text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,g=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),x=r||n||i,C=x&&(r?document.documentMode||6:+(i||n)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),l=!i&&/Chrome\//.test(e),v=/Opera\//.test(e),a=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),u=/PhantomJS/.test(e),c=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),h=/Android/.test(e),f=c||h||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),w=c||/Mac/.test(t),d=/\bCrOS\b/.test(e),p=/win/i.test(t),m=v&&e.match(/Version\/(\d*\.\d*)/);m&&(m=Number(m[1])),m&&15<=m&&(b=!(v=!1));var y=w&&(o||v&&(null==m||m<12.11)),S=g||x&&9<=C;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function A(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function O(e,t,r,n){var i=A(e,t,r,n);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function W(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function H(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}k=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function I(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function z(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||t<=s)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}c?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:x&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}R.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var G=30,U={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},K={origin:"*mouse"},j={origin:"+move"};function X(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||t<=i+l)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,t<=(i+=r-i%r))return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push($(Y)+" ");return Y[e]}function $(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(){}function Q(e,t){var r;return r=Object.create?Object.create(e):(Z.prototype=e,new Z),t&&I(t,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||""<e&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 ie(e){return 768<=e.charCodeAt(0)&&ne.test(e)}function oe(e,t,r){for(;(r<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function le(e,t,r){for(var n=r<t?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var se=null;function ae(e,t,r){var n;se=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:se=i)}return null!=n?n:se}var ue=function(){var I="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var R=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,B=/[stwN]/,G=/[LRr]/,U=/[Lb1n]/,V=/[1n]/;function K(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!R.test(e))return!1;for(var n,i=e.length,o=[],l=0;l<i;++l)o.push((n=e.charCodeAt(l))<=247?I.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?z.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L");for(var s=0,a=r;s<i;++s){var u=o[s];"m"==u?o[s]=a:a=u}for(var c=0,h=r;c<i;++c){var f=o[c];"1"==f&&"r"==h?o[c]="n":G.test(f)&&"r"==(h=f)&&(o[c]="R")}for(var d=1,p=o[0];d<i-1;++d){var g=o[d];"+"==g&&"1"==p&&"1"==o[d+1]?o[d]="1":","!=g||p!=o[d+1]||"1"!=p&&"n"!=p||(o[d]=p),p=g}for(var v=0;v<i;++v){var m=o[v];if(","==m)o[v]="N";else if("%"==m){var y=void 0;for(y=v+1;y<i&&"%"==o[y];++y);for(var b=v&&"!"==o[v-1]||y<i&&"1"==o[y]?"1":"N",w=v;w<y;++w)o[w]=b;v=y-1}}for(var x=0,C=r;x<i;++x){var S=o[x];"L"==C&&"1"==S?o[x]="L":G.test(S)&&(C=S)}for(var L=0;L<i;++L)if(B.test(o[L])){var k=void 0;for(k=L+1;k<i&&B.test(o[k]);++k);for(var T="L"==(L?o[L-1]:r),M=T==("L"==(k<i?o[k]:r))?T?"L":"R":r,N=L;N<k;++N)o[N]=M;L=k-1}for(var O,A=[],D=0;D<i;)if(U.test(o[D])){var W=D;for(++D;D<i&&U.test(o[D]);++D);A.push(new K(0,W,D))}else{var H=D,F=A.length;for(++D;D<i&&"L"!=o[D];++D);for(var P=H;P<D;)if(V.test(o[P])){H<P&&A.splice(F,0,new K(1,H,P));var E=P;for(++P;P<D&&V.test(o[P]);++P);A.splice(F,0,new K(2,E,P)),H=P}else++P;H<D&&A.splice(F,0,new K(1,H,D))}return"ltr"==t&&(1==A[0].level&&(O=e.match(/^\s+/))&&(A[0].from=O[0].length,A.unshift(new K(0,0,O[0].length))),1==$(A).level&&(O=e.match(/\s+$/))&&($(A).to-=O[0].length,A.push(new K(0,i-O[0].length,i)))),"rtl"==t?A.reverse():A}}();function ce(e,t){var r=e.order;return null==r&&(r=e.order=ue(e.text,t)),r}var he=[],fe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||he).concat(r)}};function de(e,t){return e._handlers&&e._handlers[t]||he}function pe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=B(i,r);-1<o&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var r=de(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function ve(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,r||t.type,e,t),Ce(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==B(r,t[n])&&r.push(t[n])}function ye(e,t){return 0<de(e,t).length}function be(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){we(e),xe(e)}function Le(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),w&&e.ctrlKey&&1==t&&(t=3),t}var Te,Me,Ne=function(){if(x&&C<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Te){var t=A("span","​");N(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&2<t.offsetHeight&&!(x&&C<8))}var r=Te?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ae(e){if(null!=Me)return Me;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Me=n.right-r.right<3)}var De,We=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe="oncopy"in(De=A("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Pe=null;var Ee={},Ie={};function ze(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Re(e,t){t=ze(t);var r=Ee[t.name];if(!r)return Re(e,"text/plain");var n=r(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Be={};function Ge(e,t){I(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ve(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ke(e,t,r){return!e.startState||e.startState(t,r)}var je=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function Ye(e,r,n){var i=[],o=r.line;return e.iter(r.line,n.line+1,function(e){var t=e.text;o==n.line&&(t=t.slice(0,n.ch)),o==r.line&&(t=t.slice(r.ch)),i.push(t),++o}),i}function _e(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function $e(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function qe(e){if(null==e.parent)return null;for(var t=e.parent,r=B(t.lines,e),n=t.parent;n;n=(t=n).parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Ze(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return r+l}function Qe(e,t){return t>=e.first&&t<e.first+e.size}function Je(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,r){if(void 0===r&&(r=null),!(this instanceof et))return new et(e,t,r);this.line=e,this.ch=t,this.sticky=r}function tt(e,t){return e.line-t.line||e.ch-t.ch}function rt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function nt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function ot(e,t){return tt(e,t)<0?e:t}function lt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var r,n,i,o=e.first+e.size-1;return t.line>o?et(o,Xe(e,o).text.length):(n=Xe(e,(r=t).line).text.length,null==(i=r.ch)||n<i?et(r.line,n):i<0?et(r.line,0):r)}function at(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=st(e,t[n]);return r}je.prototype.eol=function(){return this.pos>=this.string.length},je.prototype.sol=function(){return this.pos==this.lineStart},je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},je.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},je.prototype.skipToEnd=function(){this.pos=this.string.length},je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},je.prototype.backUp=function(e){this.pos-=e},je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},je.prototype.indentation=function(){return z(this.string,null,this.tabSize)-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},je.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&0<n.index?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},je.prototype.current=function(){return this.string.slice(this.start,this.pos)},je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ht(t,r,n,e){var a=[t.state.modeGen],i={};wt(t,r.text,t.doc.mode,n,function(e,t){return a.push(e,t)},i,e);for(var u=n.state,o=function(e){n.baseTokens=a;var o=t.state.overlays[e],l=1,s=0;n.state=!0,wt(t,r.text,o.mode,n,function(e,t){for(var r=l;s<e;){var n=a[l];e<n&&a.splice(l,1,e,a[l+1],n),l+=2,s=Math.min(e,n)}if(t)if(o.opaque)a.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;r<l;r+=2){var i=a[r+1];a[r+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=u,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)o(l);return{styles:a,classes:i.bgClass||i.textClass?i:null}}function ft(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=dt(e,qe(t)),i=t.text.length>e.options.maxHighlightLength&&Ue(e.doc.mode,n.state),o=ht(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function dt(r,n,e){var t=r.doc,i=r.display;if(!t.mode.startState)return new ct(t,!0,n);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;l<s;--s){if(s<=o.first)return o.first;var a=Xe(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return s;var c=z(a.text,null,e.options.tabSize);(null==i||c<n)&&(i=s-1,n=c)}return i}(r,n,e),l=o>t.first&&Xe(t,o-1).stateAfter,s=l?ct.fromSaved(t,l,o):new ct(t,Ke(t.mode),o);return t.iter(o,n,function(e){pt(r,e.text,s);var t=s.line;e.stateAfter=t==n-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?s.save():null,s.nextLine()}),e&&(t.modeFrontier=s.line),s}function pt(e,t,r,n){var i=e.doc.mode,o=new je(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&gt(i,r.state);!o.eol();)vt(i,o,r.state),o.start=o.pos}function gt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ve(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function vt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Ve(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},ct.fromSaved=function(e,t,r){return t instanceof ut?new ct(e,Ue(e.mode,t.state),r,t.lookAhead):new ct(e,Ue(e.mode,t),r)},ct.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new ut(t,this.maxLookAhead):t};var mt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function yt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=Xe(l,(t=st(l,t)).line),u=dt(e,t.line,r),c=new je(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=vt(s,c,u.state),n&&o.push(new mt(c,i,Ue(l.mode,u.state)));return n?o:new mt(c,i,u.state)}function bt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function wt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new je(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&bt(gt(r,n.state),o);!h.eol();){if(a=h.pos>e.options.maxHighlightLength?(s=!1,l&&pt(e,t,n,h.pos),h.pos=t.length,null):bt(vt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=a}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}var xt=!1,Ct=!1;function St(e,t,r){this.marker=e,this.from=t,this.to=r}function Lt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function kt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Tt(e,t){if(t.full)return null;var r=Qe(e,t.from.line)&&Xe(e,t.from.line).markedSpans,n=Qe(e,t.to.line)&&Xe(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==tt(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new St(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new St(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,l),u=1==t.text.length,c=$(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=Lt(a,f.marker);d?u&&(f.to=null==d.to?null:d.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=c),null==g.from)Lt(s,g.marker)||(g.from=c,u&&(s||(s=[])).push(g));else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=Mt(s)),a&&a!=s&&(a=Mt(a));var v=[s];if(!u){var m,y=t.text.length-2;if(0<y&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new St(s[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(a)}return v}function Mt(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Nt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Ot(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function Dt(e){return e.inclusiveRight?1:0}function Wt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=tt(n.from,i.from)||At(e)-At(t);if(o)return-o;var l=tt(n.to,i.to)||Dt(e)-Dt(t);return l||t.id-e.id}function Ht(e,t){var r,n=Ct&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Wt(r,i.marker)<0)&&(r=i.marker);return r}function Ft(e){return Ht(e,!0)}function Pt(e){return Ht(e,!1)}function Et(e,t){var r,n=Ct&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Wt(r,o.marker)<0)&&(r=o.marker)}return r}function It(e,t,r,n,i){var o=Xe(e,t),l=Ct&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=tt(u.from,r)||At(a.marker)-At(i),h=tt(u.to,n)||Dt(a.marker)-Dt(i);if(!(0<=c&&h<=0||c<=0&&0<=h)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?0<=tt(u.to,r):0<tt(u.to,r))||0<=c&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,n)<=0:tt(u.from,n)<0)))return!0}}}function zt(e){for(var t;t=Ft(e);)e=t.find(-1,!0).line;return e}function Rt(e,t){var r=Xe(e,t),n=zt(r);return r==n?t:qe(n)}function Bt(e,t){if(t>e.lastLine())return t;var r,n=Xe(e,t);if(!Gt(e,n))return t;for(;r=Pt(n);)n=r.find(1,!0).line;return qe(n)+1}function Gt(e,t){var r=Ct&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Ut(e,t,n))return!0}}function Ut(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Ut(e,n.line,Lt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ut(e,t,i))return!0}function Vt(e){for(var t=0,r=(e=zt(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function Kt(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Ft(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Pt(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function jt(e){var r=e.display,t=e.doc;r.maxLine=Xe(t,t.first),r.maxLineLength=Kt(r.maxLine),r.maxLineChanged=!0,t.iter(function(e){var t=Kt(e);t>r.maxLineLength&&(r.maxLineLength=t,r.maxLine=e)})}var Xt=function(e,t,r){this.text=e,Ot(this,t),this.height=r?r(this):1};Xt.prototype.lineNo=function(){return qe(this)},be(Xt);var Yt={},_t={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?_t:Yt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function qt(e,t){var r=O("span",null,null,b?"padding-right: .1px":null),n={pre:O("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=Qt,Ae(e.display.measure)&&(l=ce(o,e.doc.direction))&&(n.addToken=Jt(n.addToken,l)),n.map=[],tr(o,n,ft(e,o,t!=e.display.externalMeasured&&qe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(b){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Zt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,r,n,i,o,l){if(t){var s,a=e.splitSpaces?function(e,t){if(1<e.length&&!/  /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,u=e.cm.state.specialChars,c=!1;if(u.test(t)){s=document.createDocumentFragment();for(var h=0;;){u.lastIndex=h;var f=u.exec(t),d=f?f.index-h:t.length-h;if(d){var p=document.createTextNode(a.slice(h,h+d));x&&C<9?s.appendChild(A("span",[p])):s.appendChild(p),e.map.push(e.pos,e.pos+d,p),e.col+=d,e.pos+=d}if(!f)break;h+=d+1;var g=void 0;if("\t"==f[0]){var v=e.cm.options.tabSize,m=v-e.col%v;(g=s.appendChild(A("span",_(m),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=m}else"\r"==f[0]||"\n"==f[0]?(g=s.appendChild(A("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]):((g=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),x&&C<9?s.appendChild(A("span",[g])):s.appendChild(g)),e.col+=1;e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,s=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,s),x&&C<9&&(c=!0),e.pos+=t.length;if(e.trailingSpace=32==a.charCodeAt(t.length-1),r||n||i||c||o){var y=r||"";n&&(y+=n),i&&(y+=i);var b=A("span",[s],y,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&b.setAttribute(w,l[w]);return e.content.appendChild(b)}e.content.appendChild(s)}}function Jt(h,f){return function(e,t,r,n,i,o,l){r=r?r+" cm-force-border":"cm-force-border";for(var s=e.pos,a=s+t.length;;){for(var u=void 0,c=0;c<f.length&&!((u=f[c]).to>s&&u.from<=s);c++);if(u.to>=a)return h(e,t,r,n,i,o,l);h(e,t.slice(0,u.to-s),r,n,null,o,l),n=null,t=t.slice(u.to-s),s=u.to}}}function er(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=s="",h=f=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;if("bookmark"==C.type&&x.from==p&&C.widgetNode)y.push(C);else if(x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||Wt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var L=0;L<b.length;L+=2)b[L+1]==m&&(u+=" "+b[L]);if(!h||h.from==p)for(var k=0;k<y.length;++k)er(t,0,y[k]);if(h&&(h.from||0)==p){if(er(t,(null==h.to?d+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(d<=p)break;for(var T=Math.min(d,m);;){if(v){var M=p+v.length;if(!h){var N=T<M?v.slice(0,T-p):v;t.addToken(t,N,l?l+a:a,c,p+N.length==m?u:"",s,f)}if(T<=M){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=$t(r[g++],t.cm.options)}}else for(var O=1;O<r.length;O+=2)t.addToken(t,i.slice(o,o=r[O]),$t(r[O+1],t.cm.options))}function rr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Pt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?qe($(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Gt(e,t)}function nr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new rr(e.doc,Xe(e.doc,o),o);n=o+l.size,i.push(l)}return i}var ir=null;var or=null;function lr(e,t){var r=de(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);ir?n=ir.delayedCallbacks:or?n=or:(n=or=[],setTimeout(sr,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},l=0;l<r.length;++l)o(l)}}function sr(){var e=or;or=null;for(var t=0;t<e.length;++t)e[t]()}function ar(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?hr(e,t):"gutter"==o?dr(e,t,r,n):"class"==o?fr(e,t):"widget"==o&&pr(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),x&&C<8&&(e.node.style.zIndex=2)),e.node}function cr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):qt(e,t)}function hr(e,t){var r=t.text.className,n=cr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,fr(e,t)):r&&(t.text.className=r)}function fr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(A("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function dr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ur(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=ur(t),s=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(A("div",Je(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.display.gutterSpecs.length;++a){var u=e.display.gutterSpecs[a].className,c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(A("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function pr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);gr(e,t,r)}function gr(e,t,r){if(vr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)vr(e,t.rest[n],t,r,!1)}function vr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=A("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),mr(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),lr(a,"redraw")}}function mr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function yr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,A("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function br(e,t){for(var r=Le(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function wr(e){return e.lineSpace.offsetTop}function xr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,A("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Sr(e){return G-e.display.nativeBarWidth}function Lr(e){return e.display.scroller.clientWidth-Sr(e)-e.display.barWidth}function kr(e){return e.display.scroller.clientHeight-Sr(e)-e.display.barHeight}function Tr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(qe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Mr(e,t,r,n){return Ar(e,Or(e,t),r,n)}function Nr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ln(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Or(e,t){var r=qe(t),n=Nr(e,r);n&&!n.text?n=null:n&&n.changes&&(ar(e,n,r,en(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=qe(t=zt(t)),n=e.display.externalMeasured=new rr(e.doc,t,r);n.lineN=r;var i=n.built=qt(e,n);return n.text=i.pre,N(e.display.lineMeasure,i.pre),n}(e,t));var i=Tr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ar(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&Lr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];2<Math.abs(a.bottom-u.bottom)&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Hr(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&ie(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+a));)++a;if((i=x&&C<9&&0==s&&a==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Fr(k(l,s,a).getClientRects(),n)).left||i.right||0==s)break;a=s,s-=1,u="right"}x&&C<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Pe)return Pe;var t=N(e,A("span","x")),r=t.getBoundingClientRect(),n=k(t,0,1).getBoundingClientRect();return Pe=1<Math.abs(r.left-n.left)}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var h;0<s&&(u=n="right"),i=e.options.lineWrapping&&1<(h=l.getClientRects()).length?h["right"==n?h.length-1:0]:l.getBoundingClientRect()}if(x&&C<9&&!s&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+Jr(e.display),top:f.top,bottom:f.bottom}:Wr}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m<v.length-1&&!(g<v[m]);m++);var y=m?v[m-1]:0,b=v[m],w={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:b};i.left||i.right||(w.bogus=!0);e.options.singleCursorHeightPerLine||(w.rtop=d,w.rbottom=p);return w}(e,t,r,n)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Dr,Wr={left:0,right:0,top:0,bottom:0};function Hr(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=(i=t-s)+1:(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,a<=t&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Fr(e,t){var r=Wr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;0<=i&&(r=e[i]).left==r.right;i--);return r}function Pr(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 Er(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Pr(e.display.view[t])}function Ir(e){Er(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function zr(){return l&&h?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Rr(){return l&&h?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Br(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=yr(e.widgets[r]));return t}function Gr(e,t,r,n,i){if(!i){var o=Br(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=Vt(t);if("local"==n?l+=wr(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:Rr());var a=s.left+("window"==n?0:zr());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function Ur(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=zr(),i-=Rr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function Vr(e,t,r,n,i){return n||(n=Xe(e.doc,t.line)),Gr(e,n,Mr(e,n,t.ch,i),r)}function Kr(n,e,i,o,l,s){function a(e,t){var r=Ar(n,l,e,t?"right":"left",s);return t?r.left=r.right:r.right=r.left,Gr(n,o,r,i)}o=o||Xe(n.doc,e.line),l||(l=Or(n,o));var u=ce(o,n.doc.direction),t=e.ch,r=e.sticky;if(t>=o.text.length?(t=o.text.length,r="before"):t<=0&&(t=0,r="after"),!u)return a("before"==r?t-1:t,"before"==r);function c(e,t,r){return a(r?e-1:e,1==u[t].level!=r)}var h=ae(u,t,r),f=se,d=c(t,h,"before"==r);return null!=f&&(d.other=c(t,f,"before"!=r)),d}function jr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=Jr(e.display)*t.ch);var n=Xe(e.doc,t.line),i=Vt(n)+wr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Xr(e,t,r,n,i){var o=et(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Yr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Xr(n.first,0,null,!0,-1);var i=Ze(n,r),o=n.first+n.size-1;if(o<i)return Xr(n.first+n.size-1,Xe(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=Xe(n,i);;){var s=Zr(e,l,i,t,r),a=Et(l,s.ch+(0<s.xRel?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=Xe(n,i=u.line)}}function _r(t,e,r,n){n-=Br(e);var i=e.text.length,o=le(function(e){return Ar(t,r,e-1).bottom<=n},i,0);return{begin:o,end:i=le(function(e){return Ar(t,r,e).top>n},o,i)}}function $r(e,t,r,n){return r||(r=Or(e,t)),_r(e,t,r,Gr(e,t,Ar(e,r,n),"line").top)}function qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Zr(r,e,t,n,i){i-=Vt(e);var o=Or(r,e),l=Br(e),s=0,a=e.text.length,u=!0,c=ce(e,r.doc.direction);if(c){var h=(r.options.lineWrapping?function(e,t,r,n,i,o,l){var s=_r(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f<i.length;f++){var d=i[f];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=Ar(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||v<h)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.from<a&&(c={from:a,to:c.to,level:c.level});c.to>u&&(c={from:c.from,to:u,level:c.level});return c}:function(n,i,o,l,s,a,u){var e=le(function(e){var t=s[e],r=1!=t.level;return qr(Kr(n,et(o,r?t.to:t.from,r?"before":"after"),"line",i,l),a,u,!0)},0,s.length-1),t=s[e];if(0<e){var r=1!=t.level,c=Kr(n,et(o,r?t.from:t.to,r?"after":"before"),"line",i,l);qr(c,a,u,!0)&&c.top>u&&(t=s[e-1])}return t})(r,e,t,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(e){var t=Ar(r,o,e);return t.top+=l,t.bottom+=l,!!qr(t,n,i,!1)&&(t.top<=i&&t.left<=n&&(p=e,g=t),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",f=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==e.text.length?"before":Ar(r,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=Kr(r,et(t,v,d),"line",e,o);f=w.left,m=i<w.top||i>=w.bottom}return Xr(t,v=oe(e.text,v,1),d,m,n-f)}function Qr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Dr){Dr=A("pre");for(var t=0;t<49;++t)Dr.appendChild(document.createTextNode("x")),Dr.appendChild(A("br"));Dr.appendChild(document.createTextNode("x"))}N(e.measure,Dr);var r=Dr.offsetHeight/50;return 3<r&&(e.cachedTextHeight=r),M(e.measure),r||1}function Jr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),r=A("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function en(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:tn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function tn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function rn(n){var i=Qr(n.display),o=n.options.lineWrapping,l=o&&Math.max(5,n.display.scroller.clientWidth/Jr(n.display)-3);return function(e){if(Gt(n.doc,e))return 0;var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;r++)e.widgets[r].height&&(t+=e.widgets[r].height);return o?t+(Math.ceil(e.text.length/l)||1)*i:t+i}}function nn(e){var t=e.doc,r=rn(e);t.iter(function(e){var t=r(e);t!=e.height&&$e(e,t)})}function on(e,t,r,n){var i=e.display;if(!r&&"true"==Le(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=Yr(e,o,l);if(n&&1==u.xRel&&(a=Xe(e.doc,u.line).text).length==u.ch){var c=z(a,a.length,e.options.tabSize)-a.length;u=et(u.line,Math.max(0,Math.round((o-Cr(e.display).left)/Jr(e.display))-c))}return u}function ln(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function sn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&Rt(e.doc,t)<i.viewTo&&un(e);else if(r<=i.viewFrom)Ct&&Bt(e.doc,r+n)>i.viewFrom?un(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)un(e);else if(t<=i.viewFrom){var o=cn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):un(e)}else if(r>=i.viewTo){var l=cn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):un(e)}else{var s=cn(e,t,t,-1),a=cn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(nr(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):un(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function an(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[ln(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function un(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function cn(e,t,r,n){var i,o=ln(e,t),l=e.display.view;if(!Ct||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(0<n){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Rt(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function hn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function fn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function dn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&pn(e,s.head,i),a||vn(e,s,o)}}return n}function pn(e,t,r){var n=Kr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function gn(e,t){return e.top-t.top||e.left-t.left}function vn(l,e,t){var r=l.display,n=l.doc,i=document.createDocumentFragment(),o=Cr(l.display),T=o.left,M=Math.max(r.sizerWidth,Lr(l)-r.sizer.offsetLeft)-o.right,N="ltr"==n.direction;function O(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==r?M-e:r)+"px;\n                             height: "+(n-t)+"px"))}function s(r,y,b){var w,x,o=Xe(n,r),C=o.text.length;function S(e,t){return Vr(l,et(r,e),"div",o,t)}function L(e,t,r){var n=$r(l,o,null,e),i="ltr"==t==("after"==r)?"left":"right";return S("after"==r?n.begin:n.end-(/\s/.test(o.text.charAt(n.end-1))?2:1),i)[i]}var k=ce(o,n.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(k,y||0,null==b?C:b,function(e,t,r,n){var i="ltr"==r,o=S(e,i?"left":"right"),l=S(t-1,i?"right":"left"),s=null==y&&0==e,a=null==b&&t==C,u=0==n,c=!k||n==k.length-1;if(l.top-o.top<=3){var h=(N?a:s)&&c,f=(N?s:a)&&u?T:(i?o:l).left,d=h?M:(i?l:o).right;O(f,o.top,d-f,o.bottom)}else{var p,g,v,m;m=i?(p=N&&s&&u?T:o.left,g=N?M:L(e,r,"before"),v=N?T:L(t,r,"after"),N&&a&&c?M:l.right):(p=N?L(e,r,"before"):T,g=!N&&s&&u?M:o.right,v=!N&&a&&c?T:l.left,N?L(t,r,"after"):M),O(p,o.top,g-p,o.bottom),o.bottom<l.top&&O(T,o.bottom,null,l.top),O(v,l.top,m-v,l.bottom)}(!w||gn(o,w)<0)&&(w=o),gn(l,w)<0&&(w=l),(!x||gn(o,x)<0)&&(x=o),gn(l,x)<0&&(x=l)}),{start:w,end:x}}var a=e.from(),u=e.to();if(a.line==u.line)s(a.line,a.ch,u.ch);else{var c=Xe(n,a.line),h=Xe(n,u.line),f=zt(c)==zt(h),d=s(a.line,a.ch,f?c.text.length+1:null).end,p=s(u.line,f?0:null,u.ch).start;f&&(d.top<p.top-2?(O(d.right,d.top,null,d.bottom),O(T,p.top,p.left,p.bottom)):O(d.right,d.top,p.left-d.right,d.bottom)),d.bottom<p.top&&O(T,d.bottom,null,p.top)}t.appendChild(i)}function mn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function yn(e){e.state.focused||(e.display.input.focus(),wn(e))}function bn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,xn(e))},100)}function wn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),mn(e))}function xn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(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 Cn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,l=void 0,s=0;if(!i.hidden){if(x&&C<8){var a=i.node.offsetTop+i.node.offsetHeight;l=a-r,r=a}else{var u=i.node.getBoundingClientRect();l=u.bottom-u.top,!o&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var c=i.line.height-l;if((.005<c||c<-.005)&&($e(i.line,l),Sn(i.line),i.rest))for(var h=0;h<i.rest.length;h++)Sn(i.rest[h]);if(s>e.display.sizerWidth){var f=Math.ceil(s/Jr(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Sn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Ln(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=Ze(t,n),l=Ze(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?l=Ze(t,Vt(Xe(t,o=s))+e.wrapper.clientHeight):Math.min(a,t.lastLine())>=l&&(o=Ze(t,Vt(Xe(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function kn(e,t){var r=e.display,n=Qr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=kr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+xr(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Lr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.left<h?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>f+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function Tn(e,t){null!=t&&(On(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mn(e){On(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nn(e,t,r){null==t&&null==r||On(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function On(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,An(e,jr(e,t.from),jr(e,t.to),t.margin))}function An(e,t,r,n){var i=kn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Nn(e,i.scrollLeft,i.scrollTop)}function Dn(e,t){Math.abs(e.doc.scrollTop-t)<2||(g||ni(e,{top:t}),Wn(e,t,!0),g&&ni(e),Qn(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Hn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,li(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+xr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Sr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Pn=function(e,t,r){this.cm=r;var n=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),fe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&C<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Pn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Pn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Pn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Pn.prototype.zeroWidthHack=function(){var e=w&&!s?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Pn.prototype.enableZeroWidthBar=function(r,n,i){r.style.pointerEvents="auto",n.set(1e3,function e(){var t=r.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=r?r.style.pointerEvents="none":n.set(1e3,e)})},Pn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var En=function(){};function In(e,t){t||(t=Fn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Cn(e),zn(e,Fn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}En.prototype.update=function(){return{bottom:0,right:0}},En.prototype.setScrollLeft=function(){},En.prototype.setScrollTop=function(){},En.prototype.clear=function(){};var Rn={native:Pn,null:En};function Bn(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&T(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Rn[r.options.scrollbarStyle](function(e){r.display.wrapper.insertBefore(e,r.display.scrollbarFiller),fe(e,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?Hn(r,e):Dn(r,e)},r),r.display.scrollbars.addClass&&H(r.display.wrapper,r.display.scrollbars.addClass)}var Gn=0;function Un(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gn},t=e.curOp,ir?ir.ops.push(t):t.ownsGroup=ir={ops:[t],delayedCallbacks:[]}}function Vn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{ir=null,t(r)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Kn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&ti(i.cm,i.update);var i;for(var o=0;o<t.length;o++)jn(t[o]);for(var l=0;l<t.length;l++)Xn(t[l]);for(var s=0;s<t.length;s++)Yn(t[s])}(e)})}function Kn(e){var t,r,n=e.cm,i=n.display;!(r=(t=n).display).scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Sr(t)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Sr(t)+"px",r.scrollbarsClipped=!0),e.updateMaxLine&&jt(n),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new ei(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Cn(t),e.barMeasure=Fn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Mr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Sr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Lr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Xn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Hn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==W();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&In(t,e.barMeasure),e.updatedDisplay&&oi(t,e.barMeasure),e.selectionChanged&&mn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&yn(e.cm)}function Yn(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&ri(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Hn(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!u){var o=A("div","​",null,"position: absolute;\n                         top: "+(t.top-r.viewOffset-wr(e.display))+"px;\n                         height: "+(t.bottom-t.top+Sr(e)+r.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Kr(e,t),a=r&&r!=t?Kr(e,r):s,u=kn(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Dn(e,u.scrollTop),1<Math.abs(e.doc.scrollTop-c)&&(l=!0)),null!=u.scrollLeft&&(Hn(e,u.scrollLeft),1<Math.abs(e.doc.scrollLeft-h)&&(l=!0)),!l)break}return i}(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||ge(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ge(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _n(e,t){if(e.curOp)return t();Un(e);try{return t()}finally{Vn(e)}}function $n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Un(e);try{return t.apply(e,arguments)}finally{Vn(e)}}}function qn(e){return function(){if(this.curOp)return e.apply(this,arguments);Un(this);try{return e.apply(this,arguments)}finally{Vn(this)}}}function Zn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Un(e);try{return t.apply(this,arguments)}finally{Vn(e)}}}function Qn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(Jn,e))}function Jn(a){var u=a.doc;if(!(u.highlightFrontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,h=dt(a,u.highlightFrontier),f=[];u.iter(h.line,Math.min(u.first+u.size,a.display.viewTo+500),function(e){if(h.line>=a.display.viewFrom){var t=e.styles,r=e.text.length>a.options.maxHighlightLength?Ue(u.mode,h.state):null,n=ht(a,e,h,!0);r&&(h.state=r),e.styles=n.styles;var i=e.styleClasses,o=n.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var l=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),s=0;!l&&s<t.length;++s)l=t[s]!=e.styles[s];l&&f.push(h.line),e.stateAfter=h.save(),h.nextLine()}else e.text.length<=a.options.maxHighlightLength&&pt(a,e.text,h),e.stateAfter=h.line%5==0?h.save():null,h.nextLine();if(+new Date>c)return Qn(a,a.options.workDelay),!0}),u.highlightFrontier=h.line,u.modeFrontier=Math.max(u.modeFrontier,h.line),f.length&&_n(a,function(){for(var e=0;e<f.length;e++)an(a,f[e],"text")})}}var ei=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ln(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Lr(e),this.force=r,this.dims=en(e),this.events=[]};function ti(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return un(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==hn(e))return!1;si(e)&&(un(e),t.dims=en(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Ct&&(o=Rt(e.doc,o),l=Bt(e.doc,l));var s,a,u,c,h=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;a=o,u=l,0==(c=(s=e).display).view.length||a>=c.viewTo||u<=c.viewFrom?(c.view=nr(s,a,u),c.viewFrom=a):(c.viewFrom>a?c.view=nr(s,a,c.viewFrom).concat(c.view):c.viewFrom<a&&(c.view=c.view.slice(ln(s,a))),c.viewFrom=a,c.viewTo<u?c.view=c.view.concat(nr(s,c.viewTo,u)):c.viewTo>u&&(c.view=c.view.slice(0,ln(s,u)))),c.viewTo=u,r.viewOffset=Vt(Xe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var f=hn(e);if(!h&&0==f&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var d=function(e){if(e.hasFocus())return null;var t=W();if(!t||!D(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&D(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return 4<f&&(r.lineDiv.style.display="none"),function(r,e,t){var n=r.display,i=r.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(e){var t=e.nextSibling;return b&&w&&r.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var a=n.view,u=n.viewFrom,c=0;c<a.length;c++){var h=a[c];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;l!=h.node;)l=s(l);var f=i&&null!=e&&e<=u&&h.lineNumber;h.changes&&(-1<B(h.changes,"gutter")&&(f=!1),ar(r,h,u,t)),f&&(M(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(Je(r.options,u)))),l=h.node.nextSibling}else{var d=(v=u,m=t,void 0,y=cr(p=r,g=h),g.text=g.node=y.pre,y.bgClass&&(g.bgClass=y.bgClass),y.textClass&&(g.textClass=y.textClass),fr(p,g),dr(p,g,v,m),gr(p,g,m),g.node);o.insertBefore(d,l)}u+=h.size}var p,g,v,m,y;for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),4<f&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=W()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(d),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,h&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Qn(e,400)),!(r.updateLineNumbers=null)}function ri(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Lr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+xr(e.display)-kr(e),r.top)}),t.visible=Ln(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ti(e,t);n=!1){Cn(e);var i=Fn(e);fn(e),In(e,i),oi(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 ni(e,t){var r=new ei(e,t);if(ti(e,r)){Cn(e),ri(e,r);var n=Fn(e);fn(e),In(e,n),oi(e,n),r.finish()}}function ii(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function oi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sr(e)+"px"}function li(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=tn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function si(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Je(e.options,t.first+t.size-1),n=e.display;if(r.length==n.lineNumChars)return!1;var i=n.measure.appendChild(A("div",[A("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ii(e.display),!0}function ai(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:l})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function ui(e){var t=e.gutters,r=e.gutterSpecs;M(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,l=i.style,s=t.appendChild(A("div",null,"CodeMirror-gutter "+o));l&&(s.style.cssText=l),"CodeMirror-linenumbers"==o&&((e.lineGutter=s).style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ii(e)}function ci(e){ui(e.display),sn(e),li(e)}function hi(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=O("div",null,"CodeMirror-code"),i.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=A("div",null,"CodeMirror-cursors"),i.measure=A("div",null,"CodeMirror-measure"),i.lineMeasure=A("div",null,"CodeMirror-measure"),i.lineSpace=O("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=O("div",[i.lineSpace],"CodeMirror-lines");i.mover=A("div",[o],null,"position: relative"),i.sizer=A("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=A("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=A("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=A("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=A("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),x&&C<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),b||g&&f||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ai(n.gutters,n.lineNumbers),ui(i),r.init(i)}ei.prototype.signal=function(e,t){ye(e,t)&&this.events.push(arguments)},ei.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var fi=0,di=null;function pi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function gi(e){var t=pi(e);return t.x*=di,t.y*=di,t}function vi(e,t){var r=pi(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&w&&b)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var h=0;h<c.length;h++)if(c[h].node==u){e.display.currentWheelTarget=u;break e}if(n&&!g&&!v&&null!=di)return i&&a&&Dn(e,Math.max(0,l.scrollTop+i*di)),Hn(e,Math.max(0,l.scrollLeft+n*di)),(!i||i&&a)&&we(t),void(o.wheelStartX=null);if(i&&null!=di){var f=i*di,d=e.doc.scrollTop,p=d+o.wrapper.clientHeight;f<0?d=Math.max(0,d+f-50):p=Math.min(e.doc.height,p+f+50),ni(e,{top:d,bottom:p})}fi<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}x?di=-.53:g?di=15:l?di=-.7:a&&(di=-1/3);var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!rt(r.anchor,n.anchor)||!rt(r.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new yi(nt(this.ranges[t].anchor),nt(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(0<=tt(t,n.from())&&tt(e,n.to())<=0)return r}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(e,t){return tt(e.from(),t.from())}),r=B(t,i);for(var o=1;o<t.length;o++){var l=t[o],s=t[o-1],a=tt(s.to(),l.from());if(n&&!l.empty()?0<a:0<=a){var u=ot(s.from(),l.from()),c=it(s.to(),l.to()),h=s.empty()?l.from()==l.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new yi(h?c:u,h?u:c))}}return new mi(t,r)}function wi(e,t){return new mi([new yi(e,t||e)],0)}function xi(e){return e.text?et(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return xi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=xi(t).ch-t.to.ch),et(r,n)}function Si(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new yi(Ci(i.anchor,t),Ci(i.head,t)))}return bi(e.cm,r,e.sel.primIndex)}function Li(e,t,r){return e.line==t.line?et(r.line,e.ch-t.ch+r.ch):et(r.line+(e.line-t.line),e.ch)}function ki(e){e.doc.mode=Re(e.options,e.doc.modeOption),Ti(e)}function Ti(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,Qn(e,100),e.state.modeGen++,e.curOp&&sn(e)}function Mi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==$(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,n,t,i){function o(e){return t?t[e]:null}function r(e,t,r){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Nt(e),Ot(e,r);var i=n?n(e):1;i!=e.height&&$e(e,i)}(e,t,r,i),lr(e,"change",e,n)}function l(e,t){for(var r=[],n=e;n<t;++n)r.push(new Xt(u[n],o(n),i));return r}var s=n.from,a=n.to,u=n.text,c=Xe(e,s.line),h=Xe(e,a.line),f=$(u),d=o(u.length-1),p=a.line-s.line;if(n.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Mi(e,n)){var g=l(0,u.length-1);r(h,h.text,d),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==h)if(1==u.length)r(c,c.text.slice(0,s.ch)+f+c.text.slice(a.ch),d);else{var v=l(1,u.length-1);v.push(new Xt(f+c.text.slice(a.ch),d,i)),r(c,c.text.slice(0,s.ch)+u[0],o(0)),e.insert(s.line+1,v)}else if(1==u.length)r(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(a.ch),o(0)),e.remove(s.line+1,p);else{r(c,c.text.slice(0,s.ch)+u[0],o(0)),r(h,f+h.text.slice(a.ch),d);var m=l(1,u.length-1);1<p&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}lr(e,"change",e,n)}function Oi(e,s,a){!function e(t,r,n){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=r){var l=n&&o.sharedHist;a&&!l||(s(o.doc,l),e(o.doc,t,l))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");nn((e.doc=t).cm=e),ki(e),Di(e),e.options.lineWrapping||jt(e),e.options.mode=t.modeOption,sn(e)}function Di(e){("rtl"==e.doc.direction?H:T)(e.display.lineDiv,"CodeMirror-rtl")}function Wi(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 Hi(e,t){var r={from:nt(t.from),to:xi(t),text:Ye(e,t.from,t.to)};return zi(e,r,t.from.line,t.to.line+1),Oi(e,function(e){return zi(e,r,t.from.line,t.to.line+1)},!0),r}function Fi(e){for(;e.length;){if(!$(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(s=i).lastOp==n?(Fi(s.done),$(s.done)):s.done.length&&!$(s.done).ranges?$(s.done):1<s.done.length&&!s.done[s.done.length-2].ranges?(s.done.pop(),$(s.done)):void 0))l=$(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,l.to)?l.to=xi(t):o.changes.push(Hi(e,t));else{var u=$(i.done);for(u&&u.ranges||Ii(e.sel,i.done),o={changes:[Hi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||ge(e,"historyAdded")}function Ei(e,t,r,n){var i,o,l,s,a,u=e.history,c=n&&n.origin;r==u.lastSelOp||c&&u.lastSelOrigin==c&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==c||(i=e,o=c,l=$(u.done),s=t,"*"==(a=o.charAt(0))||"+"==a&&l.ranges.length==s.ranges.length&&l.somethingSelected()==s.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?u.done[u.done.length-1]=t:Ii(t,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=c,u.lastSelOp=r,n&&!1!==n.clearRedo&&Fi(u.undone)}function Ii(e,t){var r=$(t);r&&r.ranges&&r.equals(e)||t.push(e)}function zi(t,r,e,n){var i=r["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,n),function(e){e.markedSpans&&((i||(i=r["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Bi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ri(r[i]));return n}(e,t),n=Tt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function Gi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?mi.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&-1<B(t,Number(c[1]))&&($(s)[h]=u[h],delete u[h])}}}return n}function Ui(e,t,r,n){if(n){var i=e.anchor;if(r){var o=tt(t,i)<0;o!=tt(r,i)<0?(i=t,t=r):o!=tt(t,r)<0&&(t=r)}return new yi(i,t)}return new yi(r||t,t)}function Vi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_i(e,new mi([Ui(e.sel.primary(),t,r,i)],0),n)}function Ki(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ui(e.sel.ranges[o],t[o],null,i);_i(e,bi(e.cm,n,e.sel.primIndex),r)}function ji(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,_i(e,bi(e.cm,i,e.sel.primIndex),n)}function Xi(e,t,r,n){_i(e,wi(t,r),n)}function Yi(e,t,r){var n=e.history.done,i=$(n);i&&i.ranges?$i(e,n[n.length-1]=t,r):_i(e,t,r)}function _i(e,t,r){$i(e,t,r),Ei(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function $i(e,t,r){var n,i,o,l;(ye(e,"beforeSelectionChange")||e.cm&&ye(e.cm,"beforeSelectionChange"))&&(n=e,o=r,l={ranges:(i=t).ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new yi(st(n,e[t].anchor),st(n,e[t].head))},origin:o&&o.origin},ge(n,"beforeSelectionChange",n,l),n.cm&&ge(n.cm,"beforeSelectionChange",n.cm,l),t=l.ranges!=i.ranges?bi(n.cm,l.ranges,l.ranges.length-1):i),qi(e,Qi(e,t,r&&r.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||Mn(e.cm)}function qi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,me(e.cm)),lr(e,"cursorActivity",e))}function Zi(e){qi(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=eo(e,l.anchor,s&&s.anchor,r,n),u=eo(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new yi(a,u))}return i?bi(e.cm,i,t.primIndex):t}function Ji(e,t,r,n,i){var o=Xe(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(ge(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=to(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=tt(u,r))&&(n<0?c<0:0<c))return Ji(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=to(e,h,n,h.line==t.line?o:null)),h?Ji(e,h,t,n,i):null}}return t}function eo(e,t,r,n,i){var o=n||1,l=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return l||(e.cantEdit=!0,et(e.first,0))}function to(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:0<r&&t.ch==(n||Xe(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+r)}function ro(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),V)}function no(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,r,n){e&&(o.from=st(i,e)),t&&(o.to=st(i,t)),r&&(o.text=r),void 0!==n&&(o.origin=n)}),ge(i,"beforeChange",i,o),i.cm&&ge(i.cm,"beforeChange",i.cm,o),o.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function io(e,t,r){if(e.cm){if(!e.cm.curOp)return $n(e.cm,io)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ye(e,"beforeChange")||e.cm&&ye(e.cm,"beforeChange"))||(t=no(e,t,!0))){var n=xt&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=B(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(tt(u.to,s.from)<0||0<tt(u.from,s.to))){var c=[a,1],h=tt(u.from,s.from),f=tt(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(0<f||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;0<=i;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,r){if(1!=r.text.length||""!=r.text[0]||0!=tt(r.from,r.to)){var t=Si(e,r);Pi(e,r,t,e.cm?e.cm.curOp.id:NaN),ao(e,r,t,Tt(e,r));var n=[];Oi(e,function(e,t){t||-1!=B(n,e.history)||(fo(e.history,r),n.push(e.history)),ao(e,r,null,Tt(e,r))})}}function lo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var l,r=i.history,n=i.sel,s="undo"==o?r.done:r.undone,a="undo"==o?r.undone:r.done,u=0;u<s.length&&(l=s[u],e?!l.ranges||l.equals(i.sel):l.ranges);u++);if(u!=s.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(l=s.pop()).ranges){if(t)return void s.push(l);break}if(Ii(l,a),e&&!l.equals(i.sel))return void _i(i,l,{clearRedo:!1});n=l}var c=[];Ii(n,a),a.push({changes:c,generation:r.generation}),r.generation=l.generation||++r.maxGeneration;for(var h=ye(i,"beforeChange")||i.cm&&ye(i.cm,"beforeChange"),f=function(e){var r=l.changes[e];if(r.origin=o,h&&!no(i,r,!1))return s.length=0,{};c.push(Hi(i,r));var t=e?Si(i,r):$(s);ao(i,r,t,Bi(i,r)),!e&&i.cm&&i.cm.scrollIntoView({from:r.from,to:xi(r)});var n=[];Oi(i,function(e,t){t||-1!=B(n,e.history)||(fo(e.history,r),n.push(e.history)),ao(e,r,null,Bi(e,r))})},d=l.changes.length-1;0<=d;--d){var p=f(d);if(p)return p.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new mi(q(e.sel.ranges,function(e){return new yi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){sn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)an(e.cm,n,"gutter")}}function ao(e,t,r,n){if(e.cm&&!e.cm.curOp)return $n(e.cm,ao)(e,t,r,n);if(t.to.line<e.first)so(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);so(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[$(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:et(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),r||(r=Si(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=qe(zt(Xe(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0}));-1<n.sel.contains(t.from,t.to)&&me(e);Ni(n,t,r,rn(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Kt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;r<n;n--){var i=Xe(e,n).stateAfter;if(i&&(!(i instanceof ut)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),Qn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?sn(e):o.line!=l.line||1!=t.text.length||Mi(e.doc,t)?sn(e,o.line,l.line+1,u):an(e,o.line,"text");var c=ye(e,"changes"),h=ye(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&lr(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Ni(e,t,n),$i(e,r,V)}}function uo(e,t,r,n,i){var o;n||(n=r),tt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),io(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ho(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=et(u.from.line+n,u.from.ch),u.to=et(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ho(e.done,r,n,i),ho(e.undone,r,n,i)}function po(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Xe(e,lt(e,t)):i=qe(t),null==i?null:(n(o,i)&&e.cm&&an(e.cm,i,r),o)}function go(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function vo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}yi.prototype.from=function(){return ot(this.anchor,this.head)},yi.prototype.to=function(){return it(this.anchor,this.head)},yi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},go.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r,n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,(r=o).parent=null,Nt(r),lr(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},vo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(1<this.children.length||!(this.children[0]instanceof go))){var s=[];this.collapse(s),this.children=[new go(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&50<i.lines.length){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new go(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new vo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=B(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new vo(e.children);(n.parent=e).children=[n,t],e=n}t.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var mo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function yo(e,t,r){Vt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Tn(e,r)}mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=qe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=yr(this);$e(r,Math.max(0,r.height-o)),e&&(_n(e,function(){yo(e,r,-o),an(e,n,"widget")}),lr(e,"lineWidgetCleared",e,this,n))}},mo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=yr(this)-t;i&&(Gt(this.doc,n)||$e(n,n.height+i),r&&_n(r,function(){r.curOp.forceUpdate=!0,yo(r,n,i),lr(r,"lineWidgetChanged",r,e,qe(n))}))},be(mo);var bo=0,wo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};function xo(t,n,i,e,r){if(e&&e.shared)return function(e,r,n,i,o){(i=I(i)).shared=!1;var l=[xo(e,r,n,i,o)],s=l[0],a=i.widgetNode;return Oi(e,function(e){a&&(i.widgetNode=a.cloneNode(!0)),l.push(xo(e,st(e,r),st(e,n),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;s=$(l)}),new Co(l,s)}(t,n,i,e,r);if(t.cm&&!t.cm.curOp)return $n(t.cm,xo)(t,n,i,e,r);var o=new wo(t,r),l=tt(n,i);if(e&&I(e,o,!1),0<l||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(It(t,n.line,n,i,o)||n.line!=i.line&&It(t,i.line,n,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}o.addToHistory&&Pi(t,{from:n,to:i,origin:"markText"},t.sel,NaN);var s,a=n.line,u=t.cm;if(t.iter(a,i.line+1,function(e){var t,r;u&&o.collapsed&&!u.options.lineWrapping&&zt(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=n.line&&$e(e,0),t=e,r=new St(o,a==n.line?n.ch:null,a==i.line?i.ch:null),t.markedSpans=t.markedSpans?t.markedSpans.concat([r]):[r],r.marker.attachLine(t),++a}),o.collapsed&&t.iter(n.line,i.line+1,function(e){Gt(t,e)&&$e(e,0)}),o.clearOnEnter&&fe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(xt=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)sn(u,n.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=n.line;c<=i.line;c++)an(u,c,"text");o.atomic&&Zi(u.doc),lr(u,"markerAdded",u,o)}return o}wo.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&Un(t),ye(this,"clear")){var n=this.find();n&&lr(this,"clear",n.from,n.to)}for(var i=null,o=null,l=0;l<this.lines.length;++l){var s=e.lines[l],a=Lt(s.markedSpans,e);t&&!e.collapsed?an(t,qe(s),"text"):t&&(null!=a.to&&(o=qe(s)),null!=a.from&&(i=qe(s))),s.markedSpans=kt(s.markedSpans,a),null==a.from&&e.collapsed&&!Gt(e.doc,s)&&t&&$e(s,Qr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=zt(e.lines[u]),h=Kt(c);h>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&sn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Zi(t.doc)),t&&lr(t,"markerCleared",t,this,i,o),r&&Vn(t),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Lt(o.markedSpans,this);if(null!=l.from&&(r=et(t?o:qe(o),l.from),-1==e))return r;if(null!=l.to&&(n=et(t?o:qe(o),l.to),1==e))return n}return r&&{from:r,to:n}},wo.prototype.changed=function(){var o=this,l=this.find(-1,!0),s=this,a=this.doc.cm;l&&a&&_n(a,function(){var e=l.line,t=qe(l.line),r=Nr(a,t);if(r&&(Pr(r),a.curOp.selectionChanged=a.curOp.forceUpdate=!0),a.curOp.updateMaxLine=!0,!Gt(s.doc,e)&&null!=s.height){var n=s.height;s.height=null;var i=yr(s)-n;i&&$e(e,e.height+i)}lr(a,"markerChanged",a,o)})},wo.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)},wo.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)}},be(wo);var Co=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function So(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),function(e){return e.parent})}function Lo(o){for(var e=function(e){var t=o[e],r=[t.primary.doc];Oi(t.primary.doc,function(e){return r.push(e)});for(var n=0;n<t.markers.length;n++){var i=t.markers[n];-1==B(r,i.doc)&&(i.parent=null,t.markers.splice(n--,1))}},t=0;t<o.length;t++)e(t)}Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();lr(this,"clear")}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},be(Co);var ko=0,To=function(e,t,r,n,i){if(!(this instanceof To))return new To(e,t,r,n,i);null==r&&(r=0),vo.call(this,[new go([new Xt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=et(r,0);this.sel=wi(o),this.history=new Wi(null),this.id=++ko,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:o,to:o,text:e}),_i(this,wi(o),V)};To.prototype=Q(vo.prototype,{constructor:To,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=_e(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Zn(function(e){var t=et(this.first,0),r=this.first+this.size-1;io(this,{from:t,to:et(r,Xe(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Nn(this.cm,0,0),_i(this,wi(t),V)}),replaceRange:function(e,t,r,n){uo(this,e,t=st(this,t),r=r?st(this,r):t,n)},getRange:function(e,t,r){var n=Ye(this,st(this,e),st(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Qe(this,e))return Xe(this,e)},getLineNumber:function(e){return qe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Xe(this,e)),zt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Zn(function(e,t,r){Xi(this,st(this,"number"==typeof e?et(e,t||0):e),null,r)}),setSelection:Zn(function(e,t,r){Xi(this,st(this,e),st(this,t||e),r)}),extendSelection:Zn(function(e,t,r){Vi(this,st(this,e),t&&st(this,t),r)}),extendSelections:Zn(function(e,t){Ki(this,at(this,e),t)}),extendSelectionsBy:Zn(function(e,t){Ki(this,at(this,q(this.sel.ranges,e)),t)}),setSelections:Zn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new yi(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),_i(this,bi(this.cm,n,t),r)}}),addSelection:Zn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new yi(st(this,e),st(this,t||e))),_i(this,bi(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Ye(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Ye(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Zn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=et(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Li(s.from,i,o),u=Li(xi(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],h=tt(c.head,c.anchor)<0;n[l]=new yi(h?u:a,h?a:u)}else n[l]=new yi(a,a)}return new mi(n,e.sel.primIndex)}(this,n,t),a=n.length-1;0<=a;a--)io(this,n[a]);s?Yi(this,s):this.cm&&Mn(this.cm)}),undo:Zn(function(){lo(this,"undo")}),redo:Zn(function(){lo(this,"redo")}),undoSelection:Zn(function(){lo(this,"undo",!0)}),redoSelection:Zn(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Wi(this.history.maxGeneration)},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:Gi(this.history.done),undone:Gi(this.history.undone)}},setHistory:function(e){var t=this.history=new Wi(this.history.maxGeneration);t.done=Gi(e.done.slice(0),null,!0),t.undone=Gi(e.undone.slice(0),null,!0)},setGutterMarker:Zn(function(e,r,n){return po(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[r]=n)&&re(t)&&(e.gutterMarkers=null),!0})}),clearGutter:Zn(function(t){var r=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&po(r,e,"gutter",function(){return e.gutterMarkers[t]=null,re(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!Qe(this,e))return null;if(!(e=Xe(this,t=e)))return null}else if(null==(t=qe(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Zn(function(e,r,n){return po(this,e,"gutter"==r?"gutter":"class",function(e){var t="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(e[t]){if(L(n).test(e[t]))return!1;e[t]+=" "+n}else e[t]=n;return!0})}),removeLineClass:Zn(function(e,o,l){return po(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",r=e[t];if(!r)return!1;if(null==l)e[t]=null;else{var n=r.match(L(l));if(!n)return!1;var i=n.index+n[0].length;e[t]=r.slice(0,n.index)+(n.index&&i!=r.length?" ":"")+r.slice(i)||null}return!0})}),addLineWidget:Zn(function(e,t,r){return i=e,o=new mo(n=this,t,r),(l=n.cm)&&o.noHScroll&&(l.display.alignWidgets=!0),po(n,i,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==o.insertAt?t.push(o):t.splice(Math.min(t.length-1,Math.max(0,o.insertAt)),0,o),o.line=e,l&&!Gt(n,e)){var r=Vt(e)<n.scrollTop;$e(e,e.height+yr(o)),r&&Tn(l,o.height),l.curOp.forceUpdate=!0}return!0}),l&&lr(l,"lineWidgetAdded",l,o,"number"==typeof i?i:qe(i)),o;var n,i,o,l}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,st(this,e),st(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return xo(this,e=st(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=Xe(this,(e=st(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,l){i=st(this,i),o=st(this,o);var s=[],a=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;r++){var n=t[r];null!=n.to&&a==i.line&&i.ch>=n.to||null==n.from&&a!=i.line||null!=n.from&&a==o.line&&n.from>=o.ch||l&&!l(n.marker)||s.push(n.marker.parent||n.marker)}++a}),s},getAllMarks:function(){var n=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;++r)null!=t[r].from&&n.push(t[r].marker)}),n},posFromIndex:function(r){var n,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(r<t)return n=r,!0;r-=t,++i}),st(this,et(i,n))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new To(_e(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new To(_e(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(tt(o,l)){var s=xo(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,So(this)),n},unlinkDoc:function(e){if(e instanceof Cl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Lo(So(this));break}}if(e.history==this.history){var r=[e.id];Oi(e,function(e){return r.push(e.id)},!0),e.history=new Wi(null),e.history.done=Gi(this.history.done,r),e.history.undone=Gi(this.history.undone,r)}},iterLinkedDocs:function(e){Oi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):We(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Zn(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&_n(t=this.cm,function(){Di(t),sn(t)}))})}),To.prototype.eachLine=To.prototype.iter;var Mo=0;function No(e){var i=this;if(Oo(i),!ve(i,e)&&!br(i.display,e)){we(e),x&&(Mo=+new Date);var o=on(i,e,!0),t=e.dataTransfer.files;if(o&&!i.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var l=t.length,s=Array(l),a=0,r=function(e,r){if(!i.options.allowDropFileTypes||-1!=B(i.options.allowDropFileTypes,e.type)){var n=new FileReader;n.onload=$n(i,function(){var e=n.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),s[r]=e,++a==l){var t={from:o=st(i.doc,o),to:o,text:i.doc.splitLines(s.join(i.doc.lineSeparator())),origin:"paste"};io(i.doc,t),Yi(i.doc,wi(o,xi(t)))}}),n.readAsText(e)}},n=0;n<l;++n)r(t[n],n);else{if(i.state.draggingText&&-1<i.doc.sel.contains(o))return i.state.draggingText(e),void setTimeout(function(){return i.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var c;if(i.state.draggingText&&!i.state.draggingText.copy&&(c=i.listSelections()),$i(i.doc,wi(o,o)),c)for(var h=0;h<c.length;++h)uo(i.doc,"",c[h].anchor,c[h].head,"drag");i.replaceSelection(u,"around","paste"),i.display.input.focus()}}catch(e){}}}}function Oo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<e.length;n++){var i=e[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var e=0;e<r.length;e++)t(r[e])})}}var Do=!1;function Wo(){var e;Do||(fe(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(Ho)},100))}),fe(window,"blur",function(){return Ao(xn)}),Do=!0)}function Ho(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Fo={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"},Po=0;Po<10;Po++)Fo[Po+48]=Fo[Po+96]=String(Po);for(var Eo=65;Eo<=90;Eo++)Fo[Eo]=String.fromCharCode(Eo);for(var Io=1;Io<=12;Io++)Fo[Io+111]=Fo[Io+63235]="F"+Io;var zo={};function Ro(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Bo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=q(r.split(" "),Ro),o=0;o<i.length;o++){var l=void 0,s=void 0;l=o==i.length-1?(s=i.join(" "),n):(s=i.slice(0,o+1).join(" "),"...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function Go(e,t,r,n){var i=(t=jo(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Go(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Go(e,t.fallthrough[o],r,n);if(l)return l}}}function Uo(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Vo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ko(e,t){if(v&&34==e.keyCode&&e.char)return!1;var r=Fo[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Vo(r,e,t))}function jo(e){return"string"==typeof e?zo[e]:e}function Xo(t,e){for(var r=t.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=e(r[i]);n.length&&tt(o.from,$(n).to)<=0;){var l=n.pop();if(tt(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}_n(t,function(){for(var e=n.length-1;0<=e;e--)uo(t.doc,"",n[e].from,n[e].to,"+delete");Mn(t)})}function Yo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _o(e,t,r){var n=Yo(e,t.ch,r);return null==n?null:new et(t.line,n,r<0?"after":"before")}function $o(e,t,r,n,i){if(e){var o=ce(r,t.doc.direction);if(o){var l,s=i<0?$(o):o[0],a=i<0==(1==s.level)?"after":"before";if(0<s.level||"rtl"==t.doc.direction){var u=Or(t,r);l=i<0?r.text.length-1:0;var c=Ar(t,u,l).top;l=le(function(e){return Ar(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Yo(r,l,1))}else l=i<0?s.to:s.from;return new et(n,l,a)}}return new et(n,i<0?r.text.length:0,i<0?"before":"after")}zo.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"},zo.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"},zo.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"},zo.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"]},zo.default=w?zo.macDefault:zo.pcDefault;var qo={selectAll:ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(r){return Xo(r,function(e){if(e.empty()){var t=Xe(r.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<r.lastLine()?{from:e.head,to:et(e.head.line+1,0)}:{from:e.head,to:et(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return Xo(t,function(e){return{from:et(e.from().line,0),to:st(t.doc,et(e.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:et(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(r){return Xo(r,function(e){var t=r.charCoords(e.head,"div").top+5;return{from:r.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(n){return Xo(n,function(e){var t=n.charCoords(e.head,"div").top+5,r=n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.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(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return Zo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return Qo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var r=Xe(e.doc,t),n=function(e){for(var t;t=Pt(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=qe(n));return $o(!0,e,r,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div")},j)},goLineLeft:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:0,top:t},"div")},j)},goLineLeftSmart:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5,r=n.coordsChar({left:0,top:t},"div");return r.ch<n.getLine(r.line).search(/\S/)?Qo(n,e.head):r},j)},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=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=z(e.getLine(o.line),o.ch,n);t.push(_(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(l){return _n(l,function(){for(var e=l.listSelections(),t=[],r=0;r<e.length;r++)if(e[r].empty()){var n=e[r].head,i=Xe(l.doc,n.line).text;if(i)if(n.ch==i.length&&(n=new et(n.line,n.ch-1)),0<n.ch)n=new et(n.line,n.ch+1),l.replaceRange(i.charAt(n.ch-1)+i.charAt(n.ch-2),et(n.line,n.ch-2),n,"+transpose");else if(n.line>l.doc.first){var o=Xe(l.doc,n.line-1).text;o&&(n=new et(n.line,1),l.replaceRange(i.charAt(0)+l.doc.lineSeparator()+o.charAt(o.length-1),et(n.line-1,o.length-1),n,"+transpose"))}t.push(new yi(n,n))}l.setSelections(t)})},newlineAndIndent:function(n){return _n(n,function(){for(var e=n.listSelections(),t=e.length-1;0<=t;t--)n.replaceRange(n.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=n.listSelections();for(var r=0;r<e.length;r++)n.indentLine(e[r].from().line,null,!0);Mn(n)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Zo(e,t){var r=Xe(e.doc,t),n=zt(r);return n!=r&&(t=qe(n)),$o(!0,e,n,t,1)}function Qo(e,t){var r=Zo(e,t.line),n=Xe(e.doc,r.line),i=ce(n,e.doc.direction);if(i&&0!=i[0].level)return r;var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return et(r.line,l?0:o,r.sticky)}function Jo(e,t,r){if("string"==typeof t&&!(t=qo[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var el=new R;function tl(e,t,r,n){var i=e.state.keySeq;if(i){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:el.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),rl(e,i+" "+t,r,n))return!0}return rl(e,t,r,n)}function rl(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Go(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Go(t,e.options.extraKeys,r,e)||Go(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&lr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(we(r),mn(e)),!!i}function nl(t,e){var r=Ko(e,!0);return!!r&&(e.shiftKey&&!t.state.keySeq?tl(t,"Shift-"+r,e,function(e){return Jo(t,e,!0)})||tl(t,r,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Jo(t,e)}):tl(t,r,e,function(e){return Jo(t,e)}))}var il=null;function ol(e){var t=this;if(t.curOp.focus=W(),!ve(t,e)){x&&C<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=nl(t,e);v&&(il=n?r:null,!n&&88==r&&!Fe&&(w?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),pe(document,"keyup",r),pe(document,"mouseover",r))}H(t,"CodeMirror-crosshair"),fe(document,"keyup",r),fe(document,"mouseover",r)}(t)}}function ll(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function sl(e){var t=this;if(!(br(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||w&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(v&&r==il)return il=null,void we(e);if(!v||e.which&&!(e.which<10)||!nl(t,e)){var i,o=String.fromCharCode(null==n?r:n);if("\b"!=o)if(!tl(i=t,"'"+o+"'",e,function(e){return Jo(i,e,!0)}))t.display.input.onKeyPress(e)}}}var al,ul,cl=function(e,t,r){this.time=e,this.pos=t,this.button=r};function hl(e){var t=this,r=t.display;if(!(ve(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,br(r,e))b||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!pl(t,e)){var n,i,o,l=on(t,e),s=ke(e),a=l?(n=l,i=s,o=+new Date,ul&&ul.compare(o,n,i)?(al=ul=null,"triple"):al&&al.compare(o,n,i)?(ul=new cl(o,n,i),al=null,"double"):(al=new cl(o,n,i),ul=null,"single")):"single";window.focus(),1==s&&t.state.selectingText&&t.state.selectingText(e),l&&function(r,e,n,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return tl(r,Vo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=qo[e]),!e)return!1;var t=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),t=e(r,n)!=U}finally{r.state.suppressEdits=!1}return t})}(t,s,l,a,e)||(1==s?l?function(e,t,r,n){x?setTimeout(E(yn,e),0):e.curOp.focus=W();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=d?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=w?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(w?r.altKey:r.ctrlKey));return i}(e,r,n),l=e.doc.sel;e.options.dragDrop&&Ne&&!e.isReadOnly()&&"single"==r&&-1<(i=l.contains(t))&&(tt((i=l.ranges[i]).from(),t)<0||0<t.xRel)&&(0<tt(i.to(),t)||t.xRel<0)?function(t,r,n,i){var o=t.display,l=!1,s=$n(t,function(e){b&&(o.scroller.draggable=!1),t.state.draggingText=!1,pe(o.wrapper.ownerDocument,"mouseup",s),pe(o.wrapper.ownerDocument,"mousemove",a),pe(o.scroller,"dragstart",u),pe(o.scroller,"drop",s),l||(we(e),i.addNew||Vi(t.doc,n,null,null,i.extend),b||x&&9==C?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),a=function(e){l=l||10<=Math.abs(r.clientX-e.clientX)+Math.abs(r.clientY-e.clientY)},u=function(){return l=!0};b&&(o.scroller.draggable=!0);(t.state.draggingText=s).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();fe(o.wrapper.ownerDocument,"mouseup",s),fe(o.wrapper.ownerDocument,"mousemove",a),fe(o.scroller,"dragstart",u),fe(o.scroller,"drop",s),bn(t),setTimeout(function(){return o.input.focus()},20)}(e,n,t,o):function(v,e,m,y){var l=v.display,b=v.doc;we(e);var w,x,C=b.sel,t=C.ranges;y.addNew&&!y.extend?(x=b.sel.contains(m),w=-1<x?t[x]:new yi(m,m)):(w=b.sel.primary(),x=b.sel.primIndex);if("rectangle"==y.unit)y.addNew||(w=new yi(m,m)),m=on(v,e,!0,!0),x=-1;else{var r=fl(v,m,y.unit);w=y.extend?Ui(w,r.anchor,r.head,y.extend):r}y.addNew?-1==x?(x=t.length,_i(b,bi(v,t.concat([w]),x),{scroll:!1,origin:"*mouse"})):1<t.length&&t[x].empty()&&"char"==y.unit&&!y.extend?(_i(b,bi(v,t.slice(0,x).concat(t.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),C=b.sel):ji(b,x,w,K):(_i(b,new mi([w],x=0),K),C=b.sel);var S=m;function s(e){if(0!=tt(S,e))if(S=e,"rectangle"==y.unit){for(var t=[],r=v.options.tabSize,n=z(Xe(b,m.line).text,m.ch,r),i=z(Xe(b,e.line).text,e.ch,r),o=Math.min(n,i),l=Math.max(n,i),s=Math.min(m.line,e.line),a=Math.min(v.lastLine(),Math.max(m.line,e.line));s<=a;s++){var u=Xe(b,s).text,c=X(u,o,r);o==l?t.push(new yi(et(s,c),et(s,c))):u.length>c&&t.push(new yi(et(s,c),et(s,X(u,l,r))))}t.length||t.push(new yi(m,m)),_i(b,bi(v,C.ranges.slice(0,x).concat(t),x),{origin:"*mouse",scroll:!1}),v.scrollIntoView(e)}else{var h,f=w,d=fl(v,e,y.unit),p=f.anchor;p=0<tt(d.anchor,p)?(h=d.head,ot(f.from(),d.anchor)):(h=d.anchor,it(f.to(),d.head));var g=C.ranges.slice(0);g[x]=function(e,t){var r=t.anchor,n=t.head,i=Xe(e.doc,r.line);if(0==tt(r,n)&&r.sticky==n.sticky)return t;var o=ce(i);if(!o)return t;var l=ae(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=0<(n.line-r.line)*("ltr"==e.doc.direction?1:-1);else{var c=ae(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:0<h}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new yi(new et(r.line,p,g),n)}(v,new yi(st(b,p),h)),_i(b,bi(v,g,x),K)}}var a=l.wrapper.getBoundingClientRect(),u=0;function n(e){v.state.selectingText=!1,u=1/0,e&&(we(e),l.input.focus()),pe(l.wrapper.ownerDocument,"mousemove",i),pe(l.wrapper.ownerDocument,"mouseup",o),b.history.lastSelOrigin=null}var i=$n(v,function(e){0!==e.buttons&&ke(e)?function e(t){var r=++u;var n=on(v,t,!0,"rectangle"==y.unit);if(!n)return;if(0!=tt(n,S)){v.curOp.focus=W(),s(n);var i=Ln(l,b);(n.line>=i.to||n.line<i.from)&&setTimeout($n(v,function(){u==r&&e(t)}),150)}else{var o=t.clientY<a.top?-20:t.clientY>a.bottom?20:0;o&&setTimeout($n(v,function(){u==r&&(l.scroller.scrollTop+=o,e(t))}),50)}}(e):n(e)}),o=$n(v,n);v.state.selectingText=o,fe(l.wrapper.ownerDocument,"mousemove",i),fe(l.wrapper.ownerDocument,"mouseup",o)}(e,n,t,o)}(t,l,a,e):Le(e)==r.scroller&&we(e):2==s?(l&&Vi(t.doc,l),setTimeout(function(){return r.input.focus()},20)):3==s&&(S?t.display.input.onContextMenu(e):bn(t)))}}function fl(e,t,r){if("char"==r)return new yi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new yi(et(t.line,0),st(e.doc,et(t.line+1,0)));var n=r(e,t);return new yi(n.from,n.to)}function dl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&we(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,r))return Ce(t);o-=s.top-l.viewOffset;for(var a=0;a<e.display.gutterSpecs.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i)return ge(e,r,e,Ze(e.doc,o),e.display.gutterSpecs[a].className,t),Ce(t)}}function pl(e,t){return dl(e,t,"gutterClick",!0)}function gl(e,t){var r,n;br(e.display,t)||(n=t,ye(r=e,"gutterContextMenu")&&dl(r,n,"gutterContextMenu",!1))||(ve(e,t,"contextmenu")||S||e.display.input.onContextMenu(t))}function vl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ir(e)}cl.prototype.compare=function(e,t,r){return this.time+400>e&&0==tt(t,this.pos)&&r==this.button};var ml={toString:function(){return"CodeMirror.Init"}},yl={},bl={};function wl(e,t,r){if(!t!=!(r&&r!=ml)){var n=e.display.dragFunctions,i=t?fe:pe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function xl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),jt(e)),nn(e),sn(e),Ir(e),setTimeout(function(){return In(e)},100)}function Cl(e,t){var r=this;if(!(this instanceof Cl))return new Cl(e,t);this.options=t=t?I(t):{},I(yl,t,!1);var n=t.value;"string"==typeof n?n=new To(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Cl.inputStyles[t.inputStyle](this),o=this.display=new hi(e,n,i,t);for(var l in vl(o.wrapper.CodeMirror=this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bn(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 R,keySeq:null,specialChars:null},t.autofocus&&!f&&o.input.focus(),x&&C<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(i){var o=i.display;fe(o.scroller,"mousedown",$n(i,hl)),fe(o.scroller,"dblclick",x&&C<11?$n(i,function(e){if(!ve(i,e)){var t=on(i,e);if(t&&!pl(i,e)&&!br(i.display,e)){we(e);var r=i.findWordAt(t);Vi(i.doc,r.anchor,r.head)}}}):function(e){return ve(i,e)||we(e)});fe(o.scroller,"contextmenu",function(e){return gl(i,e)});var r,n={end:0};function l(){o.activeTouch&&(r=setTimeout(function(){return o.activeTouch=null},1e3),(n=o.activeTouch).end=+new Date)}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return 400<r*r+n*n}fe(o.scroller,"touchstart",function(e){if(!ve(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!pl(i,e)){o.input.ensurePolled(),clearTimeout(r);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-n.end<=300?n:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),fe(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),fe(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!br(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var r,n=i.coordsChar(o.activeTouch,"page");r=!t.prev||s(t,t.prev)?new yi(n,n):!t.prev.prev||s(t,t.prev.prev)?i.findWordAt(n):new yi(et(n.line,0),st(i.doc,et(n.line+1,0))),i.setSelection(r.anchor,r.head),i.focus(),we(e)}l()}),fe(o.scroller,"touchcancel",l),fe(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Dn(i,o.scroller.scrollTop),Hn(i,o.scroller.scrollLeft,!0),ge(i,"scroll",i))}),fe(o.scroller,"mousewheel",function(e){return vi(i,e)}),fe(o.scroller,"DOMMouseScroll",function(e){return vi(i,e)}),fe(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){ve(i,e)||Se(e)},over:function(e){ve(i,e)||(!function(e,t){var r=on(e,t);if(r){var n=document.createDocumentFragment();pn(e,r,n),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(i,e),Se(e))},start:function(e){return function(e,t){if(x&&(!e.state.draggingText||+new Date-Mo<100))Se(t);else if(!ve(e,t)&&!br(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!a)){var r=A("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",v&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),v&&r.parentNode.removeChild(r)}}(i,e)},drop:$n(i,No),leave:function(e){ve(i,e)||Oo(i)}};var e=o.input.getField();fe(e,"keyup",function(e){return ll.call(i,e)}),fe(e,"keydown",$n(i,ol)),fe(e,"keypress",$n(i,sl)),fe(e,"focus",function(e){return wn(i,e)}),fe(e,"blur",function(e){return xn(i,e)})}(this),Wo(),Un(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!f||this.hasFocus()?setTimeout(E(wn,this),20):xn(this),bl)bl.hasOwnProperty(l)&&bl[l](r,t[l],ml);si(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Sl.length;++s)Sl[s](r);Vn(this),b&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Cl.defaults=yl,Cl.optionHandlers=bl;var Sl=[];function Ll(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=dt(e,t).state:r="prev");var l=e.options.tabSize,s=Xe(o,t),a=z(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==U||150<u)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(Xe(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f<u&&(h+=_(u-f)),h!=c)return uo(o,h,et(t,0),et(t,c.length),"+input"),!(s.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var v=et(t,c.length);ji(o,p,new yi(v,v));break}}}Cl.defineInitHook=function(e){return Sl.push(e)};var kl=null;function Tl(e){kl=e}function Ml(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=+new Date-200,s="paste"==i||e.state.pasteIncoming>l,a=We(t),u=null;if(s&&1<n.ranges.length)if(kl&&kl.text.join("\n")==t){if(n.ranges.length%kl.text.length==0){u=[];for(var c=0;c<kl.text.length;c++)u.push(o.splitLines(kl.text[c]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=q(a,function(e){return[e]}));for(var h=e.curOp.updateInput,f=n.ranges.length-1;0<=f;f--){var d=n.ranges[f],p=d.from(),g=d.to();d.empty()&&(r&&0<r?p=et(p.line,p.ch-r):e.state.overwrite&&!s?g=et(g.line,Math.min(Xe(o,g.line).text.length,g.ch+$(a).length)):s&&kl&&kl.lineWise&&kl.text.join("\n")==t&&(p=g=et(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};io(e.doc,v),lr(e,"inputRead",e,v)}t&&!s&&Ol(e,t),Mn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Nl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||_n(t,function(){return Ml(t,r,0,null,"paste")}),!0}function Ol(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;0<=n;n--){var i=r.ranges[n];if(!(100<i.head.ch||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(-1<t.indexOf(o.electricChars.charAt(s))){l=Ll(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ll(e,i.head.line,"smart"));l&&lr(e,"electricInput",e,i.head.line)}}}function Al(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:et(i,0),head:et(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Dl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Wl(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),c&&(e.style.border="1px solid black"),Dl(e),t}function Hl(n,i,o,e,l){var t=i,r=o,s=Xe(n,i.line);function a(e){var t,r;if(null==(t=l?function(t,r,s,e){var a=ce(r,t.doc.direction);if(!a)return _o(r,s,e);s.ch>=r.text.length?(s.ch=r.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var n=ae(a,s.ch,s.sticky),i=a[n];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>s.ch:i.from<s.ch))return _o(r,s,e);var o,u=function(e,t){return Yo(r,e instanceof et?e.ch:e,t)},l=function(e){return t.options.lineWrapping?(o=o||Or(t,r),$r(t,r,o,e)):{begin:0,end:r.text.length}},c=l("before"==s.sticky?u(s,-1):s.ch);if("rtl"==t.doc.direction||1==i.level){var h=1==i.level==e<0,f=u(s,h?1:-1);if(null!=f&&(h?f<=i.to&&f<=c.end:f>=i.from&&f>=c.begin)){var d=h?"before":"after";return new et(s.line,f,d)}}var p=function(e,t,r){for(var n=function(e,t){return t?new et(s.line,u(e,1),"before"):new et(s.line,e,"after")};0<=e&&e<a.length;e+=t){var i=a[e],o=0<t==(1!=i.level),l=o?r.begin:u(r.end,-1);if(i.from<=l&&l<i.to)return n(l,o);if(l=o?i.from:u(i.to,-1),r.begin<=l&&l<r.end)return n(l,o)}},g=p(n+e,e,c);if(g)return g;var v=0<e?c.end:u(c.begin,-1);return null==v||0<e&&v==r.text.length||!(g=p(0<e?0:a.length-1,e,l(v)))?null:g}(n.cm,s,i,o):_o(s,i,o))){if(e||(r=i.line+o)<n.first||r>=n.first+n.size||(i=new et(r,i.ch,i.sticky),!(s=Xe(n,r))))return!1;i=$o(l,n.cm,s,i.line,o)}else i=t;return!0}if("char"==e)a();else if("column"==e)a(!0);else if("word"==e||"group"==e)for(var u=null,c="group"==e,h=n.cm&&n.cm.getHelper(i,"wordChars"),f=!0;!(o<0)||a(!f);f=!1){var d=s.text.charAt(i.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){o<0&&(o=1,a(),i.sticky="after");break}if(p&&(u=p),0<o&&!a(!f))break}var g=eo(n,i,t,r,!0);return rt(t,g)&&(g.hitSide=!0),g}function Fl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*Qr(e.display),3);i=(0<r?t.bottom:t.top)+r*u}else"line"==n&&(i=0<r?t.bottom+3:t.top-3);for(;(o=Yr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Pl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function El(e,t){var r=Nr(e,t.line);if(!r||r.hidden)return null;var n=Xe(e.doc,t.line),i=Tr(r,n,t.line),o=ce(n,e.doc.direction),l="left";o&&(l=ae(o,t.ch)%2?"right":"left");var s=Hr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Il(e,t){return t&&(e.bad=!0),e}function zl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Il(e.clipPos(et(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Rl(o,t,r)}}function Rl(u,e,t){var r=u.text.firstChild,n=!1;if(!e||!D(r,e))return Il(et(qe(u.line),0),!0);if(e==r&&(n=!0,e=r.childNodes[t],t=0,!e)){var i=u.rest?$(u.rest):u.line;return Il(et(qe(i),i.text.length),n)}var o=3==e.nodeType?e:null,l=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t&&(t=o.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var c=u.measure,h=c.maps;function s(e,t,r){for(var n=-1;n<(h?h.length:0);n++)for(var i=n<0?c.map:h[n],o=0;o<i.length;o+=3){var l=i[o+2];if(l==e||l==t){var s=qe(n<0?u.line:u.rest[n]),a=i[o]+r;return(r<0||l!=e)&&(a=i[o+(r?1:0)]),et(s,a)}}}var a=s(o,l,t);if(a)return Il(a,n);for(var f=l.nextSibling,d=o?o.nodeValue.length-t:0;f;f=f.nextSibling){if(a=s(f,f.firstChild,0))return Il(et(a.line,a.ch-d),n);d+=f.textContent.length}for(var p=l.previousSibling,g=t;p;p=p.previousSibling){if(a=s(p,p.firstChild,-1))return Il(et(a.line,a.ch+g),n);g+=p.textContent.length}}Pl.prototype.init=function(e){var t=this,l=this,s=l.cm,a=l.div=e.lineDiv;function r(e){if(!ve(s,e)){if(s.somethingSelected())Tl({lineWise:!1,text:s.getSelections()}),"cut"==e.type&&s.replaceSelection("",null,"cut");else{if(!s.options.lineWiseCopyCut)return;var t=Al(s);Tl({lineWise:!0,text:t.text}),"cut"==e.type&&s.operation(function(){s.setSelections(t.ranges,0,V),s.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=kl.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var n=Wl(),i=n.firstChild;s.display.lineSpace.insertBefore(n,s.display.lineSpace.firstChild),i.value=kl.text.join("\n");var o=document.activeElement;P(i),setTimeout(function(){s.display.lineSpace.removeChild(n),o.focus(),o==a&&l.showPrimarySelection()},50)}}Dl(a,s.options.spellcheck,s.options.autocorrect,s.options.autocapitalize),fe(a,"paste",function(e){ve(s,e)||Nl(e,s)||C<=11&&setTimeout($n(s,function(){return t.updateFromDOM()}),20)}),fe(a,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),fe(a,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),fe(a,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),fe(a,"touchstart",function(){return l.forceCompositionEnd()}),fe(a,"input",function(){t.composing||t.readFromDOMSoon()}),fe(a,"copy",r),fe(a,"cut",r)},Pl.prototype.prepareSelection=function(){var e=dn(this.cm,!1);return e.focus=this.cm.state.focused,e},Pl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Pl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Pl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=zl(t,e.anchorNode,e.anchorOffset),l=zl(t,e.focusNode,e.focusOffset);if(!o||o.bad||!l||l.bad||0!=tt(ot(o,l),n)||0!=tt(it(o,l),i)){var s=t.display.view,a=n.line>=t.display.viewFrom&&El(t,n)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&El(t,i);if(!u){var c=s[s.length-1].measure,h=c.maps?c.maps[c.maps.length-1]:c.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(a&&u){var f,d=e.rangeCount&&e.getRangeAt(0);try{f=k(a.node,a.offset,u.offset,u.node)}catch(e){}f&&(!g&&t.state.focused?(e.collapse(a.node,a.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),d&&null==e.anchorNode?e.addRange(d):g&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Pl.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)},Pl.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},Pl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Pl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Pl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Pl.prototype.blur=function(){this.div.blur()},Pl.prototype.getField=function(){return this.div},Pl.prototype.supportsTouch=function(){return!0},Pl.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():_n(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},Pl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Pl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(h&&l&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=zl(t,e.anchorNode,e.anchorOffset),n=zl(t,e.focusNode,e.focusOffset);r&&n&&_n(t,function(){_i(t.doc,wi(r,n),V),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Pl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=et(l.line-1,Xe(n.doc,l.line-1).length)),s.ch==Xe(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=et(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;r=l.line==i.viewFrom||0==(e=ln(n,l.line))?(t=qe(i.view[0].line),i.view[0].node):(t=qe(i.view[e].line),i.view[e-1].node.nextSibling);var a,u,c=ln(n,s.line);if(u=c==i.view.length-1?(a=i.viewTo-1,i.lineDiv.lastChild):(a=qe(i.view[c+1].line)-1,i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(a,e,t,u,c){var r="",h=!1,f=a.doc.lineSeparator(),d=!1;function p(){h&&(r+=f,d&&(r+=f),h=d=!1)}function g(e){e&&(p(),r+=e)}function v(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void g(t);var r,n=e.getAttribute("cm-marker");if(n){var i=a.findMarks(et(u,0),et(c+1,0),(s=+n,function(e){return e.id==s}));return void(i.length&&(r=i[0].find(0))&&g(Ye(a.doc,r.from,r.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&p();for(var l=0;l<e.childNodes.length;l++)v(e.childNodes[l]);/^(pre|p)$/i.test(e.nodeName)&&(d=!0),o&&(h=!0)}else 3==e.nodeType&&g(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var s}for(;v(e),e!=t;)e=e.nextSibling,d=!1;return r}(n,r,u,t,a)),f=Ye(n.doc,et(t,0),et(a,Xe(n.doc,a).text.length));1<h.length&&1<f.length;)if($(h)==$(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);d<m&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=$(h),b=$(f),w=Math.min(y.length-(1==h.length?d:0),b.length-(1==f.length?d:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==f.length&&t==l.line)for(;d&&d>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=et(t,d),C=et(a,f.length?$(f).length-p:0);return 1<h.length||h[0]||tt(x,C)?(uo(n.doc,h,x,C,"+input"),!0):void 0},Pl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Pl.prototype.reset=function(){this.forceCompositionEnd()},Pl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Pl.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))},Pl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||_n(this.cm,function(){return sn(e.cm)})},Pl.prototype.setUneditable=function(e){e.contentEditable="false"},Pl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||$n(this.cm,Ml)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Pl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Pl.prototype.onContextMenu=function(){},Pl.prototype.resetPosition=function(){},Pl.prototype.needsContentAttribute=!0;var Bl,Gl,Ul,Vl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Vl.prototype.init=function(r){var e=this,n=this,i=this.cm;this.createField(r);var o=this.textarea;function t(e){if(!ve(i,e)){if(i.somethingSelected())Tl({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Al(i);Tl({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,V):(n.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}r.wrapper.insertBefore(this.wrapper,r.wrapper.firstChild),c&&(o.style.width="0px"),fe(o,"input",function(){x&&9<=C&&e.hasSelection&&(e.hasSelection=null),n.poll()}),fe(o,"paste",function(e){ve(i,e)||Nl(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())}),fe(o,"cut",t),fe(o,"copy",t),fe(r.scroller,"paste",function(e){if(!br(r,e)&&!ve(i,e)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var t=new Event("paste");t.clipboardData=e.clipboardData,o.dispatchEvent(t)}}),fe(r.lineSpace,"selectstart",function(e){br(r,e)||we(e)}),fe(o,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),fe(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Vl.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},Vl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=dn(e);if(e.options.moveInputWithCursor){var i=Kr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Vl.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Vl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),x&&9<=C&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",x&&9<=C&&(this.hasSelection=null))}},Vl.prototype.getField=function(){return this.textarea},Vl.prototype.supportsTouch=function(){return!1},Vl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!f||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},Vl.prototype.blur=function(){this.textarea.blur()},Vl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vl.prototype.receivedFocus=function(){this.slowPoll()},Vl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Vl.prototype.fastPoll=function(){var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))})},Vl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(x&&9<=C&&this.hasSelection===i||w&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l<s&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return _n(t,function(){Ml(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Vl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vl.prototype.onKeyPress=function(){x&&9<=C&&(this.hasSelection=null),this.fastPoll()},Vl.prototype.onContextMenu=function(e){var r=this,n=r.cm,i=n.display,o=r.textarea;r.contextMenuPending&&r.contextMenuPending();var t=on(n,e),l=i.scroller.scrollTop;if(t&&!v){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(t)&&$n(n,_i)(n.doc,wi(t),V);var s,a=o.style.cssText,u=r.wrapper.style.cssText,c=r.wrapper.offsetParent.getBoundingClientRect();if(r.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-c.top-5)+"px; left: "+(e.clientX-c.left-5)+"px;\n      z-index: 1000; background: "+(x?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",b&&(s=window.scrollY),i.input.focus(),b&&window.scrollTo(null,s),i.input.reset(),n.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=d,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),x&&9<=C&&f(),S){Se(e);var h=function(){pe(window,"mouseup",h),setTimeout(d,20)};fe(window,"mouseup",h)}else setTimeout(d,50)}function f(){if(null!=o.selectionStart){var e=n.somethingSelected(),t="​"+(e?o.value:"");o.value="⇚",o.value=t,r.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=n.doc.sel}}function d(){if(r.contextMenuPending==d&&(r.contextMenuPending=!1,r.wrapper.style.cssText=u,o.style.cssText=a,x&&C<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=l),null!=o.selectionStart)){(!x||x&&C<9)&&f();var e=0,t=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&"​"==r.prevInput?$n(n,ro)(n):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},Vl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Vl.prototype.setUneditable=function(){},Vl.prototype.needsContentAttribute=!1,function(i){var o=i.optionHandlers;function e(e,t,n,r){i.defaults[e]=t,n&&(o[e]=r?function(e,t,r){r!=ml&&n(e,t,r)}:n)}i.defineOption=e,i.Init=ml,e("value","",function(e,t){return e.setValue(t)},!0),e("mode",null,function(e,t){e.doc.modeOption=t,ki(e)},!0),e("indentUnit",2,ki,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(e){Ti(e),Ir(e),sn(e)},!0),e("lineSeparator",null,function(e,n){if(e.doc.lineSep=n){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var r=e.text.indexOf(n,t);if(-1==r)break;t=r+n.length,i.push(et(o,r))}o++});for(var t=i.length-1;0<=t;t--)uo(e.doc,n,i[t],et(i[t].line,i[t].ch+n.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ml&&e.refresh()}),e("specialCharPlaceholder",Zt,function(e){return e.refresh()},!0),e("electricChars",!0),e("inputStyle",f?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),e("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),e("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),e("rtlMoveVisually",!p),e("wholeLineUpdateBefore",!0),e("theme","default",function(e){vl(e),ci(e)},!0),e("keyMap","default",function(e,t,r){var n=jo(t),i=r!=ml&&jo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,xl,!0),e("gutters",[],function(e,t){e.display.gutterSpecs=ai(t,e.options.lineNumbers),ci(e)},!0),e("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?tn(e.display)+"px":"0",e.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(e){return In(e)},!0),e("scrollbarStyle","native",function(e){Bn(e),In(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),e("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ai(e.options.gutters,t),ci(e)},!0),e("firstLineNumber",1,ci,!0),e("lineNumberFormatter",function(e){return e},ci,!0),e("showCursorWhenSelecting",!1,fn,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("selectionsMayTouch",!1),e("readOnly",!1,function(e,t){"nocursor"==t&&(xn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),e("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),e("dragDrop",!0,wl),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,fn,!0),e("singleCursorHeightPerLine",!0,fn,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Ti,!0),e("addModeClass",!1,Ti,!0),e("pollInterval",100),e("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),e("historyEventDelay",1250),e("viewportMargin",10,function(e){return e.refresh()},!0),e("maxHighlightLength",1e4,Ti,!0),e("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),e("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),e("autofocus",null),e("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),e("phrases",null)}(Cl),Gl=(Bl=Cl).optionHandlers,Ul=Bl.helpers={},Bl.prototype={constructor:Bl,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];r[e]==t&&"mode"!=e||(r[e]=t,Gl.hasOwnProperty(e)&&$n(this,Gl[e])(this,t,n),ge(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"](jo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:qn(function(e,t){var r=e.token?e:Bl.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:r,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,sn(this)}),removeOverlay:qn(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void sn(this)}}),indentLine:qn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Qe(this.doc,e)&&Ll(this,e,t,r)}),indentSelection:qn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Ll(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Mn(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u<n;++u)Ll(t,u,e);var c=t.doc.sel.ranges;0==l.ch&&r.length==c.length&&0<c[i].from().ch&&ji(t.doc,i,new yi(l,c[i].to()),V)}}}),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=ft(this,Xe(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Bl.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Ul.hasOwnProperty(t))return r;var n=Ul[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var l=n[i[t][o]];l&&r.push(l)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var s=0;s<n._global.length;s++){var a=n._global[s];a.pred(i,this)&&-1==B(r,a.val)&&r.push(a.val)}return r},getStateAfter:function(e,t){var r=this.doc;return dt(this,(e=lt(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Kr(this,null==e?r.head:"object"==typeof e?st(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Vr(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Yr(this,(e=Ur(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Ur(this,{top:e,left:0},t||"page").top,Ze(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),n=Xe(this.doc,e)}else n=e;return Gr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Vt(n):0)},defaultTextHeight:function(){return Qr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Kr(this,st(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=kn(o,l)).scrollTop&&Dn(o,s.scrollTop),null!=s.scrollLeft&&Hn(o,s.scrollLeft))},triggerOnKeyDown:qn(ol),triggerOnKeyPress:qn(sl),triggerOnKeyUp:ll,triggerOnMouseDown:qn(hl),execCommand:function(e){if(qo.hasOwnProperty(e))return qo[e].call(null,this)},triggerElectric:qn(function(e){Ol(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),l=0;l<t&&!(o=Hl(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:qn(function(t,r){var n=this;this.extendSelectionsBy(function(e){return n.display.shift||n.doc.extend||e.empty()?Hl(n.doc,e.head,t,r,n.options.rtlMoveVisually):t<0?e.from():e.to()},j)}),deleteH:qn(function(r,n){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):Xo(this,function(e){var t=Hl(i,e.head,r,n,!1);return r<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=st(this.doc,e),s=0;s<t;++s){var a=Kr(this,l,"div");if(null==o?o=a.left:a.left=o,(l=Fl(this,a,i,r)).hitSide)break}return l},moveV:qn(function(n,i){var o=this,l=this.doc,s=[],a=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(e){if(a)return n<0?e.from():e.to();var t=Kr(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),s.push(t.left);var r=Fl(o,t,n,i);return"page"==i&&e==l.sel.primary()&&Tn(o,Vr(o,r,"div").top-t.top),r},j),s.length)for(var e=0;e<l.sel.ranges.length;e++)l.sel.ranges[e].goalColumn=s[e]}),findWordAt:function(e){var t=Xe(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),l=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<r&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new yi(et(e.line,r),et(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==W()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:qn(function(e,t){Nn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sr(this)-this.display.barHeight,width:e.scrollWidth-Sr(this)-this.display.barWidth,clientHeight:kr(this),clientWidth:Lr(this)}},scrollIntoView:qn(function(e,t){var r,n;null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?(n=e,On(r=this),r.curOp.scrollToPos=n):An(this,e.from,e.to,e.margin)}),setSize:qn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Er(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){an(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,ge(this,"refresh",this)}),operation:function(e){return _n(this,e)},startOperation:function(){return Un(this)},endOperation:function(){return Vn(this)},refresh:qn(function(){var e=this.display.cachedTextHeight;sn(this),this.curOp.forceUpdate=!0,Ir(this),Nn(this,this.doc.scrollLeft,this.doc.scrollTop),ii(this.display),(null==e||.5<Math.abs(e-Qr(this.display)))&&nn(this),ge(this,"refresh",this)}),swapDoc:qn(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ai(this,e),Ir(this),this.display.input.reset(),Nn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,lr(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}},be(Bl),Bl.registerHelper=function(e,t,r){Ul.hasOwnProperty(e)||(Ul[e]=Bl[e]={_global:[]}),Ul[e][t]=r},Bl.registerGlobalHelper=function(e,t,r,n){Bl.registerHelper(e,t,n),Ul[e]._global.push({pred:r,val:n})};var Kl,jl="iter insert remove copy getEditor constructor".split(" ");for(var Xl in To.prototype)To.prototype.hasOwnProperty(Xl)&&B(jl,Xl)<0&&(Cl.prototype[Xl]=function(e){return function(){return e.apply(this.doc,arguments)}}(To.prototype[Xl]));return be(To),Cl.inputStyles={textarea:Vl,contenteditable:Pl},Cl.defineMode=function(e){Cl.defaults.mode||"null"==e||(Cl.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ee[e]=t}.apply(this,arguments)},Cl.defineMIME=function(e,t){Ie[e]=t},Cl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Cl.defineMIME("text/plain","null"),Cl.defineExtension=function(e,t){Cl.prototype[e]=t},Cl.defineDocExtension=function(e,t){To.prototype[e]=t},Cl.fromTextArea=function(t,e){if((e=e?I(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=W();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function n(){t.value=s.getValue()}var i;if(t.form&&(fe(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}e.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(pe(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var s=Cl(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},(Kl=Cl).off=pe,Kl.on=fe,Kl.wheelEventPixels=gi,Kl.Doc=To,Kl.splitLines=We,Kl.countColumn=z,Kl.findColumn=X,Kl.isWordChar=ee,Kl.Pass=U,Kl.signal=ge,Kl.Line=Xt,Kl.changeEnd=xi,Kl.scrollbarModel=Rn,Kl.Pos=et,Kl.cmpPos=tt,Kl.modes=Ee,Kl.mimeModes=Ie,Kl.resolveMode=ze,Kl.getMode=Re,Kl.modeExtensions=Be,Kl.extendMode=Ge,Kl.copyState=Ue,Kl.startState=Ke,Kl.innerMode=Ve,Kl.commands=qo,Kl.keyMap=zo,Kl.keyName=Ko,Kl.isModifierKey=Uo,Kl.lookupKey=Go,Kl.normalizeKeyMap=Bo,Kl.StringStream=je,Kl.SharedTextMarker=Co,Kl.TextMarker=wo,Kl.LineWidget=mo,Kl.e_preventDefault=we,Kl.e_stopPropagation=xe,Kl.e_stop=Se,Kl.addClass=H,Kl.contains=D,Kl.rmClass=T,Kl.keyNames=Fo,Cl.version="5.46.0",Cl});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(i){"use strict";var p,x,L=i.Pos;function m(t,e){for(var n,r,i=null!=(r=(n=t).flags)?r:(n.ignoreCase?"i":"")+(n.global?"g":"")+(n.multiline?"m":""),o=i,l=0;l<e.length;l++)-1==o.indexOf(e.charAt(l))&&(o+=e.charAt(l));return i==o?t:new RegExp(t.source,o)}function d(t,e,n){e=m(e,"g");for(var r=n.line,i=n.ch,o=t.lastLine();r<=o;r++,i=0){e.lastIndex=i;var l=t.getLine(r),h=e.exec(l);if(h)return{from:L(r,h.index),to:L(r,h.index+h[0].length),match:h}}}function v(t,e){for(var n,r=0;;){e.lastIndex=r;var i=e.exec(t);if(!i)return n;if((r=(n=i).index+(n[0].length||1))==t.length)return n}}function C(t,e,n,r){if(t.length==e.length)return n;for(var i=0,o=n+Math.max(0,t.length-e.length);;){if(i==o)return i;var l=i+o>>1,h=r(t.slice(0,l)).length;if(h==n)return l;n<h?o=l:i=l+1}}function r(n,r,t,e){var i;this.atOccurrence=!1,this.doc=n,t=t?n.clipPos(t):L(0,0),this.pos={from:t,to:t},"object"==typeof e?i=e.caseFold:(i=e,e=null),"string"==typeof r?(null==i&&(i=!1),this.matches=function(t,e){return(t?function(t,e,n,r){if(!e.length)return null;var i=r?p:x,o=i(e).split(/\r|\n\r?/);t:for(var l=n.line,h=n.ch,s=t.firstLine()-1+o.length;s<=l;l--,h=-1){var c=t.getLine(l);-1<h&&(c=c.slice(0,h));var f=i(c);if(1==o.length){var u=f.lastIndexOf(o[0]);if(-1==u)continue t;return{from:L(l,C(c,f,u,i)),to:L(l,C(c,f,u+o[0].length,i))}}var a=o[o.length-1];if(f.slice(0,a.length)==a){var g=1;for(n=l-o.length+1;g<o.length-1;g++)if(i(t.getLine(n+g))!=o[g])continue t;var m=t.getLine(l+1-o.length),d=i(m);if(d.slice(d.length-o[0].length)==o[0])return{from:L(l+1-o.length,C(m,d,m.length-o[0].length,i)),to:L(l,C(c,f,a.length,i))}}}}:function(t,e,n,r){if(!e.length)return null;var i=r?p:x,o=i(e).split(/\r|\n\r?/);t:for(var l=n.line,h=n.ch,s=t.lastLine()+1-o.length;l<=s;l++,h=0){var c=t.getLine(l).slice(h),f=i(c);if(1==o.length){var u=f.indexOf(o[0]);if(-1==u)continue t;return n=C(c,f,u,i)+h,{from:L(l,C(c,f,u,i)+h),to:L(l,C(c,f,u+o[0].length,i)+h)}}var a=f.length-o[0].length;if(f.slice(a)==o[0]){for(var g=1;g<o.length-1;g++)if(i(t.getLine(l+g))!=o[g])continue t;var m=t.getLine(l+o.length-1),d=i(m),v=o[o.length-1];if(d.slice(0,v.length)==v)return{from:L(l,C(c,f,a,i)+h),to:L(l+o.length-1,C(m,d,v.length,i))}}}})(n,r,e,i)}):(r=m(r,"gm"),e&&!1===e.multiline?this.matches=function(t,e){return(t?function(t,e,n){e=m(e,"g");for(var r=n.line,i=n.ch,o=t.firstLine();o<=r;r--,i=-1){var l=t.getLine(r);-1<i&&(l=l.slice(0,i));var h=v(l,e);if(h)return{from:L(r,h.index),to:L(r,h.index+h[0].length),match:h}}}:d)(n,r,e)}:this.matches=function(t,e){return(t?function(t,e,n){e=m(e,"gm");for(var r,i=1,o=n.line,l=t.firstLine();l<=o;){for(var h=0;h<i;h++){var s=t.getLine(o--);r=null==r?s.slice(0,n.ch):s+"\n"+r}i*=2;var c=v(r,e);if(c){var f=r.slice(0,c.index).split("\n"),u=c[0].split("\n"),a=o+f.length,g=f[f.length-1].length;return{from:L(a,g),to:L(a+u.length-1,1==u.length?g+u[0].length:u[u.length-1].length),match:c}}}}:function(t,e,n){if(!/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source))return d(t,e,n);e=m(e,"gm");for(var r,i=1,o=n.line,l=t.lastLine();o<=l;){for(var h=0;h<i&&!(l<o);h++){var s=t.getLine(o++);r=null==r?s:r+"\n"+s}i*=2,e.lastIndex=n.ch;var c=e.exec(r);if(c){var f=r.slice(0,c.index).split("\n"),u=c[0].split("\n"),a=n.line+f.length-1,g=f[f.length-1].length;return{from:L(a,g),to:L(a+u.length-1,1==u.length?g+u[0].length:u[u.length-1].length),match:c}}}})(n,r,e)})}x=String.prototype.normalize?(p=function(t){return t.normalize("NFD").toLowerCase()},function(t){return t.normalize("NFD")}):(p=function(t){return t.toLowerCase()},function(t){return t}),r.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var e=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));e&&0==i.cmpPos(e.from,e.to);)t?e.from.ch?e.from=L(e.from.line,e.from.ch-1):e=e.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(L(e.from.line-1))):e.to.ch<this.doc.getLine(e.to.line).length?e.to=L(e.to.line,e.to.ch+1):e=e.to.line==this.doc.lastLine()?null:this.matches(t,L(e.to.line+1,0));if(e)return this.pos=e,this.atOccurrence=!0,this.pos.match||!0;var n=L(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:n,to:n},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,e){if(this.atOccurrence){var n=i.splitLines(t);this.doc.replaceRange(n,this.pos.from,this.pos.to,e),this.pos.to=L(this.pos.from.line+n.length-1,n[n.length-1].length+(1==n.length?this.pos.from.ch:0))}}},i.defineExtension("getSearchCursor",function(t,e,n){return new r(this.doc,t,e,n)}),i.defineDocExtension("getSearchCursor",function(t,e,n){return new r(this,t,e,n)}),i.defineExtension("selectMatches",function(t,e){for(var n=[],r=this.getSearchCursor(t,this.getCursor("from"),e);r.findNext()&&!(0<i.cmpPos(r.to(),this.getCursor("to")));)n.push({anchor:r.from(),head:r.to()});n.length&&this.setSelections(n,0)})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(d){"use strict";function r(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function y(e){return e.state.search||(e.state.search=new r)}function a(e){return"string"==typeof e&&e==e.toLowerCase()}function m(e,r,o){return e.getSearchCursor(r,o,{caseFold:a(r),multiline:!0})}function h(e,r,o,n,t){e.openDialog?e.openDialog(r,t,{value:n,selectValueOnOpen:!0}):t(prompt(o,n))}function n(e){return e.replace(/\\(.)/g,function(e,r){return"n"==r?"\n":"r"==r?"\r":r})}function i(e){var r=e.match(/^\/(.*)\/([a-z]*)$/);if(r)try{e=new RegExp(r[1],-1==r[2].indexOf("i")?"":"i")}catch(e){}else e=n(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function g(e,r,o){var n,t;r.queryText=o,r.query=i(o),e.removeOverlay(r.overlay,a(r.query)),r.overlay=(n=r.query,t=a(r.query),"string"==typeof n?n=new RegExp(n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):n.global||(n=new RegExp(n.source,n.ignoreCase?"gi":"g")),{token:function(e){n.lastIndex=e.pos;var r=n.exec(e.string);if(r&&r.index==e.pos)return e.pos+=r[0].length||1,"searching";r?e.pos=r.index:e.skipToEnd()}}),e.addOverlay(r.overlay),e.showMatchesOnScrollbar&&(r.annotate&&(r.annotate.clear(),r.annotate=null),r.annotate=e.showMatchesOnScrollbar(r.query,a(r.query)))}function o(a,r,e,o){var n=y(a);if(n.query)return v(a,r);var t,i,s,c,l,u=a.getSelection()||n.lastQuery;if(u instanceof RegExp&&"x^"==u.source&&(u=null),e&&a.openDialog){var f=null,p=function(e,r){d.e_stop(r),e&&(e!=n.queryText&&(g(a,n,e),n.posFrom=n.posTo=a.getCursor()),f&&(f.style.opacity=1),v(a,r.shiftKey,function(e,r){var o;r.line<3&&document.querySelector&&(o=a.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>a.cursorCoords(r,"window").top&&((f=o).style.opacity=.4)}))};i=C(t=a),s=u,c=p,l=function(e,r){var o=d.keyName(e),n=a.getOption("extraKeys"),t=n&&n[o]||d.keyMap[a.getOption("keyMap")][o];"findNext"==t||"findPrev"==t||"findPersistentNext"==t||"findPersistentPrev"==t?(d.e_stop(e),g(a,y(a),r),a.execCommand(t)):"find"!=t&&"findPersistent"!=t||(d.e_stop(e),p(r,e))},t.openDialog(i,c,{value:s,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){x(t)},onKeyDown:l}),o&&u&&(g(a,n,u),v(a,r))}else h(a,C(a),"Search for:",u,function(e){e&&!n.query&&a.operation(function(){g(a,n,e),n.posFrom=n.posTo=a.getCursor(),v(a,r)})})}function v(o,n,t){o.operation(function(){var e=y(o),r=m(o,e.query,n?e.posFrom:e.posTo);(r.find(n)||(r=m(o,e.query,n?d.Pos(o.lastLine()):d.Pos(o.firstLine(),0))).find(n))&&(o.setSelection(r.from(),r.to()),o.scrollIntoView({from:r.from(),to:r.to()},20),e.posFrom=r.from(),e.posTo=r.to(),t&&t(r.from(),r.to()))})}function x(r){r.operation(function(){var e=y(r);e.lastQuery=e.query,e.query&&(e.query=e.queryText=null,r.removeOverlay(e.overlay),e.annotate&&(e.annotate.clear(),e.annotate=null))})}function C(e){return'<span class="CodeMirror-search-label">'+e.phrase("Search:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use /re/ syntax for regexp search)")+"</span>"}function q(r,n,t){r.operation(function(){for(var e=m(r,n);e.findNext();)if("string"!=typeof n){var o=r.getRange(e.from(),e.to()).match(n);e.replace(t.replace(/\$(\d)/g,function(e,r){return o[r]}))}else e.replace(t)})}function t(p,e){if(!p.getOption("readOnly")){var r=p.getSelection()||y(p).lastQuery,o='<span class="CodeMirror-search-label">'+(e?p.phrase("Replace all:"):p.phrase("Replace:"))+"</span>";h(p,o+(' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+p.phrase("(Use /re/ syntax for regexp search)")+"</span>"),o,r,function(f){f&&(f=i(f),h(p,'<span class="CodeMirror-search-label">'+p.phrase("With:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',p.phrase("Replace with:"),"",function(s){if(s=n(s),e)q(p,f,s);else{x(p);var c=m(p,f,p.getCursor("from")),l=function(){var e,r,o,n,t,a,i=c.from();!(e=c.findNext())&&(c=m(p,f),!(e=c.findNext())||i&&c.from().line==i.line&&c.from().ch==i.ch)||(p.setSelection(c.from(),c.to()),p.scrollIntoView({from:c.from(),to:c.to()}),o='<span class="CodeMirror-search-label">'+(a=r=p).phrase("Replace?")+"</span> <button>"+a.phrase("Yes")+"</button> <button>"+a.phrase("No")+"</button> <button>"+a.phrase("All")+"</button> <button>"+a.phrase("Stop")+"</button> ",n=p.phrase("Replace?"),t=[function(){u(e)},l,function(){q(p,f,s)}],r.openConfirm?r.openConfirm(o,t):confirm(n)&&t[0]())},u=function(o){c.replace("string"==typeof f?s:s.replace(/\$(\d)/g,function(e,r){return o[r]})),l()};l()}}))})}}d.commands.find=function(e){x(e),o(e)},d.commands.findPersistent=function(e){x(e),o(e,!1,!0)},d.commands.findPersistentNext=function(e){o(e,!1,!0,!0)},d.commands.findPersistentPrev=function(e){o(e,!0,!0,!0)},d.commands.findNext=o,d.commands.findPrev=function(e){o(e,!0)},d.commands.clearSearch=x,d.commands.replace=t,d.commands.replaceAll=function(e){t(e,!0)}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){function f(e,o,n){var t,i=e.getWrapperElement();return(t=i.appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?t.innerHTML=o:t.appendChild(o),s.addClass(i,"dialog-opened"),t}function p(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}s.defineExtension("openDialog",function(e,o,n){n||(n={}),p(this,null);var t=f(this,e,n.bottom),i=!1,r=this;function u(e){if("string"==typeof e)a.value=e;else{if(i)return;i=!0,s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t),r.focus(),n.onClose&&n.onClose(t)}}var l,a=t.getElementsByTagName("input")[0];return a?(a.focus(),n.value&&(a.value=n.value,!1!==n.selectValueOnOpen&&a.select()),n.onInput&&s.on(a,"input",function(e){n.onInput(e,a.value,u)}),n.onKeyUp&&s.on(a,"keyup",function(e){n.onKeyUp(e,a.value,u)}),s.on(a,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,a.value,u)||((27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(a.blur(),s.e_stop(e),u()),13==e.keyCode&&o(a.value,e))}),!1!==n.closeOnBlur&&s.on(a,"blur",u)):(l=t.getElementsByTagName("button")[0])&&(s.on(l,"click",function(){u(),r.focus()}),!1!==n.closeOnBlur&&s.on(l,"blur",u),l.focus()),u}),s.defineExtension("openConfirm",function(e,o,n){p(this,null);var t=f(this,e,n&&n.bottom),i=t.getElementsByTagName("button"),r=!1,u=this,l=1;function a(){r||(r=!0,s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t),u.focus())}i[0].focus();for(var c=0;c<i.length;++c){var d=i[c];!function(o){s.on(d,"click",function(e){s.e_preventDefault(e),a(),o&&o(u)})}(o[c]),s.on(d,"blur",function(){--l,setTimeout(function(){l<=0&&a()},200)}),s.on(d,"focus",function(){++l})}}),s.defineExtension("openNotification",function(e,o){p(this,u);var n,t=f(this,e,o&&o.bottom),i=!1,r=o&&void 0!==o.duration?o.duration:5e3;function u(){i||(i=!0,clearTimeout(n),s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t))}return s.on(t,"click",function(e){s.e_preventDefault(e),u()}),r&&(n=setTimeout(u,r)),u})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(r){var s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),k=r.Pos,p={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function v(t){return t&&t.bracketRegex||/[(){}[\]]/}function u(t,e,n){var r=t.getLineHandle(e.line),i=e.ch-1,a=n&&n.afterCursor;null==a&&(a=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var c=v(n),o=!a&&0<=i&&c.test(r.text.charAt(i))&&p[r.text.charAt(i)]||c.test(r.text.charAt(i+1))&&p[r.text.charAt(++i)];if(!o)return null;var l=">"==o.charAt(1)?1:-1;if(n&&n.strict&&0<l!=(i==e.ch))return null;var h=t.getTokenTypeAt(k(e.line,i+1)),s=f(t,k(e.line,i+(0<l?1:0)),l,h||null,n);return null==s?null:{from:k(e.line,i),to:s&&s.pos,match:s&&s.ch==o.charAt(0),forward:0<l}}function f(t,e,n,r,i){for(var a=i&&i.maxScanLineLength||1e4,c=i&&i.maxScanLines||1e3,o=[],l=v(i),h=0<n?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),s=e.line;s!=h;s+=n){var u=t.getLine(s);if(u){var f=0<n?0:u.length-1,m=0<n?u.length:-1;if(!(u.length>a))for(s==e.line&&(f=e.ch-(n<0?1:0));f!=m;f+=n){var g=u.charAt(f);if(l.test(g)&&(void 0===r||t.getTokenTypeAt(k(s,f+1))==r)){var d=p[g];if(d&&">"==d.charAt(1)==0<n)o.push(g);else{if(!o.length)return{pos:k(s,f),ch:g};o.pop()}}}}}return s-n!=(0<n?t.lastLine():t.firstLine())&&null}function e(t,e,n){for(var r=t.state.matchBrackets.maxHighlightLineLength||1e3,i=[],a=t.listSelections(),c=0;c<a.length;c++){var o=a[c].empty()&&u(t,a[c].head,n);if(o&&t.getLine(o.from.line).length<=r){var l=o.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";i.push(t.markText(o.from,k(o.from.line,o.from.ch+1),{className:l})),o.to&&t.getLine(o.to.line).length<=r&&i.push(t.markText(o.to,k(o.to.line,o.to.ch+1),{className:l}))}}if(i.length){s&&t.state.focused&&t.focus();var h=function(){t.operation(function(){for(var t=0;t<i.length;t++)i[t].clear()})};if(!e)return h;setTimeout(h,800)}}function i(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=e(t,!1,t.state.matchBrackets)})}r.defineOption("matchBrackets",!1,function(t,e,n){n&&n!=r.Init&&(t.off("cursorActivity",i),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),e&&(t.state.matchBrackets="object"==typeof e?e:{},t.on("cursorActivity",i))}),r.defineExtension("matchBrackets",function(){e(this,!0)}),r.defineExtension("findMatchingBracket",function(t,e,n){return(n||"boolean"==typeof e)&&(e=n?(n.strict=e,n):e?{strict:!0}:null),u(this,t,e)}),r.defineExtension("scanForBracket",function(t,e,n,r){return f(this,t,e,n,r)})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(k){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},y=k.Pos;function S(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}k.defineOption("autoCloseBrackets",!1,function(e,r,t){t&&t!=k.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),r&&(n(S(r,"pairs")),e.state.closeBrackets=r,e.addKeyMap(i))});var i={Backspace:function(e){var r=O(e);if(!r||e.getOption("disableInput"))return k.Pass;for(var t=S(r,"pairs"),n=e.listSelections(),i=0;i<n.length;i++){if(!n[i].empty())return k.Pass;var a=s(e,n[i].head);if(!a||t.indexOf(a)%2!=0)return k.Pass}for(var i=n.length-1;0<=i;i--){var o=n[i].head;e.replaceRange("",y(o.line,o.ch-1),y(o.line,o.ch+1),"+delete")}},Enter:function(n){var e=O(n),r=e&&S(e,"explode");if(!r||n.getOption("disableInput"))return k.Pass;for(var i=n.listSelections(),t=0;t<i.length;t++){if(!i[t].empty())return k.Pass;var a=s(n,i[t].head);if(!a||r.indexOf(a)%2!=0)return k.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),i=n.listSelections();for(var r=0;r<i.length;r++){var t=i[r].head.line;n.indentLine(t,null,!0),n.indentLine(t+1,null,!0)}})}};function n(e){for(var r=0;r<e.length;r++){var t=e.charAt(r),n="'"+t+"'";i[n]||(i[n]=a(t))}}function a(r){return function(e){return function(i,e){var r=O(i);if(!r||i.getOption("disableInput"))return k.Pass;var t=S(r,"pairs"),n=t.indexOf(e);if(-1==n)return k.Pass;for(var a,o=S(r,"closeBefore"),s=S(r,"triples"),l=t.charAt(n+1)==e,c=i.listSelections(),f=n%2==0,h=0;h<c.length;h++){var u,d=c[h],p=d.head,g=i.getRange(p,y(p.line,p.ch+1));if(f&&!d.empty())u="surround";else if(!l&&f||g!=e)if(l&&1<p.ch&&0<=s.indexOf(e)&&i.getRange(y(p.line,p.ch-2),p)==e+e){if(2<p.ch&&/\bstring/.test(i.getTokenTypeAt(y(p.line,p.ch-2))))return k.Pass;u="addFour"}else if(l){var v=0==p.ch?" ":i.getRange(y(p.line,p.ch-1),p);if(k.isWordChar(g)||v==e||k.isWordChar(v))return k.Pass;u="both"}else{if(!f||!(0===g.length||/\s/.test(g)||-1<o.indexOf(g)))return k.Pass;u="both"}else u=!l||(b=p,void 0,C=(m=i).getTokenAt(y(b.line,b.ch+1)),!/\bstring/.test(C.type)||C.start!=b.ch||0!=b.ch&&/\bstring/.test(m.getTokenTypeAt(b)))?0<=s.indexOf(e)&&i.getRange(p,y(p.line,p.ch+3))==e+e+e?"skipThree":"skip":"both";if(a){if(a!=u)return k.Pass}else a=u}var m,b,C;var x=n%2?t.charAt(n-1):e,P=n%2?e:t.charAt(n+1);i.operation(function(){if("skip"==a)i.execCommand("goCharRight");else if("skipThree"==a)for(var e=0;e<3;e++)i.execCommand("goCharRight");else if("surround"==a){for(var r=i.getSelections(),e=0;e<r.length;e++)r[e]=x+r[e]+P;i.replaceSelections(r,"around"),r=i.listSelections().slice();for(var e=0;e<r.length;e++)r[e]=(t=r[e],void 0,n=0<k.cmpPos(t.anchor,t.head),{anchor:new y(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new y(t.head.line,t.head.ch+(n?1:-1))});i.setSelections(r)}else"both"==a?(i.replaceSelection(x+P,null),i.triggerElectric(x+P),i.execCommand("goCharLeft")):"addFour"==a&&(i.replaceSelection(x+x+x+x,"before"),i.execCommand("goCharRight"));var t,n})}(e,r)}}function O(e){var r=e.state.closeBrackets;return!r||r.override?r:e.getModeAt(e.getCursor()).closeBrackets||r}function s(e,r){var t=e.getRange(y(r.line,r.ch-1),y(r.line,r.ch+1));return 2==t.length?t:null}n(t.pairs+"`")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var y={},E=/[^\s\u00a0]/,M=e.Pos;function s(e){var n=e.search(E);return-1==n?0:n}function S(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=y);for(var n=this,t=1/0,i=this.listSelections(),l=null,o=i.length-1;0<=o;o--){var r=i[o].from(),a=i[o].to();r.line>=t||(a.line>=t&&(a=M(t,0)),t=r.line,null==l?l=n.uncomment(r,a,e)?"un":(n.lineComment(r,a,e),"line"):"un"==l?n.uncomment(r,a,e):n.lineComment(r,a,e))}}),e.defineExtension("lineComment",function(o,e,r){r||(r=y);var a=this,n=S(a,o),t=a.getLine(o.line);if(null!=t&&(i=o,l=t,!/\bstring\b/.test(a.getTokenTypeAt(M(i.line,0)))||/^[\'\"\`]/.test(l))){var i,l,m=r.lineComment||n.lineComment;if(m){var c=Math.min(0!=e.ch||e.line==o.line?e.line+1:e.line,a.lastLine()+1),f=null==r.padding?" ":r.padding,g=r.commentBlankLines||o.line==e.line;a.operation(function(){if(r.indent){for(var e=null,n=o.line;n<c;++n){var t=(i=a.getLine(n)).slice(0,s(i));(null==e||e.length>t.length)&&(e=t)}for(n=o.line;n<c;++n){var i=a.getLine(n),l=e.length;(g||E.test(i))&&(i.slice(0,l)!=e&&(l=s(i)),a.replaceRange(e+m+f,M(n,0),M(n,l)))}}else for(n=o.line;n<c;++n)(g||E.test(a.getLine(n)))&&a.replaceRange(m+f,M(n,0))})}else(r.blockCommentStart||n.blockCommentStart)&&(r.fullLines=!0,a.blockComment(o,e,r))}}),e.defineExtension("blockComment",function(i,l,o){o||(o=y);var r=this,a=S(r,i),m=o.blockCommentStart||a.blockCommentStart,c=o.blockCommentEnd||a.blockCommentEnd;if(m&&c){if(!/\bcomment\b/.test(r.getTokenTypeAt(M(i.line,0)))){var f=Math.min(l.line,r.lastLine());f!=i.line&&0==l.ch&&E.test(r.getLine(f))&&--f;var g=null==o.padding?" ":o.padding;i.line>f||r.operation(function(){if(0!=o.fullLines){var e=E.test(r.getLine(f));r.replaceRange(g+c,M(f)),r.replaceRange(m+g,M(i.line,0));var n=o.blockCommentLead||a.blockCommentLead;if(null!=n)for(var t=i.line+1;t<=f;++t)(t!=f||e)&&r.replaceRange(n+g,M(t,0))}else r.replaceRange(c,l),r.replaceRange(m,i)})}}else(o.lineComment||a.lineComment)&&0!=o.fullLines&&r.lineComment(i,l,o)}),e.defineExtension("uncomment",function(e,n,t){t||(t=y);var l,o=this,i=S(o,e),r=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,o.lastLine()),a=Math.min(e.line,r),m=t.lineComment||i.lineComment,c=[],f=null==t.padding?" ":t.padding;e:if(m){for(var g=a;g<=r;++g){var s=o.getLine(g),d=s.indexOf(m);if(-1<d&&!/comment/.test(o.getTokenTypeAt(M(g,d+1)))&&(d=-1),-1==d&&E.test(s))break e;if(-1<d&&E.test(s.slice(0,d)))break e;c.push(s)}if(o.operation(function(){for(var e=a;e<=r;++e){var n=c[e-a],t=n.indexOf(m),i=t+m.length;t<0||(n.slice(i,i+f.length)==f&&(i+=f.length),l=!0,o.replaceRange("",M(e,t),M(e,i)))}}),l)return!0}var u=t.blockCommentStart||i.blockCommentStart,h=t.blockCommentEnd||i.blockCommentEnd;if(!u||!h)return!1;var p=t.blockCommentLead||i.blockCommentLead,v=o.getLine(a),C=v.indexOf(u);if(-1==C)return!1;var b=r==a?v:o.getLine(r),k=b.indexOf(h,r==a?C+u.length:0),L=M(a,C+1),x=M(r,k+1);if(-1==k||!/comment/.test(o.getTokenTypeAt(L))||!/comment/.test(o.getTokenTypeAt(x))||-1<o.getRange(L,x,"\n").indexOf(h))return!1;var R=v.lastIndexOf(u,e.ch),O=-1==R?-1:v.slice(0,e.ch).indexOf(h,R+u.length);if(-1!=R&&-1!=O&&O+h.length!=e.ch)return!1;O=b.indexOf(h,n.ch);var T=b.slice(n.ch).lastIndexOf(u,O-n.ch);return R=-1==O||-1==T?-1:n.ch+T,(-1==O||-1==R||R==n.ch)&&(o.operation(function(){o.replaceRange("",M(r,k-(f&&b.slice(k-f.length,k)==f?f.length:0)),M(r,k+h.length));var e=C+u.length;if(f&&v.slice(e,e+f.length)==f&&(e+=f.length),o.replaceRange("",M(a,C),M(a,e)),p)for(var n=a+1;n<=r;++n){var t=o.getLine(n),i=t.indexOf(p);if(-1!=i&&!E.test(t.slice(0,i))){var l=i+p.length;f&&t.slice(l,l+f.length)==f&&(l+=f.length),o.replaceRange("",M(n,i),M(n,l))}}}),!0)})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(x){"use strict";var S=x.Pos;function l(t,r,e){for(var n=e.paragraphStart||t.getHelper(r,"paragraphStart"),o=r.line,a=t.firstLine();a<o;--o){var i=t.getLine(o);if(n&&n.test(i))break;if(!/\S/.test(i)){++o;break}}for(var f=e.paragraphEnd||t.getHelper(r,"paragraphEnd"),l=r.line+1,h=t.lastLine();l<=h;++l){i=t.getLine(l);if(f&&f.test(i)){++l;break}if(!/\S/.test(i))break}return{from:o,to:l}}function E(t,r,e,n){for(var o=r;o<t.length&&" "==t.charAt(o);)o++;for(;0<o&&!e.test(t.slice(o-1,o+1));--o);for(var a=!0;;a=!1){var i=o;if(n)for(;" "==t.charAt(i-1);)--i;if(0!=i||!a)return{from:i,to:o};o=r}}function h(e,t,r,n){t=e.clipPos(t),r=e.clipPos(r);var o=n.column||80,a=n.wrapOn||/\s\S|-[^\.\d]/,i=!1!==n.killTrailingSpace,f=[],l="",h=t.line,s=e.getRange(t,r,!1);if(!s.length)return null;var c=s[0].match(/^[ \t]*/)[0];c.length>=o&&(o=c.length+1);for(var g=0;g<s.length;++g){var p=s[g],u=l.length,m=0;l&&p&&!a.test(l.charAt(l.length-1)+p.charAt(0))&&(l+=" ",m=1);var v="";if(g&&(v=p.match(/^\s*/)[0],p=p.slice(v.length)),l+=p,g){var d=l.length>o&&c==v&&E(l,o,a,i);d&&d.from==u&&d.to==u+m?(l=c+p,++h):f.push({text:[m?" ":""],from:S(h,u),to:S(h+1,v.length)})}for(;l.length>o;){var b=E(l,o,a,i);f.push({text:["",c],from:S(h,b.from),to:S(h,b.to)}),l=c+l.slice(b.to),++h}}return f.length&&e.operation(function(){for(var t=0;t<f.length;++t){var r=f[t];(r.text||x.cmpPos(r.from,r.to))&&e.replaceRange(r.text,r.from,r.to)}}),f.length?{from:f[0].from,to:x.changeEnd(f[f.length-1])}:null}x.defineExtension("wrapParagraph",function(t,r){r=r||{},t||(t=this.getCursor());var e=l(this,t,r);return h(this,S(e.from,0),S(e.to-1),r)}),x.commands.wrapLines=function(i){i.operation(function(){for(var t=i.listSelections(),r=i.lastLine()+1,e=t.length-1;0<=e;e--){var n,o=t[e];if(o.empty()){var a=l(i,o.head,{});n={from:S(a.from,0),to:S(a.to-1)}}else n={from:o.from(),to:o.to()};n.to.line>=r||(r=n.from.line,h(i,n.from,n.to,{}))}})},x.defineExtension("wrapRange",function(t,r,e){return h(this,t,r,e||{})}),x.defineExtension("wrapParagraphsInRange",function(t,r,e){e=e||{};for(var n=this,o=[],a=t.line;a<=r.line;){var i=l(n,S(a,0),e);o.push(i),a=i.to}var f=!1;return o.length&&n.operation(function(){for(var t=o.length-1;0<=t;--t)f=f||h(n,S(o[t].from,0),S(o[t].to-1),e)}),f})});;
  ;!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(a){"use strict";function i(i,t,n,l){if(n&&n.call){var f=n;n=null}else f=c(i,n,"rangeFinder");"number"==typeof t&&(t=a.Pos(t,0));var d=c(i,n,"minFoldSize");function e(n){var e=f(i,t);if(!e||e.to.line-e.from.line<d)return null;for(var o=i.findMarksAt(e.from),r=0;r<o.length;++r)if(o[r].__isFold&&"fold"!==l){if(!n)return null;e.cleared=!0,o[r].clear()}return e}var o=e(!0);if(c(i,n,"scanUp"))for(;!o&&t.line>i.firstLine();)t=a.Pos(t.line-1,0),o=e(!1);if(o&&!o.cleared&&"unfold"!==l){var r=function(n,e){var o=c(n,e,"widget");if("string"==typeof o){var r=document.createTextNode(o);(o=document.createElement("span")).appendChild(r),o.className="CodeMirror-foldmarker"}else o&&(o=o.cloneNode(!0));return o}(i,n);a.on(r,"mousedown",function(n){u.clear(),a.e_preventDefault(n)});var u=i.markText(o.from,o.to,{replacedWith:r,clearOnEnter:c(i,n,"clearOnEnter"),__isFold:!0});u.on("clear",function(n,e){a.signal(i,"unfold",i,n,e)}),a.signal(i,"fold",i,o.from,o.to)}}a.newFoldFunction=function(o,r){return function(n,e){i(n,e,{rangeFinder:o,widget:r})}},a.defineExtension("foldCode",function(n,e,o){i(this,n,e,o)}),a.defineExtension("isFolded",function(n){for(var e=this.findMarksAt(n),o=0;o<e.length;++o)if(e[o].__isFold)return!0}),a.commands.toggleFold=function(n){n.foldCode(n.getCursor())},a.commands.fold=function(n){n.foldCode(n.getCursor(),null,"fold")},a.commands.unfold=function(n){n.foldCode(n.getCursor(),null,"unfold")},a.commands.foldAll=function(o){o.operation(function(){for(var n=o.firstLine(),e=o.lastLine();n<=e;n++)o.foldCode(a.Pos(n,0),null,"fold")})},a.commands.unfoldAll=function(o){o.operation(function(){for(var n=o.firstLine(),e=o.lastLine();n<=e;n++)o.foldCode(a.Pos(n,0),null,"unfold")})},a.registerHelper("fold","combine",function(){var i=Array.prototype.slice.call(arguments,0);return function(n,e){for(var o=0;o<i.length;++o){var r=i[o](n,e);if(r)return r}}}),a.registerHelper("fold","auto",function(n,e){for(var o=n.getHelpers(e,"fold"),r=0;r<o.length;r++){var i=o[r](n,e);if(i)return i}});var t={rangeFinder:a.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function c(n,e,o){if(e&&void 0!==e[o])return e[o];var r=n.options.foldOptions;return r&&void 0!==r[o]?r[o]:t[o]}a.defineOption("foldOptions",null),a.defineExtension("foldOption",function(n,e){return c(this,n,e)})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(k){"use strict";k.registerHelper("fold","brace",function(i,o){var l,f=o.line,s=i.getLine(f);function e(e){for(var r=o.ch,n=0;;){var t=r<=0?-1:s.lastIndexOf(e,r-1);if(-1!=t){if(1==n&&t<o.ch)break;if(l=i.getTokenTypeAt(k.Pos(f,t+1)),!/^(comment|string)/.test(l))return t+1;r=t-1}else{if(1==n)break;n=1,r=s.length}}}var r="{",n="}",t=e("{");if(null==t&&(n="]",t=e(r="[")),null!=t){var u,a,d=1,c=i.lastLine();e:for(var g=f;g<=c;++g)for(var v=i.getLine(g),p=g==f?t:0;;){var m=v.indexOf(r,p),P=v.indexOf(n,p);if(m<0&&(m=v.length),P<0&&(P=v.length),(p=Math.min(m,P))==v.length)break;if(i.getTokenTypeAt(k.Pos(g,p+1))==l)if(p==m)++d;else if(!--d){u=g,a=p;break e}++p}if(null!=u&&f!=u)return{from:k.Pos(f,t),to:k.Pos(u,a)}}}),k.registerHelper("fold","import",function(o,e){function r(e){if(e<o.firstLine()||e>o.lastLine())return null;var r=o.getTokenAt(k.Pos(e,1));if(/\S/.test(r.string)||(r=o.getTokenAt(k.Pos(e,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var n=e,t=Math.min(o.lastLine(),e+10);n<=t;++n){var i=o.getLine(n).indexOf(";");if(-1!=i)return{startCh:r.end,end:k.Pos(n,i)}}}var n,t=e.line,i=r(t);if(!i||r(t-1)||(n=r(t-2))&&n.end.line==t-1)return null;for(var l=i.end;;){var f=r(l.line+1);if(null==f)break;l=f.end}return{from:o.clipPos(k.Pos(t,i.startCh+1)),to:l}}),k.registerHelper("fold","include",function(n,e){function r(e){if(e<n.firstLine()||e>n.lastLine())return null;var r=n.getTokenAt(k.Pos(e,1));return/\S/.test(r.string)||(r=n.getTokenAt(k.Pos(e,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var t=e.line,i=r(t);if(null==i||null!=r(t-1))return null;for(var o=t;;){if(null==r(o+1))break;++o}return{from:k.Pos(t,i+1),to:n.clipPos(k.Pos(o))}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(Le){"use strict";Le.defineMode("javascript",function(e,l){var n,a,d=e.indentUnit,p=l.statementIndent,o=l.jsonld,c=l.json||o,s=l.typescript,f=l.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),m=/[+\-*&%=<>!?|~^@]/,v=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function k(e,t,r){return n=e,a=r,t}function y(e,t){var a,r=e.next();if('"'==r||"'"==r)return t.tokenize=(a=r,function(e,t){var r,n=!1;if(o&&"@"==e.peek()&&e.match(v))return t.tokenize=y,k("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=a||n);)n=!n&&"\\"==r;return n||(t.tokenize=y),k("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return k("number","number");if("."==r&&e.match(".."))return k("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return k(r);if("="==r&&e.eat(">"))return k("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return k("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),k("number","number");if("/"==r)return e.eat("*")?(t.tokenize=w)(e,t):e.eat("/")?(e.skipToEnd(),k("comment","comment")):Ke(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),k("regexp","string-2")):(e.eat("="),k("operator","operator",e.current()));if("`"==r)return(t.tokenize=b)(e,t);if("#"==r)return e.skipToEnd(),k("error","error");if(m.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),k("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(u.propertyIsEnumerable(n)){var i=u[n];return k(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return k("async","keyword",n)}return k("variable","variable",n)}}function w(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=y;break}n="*"==r}return k("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=y;break}n=!n&&"\\"==r}return k("quasi","string-2",e.current())}var x="([{}])";function i(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(s){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;0<=o;--o){var c=e.string.charAt(o),u=x.indexOf(c);if(0<=u&&u<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(3<=u&&u<6)++a;else if(f.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function g(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function j(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var M={state:null,column:null,marked:null,cc:null};function V(){for(var e=arguments.length-1;0<=e;e--)M.cc.push(arguments[e])}function A(){return V.apply(null,arguments),!0}function E(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function r(e){var t=M.state;if(M.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,r){{if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new I(n,r.vars,!0):null}return E(t,r.vars)?r:new I(r.prev,new T(t,r.vars),!1)}return null}}(e,t.context);if(null!=r)return void(t.context=r)}else if(!E(e,t.localVars))return void(t.localVars=new T(e,t.localVars));l.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new T(e,t.globalVars))}function z(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function I(e,t,r){this.prev=e,this.vars=t,this.block=r}function T(e,t){this.name=e,this.next=t}var t=new T("this",new T("arguments",null));function $(){M.state.context=new I(M.state.context,M.state.localVars,!1),M.state.localVars=t}function C(){M.state.context=new I(M.state.context,M.state.localVars,!0),M.state.localVars=null}function O(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function q(n,a){var e=function(){var e=M.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var r=e.lexical;r&&")"==r.type&&r.align;r=r.prev)t=r.indented;e.lexical=new g(t,M.stream.column(),n,null,e.lexical,a)};return e.lex=!0,e}function P(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function S(r){return function e(t){return t==r?A():";"==r||"}"==t||")"==t||"]"==t?V():A(e)}}function N(e,t){return"var"==e?A(q("vardef",t),ye,S(";"),P):"keyword a"==e?A(q("form"),W,N,P):"keyword b"==e?A(q("form"),N,P):"keyword d"==e?M.stream.match(/^\s*$/,!1)?A():A(q("stat"),F,S(";"),P):"debugger"==e?A(S(";")):"{"==e?A(q("}"),C,ie,P,O):";"==e?A():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==P&&M.state.cc.pop()(),A(q("form"),W,N,P,je)):"function"==e?A(Ee):"for"==e?A(q("form"),Me,N,P):"class"==e||s&&"interface"==t?(M.marked="keyword",A(q("form","class"==e?e:t),Ce,P)):"variable"==e?s&&"declare"==t?(M.marked="keyword",A(N)):s&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?A(Ge):"type"==t?A(Ie,S("operator"),se,S(";")):A(q("form"),we,S("{"),q("}"),ie,P,P)):s&&"namespace"==t?(M.marked="keyword",A(q("form"),B,N,P)):s&&"abstract"==t?(M.marked="keyword",A(N)):A(q("stat"),Z):"switch"==e?A(q("form"),W,S("{"),q("}","switch"),C,ie,P,P,O):"case"==e?A(B,S(":")):"default"==e?A(S(":")):"catch"==e?A(q("form"),$,U,N,P,O):"export"==e?A(q("stat"),Se,P):"import"==e?A(q("stat"),Ue,P):"async"==e?A(N):"@"==t?A(B,N):V(q("stat"),B,S(";"),P)}function U(e){if("("==e)return A(Te,S(")"))}function B(e,t){return D(e,t,!1)}function H(e,t){return D(e,t,!0)}function W(e){return"("!=e?V():A(q(")"),B,S(")"),P)}function D(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?R:Q;if("("==e)return A($,q(")"),ne(Te,")"),P,S("=>"),n,O);if("variable"==e)return V($,we,S("=>"),n,O)}var a,i=r?J:G;return h.hasOwnProperty(e)?A(i):"function"==e?A(Ee,i):"class"==e||s&&"interface"==t?(M.marked="keyword",A(q("form"),$e,P)):"keyword c"==e||"async"==e?A(r?H:B):"("==e?A(q(")"),F,S(")"),P,i):"operator"==e||"spread"==e?A(r?H:B):"["==e?A(q("]"),Fe,P,i):"{"==e?ae(ee,"}",null,i):"quasi"==e?V(K,i):"new"==e?A((a=r,function(e){return"."==e?A(a?Y:X):"variable"==e&&s?A(me,a?J:G):V(a?H:B)})):"import"==e?A(B):A()}function F(e){return e.match(/[;\}\)\],]/)?V():V(B)}function G(e,t){return","==e?A(B):J(e,t,!1)}function J(e,t,r){var n=0==r?G:J,a=0==r?B:H;return"=>"==e?A($,r?R:Q,O):"operator"==e?/\+\+|--/.test(t)||s&&"!"==t?A(n):s&&"<"==t&&M.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?A(q(">"),ne(se,">"),P,n):"?"==t?A(B,S(":"),a):A(a):"quasi"==e?V(K,n):";"!=e?"("==e?ae(H,")","call",n):"."==e?A(_,n):"["==e?A(q("]"),F,S("]"),P,n):s&&"as"==t?(M.marked="keyword",A(se,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),A(a)):void 0:void 0}function K(e,t){return"quasi"!=e?V():"${"!=t.slice(t.length-2)?A(K):A(B,L)}function L(e){if("}"==e)return M.marked="string-2",M.state.tokenize=b,A(K)}function Q(e){return i(M.stream,M.state),V("{"==e?N:B)}function R(e){return i(M.stream,M.state),V("{"==e?N:H)}function X(e,t){if("target"==t)return M.marked="keyword",A(G)}function Y(e,t){if("target"==t)return M.marked="keyword",A(J)}function Z(e){return":"==e?A(P,N):V(G,S(";"),P)}function _(e){if("variable"==e)return M.marked="property",A()}function ee(e,t){if("async"==e)return M.marked="property",A(ee);if("variable"==e||"keyword"==M.style){return M.marked="property","get"==t||"set"==t?A(te):(s&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),A(re));var r}else{if("number"==e||"string"==e)return M.marked=o?"property":M.style+" property",A(re);if("jsonld-keyword"==e)return A(re);if(s&&z(t))return M.marked="keyword",A(ee);if("["==e)return A(B,oe,S("]"),re);if("spread"==e)return A(H,re);if("*"==t)return M.marked="keyword",A(ee);if(":"==e)return V(re)}}function te(e){return"variable"!=e?V(re):(M.marked="property",A(Ee))}function re(e){return":"==e?A(H):"("==e?V(Ee):void 0}function ne(n,a,i){function o(e,t){if(i?-1<i.indexOf(e):","==e){var r=M.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),A(function(e,t){return e==a||t==a?V():V(n)},o)}return e==a||t==a?A():i&&-1<i.indexOf(";")?V(n):A(S(a))}return function(e,t){return e==a||t==a?A():V(n,o)}}function ae(e,t,r){for(var n=3;n<arguments.length;n++)M.cc.push(arguments[n]);return A(q(t,r),ne(e,t),P)}function ie(e){return"}"==e?A():V(N,ie)}function oe(e,t){if(s){if(":"==e||"in"==t)return A(se);if("?"==t)return A(oe)}}function ce(e){if(s&&":"==e)return M.stream.match(/^\s*\w+\s+is\b/,!1)?A(B,ue,se):A(se)}function ue(e,t){if("is"==t)return M.marked="keyword",A()}function se(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(M.marked="keyword",A("typeof"==t?H:se)):"variable"==e||"void"==t?(M.marked="type",A(pe)):"|"==t||"&"==t?A(se):"string"==e||"number"==e||"atom"==e?A(pe):"["==e?A(q("]"),ne(se,"]",","),P,pe):"{"==e?A(q("}"),ne(le,"}",",;"),P,pe):"("==e?A(ne(de,")"),fe,pe):"<"==e?A(ne(se,">"),se):void 0}function fe(e){if("=>"==e)return A(se)}function le(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",A(le)):"?"==t||"number"==e||"string"==e?A(le):":"==e?A(se):"["==e?A(S("variable"),oe,S("]"),le):"("==e?V(ze,le):void 0}function de(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?A(de):":"==e?A(se):"spread"==e?A(de):V(se)}function pe(e,t){return"<"==t?A(q(">"),ne(se,">"),P,pe):"|"==t||"."==e||"&"==t?A(se):"["==e?A(se,S("]"),pe):"extends"==t||"implements"==t?(M.marked="keyword",A(se)):"?"==t?A(se,S(":"),se):void 0}function me(e,t){if("<"==t)return A(q(">"),ne(se,">"),P,pe)}function ve(){return V(se,ke)}function ke(e,t){if("="==t)return A(se)}function ye(e,t){return"enum"==t?(M.marked="keyword",A(Ge)):V(we,oe,he,ge)}function we(e,t){return s&&z(t)?(M.marked="keyword",A(we)):"variable"==e?(r(t),A()):"spread"==e?A(we):"["==e?ae(xe,"]"):"{"==e?ae(be,"}"):void 0}function be(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?A(we):"}"==e?V():"["==e?A(B,S("]"),S(":"),be):A(S(":"),we,he)):(r(t),A(he))}function xe(){return V(we,he)}function he(e,t){if("="==t)return A(H)}function ge(e){if(","==e)return A(ye)}function je(e,t){if("keyword b"==e&&"else"==t)return A(q("form","else"),N,P)}function Me(e,t){return"await"==t?A(Me):"("==e?A(q(")"),Ve,P):void 0}function Ve(e){return"var"==e?A(ye,Ae):"variable"==e?A(Ae):V(Ae)}function Ae(e,t){return")"==e?A():";"==e?A(Ae):"in"==t||"of"==t?(M.marked="keyword",A(B,Ae)):V(B,Ae)}function Ee(e,t){return"*"==t?(M.marked="keyword",A(Ee)):"variable"==e?(r(t),A(Ee)):"("==e?A($,q(")"),ne(Te,")"),P,ce,N,O):s&&"<"==t?A(q(">"),ne(ve,">"),P,Ee):void 0}function ze(e,t){return"*"==t?(M.marked="keyword",A(ze)):"variable"==e?(r(t),A(ze)):"("==e?A($,q(")"),ne(Te,")"),P,ce,O):s&&"<"==t?A(q(">"),ne(ve,">"),P,ze):void 0}function Ie(e,t){return"keyword"==e||"variable"==e?(M.marked="type",A(Ie)):"<"==t?A(q(">"),ne(ve,">"),P):void 0}function Te(e,t){return"@"==t&&A(B,Te),"spread"==e?A(Te):s&&z(t)?(M.marked="keyword",A(Te)):s&&"this"==e?A(oe,he):V(we,oe,he)}function $e(e,t){return"variable"==e?Ce(e,t):Oe(e,t)}function Ce(e,t){if("variable"==e)return r(t),A(Oe)}function Oe(e,t){return"<"==t?A(q(">"),ne(ve,">"),P,Oe):"extends"==t||"implements"==t||s&&","==e?("implements"==t&&(M.marked="keyword"),A(s?se:B,Oe)):"{"==e?A(q("}"),qe,P):void 0}function qe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||s&&z(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",A(qe)):"variable"==e||"keyword"==M.style?(M.marked="property",A(s?Pe:Ee,qe)):"number"==e||"string"==e?A(s?Pe:Ee,qe):"["==e?A(B,oe,S("]"),s?Pe:Ee,qe):"*"==t?(M.marked="keyword",A(qe)):s&&"("==e?V(ze,qe):";"==e||","==e?A(qe):"}"==e?A():"@"==t?A(B,qe):void 0}function Pe(e,t){if("?"==t)return A(Pe);if(":"==e)return A(se,he);if("="==t)return A(H);var r=M.state.lexical.prev;return V(r&&"interface"==r.info?ze:Ee)}function Se(e,t){return"*"==t?(M.marked="keyword",A(De,S(";"))):"default"==t?(M.marked="keyword",A(B,S(";"))):"{"==e?A(ne(Ne,"}"),De,S(";")):V(N)}function Ne(e,t){return"as"==t?(M.marked="keyword",A(S("variable"))):"variable"==e?V(H,Ne):void 0}function Ue(e){return"string"==e?A():"("==e?V(B):V(Be,He,De)}function Be(e,t){return"{"==e?ae(Be,"}"):("variable"==e&&r(t),"*"==t&&(M.marked="keyword"),A(We))}function He(e){if(","==e)return A(Be,He)}function We(e,t){if("as"==t)return M.marked="keyword",A(Be)}function De(e,t){if("from"==t)return M.marked="keyword",A(B)}function Fe(e){return"]"==e?A():V(ne(H,"]"))}function Ge(){return V(q("form"),we,S("{"),q("}"),ne(Je,"}"),P,P)}function Je(){return V(we,he)}function Ke(e,t,r){return t.tokenize==y&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return P.lex=O.lex=!0,{startState:function(e){var t={tokenize:y,lastType:"sof",cc:[],lexical:new g((e||0)-d,0,"block",!1),localVars:l.localVars,context:l.localVars&&new I(null,null,!1),indented:e||0};return l.globalVars&&"object"==typeof l.globalVars&&(t.globalVars=l.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),i(e,t)),t.tokenize!=w&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",function(e,t,r,n,a){var i=e.cc;for(M.state=e,M.stream=a,M.marked=null,M.cc=i,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():c?B:N)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return M.marked?M.marked:"variable"==r&&j(e,n)?"variable-2":t}}(t,r,n,a,e))},indent:function(e,t){if(e.tokenize==w)return Le.Pass;if(e.tokenize!=y)return 0;var r,n=t&&t.charAt(0),a=e.lexical;if(!/^\s*else\b/.test(t))for(var i=e.cc.length-1;0<=i;--i){var o=e.cc[i];if(o==P)a=a.prev;else if(o!=je)break}for(;("stat"==a.type||"form"==a.type)&&("}"==n||(r=e.cc[e.cc.length-1])&&(r==G||r==J)&&!/^[,\.=+\-*:?[\(]/.test(t));)a=a.prev;p&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c,u,s=a.type,f=n==s;return"vardef"==s?a.indented+("operator"==e.lastType||","==e.lastType?a.info.length+1:0):"form"==s&&"{"==n?a.indented:"form"==s?a.indented+d:"stat"==s?a.indented+(u=t,"operator"==(c=e).lastType||","==c.lastType||m.test(u.charAt(0))||/[,.]/.test(u.charAt(0))?p||d:0):"switch"!=a.info||f||0==l.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:d):a.indented+(/^(?:case|default)\b/.test(t)?d:2*d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:c?null:"/*",blockCommentEnd:c?null:"*/",blockCommentContinue:c?null:" * ",lineComment:c?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:c?"json":"javascript",jsonldMode:o,jsonMode:c,expressionAllowed:Ke,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=B&&t!=H||e.cc.pop()}}}),Le.registerHelper("wordChars","javascript",/[\w$]/),Le.defineMIME("text/javascript","javascript"),Le.defineMIME("text/ecmascript","javascript"),Le.defineMIME("application/javascript","javascript"),Le.defineMIME("application/x-javascript","javascript"),Le.defineMIME("application/ecmascript","javascript"),Le.defineMIME("application/json",{name:"javascript",json:!0}),Le.defineMIME("application/x-json",{name:"javascript",json:!0}),Le.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),Le.defineMIME("text/typescript",{name:"javascript",typescript:!0}),Le.defineMIME("application/typescript",{name:"javascript",typescript:!0})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(u){"use strict";var e=u.commands,d=u.Pos;function t(t,n){t.extendSelectionsBy(function(e){return t.display.shift||t.doc.extend||e.empty()?function(e,t,n){if(n<0&&0==t.ch)return e.clipPos(d(t.line-1));var r=e.getLine(t.line);if(0<n&&t.ch>=r.length)return e.clipPos(d(t.line+1,0));for(var o,i="start",l=t.ch,a=n<0?0:r.length,s=0;l!=a;l+=n,s++){var c=r.charAt(n<0?l-1:l),f="_"!=c&&u.isWordChar(c)?"w":"o";if("w"==f&&c.toUpperCase()==c&&(f="W"),"start"==i)"o"!=f&&(i="in",o=f);else if("in"==i&&o!=f){if("w"==o&&"W"==f&&n<0&&l--,"W"==o&&"w"==f&&0<n){o="w";continue}break}}return d(t.line,l)}(t.doc,e.head,n):n<0?e.from():e.to()})}function n(l,a){if(l.isReadOnly())return u.Pass;l.operation(function(){for(var e=l.listSelections().length,t=[],n=-1,r=0;r<e;r++){var o=l.listSelections()[r].head;if(!(o.line<=n)){var i=d(o.line+(a?0:1),0);l.replaceRange("\n",i,null,"+insertLine"),l.indentLine(i.line,null,!0),t.push({head:i,anchor:i}),n=o.line+1}}l.setSelections(t)}),l.execCommand("indentAuto")}function c(e,t){for(var n=t.ch,r=n,o=e.getLine(t.line);n&&u.isWordChar(o.charAt(n-1));)--n;for(;r<o.length&&u.isWordChar(o.charAt(r));)++r;return{from:d(t.line,n),to:d(t.line,r),word:o.slice(n,r)}}function r(e,t){for(var n=e.listSelections(),r=[],o=0;o<n.length;o++){var i=n[o],l=e.findPosV(i.anchor,t,"line",i.anchor.goalColumn),a=e.findPosV(i.head,t,"line",i.head.goalColumn);l.goalColumn=null!=i.anchor.goalColumn?i.anchor.goalColumn:e.cursorCoords(i.anchor,"div").left,a.goalColumn=null!=i.head.goalColumn?i.head.goalColumn:e.cursorCoords(i.head,"div").left;var s={anchor:l,head:a};r.push(i),r.push(s)}e.setSelections(r)}e.goSubwordLeft=function(e){t(e,-1)},e.goSubwordRight=function(e){t(e,1)},e.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},e.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},e.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)for(var o=t[r].from(),i=t[r].to(),l=o.line;l<=i.line;++l)i.line>o.line&&l==i.line&&0==i.ch||n.push({anchor:l==o.line?o:d(l,0),head:l==i.line?i:d(l)});e.setSelections(n,0)},e.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},e.selectLine=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var o=t[r];n.push({anchor:d(o.from().line,0),head:d(o.to().line+1,0)})}e.setSelections(n)},e.insertLineAfter=function(e){return n(e,!1)},e.insertLineBefore=function(e){return n(e,!0)},e.selectNextOccurrence=function(e){var t=e.getCursor("from"),n=e.getCursor("to"),r=e.state.sublimeFindFullWord==e.doc.sel;if(0==u.cmpPos(t,n)){var o=c(e,t);if(!o.word)return;e.setSelection(o.from,o.to),r=!0}else{var i=e.getRange(t,n),l=r?new RegExp("\\b"+i+"\\b"):i,a=e.getSearchCursor(l,n),s=a.findNext();if(s||(s=(a=e.getSearchCursor(l,d(e.firstLine(),0))).findNext()),!s||function(e,t,n){for(var r=0;r<e.length;r++)if(e[r].from()==t&&e[r].to()==n)return!0;return!1}(e.listSelections(),a.from(),a.to()))return u.Pass;e.addSelection(a.from(),a.to())}r&&(e.state.sublimeFindFullWord=e.doc.sel)},e.addCursorToPrevLine=function(e){r(e,-1)},e.addCursorToNextLine=function(e){r(e,1)};var f="(){}[]";function o(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var o=t[r],i=o.head,l=e.scanForBracket(i,-1);if(!l)return!1;for(;;){var a=e.scanForBracket(i,1);if(!a)return!1;if(a.ch==f.charAt(f.indexOf(l.ch)+1)){var s=d(l.pos.line,l.pos.ch+1);if(0!=u.cmpPos(s,o.from())||0!=u.cmpPos(a.pos,o.to())){n.push({anchor:s,head:a.pos});break}if(!(l=e.scanForBracket(l.pos,-1)))return!1}i=d(a.pos.line,a.pos.ch+1)}}return e.setSelections(n),!0}function i(a,s){if(a.isReadOnly())return u.Pass;for(var c,e=a.listSelections(),f=[],t=0;t<e.length;t++){var n=e[t];if(!n.empty()){for(var r=n.from().line,o=n.to().line;t<e.length-1&&e[t+1].from().line==o;)o=e[++t].to().line;e[t].to().ch||o--,f.push(r,o)}}f.length?c=!0:f.push(a.firstLine(),a.lastLine()),a.operation(function(){for(var e=[],t=0;t<f.length;t+=2){var n=f[t],r=f[t+1],o=d(n,0),i=d(r),l=a.getRange(o,i,!1);s?l.sort():l.sort(function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-1:e==t?0:1}),a.replaceRange(l,o,i),c&&e.push({anchor:o,head:d(r+1,0)})}c&&a.setSelections(e,0)})}function l(a,s){a.operation(function(){for(var e=a.listSelections(),t=[],n=[],r=0;r<e.length;r++){(i=e[r]).empty()?(t.push(r),n.push("")):n.push(s(a.getRange(i.from(),i.to())))}a.replaceSelections(n,"around","case");var o;for(r=t.length-1;0<=r;r--){var i=e[t[r]];if(!(o&&0<u.cmpPos(i.head,o))){var l=c(a,i.head);o=l.from,a.replaceRange(s(l.word),l.from,l.to)}}})}function a(e){var t=e.getCursor("from"),n=e.getCursor("to");if(0==u.cmpPos(t,n)){var r=c(e,t);if(!r.word)return;t=r.from,n=r.to}return{from:t,to:n,query:e.getRange(t,n),word:r}}function s(e,t){var n=a(e);if(n){var r=n.query,o=e.getSearchCursor(r,t?n.to:n.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(r,t?d(e.firstLine(),0):e.clipPos(d(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):n.word&&e.setSelection(n.from,n.to))}}e.selectScope=function(e){o(e)||e.execCommand("selectAll")},e.selectBetweenBrackets=function(e){if(!o(e))return u.Pass},e.goToBracket=function(r){r.extendSelectionsBy(function(e){var t=r.scanForBracket(e.head,1);if(t&&0!=u.cmpPos(t.pos,e.head))return t.pos;var n=r.scanForBracket(e.head,-1);return n&&d(n.pos.line,n.pos.ch+1)||e.head})},e.swapLineUp=function(o){if(o.isReadOnly())return u.Pass;for(var e=o.listSelections(),i=[],t=o.firstLine()-1,l=[],n=0;n<e.length;n++){var r=e[n],a=r.from().line-1,s=r.to().line;l.push({anchor:d(r.anchor.line-1,r.anchor.ch),head:d(r.head.line-1,r.head.ch)}),0!=r.to().ch||r.empty()||--s,t<a?i.push(a,s):i.length&&(i[i.length-1]=s),t=s}o.operation(function(){for(var e=0;e<i.length;e+=2){var t=i[e],n=i[e+1],r=o.getLine(t);o.replaceRange("",d(t,0),d(t+1,0),"+swapLine"),n>o.lastLine()?o.replaceRange("\n"+r,d(o.lastLine()),null,"+swapLine"):o.replaceRange(r+"\n",d(n,0),null,"+swapLine")}o.setSelections(l),o.scrollIntoView()})},e.swapLineDown=function(o){if(o.isReadOnly())return u.Pass;for(var e=o.listSelections(),i=[],t=o.lastLine()+1,n=e.length-1;0<=n;n--){var r=e[n],l=r.to().line+1,a=r.from().line;0!=r.to().ch||r.empty()||l--,l<t?i.push(l,a):i.length&&(i[i.length-1]=a),t=a}o.operation(function(){for(var e=i.length-2;0<=e;e-=2){var t=i[e],n=i[e+1],r=o.getLine(t);t==o.lastLine()?o.replaceRange("",d(t-1),d(t),"+swapLine"):o.replaceRange("",d(t,0),d(t+1,0),"+swapLine"),o.replaceRange(r+"\n",d(n,0),null,"+swapLine")}o.scrollIntoView()})},e.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},e.joinLines=function(s){for(var e=s.listSelections(),c=[],t=0;t<e.length;t++){for(var n=e[t],r=n.from(),o=r.line,i=n.to().line;t<e.length-1&&e[t+1].from().line==i;)i=e[++t].to().line;c.push({start:o,end:i,anchor:!n.empty()&&r})}s.operation(function(){for(var e=0,t=[],n=0;n<c.length;n++){for(var r,o=c[n],i=o.anchor&&d(o.anchor.line-e,o.anchor.ch),l=o.start;l<=o.end;l++){var a=l-e;l==o.end&&(r=d(a,s.getLine(a).length+1)),a<s.lastLine()&&(s.replaceRange(" ",d(a),d(a+1,/^\s*/.exec(s.getLine(a+1))[0].length)),++e)}t.push({anchor:i||r,head:r})}s.setSelections(t,0)})},e.duplicateLine=function(r){r.operation(function(){for(var e=r.listSelections().length,t=0;t<e;t++){var n=r.listSelections()[t];n.empty()?r.replaceRange(r.getLine(n.head.line)+"\n",d(n.head.line,0)):r.replaceRange(r.getRange(n.from(),n.to()),n.from())}r.scrollIntoView()})},e.sortLines=function(e){i(e,!0)},e.sortLinesInsensitive=function(e){i(e,!1)},e.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},e.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},e.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var o=t[r].from(),i=t[r].to(),l=t[r].empty()?e.findMarksAt(o):e.findMarks(o,i),a=0;a<l.length;a++)if(l[a].sublimeBookmark){l[a].clear();for(var s=0;s<n.length;s++)n[s]==l[a]&&n.splice(s--,1);break}a==l.length&&n.push(e.markText(o,i,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},e.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},e.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var o=t[r].find();o?n.push({anchor:o.from,head:o.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},e.smartBackspace=function(s){if(s.somethingSelected())return u.Pass;s.operation(function(){for(var e=s.listSelections(),t=s.getOption("indentUnit"),n=e.length-1;0<=n;n--){var r=e[n].head,o=s.getRange({line:r.line,ch:0},r),i=u.countColumn(o,null,s.getOption("tabSize")),l=s.findPosH(r,-1,"char",!1);if(o&&!/\S/.test(o)&&i%t==0){var a=new d(r.line,u.findColumn(o,i-t,t));a.ch!=r.ch&&(l=a)}s.replaceRange("",l,r,"+delete")}})},e.delLineRight=function(n){n.operation(function(){for(var e=n.listSelections(),t=e.length-1;0<=t;t--)n.replaceRange("",e[t].anchor,d(e[t].to().line),"+delete");n.scrollIntoView()})},e.upcaseAtCursor=function(e){l(e,function(e){return e.toUpperCase()})},e.downcaseAtCursor=function(e){l(e,function(e){return e.toLowerCase()})},e.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},e.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},e.deleteToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();if(t){var n=e.getCursor(),r=t;if(0<u.cmpPos(n,r)){var o=r;r=n,n=o}e.state.sublimeKilled=e.getRange(n,r),e.replaceRange("",n,r)}},e.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},e.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},e.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},e.findUnder=function(e){s(e,!0)},e.findUnderPrevious=function(e){s(e,!1)},e.findAllUnder=function(e){var t=a(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],o=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&o++;e.setSelections(r,o)}};var m=u.keyMap;m.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Cmd-F5":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},u.normalizeKeyMap(m.macSublime),m.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},u.normalizeKeyMap(m.pcSublime);var h=m.default==m.macDefault;m.sublime=h?m.macSublime:m.pcSublime});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(F){"use strict";var M="CodeMirror-hint-active";function o(t,i){this.cm=t,this.options=i,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}F.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},F.defineExtension("showHint",function(t){t=function(t,i,e){var n=t.options.hintOptions,o={};for(var s in h)o[s]=h[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);o.hint.resolve&&(o.hint=o.hint.resolve(t,i));return o}(this,this.getCursor("start"),t);var i=this.listSelections();if(!(1<i.length)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var e=0;e<i.length;e++)if(i[e].head.line!=i[e].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new o(this,t);n.options.hint&&(F.signal(this,"startCompletion",this),n.update(!0))}}),F.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var n=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},s=window.cancelAnimationFrame||clearTimeout;function N(t){return"string"==typeof t?t:t.text}function E(t,i){for(;i&&i!=t;){if("LI"===i.nodeName.toUpperCase()&&i.parentNode==t)return i;i=i.parentNode}}function c(o,t){this.completion=o,this.data=t,this.picked=!1;var e=this,s=o.cm,c=s.getInputField().ownerDocument,r=c.defaultView||c.parentWindow,h=this.hints=c.createElement("ul"),i=o.cm.options.theme;h.className="CodeMirror-hints "+i,this.selectedHint=t.selectedHint||0;for(var n=t.list,l=0;l<n.length;++l){var a=h.appendChild(c.createElement("li")),u=n[l],f="CodeMirror-hint"+(l!=this.selectedHint?"":" "+M);null!=u.className&&(f=u.className+" "+f),a.className=f,u.render?u.render(a,t,u):a.appendChild(c.createTextNode(u.displayText||N(u))),a.hintId=l}var p=s.cursorCoords(o.options.alignWithWord?t.from:null),d=p.left,m=p.bottom,g=!0;h.style.left=d+"px",h.style.top=m+"px";var v=r.innerWidth||Math.max(c.body.offsetWidth,c.documentElement.offsetWidth),y=r.innerHeight||Math.max(c.body.offsetHeight,c.documentElement.offsetHeight);(o.options.container||c.body).appendChild(h);var w=h.getBoundingClientRect(),H=w.bottom-y,C=h.scrollHeight>h.clientHeight+1,k=s.getScrollInfo();if(0<H){var b=w.bottom-w.top;if(0<p.top-(p.bottom-w.top)-b)h.style.top=(m=p.top-b)+"px",g=!1;else if(y<b){h.style.height=y-5+"px",h.style.top=(m=p.bottom-w.top)+"px";var A=s.getCursor();t.from.ch!=A.ch&&(p=s.cursorCoords(A),h.style.left=(d=p.left)+"px",w=h.getBoundingClientRect())}}var x,S=w.right-v;if(0<S&&(w.right-w.left>v&&(h.style.width=v-5+"px",S-=w.right-w.left-v),h.style.left=(d=p.left-S)+"px"),C)for(var T=h.firstChild;T;T=T.nextSibling)T.style.paddingRight=s.display.nativeBarWidth+"px";(s.addKeyMap(this.keyMap=function(t,n){var o={Up:function(){n.moveFocus(-1)},Down:function(){n.moveFocus(1)},PageUp:function(){n.moveFocus(1-n.menuSize(),!0)},PageDown:function(){n.moveFocus(n.menuSize()-1,!0)},Home:function(){n.setFocus(0)},End:function(){n.setFocus(n.length-1)},Enter:n.pick,Tab:n.pick,Esc:n.close};/Mac/.test(navigator.platform)&&(o["Ctrl-P"]=function(){n.moveFocus(-1)},o["Ctrl-N"]=function(){n.moveFocus(1)});var i=t.options.customKeys,s=i?{}:o;function e(t,i){var e;e="string"!=typeof i?function(t){return i(t,n)}:o.hasOwnProperty(i)?o[i]:i,s[t]=e}if(i)for(var c in i)i.hasOwnProperty(c)&&e(c,i[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&e(c,r[c]);return s}(o,{moveFocus:function(t,i){e.changeActive(e.selectedHint+t,i)},setFocus:function(t){e.changeActive(t)},menuSize:function(){return e.screenAmount()},length:n.length,close:function(){o.close()},pick:function(){e.pick()},data:t})),o.options.closeOnUnfocus)&&(s.on("blur",this.onBlur=function(){x=setTimeout(function(){o.close()},100)}),s.on("focus",this.onFocus=function(){clearTimeout(x)}));return s.on("scroll",this.onScroll=function(){var t=s.getScrollInfo(),i=s.getWrapperElement().getBoundingClientRect(),e=m+k.top-t.top,n=e-(r.pageYOffset||(c.documentElement||c.body).scrollTop);if(g||(n+=h.offsetHeight),n<=i.top||n>=i.bottom)return o.close();h.style.top=e+"px",h.style.left=d+k.left-t.left+"px"}),F.on(h,"dblclick",function(t){var i=E(h,t.target||t.srcElement);i&&null!=i.hintId&&(e.changeActive(i.hintId),e.pick())}),F.on(h,"click",function(t){var i=E(h,t.target||t.srcElement);i&&null!=i.hintId&&(e.changeActive(i.hintId),o.options.completeOnSingleClick&&e.pick())}),F.on(h,"mousedown",function(){setTimeout(function(){s.focus()},20)}),F.signal(t,"select",n[this.selectedHint],h.childNodes[this.selectedHint]),!0}function r(t,i,e,n){if(t.async)t(i,n,e);else{var o=t(i,e);o&&o.then?o.then(n):n(o)}}o.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&F.signal(this.data,"close"),this.widget&&this.widget.close(),F.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,i){var e=t.list[i];e.hint?e.hint(this.cm,t,e):this.cm.replaceRange(N(e),e.from||t.from,e.to||t.to,"complete"),F.signal(t,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch<this.startPos.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(i.charAt(t.ch-1)))this.close();else{var e=this;this.debounce=n(function(){e.update()}),this.widget&&this.widget.disable()}},update:function(i){if(null!=this.tick){var e=this,n=++this.tick;r(this.options.hint,this.cm,this.options,function(t){e.tick==n&&e.finishUpdate(t,i)})}},finishUpdate:function(t,i){this.data&&F.signal(this.data,"update");var e=this.widget&&this.widget.picked||i&&this.options.completeSingle;this.widget&&this.widget.close(),(this.data=t)&&t.list.length&&(e&&1==t.list.length?this.pick(t,0):(this.widget=new c(this,t),F.signal(t,"shown")))}},c.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,i){if(t>=this.data.list.length?t=i?this.data.list.length-1:0:t<0&&(t=i?0:this.data.list.length-1),this.selectedHint!=t){var e=this.hints.childNodes[this.selectedHint];e&&(e.className=e.className.replace(" "+M,"")),(e=this.hints.childNodes[this.selectedHint=t]).className+=" "+M,e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-3:e.offsetTop+e.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=e.offsetTop+e.offsetHeight-this.hints.clientHeight+3),F.signal(this.data,"select",this.data.list[this.selectedHint],e)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},F.registerHelper("hint","auto",{resolve:function(t,i){var e,c=t.getHelpers(i,"hint");if(c.length){var n=function(t,n,o){var s=function(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n<i.length;n++)i[n].supportsSelection&&e.push(i[n]);return e}(t,c);!function i(e){if(e==s.length)return n(null);r(s[e],t,o,function(t){t&&0<t.list.length?n(t):i(e+1)})}(0)};return n.async=!0,n.supportsSelection=!0,n}return(e=t.getHelper(t.getCursor(),"hintWords"))?function(t){return F.hint.fromList(t,{words:e})}:F.hint.anyword?function(t,i){return F.hint.anyword(t,i)}:function(){}}}),F.registerHelper("hint","fromList",function(t,i){var e,n=t.getCursor(),o=t.getTokenAt(n),s=F.Pos(n.line,o.start),c=n;o.start<n.ch&&/\w/.test(o.string.charAt(n.ch-o.start-1))?e=o.string.substr(0,n.ch-o.start):(e="",s=n);for(var r=[],h=0;h<i.words.length;h++){var l=i.words[h];l.slice(0,e.length)==e&&r.push(l)}if(r.length)return{list:r,from:s,to:c}}),F.commands.autocomplete=F.showHint;var h={hint:F.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};F.defineOption("hintOptions",null)});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(v){"use strict";v.TernServer=function(e){var n=this;this.options=e||{};var t=this.options.plugins||(this.options.plugins={});t.doc_comment||(t.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new i(this):this.server=new tern.Server({getFile:function(e,t){return s(n,e,t)},async:!0,defs:this.options.defs||[],plugins:t}),this.trackChange=function(e,t){!function(e,t,n){var o=f(e,t),r=e.cachedArgHints;r&&r.doc==t&&0<=x(r.start,n.to)&&(e.cachedArgHints=null);var i=o.changed;null==i&&(o.changed=i={from:n.from.line,to:n.from.line});var s=n.from.line+(n.text.length-1);n.from.line<i.to&&(i.to=i.to-(n.to.line-s));s>=i.to&&(i.to=s+1);i.from>n.from.line&&(i.from=n.from.line);t.lineCount()>u&&100<n.to-i.from&&setTimeout(function(){o.changed&&100<o.changed.to-o.changed.from&&a(e,o)},200)}(n,e,t)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(e,t){return d=e,p=t,void(f=n).request(d,{type:"completions",types:!0,docs:!0,urls:!0},function(e,t){if(e)return k(f,d,e);var n=[],o="",r=t.start,i=t.end;'["'==d.getRange(y(r.line,r.ch-2),r)&&'"]'!=d.getRange(i,y(i.line,i.ch+2))&&(o='"]');for(var s=0;s<t.completions.length;++s){var a=t.completions[s],c=g(a.type);t.guess&&(c+=" "+h+"guess"),n.push({text:a.name+o,displayText:a.displayName||a.name,className:c,data:a})}var l={from:r,to:i,list:n},u=null;v.on(l,"close",function(){T(u)}),v.on(l,"update",function(){T(u)}),v.on(l,"select",function(e,t){T(u);var n=f.options.completionTip?f.options.completionTip(e.data):e.data.doc;n&&((u=w(t.parentNode.getBoundingClientRect().right+window.pageXOffset,t.getBoundingClientRect().top+window.pageYOffset,n)).className+=" "+h+"hint-doc")}),p(l)});var f,d,p},this.getHint.async=!0},v.TernServer.prototype={addDoc:function(e,t){var n={doc:t,name:e,changed:null};return this.server.addFile(e,A(this,n)),v.on(t,"change",this.trackChange),this.docs[e]=n},delDoc:function(e){var t=n(this,e);t&&(v.off(t.doc,"change",this.trackChange),delete this.docs[t.name],this.server.delFile(t.name))},hideDoc:function(e){D(this);var t=n(this,e);t&&t.changed&&a(this,t)},complete:function(e){e.showHint({hint:this.getHint})},showType:function(e,t,n){o(this,e,t,"type",n)},showDocs:function(e,t,n){o(this,e,t,"documentation",n)},updateArgHints:function(e){!function(n,o){if(D(n),o.somethingSelected())return;var e=o.getTokenAt(o.getCursor()).state,t=v.innerMode(o.getMode(),e);if("javascript"!=t.mode.name)return;var r=t.state.lexical;if("call"!=r.info)return;for(var i,s=r.pos||0,a=o.getOption("tabSize"),c=o.getCursor().line,l=Math.max(0,c-9),u=!1;l<=c;--c){for(var f=o.getLine(c),d=0,p=0;;){var h=f.indexOf("\t",p);if(-1==h)break;d+=a-(h+d)%a-1,p=h+1}if(i=r.column-d,"("==f.charAt(i)){u=!0;break}}if(!u)return;var g=y(c,i),m=n.cachedArgHints;if(m&&m.doc==o.getDoc()&&0==x(g,m.start))return C(n,o,s);n.request(o,{type:"type",preferFunction:!0,end:g},function(e,t){!e&&t.type&&/^fn\(/.test(t.type)&&(n.cachedArgHints={start:g,type:function(r){var e=[],i=3;function t(e){for(var t=0,n=i;;){var o=r.charAt(i);if(e.test(o)&&!t)return r.slice(n,i);/[{\[\(]/.test(o)?++t:/[}\]\)]/.test(o)&&--t,++i}}if(")"!=r.charAt(i))for(;;){var n=r.slice(i).match(/^([^, \(\[\{]+): /);if(n&&(i+=n[0].length,n=n[1]),e.push({name:n,type:t(/[\),]/)}),")"==r.charAt(i))break;i+=2}var o=r.slice(i).match(/^\) -> (.*)$/);return{args:e,rettype:o&&o[1]}}(t.type),name:t.exprName||t.name||"fn",guess:t.guess,doc:o.getDoc()},C(n,o,s))})}(this,e)},jumpToDef:function(e){!function(i,s){function t(e){var t={type:"definition",variable:e||null},r=f(i,s.getDoc());i.server.request(d(i,r,t),function(e,t){if(e)return k(i,s,e);if(t.file||!t.url){if(t.file){var n,o=i.docs[t.file];if(o&&(n=function(e,t){for(var n=t.context.slice(0,t.contextOffset).split("\n"),o=t.start.line-(n.length-1),r=y(o,(1==n.length?t.start.ch:e.getLine(o).length)-n[0].length),i=e.getLine(o).slice(r.ch),s=o+1;s<e.lineCount()&&i.length<t.context.length;++s)i+="\n"+e.getLine(s);if(i.slice(0,t.context.length)==t.context)return t;var a,c=e.getSearchCursor(t.context,0,!1),l=1/0;for(;c.findNext();){var u=c.from(),f=1e4*Math.abs(u.line-r.line);f||(f=Math.abs(u.ch-r.ch)),f<l&&(a=u,l=f)}if(!a)return null;1==n.length?a.ch+=n[0].length:a=y(a.line+(n.length-1),n[n.length-1].length);if(t.start.line==t.end.line)var d=y(a.line,a.ch+(t.end.ch-t.start.ch));else var d=y(a.line+(t.end.line-t.start.line),t.end.ch);return{start:a,end:d}}(o.doc,t)))return i.jumpStack.push({file:r.name,start:s.getCursor("from"),end:s.getCursor("to")}),void c(i,r,o,n.start,n.end)}k(i,s,"Could not find a definition.")}else window.open(t.url)})}e=s,n=e.getCursor("end"),o=e.getTokenAt(n),o.start<n.ch&&"comment"==o.type||!/[\w)\]]/.test(e.getLine(n.line).slice(Math.max(n.ch-1,0),n.ch+1))?r(s,"Jump to variable",function(e){e&&t(e)}):t();var e,n,o}(this,e)},jumpBack:function(e){!function(e,t){var n=e.jumpStack.pop(),o=n&&e.docs[n.file];if(!o)return;c(e,f(e,t.getDoc()),o,n.start,n.end)}(this,e)},rename:function(e){!function(n,o){var e=o.getTokenAt(o.getCursor());if(!/\w/.test(e.string))return k(n,o,"Not at a variable");r(o,"New name for "+e.string,function(e){n.request(o,{type:"rename",newName:e,fullDocs:!0},function(e,t){if(e)return k(n,o,e);!function(e,t){for(var n=Object.create(null),o=0;o<t.length;++o){var r=t[o];(n[r.file]||(n[r.file]=[])).push(r)}for(var i in n){var s=e.docs[i],a=n[i];if(s){a.sort(function(e,t){return x(t.start,e.start)});for(var c="*rename"+ ++l,o=0;o<a.length;++o){var r=a[o];s.doc.replaceRange(r.text,r.start,r.end,c)}}}}(n,t.changes)})})}(this,e)},selectName:function(e){var a,c,l;l=f(a=this,(c=e).doc).name,a.request(c,{type:"refs"},function(e,t){if(e)return k(a,c,e);for(var n=[],o=0,r=c.getCursor(),i=0;i<t.refs.length;i++){var s=t.refs[i];s.file==l&&(n.push({anchor:s.start,head:s.end}),0<=x(r,s.start)&&x(r,s.end)<=0&&(o=n.length-1))}c.setSelections(n,o)})},request:function(e,n,o,t){var r=this,i=f(this,e.getDoc()),s=d(this,i,n,t),a=s.query&&this.options.queryOptions&&this.options.queryOptions[s.query.type];if(a)for(var c in a)s.query[c]=a[c];this.server.request(s,function(e,t){!e&&r.options.responseFilter&&(t=r.options.responseFilter(i,n,s,e,t)),o(e,t)})},destroy:function(){D(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var y=v.Pos,h="CodeMirror-Tern-",u=250;function s(e,t,n){var o=e.docs[t];o?n(A(e,o)):e.options.getFile?e.options.getFile(t,n):n(null)}function f(e,t,n){for(var o in e.docs){var r=e.docs[o];if(r.doc==t)return r}if(!n)for(var i=0;;++i)if(o="[doc"+(i||"")+"]",!e.docs[o]){n=o;break}return e.addDoc(n,t)}function n(e,t){return"string"==typeof t?e.docs[t]:(t instanceof v&&(t=t.getDoc()),t instanceof v.Doc?f(e,t):void 0)}function a(e,t){e.server.request({files:[{type:"full",name:t.name,text:A(e,t)}]},function(e){e?window.console.error(e):t.changed=null})}function g(e){var t;return t="?"==e?"unknown":"number"==e||"string"==e||"bool"==e?e:/^fn\(/.test(e)?"fn":/^\[/.test(e)?"array":"object",h+"completion "+h+"completion-"+t}function o(r,i,e,t,s){r.request(i,t,function(e,t){if(e)return k(r,i,e);if(r.options.typeTip)var n=r.options.typeTip(t);else{n=p("span",null,p("strong",null,t.type||"not found"));if(t.doc&&n.appendChild(document.createTextNode(" — "+t.doc)),t.url){n.appendChild(document.createTextNode(" "));var o=n.appendChild(p("a",null,"[docs]"));o.href=t.url,o.target="_blank"}}m(i,n,r),s&&s()},e)}function C(e,t,n){D(e);for(var o=e.cachedArgHints,r=o.type,i=p("span",o.guess?h+"fhint-guess":null,p("span",h+"fname",o.name),"("),s=0;s<r.args.length;++s){s&&i.appendChild(document.createTextNode(", "));var a=r.args[s];i.appendChild(p("span",h+"farg"+(s==n?" "+h+"farg-current":""),a.name||"?")),"?"!=a.type&&(i.appendChild(document.createTextNode(": ")),i.appendChild(p("span",h+"type",a.type)))}i.appendChild(document.createTextNode(r.rettype?") -> ":")")),r.rettype&&i.appendChild(p("span",h+"type",r.rettype));var c=t.cursorCoords(null,"page"),l=e.activeArgHints=w(c.right+1,c.bottom,i);setTimeout(function(){l.clear=b(t,function(){e.activeArgHints==l&&D(e)})},20)}function c(e,t,n,o,r){n.doc.setSelection(o,r),t!=n&&e.options.switchToDoc&&(D(e),e.options.switchToDoc(n.name,n.doc))}var l=0;function d(e,t,n,o){var r=[],i=0,s=!n.fullDocs;s||delete n.fullDocs,"string"==typeof n&&(n={type:n}),n.lineCharPositions=!0,null==n.end&&(n.end=o||t.doc.getCursor("end"),t.doc.somethingSelected()&&(n.start=t.doc.getCursor("start")));var a=n.start||n.end;if(t.changed)if(t.doc.lineCount()>u&&!1!==s&&t.changed.to-t.changed.from<100&&t.changed.from<=a.line&&t.changed.to>n.end.line){r.push(function(e,t,n){for(var o,r=e.doc,i=null,s=null,a=t.line-1,c=Math.max(0,a-50);c<=a;--a){var l=r.getLine(a),u=l.search(/\bfunction\b/);if(!(u<0)){var f=v.countColumn(l,null,4);null!=i&&i<=f||(i=f,s=a)}}null==s&&(s=c);var d=Math.min(r.lastLine(),n.line+20);if(null==i||i==v.countColumn(r.getLine(t.line),null,4))o=d;else for(o=n.line+1;o<d;++o){var f=v.countColumn(r.getLine(o),null,4);if(f<=i)break}var p=y(s,0);return{type:"part",name:e.name,offsetLines:p.line,text:r.getRange(p,y(o,n.line==o?null:0))}}(t,a,n.end)),n.file="#0";i=r[0].offsetLines;null!=n.start&&(n.start=y(n.start.line- -i,n.start.ch)),n.end=y(n.end.line-i,n.end.ch)}else r.push({type:"full",name:t.name,text:A(e,t)}),n.file=t.name,t.changed=null;else n.file=t.name;for(var c in e.docs){var l=e.docs[c];l.changed&&l!=t&&(r.push({type:"full",name:l.name,text:A(e,l)}),l.changed=null)}return{query:n,files:r}}var x=v.cmpPos;function p(e,t){var n=document.createElement(e);t&&(n.className=t);for(var o=2;o<arguments.length;++o){var r=arguments[o];"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r)}return n}function r(e,t,n){e.openDialog?e.openDialog(t+": <input type=text>",n):n(prompt(t,""))}function m(t,e,n){t.state.ternTooltip&&T(t.state.ternTooltip);var o=t.cursorCoords(),r=t.state.ternTooltip=w(o.right+1,o.bottom,e);function i(){var e;t.state.ternTooltip=null,r.parentNode&&((e=r).style.opacity="0",setTimeout(function(){T(e)},1100)),c()}var s=!1,a=!1;v.on(r,"mousemove",function(){s=!0}),v.on(r,"mouseout",function(e){var t=e.relatedTarget||e.toElement;t&&v.contains(r,t)||(a?i():s=!1)}),setTimeout(function(){a=!0,s||i()},n.options.hintDelay?n.options.hintDelay:1700);var c=b(t,i)}function b(e,t){return e.on("cursorActivity",t),e.on("blur",t),e.on("scroll",t),e.on("setDoc",t),function(){e.off("cursorActivity",t),e.off("blur",t),e.off("scroll",t),e.off("setDoc",t)}}function w(e,t,n){var o=p("div",h+"tooltip",n);return o.style.left=e+"px",o.style.top=t+"px",document.body.appendChild(o),o}function T(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function k(e,t,n){e.options.showError?e.options.showError(t,n):m(t,String(n),e)}function D(e){e.activeArgHints&&(e.activeArgHints.clear&&e.activeArgHints.clear(),T(e.activeArgHints),e.activeArgHints=null)}function A(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function i(t){var n=t.worker=new Worker(t.options.workerScript);n.postMessage({type:"init",defs:t.options.defs,plugins:t.options.plugins,scripts:t.options.workerDeps});var o=0,r={};function i(e,t){t&&(e.id=++o,r[o]=t),n.postMessage(e)}n.onmessage=function(e){var n=e.data;"getFile"==n.type?s(t,n.name,function(e,t){i({type:"getFile",err:String(e),text:t,id:n.id})}):"debug"==n.type?window.console.log(n.message):n.id&&r[n.id]&&(r[n.id](n.err,n.body),delete r[n.id])},n.onerror=function(e){for(var t in r)r[t](e);r={}},this.addFile=function(e,t){i({type:"add",name:e,text:t})},this.delFile=function(e){i({type:"del",name:e})},this.request=function(e,t){i({type:"req",body:e},t)}}});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../meta")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],t):t(CodeMirror)}(function(H){"use strict";H.defineMode("markdown",function(c,x){var A=H.getMode(c,"text/html"),r="null"==A.name;void 0===x.highlightFormatting&&(x.highlightFormatting=!1),void 0===x.maxBlockquoteDepth&&(x.maxBlockquoteDepth=0),void 0===x.taskLists&&(x.taskLists=!1),void 0===x.strikethrough&&(x.strikethrough=!1),void 0===x.emoji&&(x.emoji=!1),void 0===x.fencedCodeBlockHighlighting&&(x.fencedCodeBlockHighlighting=!0),void 0===x.xml&&(x.xml=!0),void 0===x.tokenTypeOverrides&&(x.tokenTypeOverrides={});var S={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 t in S)S.hasOwnProperty(t)&&x.tokenTypeOverrides[t]&&(S[t]=x.tokenTypeOverrides[t]);var d=/^([*\-_])(?:\s*\1){2,}\s*$/,k=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,C=/^\[(x| )\](?=\s)/i,F=x.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,D=/^ *(?:\={1,}|-{1,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,v=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function B(t,e,i){return e.f=e.inline=i,i(t,e)}function L(t,e,i){return e.f=e.block=i,i(t,e)}function n(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==T){var e=r;if(!e){var i=H.innerMode(A,t.htmlState);e="xml"==i.mode.name&&null===i.state.tagStart&&!i.state.context&&i.state.tokenize.isInText}e&&(t.f=b,t.block=a,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function a(t,e){var i,n=t.column()===e.indentation,r=!(i=e.prevLine.stream)||!/\S/.test(i.string),u=e.indentedCode,a=e.prevLine.hr,l=!1!==e.list,o=(e.listStack[e.listStack.length-1]||0)+3;e.indentedCode=!1;var h=e.indentation;if(null===e.indentationDiff&&(e.indentationDiff=e.indentation,l)){for(e.em=!1,e.strong=!1,e.code=!1,e.strikethrough=!1,e.list=null;h<e.listStack[e.listStack.length-1];)e.listStack.pop(),e.listStack.length?e.indentation=e.listStack[e.listStack.length-1]:e.list=!1;!1!==e.list&&(e.indentationDiff=h-e.listStack[e.listStack.length-1])}var s=!(r||a||e.prevLine.header||l&&u||e.prevLine.fencedCodeEnd),g=(!1===e.list||a||r)&&e.indentation<=o&&t.match(d),m=null;if(4<=e.indentationDiff&&(u||e.prevLine.fencedCodeEnd||e.prevLine.header||r))return t.skipToEnd(),e.indentedCode=!0,S.code;if(t.eatSpace())return null;if(n&&e.indentation<=o&&(m=t.match(F))&&m[1].length<=6)return e.quote=0,e.header=m[1].length,e.thisLine.header=!0,x.highlightFormatting&&(e.formatting="header"),e.f=e.inline,M(e);if(e.indentation<=o&&t.eat(">"))return e.quote=n?1:e.quote+1,x.highlightFormatting&&(e.formatting="quote"),t.eatSpace(),M(e);if(!g&&!e.setext&&n&&e.indentation<=o&&(m=t.match(k))){var f=m[1]?"ol":"ul";return e.indentation=h+t.current().length,e.list=!0,e.quote=0,e.listStack.push(e.indentation),x.taskLists&&t.match(C,!1)&&(e.taskList=!0),e.f=e.inline,x.highlightFormatting&&(e.formatting=["list","list-"+f]),M(e)}return n&&e.indentation<=o&&(m=t.match(p,!0))?(e.quote=0,e.fencedEndRE=new RegExp(m[1]+"+ *$"),e.localMode=x.fencedCodeBlockHighlighting&&function(t){if(H.findModeByName){var e=H.findModeByName(t);e&&(t=e.mime||e.mimes[0])}var i=H.getMode(c,t);return"null"==i.name?null:i}(m[2]),e.localMode&&(e.localState=H.startState(e.localMode)),e.f=e.block=q,x.highlightFormatting&&(e.formatting="code-block"),e.code=-1,M(e)):e.setext||!(s&&l||e.quote||!1!==e.list||e.code||g||E.test(t.string))&&(m=t.lookAhead(1))&&(m=m.match(D))?(e.setext?(e.header=e.setext,e.setext=0,t.skipToEnd(),x.highlightFormatting&&(e.formatting="header")):(e.header="="==m[0].charAt(0)?1:2,e.setext=e.header),e.thisLine.header=!0,e.f=e.inline,M(e)):g?(t.skipToEnd(),e.hr=!0,e.thisLine.hr=!0,S.hr):"["===t.peek()?B(t,e,y):B(t,e,e.inline)}function T(t,e){var i=A.token(t,e.htmlState);if(!r){var n=H.innerMode(A,e.htmlState);("xml"==n.mode.name&&null===n.state.tagStart&&!n.state.context&&n.state.tokenize.isInText||e.md_inside&&-1<t.current().indexOf(">"))&&(e.f=b,e.block=a,e.htmlState=null)}return i}function q(t,e){var i,n=e.listStack[e.listStack.length-1]||0,r=e.indentation<n,u=n+3;return e.fencedEndRE&&e.indentation<=u&&(r||t.match(e.fencedEndRE))?(x.highlightFormatting&&(e.formatting="code-block"),r||(i=M(e)),e.localMode=e.localState=null,e.block=a,e.f=b,e.fencedEndRE=null,e.code=0,e.thisLine.fencedCodeEnd=!0,r?L(t,e,e.block):i):e.localMode?e.localMode.token(t,e.localState):(t.skipToEnd(),S.code)}function M(t){var e=[];if(t.formatting){e.push(S.formatting),"string"==typeof t.formatting&&(t.formatting=[t.formatting]);for(var i=0;i<t.formatting.length;i++)e.push(S.formatting+"-"+t.formatting[i]),"header"===t.formatting[i]&&e.push(S.formatting+"-"+t.formatting[i]+"-"+t.header),"quote"===t.formatting[i]&&(!x.maxBlockquoteDepth||x.maxBlockquoteDepth>=t.quote?e.push(S.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(S.linkHref,"url"):(t.strong&&e.push(S.strong),t.em&&e.push(S.em),t.strikethrough&&e.push(S.strikethrough),t.emoji&&e.push(S.emoji),t.linkText&&e.push(S.linkText),t.code&&e.push(S.code),t.image&&e.push(S.image),t.imageAltText&&e.push(S.imageAltText,"link"),t.imageMarker&&e.push(S.imageMarker)),t.header&&e.push(S.header,S.header+"-"+t.header),t.quote&&(e.push(S.quote),!x.maxBlockquoteDepth||x.maxBlockquoteDepth>=t.quote?e.push(S.quote+"-"+t.quote):e.push(S.quote+"-"+x.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(S.list2):e.push(S.list3):e.push(S.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function e(t,e){if(t.match(i,!0))return M(e)}function b(t,e){var i=e.text(t,e);if(void 0!==i)return i;if(e.list)return e.list=null,M(e);if(e.taskList)return" "===t.match(C,!0)[1]?e.taskOpen=!0:e.taskClosed=!0,x.highlightFormatting&&(e.formatting="task"),e.taskList=!1,M(e);if(e.taskOpen=!1,e.taskClosed=!1,e.header&&t.match(/^#+$/,!0))return x.highlightFormatting&&(e.formatting="header"),M(e);var n=t.next();if(e.linkTitle){e.linkTitle=!1;var r=n;"("===n&&(r=")");var u="^\\s*(?:[^"+(r=(r+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+r;if(t.match(new RegExp(u),!0))return S.linkHref}if("`"===n){var a=e.formatting;x.highlightFormatting&&(e.formatting="code"),t.eatWhile("`");var l=t.current().length;if(0!=e.code||e.quote&&1!=l){if(l!=e.code)return e.formatting=a,M(e);var o=M(e);return e.code=0,o}return e.code=l,M(e)}if(e.code)return M(e);if("\\"===n&&(t.next(),x.highlightFormatting)){var h=M(e),s=S.formatting+"-escape";return h?h+" "+s:s}if("!"===n&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.imageMarker=!0,e.image=!0,x.highlightFormatting&&(e.formatting="image"),M(e);if("["===n&&e.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return e.imageMarker=!1,e.imageAltText=!0,x.highlightFormatting&&(e.formatting="image"),M(e);if("]"===n&&e.imageAltText){x.highlightFormatting&&(e.formatting="image");var h=M(e);return e.imageAltText=!1,e.image=!1,e.inline=e.f=j,h}if("["===n&&!e.image)return e.linkText&&t.match(/^.*?\]/)||(e.linkText=!0,x.highlightFormatting&&(e.formatting="link")),M(e);if("]"===n&&e.linkText){x.highlightFormatting&&(e.formatting="link");var h=M(e);return e.linkText=!1,e.inline=e.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?j:b,h}if("<"===n&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return e.f=e.inline=w,x.highlightFormatting&&(e.formatting="link"),(h=M(e))?h+=" ":h="",h+S.linkInline;if("<"===n&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return e.f=e.inline=w,x.highlightFormatting&&(e.formatting="link"),(h=M(e))?h+=" ":h="",h+S.linkEmail;if(x.xml&&"<"===n&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var g=t.string.indexOf(">",t.pos);if(-1!=g){var m=t.string.substring(t.start,g);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(m)&&(e.md_inside=!0)}return t.backUp(1),e.htmlState=H.startState(A),L(t,e,T)}if(x.xml&&"<"===n&&t.match(/^\/\w*?>/))return e.md_inside=!1,"tag";if("*"===n||"_"===n){for(var f=1,c=1==t.pos?" ":t.string.charAt(t.pos-2);f<3&&t.eat(n);)f++;var d=t.peek()||" ",k=!/\s/.test(d)&&(!v.test(d)||/\s/.test(c)||v.test(c)),F=!/\s/.test(c)&&(!v.test(c)||/\s/.test(d)||v.test(d)),D=null,p=null;if(f%2&&(e.em||!k||"*"!==n&&F&&!v.test(c)?e.em!=n||!F||"*"!==n&&k&&!v.test(d)||(D=!1):D=!0),1<f&&(e.strong||!k||"*"!==n&&F&&!v.test(c)?e.strong!=n||!F||"*"!==n&&k&&!v.test(d)||(p=!1):p=!0),null!=p||null!=D){x.highlightFormatting&&(e.formatting=null==D?"strong":null==p?"em":"strong em"),!0===D&&(e.em=n),!0===p&&(e.strong=n);o=M(e);return!1===D&&(e.em=!1),!1===p&&(e.strong=!1),o}}else if(" "===n&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return M(e);t.backUp(1)}if(x.strikethrough)if("~"===n&&t.eatWhile(n)){if(e.strikethrough){x.highlightFormatting&&(e.formatting="strikethrough");o=M(e);return e.strikethrough=!1,o}if(t.match(/^[^\s]/,!1))return e.strikethrough=!0,x.highlightFormatting&&(e.formatting="strikethrough"),M(e)}else if(" "===n&&t.match(/^~~/,!0)){if(" "===t.peek())return M(e);t.backUp(2)}if(x.emoji&&":"===n&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){e.emoji=!0,x.highlightFormatting&&(e.formatting="emoji");var E=M(e);return e.emoji=!1,E}return" "===n&&(t.match(/^ +$/,!1)?e.trailingSpace++:e.trailingSpace&&(e.trailingSpaceNewLine=!0)),M(e)}function w(t,e){if(">"!==t.next())return t.match(/^[^>]+/,!0),S.linkInline;e.f=e.inline=b,x.highlightFormatting&&(e.formatting="link");var i=M(e);return i?i+=" ":i="",i+S.linkInline}function j(t,e){if(t.eatSpace())return null;var r,i=t.next();return"("===i||"["===i?(e.f=e.inline=(r="("===i?")":"]",function(t,e){var i=t.next();if(i!==r)return t.match(u[r]),e.linkHref=!0,M(e);e.f=e.inline=b,x.highlightFormatting&&(e.formatting="link-string");var n=M(e);return e.linkHref=!1,n}),x.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,M(e)):"error"}var u={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function y(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=l,t.next(),x.highlightFormatting&&(e.formatting="link"),e.linkText=!0,M(e)):B(t,e,b)}function l(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=o,x.highlightFormatting&&(e.formatting="link");var i=M(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function o(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=b,S.linkHref+" url")}var h={startState:function(){return{f:a,prevLine:{stream:null},thisLine:{stream:null},block:a,htmlState:null,indentation:0,inline:b,text:e,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&&H.copyState(A,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?H.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(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return n(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=T)){var i=t.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length;if(e.indentation=i,e.indentationDiff=null,0<i)return null}}return e.f(t,e)},innerMode:function(t){return t.block==T?{state:t.htmlState,mode:A}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:h}},indent:function(t,e,i){return t.block==T&&A.indent?A.indent(t.htmlState,e,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,e,i):H.Pass},blankLine:n,getType:M,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return h},"xml"),H.defineMIME("text/markdown","markdown"),H.defineMIME("text/x-markdown","markdown")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(y){"use strict";var N={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},z={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};y.defineMode("xml",function(t,e){var i,a,l=t.indentUnit,u={},n=e.htmlMode?N:z;for(var r in n)u[r]=n[r];for(var r in e)u[r]=e[r];function d(e,n){function t(t){return(n.tokenize=t)(e,n)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?t(o("atom","]]>")):null:e.match("--")?t(o("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),t(function r(o){return function(t,e){for(var n;null!=(n=t.next());){if("<"==n)return e.tokenize=r(o+1),e.tokenize(t,e);if(">"==n){if(1!=o)return e.tokenize=r(o-1),e.tokenize(t,e);e.tokenize=d;break}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),n.tokenize=o("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket"):"&"!=r?(e.eatWhile(/[^&<]/),null):(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}function c(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=d,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(e.tokenize=(r=n,(o=function(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=c;break}return"string"}).isInAttribute=!0,o),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");e.tokenize=d,e.state=g,e.tagName=e.tagStart=null;var r,o,a=e.tokenize(t,e);return a?a+" tag error":"tag error"}function o(n,r){return function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=d;break}t.next()}return n}}function s(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function g(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?h:g}function p(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",k):u.allowMissingTagName&&"endTag"==t?(a="tag bracket",k(t,e,n)):(a="error",p)}function h(t,e,n){if("word"!=t)return u.allowMissingTagName&&"endTag"==t?(a="tag bracket",x(t,e,n)):(a="error",b);var r=e.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(a="tag",x):(a="tag error",b)}function x(t,e,n){return"endTag"!=t?(a="error",x):(f(n),g)}function b(t,e,n){return a="error",x(t,0,n)}function k(t,e,n){if("word"==t)return a="attribute",w;if("endTag"!=t&&"selfcloseTag"!=t)return a="error",k;var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(r)?m(n,r):(m(n,r),n.context=new s(n,r,o==n.indented)),g}function w(t,e,n){return"equals"==t?v:(u.allowMissing||(a="error"),k(t,0,n))}function v(t,e,n){return"string"==t?T:"word"==t&&u.allowUnquoted?(a="string",k):(a="error",k(t,0,n))}function T(t,e,n){return"string"==t?T:k(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:g,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(a=null,e.state=e.state(i||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(t,e,n){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(r&&r.noIndent)return y.Pass;if(t.tokenize!=c&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(e))return 0;var o=e&&/^<(\/)?([\w_:\.-]*)/.exec(e);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!u.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var a=u.contextGrabbers[r.tagName];if(!a||!a.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==v&&(t.state=k)}}}),y.defineMIME("text/xml","xml"),y.defineMIME("application/xml","xml"),y.mimeModes.hasOwnProperty("text/html")||y.defineMIME("text/html",{name:"xml",htmlMode:!0})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(h){"use strict";function i(t,e,o){this.orientation=e,this.scroll=o,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+e,this.inner=this.node.appendChild(document.createElement("div"));var r=this;function i(t){var e=h.wheelEventPixels(t)["horizontal"==r.orientation?"x":"y"],o=r.pos;r.moveTo(r.pos+e),r.pos!=o&&h.e_preventDefault(t)}h.on(this.inner,"mousedown",function(t){if(1==t.which){h.e_preventDefault(t);var e="horizontal"==r.orientation?"pageX":"pageY",o=t[e],i=r.pos;h.on(document,"mousemove",s),h.on(document,"mouseup",n)}function n(){h.off(document,"mousemove",s),h.off(document,"mouseup",n)}function s(t){if(1!=t.which)return n();r.moveTo(i+(t[e]-o)*(r.total/r.size))}}),h.on(this.node,"click",function(t){h.e_preventDefault(t);var e,o=r.inner.getBoundingClientRect();e="horizontal"==r.orientation?t.clientX<o.left?-1:t.clientX>o.right?1:0:t.clientY<o.top?-1:t.clientY>o.bottom?1:0,r.moveTo(r.pos+e*r.screen)}),h.on(this.node,"mousewheel",i),h.on(this.node,"DOMMouseScroll",i)}i.prototype.setPos=function(t,e){return t<0&&(t=0),t>this.total-this.screen&&(t=this.total-this.screen),!(!e&&t==this.pos)&&(this.pos=t,this.inner.style["horizontal"==this.orientation?"left":"top"]=t*(this.size/this.total)+"px",!0)},i.prototype.moveTo=function(t){this.setPos(t)&&this.scroll(t,this.orientation)};function o(t,e,o){this.addClass=t,this.horiz=new i(t,"horizontal",o),e(this.horiz.node),this.vert=new i(t,"vertical",o),e(this.vert.node),this.width=null}i.prototype.update=function(t,e,o){var i=this.screen!=e||this.total!=t||this.size!=o;i&&(this.screen=e,this.total=t,this.size=o);var n=this.screen*(this.size/this.total);n<10&&(this.size-=10-n,n=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=n+"px",this.setPos(this.pos,i)},o.prototype.update=function(t){if(null==this.width){var e=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;e&&(this.width=parseInt(e.height))}var o=this.width||0,i=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1;return this.vert.node.style.display=n?"block":"none",this.horiz.node.style.display=i?"block":"none",n&&(this.vert.update(t.scrollHeight,t.clientHeight,t.viewHeight-(i?o:0)),this.vert.node.style.bottom=i?o+"px":"0"),i&&(this.horiz.update(t.scrollWidth,t.clientWidth,t.viewWidth-(n?o:0)-t.barLeft),this.horiz.node.style.right=n?o+"px":"0",this.horiz.node.style.left=t.barLeft+"px"),{right:n?o:0,bottom:i?o:0}},o.prototype.setScrollTop=function(t){this.vert.setPos(t)},o.prototype.setScrollLeft=function(t){this.horiz.setPos(t)},o.prototype.clear=function(){var t=this.horiz.node.parentNode;t.removeChild(this.horiz.node),t.removeChild(this.vert.node)},h.scrollbarModel.simple=function(t,e){return new o("CodeMirror-simplescroll",t,e)},h.scrollbarModel.overlay=function(t,e){return new o("CodeMirror-overlayscroll",t,e)}});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e){function i(t){clearTimeout(n.doRedraw),n.doRedraw=setTimeout(function(){n.redraw()},t)}this.cm=t,this.options=e,this.buttonHeight=e.scrollButtonHeight||t.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=t.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var n=this;t.on("refresh",this.resizeHandler=function(){clearTimeout(n.doUpdate),n.doUpdate=setTimeout(function(){n.computeScale()&&i(20)},100)}),t.on("markerAdded",this.resizeHandler),t.on("markerCleared",this.resizeHandler),!1!==e.listenForChanges&&t.on("change",this.changeHandler=function(){i(250)})}t.defineExtension("annotateScrollbar",function(t){return"string"==typeof t&&(t={className:t}),new e(this,t)}),t.defineOption("scrollButtonHeight",0),e.prototype.computeScale=function(){var t=this.cm,e=(t.getWrapperElement().clientHeight-t.display.barHeight-2*this.buttonHeight)/t.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0},e.prototype.update=function(t){this.annotations=t,this.redraw()},e.prototype.redraw=function(t){!1!==t&&this.computeScale();var i=this.cm,e=this.hScale,n=document.createDocumentFragment(),o=this.annotations,r=i.getOption("lineWrapping"),a=r&&1.5*i.defaultTextHeight(),s=null,h=null;function l(t,e){return s!=t.line&&(s=t.line,h=i.getLineHandle(s)),h.widgets&&h.widgets.length||r&&h.height>a?i.charCoords(t,"local")[e?"top":"bottom"]:i.heightAtLine(h,"local")+(e?0:h.height)}var d=i.lastLine();if(i.display.barWidth)for(var c,p=0;p<o.length;p++){var u=o[p];if(!(u.to.line>d)){for(var f=c||l(u.from,!0)*e,m=l(u.to,!1)*e;p<o.length-1&&!(o[p+1].to.line>d)&&!(m+.9<(c=l(o[p+1].from,!0)*e));)m=l((u=o[++p]).to,!1)*e;if(m!=f){var g=Math.max(m-f,3),H=n.appendChild(document.createElement("div"));H.style.cssText="position: absolute; right: 0px; width: "+Math.max(i.display.barWidth-1,2)+"px; top: "+(f+this.buttonHeight)+"px; height: "+g+"px",H.className=this.options.className,u.id&&H.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(n)},e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],t):t(CodeMirror)}(function(c){"use strict";function o(t,e,i,o){this.cm=t,this.options=o;var a={listenForChanges:!1};for(var n in o)a[n]=o[n];a.className||(a.className="CodeMirror-search-match"),this.annotation=t.annotateScrollbar(a),this.query=e,this.caseFold=i,this.gap={from:t.firstLine(),to:t.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var s=this;t.on("change",this.changeHandler=function(t,e){s.onChange(e)})}c.defineExtension("showMatchesOnScrollbar",function(t,e,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new o(this,t,e,i)});function f(t,e,i){return t<=e?t:Math.max(e,t+i)}o.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length;t++){if((o=this.matches[t]).from.line>=this.gap.to)break;o.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var e=this.cm.getSearchCursor(this.query,c.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||1e3;e.findNext();){var o;if((o={from:e.from(),to:e.to()}).from.line>=this.gap.to)break;if(this.matches.splice(t++,0,o),this.matches.length>i)break}this.gap=null}},o.prototype.onChange=function(t){var e=t.from.line,i=c.changeEnd(t).line,o=i-t.to.line;if(this.gap?(this.gap.from=Math.min(f(this.gap.from,e,o),t.from.line),this.gap.to=Math.max(f(this.gap.to,e,o),t.from.line)):this.gap={from:t.from.line,to:i+1},o)for(var a=0;a<this.matches.length;a++){var n=this.matches[a],s=f(n.from.line,e,o);s!=n.from.line&&(n.from=c.Pos(s,n.from.ch));var r=f(n.to.line,e,o);r!=n.to.line&&(n.to=c.Pos(r,n.to.ch))}clearTimeout(this.update);var h=this;this.update=setTimeout(function(){h.updateAfterChange()},250)},o.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},o.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function u(e,r){var o=Number(r);return/^[-+]/.test(r)?e.getCursor().line+o:o-1}e.commands.jumpToLine=function(s){var e,r,o,i,t,n,l=s.getCursor();r=(n=e=s).phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+n.phrase("(Use line:column or scroll% syntax)")+"</span>",o=s.phrase("Jump to line:"),i=l.line+1+":"+l.ch,t=function(e){var r;if(e)if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(e))s.setCursor(u(s,r[1]),Number(r[2]));else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(e)){var o=Math.round(s.lineCount()*Number(r[1])/100);/^[-+]/.test(r[1])&&(o=l.line+o+1),s.setCursor(o-1,l.ch)}else(r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(e))&&s.setCursor(u(s,r[1]),l.ch)},e.openDialog?e.openDialog(r,t,{value:i,selectValueOnOpen:!0}):t(prompt(o,i))},e.keyMap.default["Alt-G"]="jumpToLine"});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(S){"use strict";function m(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function s(e,t){if(!e)return/(?:)/;var n="";return e=e instanceof RegExp?(e.ignoreCase&&(n="i"),e.source):String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function v(e,t){(e.next||e.push)&&m(t,e.next||e.push),this.regex=s(e.regex),this.token=function(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}(e.token),this.data=e}function d(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var a in e)if(e.hasOwnProperty(a)){if(!t.hasOwnProperty(a)||!d(e[a],t[a]))return!1;n++}for(var a in t)t.hasOwnProperty(a)&&n--;return 0==n}function k(e,t,n,a){var r;if(n.persistent)for(var o=t.persistentStates;o&&!r;o=o.next)(n.spec?d(n.spec,o.spec):n.mode==o.mode)&&(r=o);var i=r?r.mode:n.mode||S.getMode(e,n.spec),l=r?r.state:S.startState(i);n.persistent&&!r&&(t.persistentStates={mode:i,spec:n.spec,state:l,next:t.persistentStates}),t.localState=l,t.local={mode:i,end:n.end&&s(n.end),endScan:n.end&&!1!==n.forceEnd&&s(n.end,!1),endToken:a&&a.join?a[a.length-1]:a}}S.defineSimpleMode=function(e,t){S.defineMode(e,function(e){return S.simpleMode(e,t)})},S.simpleMode=function(e,t){m(t,"start");var n={},a=t.meta||{},r=!1;for(var o in t)if(o!=a&&t.hasOwnProperty(o))for(var i=n[o]=[],l=t[o],s=0;s<l.length;s++){var d=l[s];i.push(new v(d,t)),(d.indent||d.dedent)&&(r=!0)}var c,p,u,f,h={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:r?[]:null}},copyState:function(e){var t={state:e.state,pending:e.pending,local:e.local,localState:null,indent:e.indent&&e.indent.slice(0)};e.localState&&(t.localState=S.copyState(e.local.mode,e.localState)),e.stack&&(t.stack=e.stack.slice(0));for(var n=e.persistentStates;n;n=n.next)t.persistentStates={mode:n.mode,spec:n.spec,state:n.state==e.localState?t.localState:S.copyState(n.mode,n.state),next:t.persistentStates};return t},token:(u=n,f=e,function(e,t){if(t.pending){var n=t.pending.shift();return 0==t.pending.length&&(t.pending=null),e.pos+=n.text.length,n.token}if(t.local){if(t.local.end&&e.match(t.local.end)){var a=t.local.endToken||null;return t.local=t.localState=null,a}var r,a=t.local.mode.token(e,t.localState);return t.local.endScan&&(r=t.local.endScan.exec(e.current()))&&(e.pos=e.start+r.index),a}for(var o=u[t.state],i=0;i<o.length;i++){var l=o[i],s=(!l.data.sol||e.sol())&&e.match(l.regex);if(s){l.data.next?t.state=l.data.next:l.data.push?((t.stack||(t.stack=[])).push(t.state),t.state=l.data.push):l.data.pop&&t.stack&&t.stack.length&&(t.state=t.stack.pop()),l.data.mode&&k(f,t,l.data.mode,l.token),l.data.indent&&t.indent.push(e.indentation()+f.indentUnit),l.data.dedent&&t.indent.pop();var d=l.token;if(d&&d.apply&&(d=d(s)),2<s.length&&l.token&&"string"!=typeof l.token){t.pending=[];for(var c=2;c<s.length;c++)s[c]&&t.pending.push({text:s[c],token:l.token[c-1]});return e.backUp(s[0].length-(s[1]?s[1].length:0)),d[0]}return d&&d.join?d[0]:d}}return e.next(),null}),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:(c=n,p=a,function(e,t,n){if(e.local&&e.local.mode.indent)return e.local.mode.indent(e.localState,t,n);if(null==e.indent||e.local||p.dontIndentStates&&-1<function(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}(e.state,p.dontIndentStates))return S.Pass;var a=e.indent.length-1,r=c[e.state];e:for(;;){for(var o=0;o<r.length;o++){var i=r[o];if(i.data.dedent&&!1!==i.data.dedentIfLineStart){var l=i.regex.exec(t);if(l&&l[0]){a--,(i.next||i.push)&&(r=c[i.next||i.push]),t=t.slice(l[0].length);continue e}}}break}return a<0?0:e.indent[a]})};if(a)for(var g in a)a.hasOwnProperty(g)&&(h[g]=a[g]);return h}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){function a(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function t(e){a(e);var o=e.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=e.getOption("direction"),o.className="CodeMirror-placeholder";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),o.appendChild(r),e.display.lineSpace.insertBefore(o,e.display.lineSpace.firstChild)}function l(e){n(e)&&t(e)}function c(e){var o=e.getWrapperElement(),r=n(e);o.className=o.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?t(e):a(e)}function n(e){return 1===e.lineCount()&&""===e.getLine(0)}i.defineOption("placeholder","",function(e,o,r){var t=r&&r!=i.Init;if(o&&!t)e.on("blur",l),e.on("change",c),e.on("swapDoc",c),c(e);else if(!o&&t){e.off("blur",l),e.off("change",c),e.off("swapDoc",c),a(e);var n=e.getWrapperElement();n.className=n.className.replace(" CodeMirror-empty","")}o&&!e.hasFocus()&&l(e)})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(v){"use strict";v.runMode=function(e,t,n,r){var o=v.getMode(v.defaults,t),c=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9);if(n.appendChild){var l=r&&r.tabSize||v.defaults.tabSize,u=n,f=0;u.innerHTML="",n=function(e,t){if("\n"==e)return u.appendChild(document.createTextNode(c?"\r":e)),void(f=0);for(var n="",r=0;;){var o=e.indexOf("\t",r);if(-1==o){n+=e.slice(r),f+=e.length-r;break}f+=o-r,n+=e.slice(r,o);var a=l-f%l;f+=a;for(var d=0;d<a;++d)n+=" ";r=o+1}if(t){var i=u.appendChild(document.createElement("span"));i.className="cm-"+t.replace(/ +/g," cm-"),i.appendChild(document.createTextNode(n))}else u.appendChild(document.createTextNode(n))}}for(var a=v.splitLines(e),d=r&&r.state||v.startState(o),i=0,s=a.length;i<s;++i){i&&n("\n");var p=new v.StringStream(a[i]);for(!p.string&&o.blankLine&&o.blankLine(d);!p.eol();){var m=o.token(p,d);n(p.current(),m,i,p.start,d),p.start=p.pos}}}});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],t):t(CodeMirror)}(function(n){"use strict";var o={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function r(t){for(var e in this.options={},o)this.options[e]=(t&&t.hasOwnProperty(e)?t:o)[e];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function a(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&i(t,e)}function s(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,i(t,e))}function i(t,e){clearTimeout(e.timeout),e.timeout=setTimeout(function(){l(t)},e.options.delay)}function h(t,e,o,i){var n,r,a,s=t.state.matchHighlighter;if(t.addOverlay(s.overlay=(n=e,r=o,a=i,{token:function(t){if(t.match(n)&&(!r||(o=r,!((e=t).start&&o.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&o.test(e.string.charAt(e.pos))))))return a;var e,o;t.next(),t.skipTo(n.charAt(0))||t.skipToEnd()}})),s.options.annotateScrollbar&&t.showMatchesOnScrollbar){var l=o?new RegExp("\\b"+e.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+"\\b"):e;s.matchesonscroll=t.showMatchesOnScrollbar(l,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function u(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function l(c){c.operation(function(){var t=c.state.matchHighlighter;if(u(c),c.somethingSelected()||!t.options.showToken){var e=c.getCursor("from"),o=c.getCursor("to");if(e.line==o.line&&(!t.options.wordsOnly||function(t,e,o){{if(null===t.getRange(e,o).match(/^\w+$/))return!1;if(0<e.ch){var i={line:e.line,ch:e.ch-1},n=t.getRange(i,e);if(null===n.match(/\W/))return!1}if(o.ch<t.getLine(e.line).length){var i={line:o.line,ch:o.ch+1},n=t.getRange(o,i);if(null===n.match(/\W/))return!1}return!0}}(c,e,o))){var i=c.getRange(e,o);t.options.trim&&(i=i.replace(/^\s+|\s+$/g,"")),i.length>=t.options.minChars&&h(c,i,!1,t.options.style)}}else{for(var n=!0===t.options.showToken?/[\w$]/:t.options.showToken,r=c.getCursor(),a=c.getLine(r.line),s=r.ch,l=s;s&&n.test(a.charAt(s-1));)--s;for(;l<a.length&&n.test(a.charAt(l));)++l;s<l&&h(c,a.slice(s,l),n,t.options.style)}})}n.defineOption("highlightSelectionMatches",!1,function(t,e,o){if(o&&o!=n.Init&&(u(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",a),t.off("focus",s)),e){var i=t.state.matchHighlighter=new r(e);t.hasFocus()?(i.active=!0,l(t)):t.on("focus",s),t.on("cursorActivity",a)}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(T){"use strict";function e(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}T.defineMode("css",function(e,t){var r=t.inline;t.propertyKeywords||(t=T.resolveMode("text/css"));var o,a,i=e.indentUnit,n=t.tokenHooks,l=t.documentTypes||{},s=t.mediaTypes||{},c=t.mediaFeatures||{},d=t.mediaValueKeywords||{},p=t.propertyKeywords||{},u=t.nonStandardPropertyKeywords||{},m=t.fontProperties||{},h=t.counterDescriptors||{},g=t.colorKeywords||{},b=t.valueKeywords||{},f=t.allowNested,y=t.lineComment,w=!0===t.supportsAtComponent;function k(e,t){return o=t,e}function v(a){return function(e,t){for(var r,o=!1;null!=(r=e.next());){if(r==a&&!o){")"==a&&e.backUp(1);break}o=!o&&"\\"==r}return(r==a||!o&&")"!=a)&&(t.tokenize=null),k("string","string")}}function x(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=v(")"),k(null,"(")}function z(e,t,r){this.type=e,this.indent=t,this.prev=r}function j(e,t,r,o){return e.context=new z(r,t.indentation()+(!1===o?0:i),e.context),r}function q(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function P(e,t,r){return B[r.context.type](e,t,r)}function K(e,t,r,o){for(var a=o||1;0<a;a--)r.context=r.context.prev;return P(e,t,r)}function C(e){var t=e.current().toLowerCase();a=b.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var B={top:function(e,t,r){if("{"==e)return j(r,t,"block");if("}"==e&&r.context.prev)return q(r);if(w&&/@component/i.test(e))return j(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return j(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return j(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return j(r,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return j(r,t,"interpolation");if(":"==e)return"pseudo";if(f&&"("==e)return j(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"!=e)return"meta"==e?"block":f||"hash"!=e&&"qualifier"!=e?B.top(e,t,r):(a="error","block");var o=t.current().toLowerCase();return p.hasOwnProperty(o)?(a="property","maybeprop"):u.hasOwnProperty(o)?(a="string-2","maybeprop"):f?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")},maybeprop:function(e,t,r){return":"==e?j(r,t,"prop"):P(e,t,r)},prop:function(e,t,r){if(";"==e)return q(r);if("{"==e&&f)return j(r,t,"propBlock");if("}"==e||"{"==e)return K(e,t,r);if("("==e)return j(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)C(t);else if("interpolation"==e)return j(r,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?q(r):"word"==e?(a="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?K(e,t,r):")"==e?q(r):"("==e?j(r,t,"parens"):"interpolation"==e?j(r,t,"interpolation"):("word"==e&&C(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(a="variable-3",r.context.type):P(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&l.hasOwnProperty(t.current())?(a="tag",r.context.type):B.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return j(r,t,"atBlock_parens");if("}"==e||";"==e)return K(e,t,r);if("{"==e)return q(r)&&j(r,t,f?"block":"top");if("interpolation"==e)return j(r,t,"interpolation");if("word"==e){var o=t.current().toLowerCase();a="only"==o||"not"==o||"and"==o||"or"==o?"keyword":s.hasOwnProperty(o)?"attribute":c.hasOwnProperty(o)?"property":d.hasOwnProperty(o)?"keyword":p.hasOwnProperty(o)?"property":u.hasOwnProperty(o)?"string-2":b.hasOwnProperty(o)?"atom":g.hasOwnProperty(o)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?K(e,t,r):"{"==e?q(r)&&j(r,t,f?"block":"top",!1):("word"==e&&(a="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?q(r):"{"==e||"}"==e?K(e,t,r,2):B.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?j(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(a="variable","restricted_atBlock_before"):P(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,q(r)):"word"==e?(a="@font-face"==r.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(a="variable","keyframes"):"{"==e?j(r,t,"top"):P(e,t,r)},at:function(e,t,r){return";"==e?q(r):"{"==e||"}"==e?K(e,t,r):("word"==e?a="tag":"hash"==e&&(a="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?q(r):"{"==e||";"==e?K(e,t,r):("word"==e?a="variable":"variable"!=e&&"("!=e&&")"!=e&&(a="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new z(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(n[r]){var o=n[r](e,t);if(!1!==o)return o}return"@"==r?(e.eatWhile(/[\w\\\-]/),k("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?k(null,"compare"):'"'==r||"'"==r?(t.tokenize=v(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),k("atom","hash")):"!"==r?(e.match(/^\s*\w*/),k("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),k("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?k(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?k("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?k(null,r):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=x),k("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),k("property","word")):k(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),k("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?k("variable-2","variable-definition"):k("variable-2","variable")):e.match(/^\w+-/)?k("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(o=r[1],r=r[0]),a=r,"comment"!=o&&(t.state=B[t.state](o,e,t)),a},indent:function(e,t){var r=e.context,o=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=o&&")"!=o||(r=r.prev),r.prev&&("}"!=o||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=o||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=o||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-i)):a=(r=r.prev).indent),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],r=e(t),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=e(o),i=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],n=e(i),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],s=e(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(c),p=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],u=e(p),m=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),h=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],b=e(g),f=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(f),w=t.concat(o).concat(i).concat(l).concat(c).concat(p).concat(g).concat(f);function k(e,t){for(var r,o=!1;null!=(r=e.next());){if(o&&"/"==r){t.tokenize=null;break}o="*"==r}return["comment","comment"]}T.registerHelper("hintWords","css",w),T.defineMIME("text/css",{documentTypes:r,mediaTypes:a,mediaFeatures:n,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:u,fontProperties:m,counterDescriptors:h,colorKeywords:b,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k)(e,t)}},name:"css"}),T.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:n,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:u,colorKeywords:b,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k)(e,t):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),T.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:n,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:u,colorKeywords:b,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k)(e,t):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),T.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:a,mediaFeatures:n,propertyKeywords:d,nonStandardPropertyKeywords:u,fontProperties:m,counterDescriptors:h,colorKeywords:b,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k)(e,t)}},name:"css",helperType:"gss"})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(f){"use strict";var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var r={};function g(t,e){var a,n=t.match(r[a=e]||(r[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function h(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function o(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],r=l.length-1;0<=r;r--)n.unshift(l[r])}f.defineMode("htmlmixed",function(u,t){var m=f.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag}),d={},e=t&&t.tags,a=t&&t.scriptTypes;if(o(l,d),e&&o(e,d),a)for(var n=a.length-1;0<=n;n--)d.script.unshift(["type",a[n].matches,a[n].mode]);function p(t,e){var a,n=m.token(t,e.htmlState),l=/\btag\b/.test(n);if(l&&!/[<>\s\/]/.test(t.current())&&(a=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(a))e.inTag=a+" ";else if(e.inTag&&l&&/>$/.test(t.current())){var r=/^([\S]+) (.*)/.exec(e.inTag);e.inTag=null;var o=">"==t.current()&&function(t,e){for(var a=0;a<t.length;a++){var n=t[a];if(!n[0]||n[1].test(g(e,n[0])))return n[2]}}(d[r[1]],r[2]),c=f.getMode(u,o),i=h(r[1],!0),s=h(r[1],!1);e.token=function(t,e){return t.match(i,!1)?(e.token=p,e.localState=e.localMode=null,null):(a=t,n=s,l=e.localMode.token(t,e.localState),r=a.current(),-1<(o=r.search(n))?a.backUp(r.length-o):r.match(/<\/?$/)&&(a.backUp(r.length),a.match(n,!1)||a.match(r)),l);var a,n,l,r,o},e.localMode=c,e.localState=f.startState(c,m.indent(e.htmlState,"",""))}else e.inTag&&(e.inTag+=t.current(),t.eol()&&(e.inTag+=" "));return n}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:f.startState(m)}},copyState:function(t){var e;return t.localState&&(e=f.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:e,htmlState:f.copyState(m,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,e,a){return!t.localMode||/^\s*<\//.test(e)?m.indent(t.htmlState,e,a):t.localMode.indent?t.localMode.indent(t.localState,e,a):f.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||m}}}},"xml","javascript","css"),f.defineMIME("text/html","htmlmixed")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function h(e,t,i,r){this.cm=e,this.node=t,this.options=i,this.height=r,this.cleared=!1}function l(e,t){for(var i=t.nextSibling;i;i=i.nextSibling)if(i==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",function(e,t){t=t||{},this.state.panels||function(r){var e=r.getWrapperElement(),t=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,n=parseInt(t.height),s=r.state.panels={setHeight:e.style.height,heightLeft:n,panels:0,wrapper:document.createElement("div")};e.parentNode.insertBefore(s.wrapper,e);var i=r.hasFocus();s.wrapper.appendChild(e),i&&r.focus();r._setSize=r.setSize,null!=n&&(r.setSize=function(e,t){if(null==t)return this._setSize(e,t);if("number"!=typeof(s.setHeight=t)){var i=/^(\d+\.?\d*)px$/.exec(t);i?t=Number(i[1]):(s.wrapper.style.height=t,t=s.wrapper.offsetHeight,s.wrapper.style.height="")}r._setSize(e,s.heightLeft+=t-n),n=t})}(this);var i=this.state.panels,r=i.wrapper,n=this.getWrapperElement(),s=t.replace instanceof h&&!t.replace.cleared;t.after instanceof h&&!t.after.cleared?r.insertBefore(e,t.before.node.nextSibling):t.before instanceof h&&!t.before.cleared?r.insertBefore(e,t.before.node):s?(r.insertBefore(e,t.replace.node),i.panels++,t.replace.clear()):"bottom"==t.position?r.appendChild(e):"before-bottom"==t.position?r.insertBefore(e,n.nextSibling):"after-top"==t.position?r.insertBefore(e,n):r.insertBefore(e,r.firstChild);var o=t&&t.height||e.offsetHeight;return this._setSize(null,i.heightLeft-=o),s||i.panels++,t.stable&&l(this,e)&&this.scrollTo(null,this.getScrollInfo().top+o),new h(this,e,t,o)}),h.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var e=this.cm.state.panels;this.cm._setSize(null,e.heightLeft+=this.height),this.options.stable&&l(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),e.wrapper.removeChild(this.node),0==--e.panels&&function(e){var t=e.state.panels;e.state.panels=null;var i=e.getWrapperElement();t.wrapper.parentNode.replaceChild(i,t.wrapper),i.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}(this.cm)}},h.prototype.changed=function(e){var t=null==e?this.node.offsetHeight:e,i=this.cm.state.panels;this.cm._setSize(null,i.heightLeft-=t-this.height),this.height=t}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(a){"use strict";function t(e){e.state.rulerDiv.textContent="";var r=e.getOption("rulers"),t=e.defaultCharWidth(),l=e.charCoords(a.Pos(e.firstLine(),0),"div").left;e.state.rulerDiv.style.minHeight=e.display.scroller.offsetHeight+30+"px";for(var i=0;i<r.length;i++){var o=document.createElement("div");o.className="CodeMirror-ruler";var s,n=r[i];"number"==typeof n?s=n:(s=n.column,n.className&&(o.className+=" "+n.className),n.color&&(o.style.borderColor=n.color),n.lineStyle&&(o.style.borderLeftStyle=n.lineStyle),n.width&&(o.style.borderLeftWidth=n.width)),o.style.left=l+s*t+"px",e.state.rulerDiv.appendChild(o)}}a.defineOption("rulers",!1,function(e,r){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",t)),r&&r.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",t(e),e.on("refresh",t))})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],e):e(CodeMirror)}(function(p){"use strict";var A=p.Pos,k="http://www.w3.org/2000/svg";function C(e,t){this.mv=e,this.type=t,this.classes="left"==t?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function h(e){e.diffOutOfDate&&(e.diff=O(e.orig.getValue(),e.edit.getValue(),e.mv.options.ignoreWhitespace),e.chunks=x(e.diff),e.diffOutOfDate=!1,p.signal(e.edit,"updateDiff",e.diff))}var f=!(C.prototype={constructor:C,init:function(e,t,i){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=p(e,P({value:t,readOnly:!this.mv.options.allowEditingOriginals},P(i))),"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new Q(this.edit)),this.orig.state.trackAlignable=new Q(this.orig)),this.lockButton.title=this.edit.phrase("Toggle locked scrolling"),this.orig.state.diffViews=[this];var r=i.chunkClassLocation||"background";"[object Array]"!=Object.prototype.toString.call(r)&&(r=[r]),this.classes.classLocation=r,this.diff=O(n(t),n(i.value),this.mv.options.ignoreWhitespace),this.chunks=x(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=!1!==i.showDifferences},registerEvents:function(e){var t,i;this.forceUpdate=function(i){var t,r={from:0,to:0,marked:[]},n={from:0,to:0,marked:[]},o=!1;function l(e){o=!(f=!0),"full"==e&&(i.svg&&_(i.svg),i.copyButtons&&_(i.copyButtons),d(i.edit,r.marked,i.classes),d(i.orig,n.marked,i.classes),r.from=r.to=n.from=n.to=0),h(i),i.showDifferences&&(u(i.edit,i.diff,r,DIFF_INSERT,i.classes),u(i.orig,i.diff,n,DIFF_DELETE,i.classes)),"align"==i.mv.options.connect&&y(i),w(i),null!=i.needsScrollSync&&g(i,i.needsScrollSync),f=!1}function a(e){f||(i.dealigned=!0,s(e))}function s(e){f||o||(clearTimeout(t),!0===e&&(o=!0),t=setTimeout(l,!0===e?20:250))}function e(e,t){i.diffOutOfDate||(i.diffOutOfDate=!0,r.from=r.to=n.from=n.to=0),a(t.text.length-1!=t.to.line-t.from.line)}function c(){i.diffOutOfDate=!0,i.dealigned=!0,l("full")}i.edit.on("change",e),i.orig.on("change",e),i.edit.on("swapDoc",c),i.orig.on("swapDoc",c),"align"==i.mv.options.connect&&(p.on(i.edit.state.trackAlignable,"realign",a),p.on(i.orig.state.trackAlignable,"realign",a));return i.edit.on("viewportChange",function(){s(!1)}),i.orig.on("viewportChange",function(){s(!1)}),l(),l}(this),o(this,!0,!1),i=e,(t=this).edit.on("scroll",function(){g(t,!0)&&w(t)}),t.orig.on("scroll",function(){g(t,!1)&&w(t),i&&g(i,!0)&&w(i)})},setShowDifferences:function(e){(e=!1!==e)!=this.showDifferences&&(this.showDifferences=e,this.forceUpdate("full"))}});function g(e,t){if(e.diffOutOfDate)return e.lockScroll&&null==e.needsScrollSync&&(e.needsScrollSync=t),!1;if(e.needsScrollSync=null,!e.lockScroll)return!0;var i,r,n=+new Date;if(r=t?(i=e.edit,e.orig):(i=e.orig,e.edit),i.state.scrollSetBy==e&&(i.state.scrollSetAt||0)+250>n)return!1;var o=i.getScrollInfo();if("align"==e.mv.options.connect)m=o.top;else{var l,a,s=.5*o.clientHeight,c=o.top+s,h=i.lineAtHeight(c,"local"),f=function(e,t,i){for(var r,n,o,l,a=0;a<e.length;a++){var s=e[a],c=i?s.editFrom:s.origFrom,h=i?s.editTo:s.origTo;null==n&&(t<c?(n=s.editFrom,l=s.origFrom):t<h&&(n=s.editTo,l=s.origTo)),h<=t?(r=s.editTo,o=s.origTo):c<=t&&(r=s.editFrom,o=s.origFrom)}return{edit:{before:r,after:n},orig:{before:o,after:l}}}(e.chunks,h,t),g=b(i,t?f.edit:f.orig),d=b(r,t?f.orig:f.edit),u=(c-g.top)/(g.bot-g.top),m=d.top-s+u*(d.bot-d.top);if(m>o.top&&(a=o.top/s)<1)m=m*a+o.top*(1-a);else if((l=o.height-o.clientHeight-o.top)<s){var v=r.getScrollInfo();l<v.height-v.clientHeight-m&&(a=l/s)<1&&(m=m*a+(v.height-v.clientHeight-l)*(1-a))}}return r.scrollTo(o.left,m),r.state.scrollSetAt=n,r.state.scrollSetBy=e,!0}function b(e,t){var i=t.after;return null==i&&(i=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(i,"local")}}function o(e,t,i){(e.lockScroll=t)&&0!=i&&g(e,DIFF_INSERT)&&w(e),(t?p.addClass:p.rmClass)(e.lockButton,"CodeMirror-merge-scrolllock-enabled")}function l(e,t,i){for(var r=i.classLocation,n=0;n<r.length;n++)e.removeLineClass(t,r[n],i.chunk),e.removeLineClass(t,r[n],i.start),e.removeLineClass(t,r[n],i.end)}function d(e,t,i){for(var r=0;r<t.length;++r){var n=t[r];n instanceof p.TextMarker?n.clear():n.parent&&l(e,n,i)}t.length=0}function u(e,t,i,r,n){var o=e.getViewport();e.operation(function(){i.from==i.to||20<o.from-i.to||20<i.from-o.to?(d(e,i.marked,n),a(e,t,r,i.marked,o.from,o.to,n),i.from=o.from,i.to=o.to):(o.from<i.from&&(a(e,t,r,i.marked,o.from,i.from,n),i.from=o.from),o.to>i.to&&(a(e,t,r,i.marked,i.to,o.to,n),i.to=o.to))})}function E(e,t,i,r,n,o){for(var l=i.classLocation,a=e.getLineHandle(t),s=0;s<l.length;s++)r&&e.addLineClass(a,l[s],i.chunk),n&&e.addLineClass(a,l[s],i.start),o&&e.addLineClass(a,l[s],i.end);return a}function a(o,e,t,l,a,s,c){var i=A(0,0),r=A(a,0),n=o.clipPos(A(s-1)),h=t==DIFF_DELETE?c.del:c.insert;function f(e,t){for(var i=Math.max(a,e),r=Math.min(s,t),n=i;n<r;++n)l.push(E(o,n,c,!0,n==e,n==t-1));e==t&&i==t&&r==t&&(i?l.push(E(o,i-1,c,!1,!1,!0)):l.push(E(o,i,c,!1,!0,!1)))}for(var g,d,u,m,v,p,k=0,C=!1,b=0;b<e.length;++b){var w=e[b],T=w[0],y=w[1];if(T==DIFF_EQUAL){var F=i.line+(I(e,b)?0:1);j(i,y);var S=i.line+(B(e,b)?1:0);F<S&&(C&&(f(k,F),C=!1),k=S)}else if(C=!0,T==t){var M=j(i,y,!0),L=(p=i,0<((v=r).line-p.line||v.ch-p.ch)?v:p),D=(m=M,((u=n).line-m.line||u.ch-m.ch)<0?u:m);d=D,((g=L).line!=d.line||g.ch!=d.ch)&&l.push(o.markText(L,D,{className:h})),i=M}}C&&f(k,i.line+1)}function w(e){if(e.showDifferences){if(e.svg){_(e.svg);var t=e.gap.offsetWidth;H(e.svg,"width",t,"height",e.gap.offsetHeight)}e.copyButtons&&_(e.copyButtons);for(var i=e.edit.getViewport(),r=e.orig.getViewport(),n=e.mv.wrap.getBoundingClientRect().top,o=n-e.edit.getScrollerElement().getBoundingClientRect().top+e.edit.getScrollInfo().top,l=n-e.orig.getScrollerElement().getBoundingClientRect().top+e.orig.getScrollInfo().top,a=0;a<e.chunks.length;a++){var s=e.chunks[a];s.editFrom<=i.to&&s.editTo>=i.from&&s.origFrom<=r.to&&s.origTo>=r.from&&F(e,s,l,o,t)}}}function T(e,t){for(var i=0,r=0,n=0;n<t.length;n++){var o=t[n];if(o.editTo>e&&o.editFrom<=e)return null;if(o.editFrom>e)break;i=o.editTo,r=o.origTo}return r+(e-i)}function c(e,t,i){for(var r=e.state.trackAlignable,n=e.firstLine(),o=0,l=[],a=0;;a++){for(var s=t[a],c=s?i?s.origFrom:s.editFrom:1e9;o<r.alignable.length;o+=2){var h=r.alignable[o]+1;if(!(h<=n)){if(!(h<=c))break;l.push(h)}}if(!s)break;l.push(n=i?s.origTo:s.editTo)}return l}function m(e,t,i,r){var n=0,o=0,l=0,a=0;e:for(;;n++){var s=e[n],c=t[o];if(!s&&null==c)break;for(var h=s?s[0]:1e9,f=null==c?1e9:c;l<i.length;){var g=i[l];if(g.origFrom<=f&&g.origTo>f){o++,n--;continue e}if(g.editTo>h){if(g.editFrom<=h)continue e;break}a+=g.origTo-g.origFrom-(g.editTo-g.editFrom),l++}if(h==f-a)s[r]=f,o++;else if(h<f-a)s[r]=h+a;else{var d=[f-a,null,null];d[r]=f,e.splice(n,0,d),o++}}}function y(e,t){if(e.dealigned||t){if(!e.orig.curOp)return e.orig.operation(function(){y(e,t)});e.dealigned=!1;var i=e.mv.left==e?e.mv.right:e.mv.left;i&&(h(i),i.dealigned=!1);for(var r=function(e,t){var i=c(e.edit,e.chunks,!1),r=[];if(t)for(var n=0,o=0;n<t.chunks.length;n++){for(var l=t.chunks[n].editTo;o<i.length&&i[o]<l;)o++;o!=i.length&&i[o]==l||i.splice(o++,0,l)}for(n=0;n<i.length;n++)r.push([i[n],null,null]);return m(r,c(e.orig,e.chunks,!0),e.chunks,1),t&&m(r,c(t.orig,t.chunks,!0),t.chunks,2),r}(e,i),n=e.mv.aligners,o=0;o<n.length;o++)n[o].clear();n.length=0;var l=[e.edit,e.orig],a=[];i&&l.push(i.orig);for(o=0;o<l.length;o++)a.push(l[o].getScrollInfo().top);for(var s=0;s<r.length;s++)v(l,r[s],n);for(o=0;o<l.length;o++)l[o].scrollTo(null,a[o])}}function v(e,t,i){for(var r=0,n=[],o=0;o<e.length;o++)if(null!=t[o]){var l=e[o].heightAtLine(t[o],"local");n[o]=l,r=Math.max(r,l)}for(o=0;o<e.length;o++)if(null!=t[o]){var a=r-n[o];1<a&&i.push(s(e[o],t[o],a))}}function s(e,t,i){var r=!0;t>e.lastLine()&&(t--,r=!1);var n=document.createElement("div");return n.className="CodeMirror-merge-spacer",n.style.height=i+"px",n.style.minWidth="1px",e.addLineWidget(t,n,{height:i,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function F(e,t,i,r,n){var o="left"==e.type,l=e.orig.heightAtLine(t.origFrom,"local",!0)-i;if(e.svg){var a=l,s=e.edit.heightAtLine(t.editFrom,"local",!0)-r;if(o){var c=a;a=s,s=c}var h=e.orig.heightAtLine(t.origTo,"local",!0)-i,f=e.edit.heightAtLine(t.editTo,"local",!0)-r;if(o){c=h;h=f,f=c}var g=" C "+n/2+" "+s+" "+n/2+" "+a+" "+(n+2)+" "+a,d=" C "+n/2+" "+h+" "+n/2+" "+f+" -1 "+f;H(e.svg.appendChild(document.createElementNS(k,"path")),"d","M -1 "+s+g+" L "+(n+2)+" "+h+d+" z","class",e.classes.connect)}if(e.copyButtons){var u=e.copyButtons.appendChild(V("div","left"==e.type?"⇝":"⇜","CodeMirror-merge-copy")),m=e.mv.options.allowEditingOriginals;if(u.title=e.edit.phrase(m?"Push to left":"Revert chunk"),u.chunk=t,u.style.top=(t.origTo>t.origFrom?l:e.edit.heightAtLine(t.editFrom,"local")-r)+"px",m){var v=e.edit.heightAtLine(t.editFrom,"local")-r,p=e.copyButtons.appendChild(V("div","right"==e.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));p.title="Push to right",p.chunk={editFrom:t.origFrom,editTo:t.origTo,origFrom:t.editFrom,origTo:t.editTo},p.style.top=v+"px","right"==e.type?p.style.left="2px":p.style.right="2px"}}}function S(e,t,i,r){if(!e.diffOutOfDate){var n=r.origTo>i.lastLine()?A(r.origFrom-1):A(r.origFrom,0),o=A(r.origTo,0),l=r.editTo>t.lastLine()?A(r.editFrom-1):A(r.editFrom,0),a=A(r.editTo,0),s=e.mv.options.revertChunk;s?s(e.mv,i,n,o,t,l,a):t.replaceRange(i.getRange(n,o),l,a)}}var M,L=p.MergeView=function(e,t){if(!(this instanceof L))return new L(e,t);var i=(this.options=t).origLeft,r=null==t.origRight?t.orig:t.origRight,n=null!=i,o=null!=r,l=1+(n?1:0)+(o?1:0),a=[],s=this.left=null,c=this.right=null,h=this;if(n){s=this.left=new C(this,"left");var f=V("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");a.push(f),a.push(D(s))}var g=V("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(a.push(g),o){c=this.right=new C(this,"right"),a.push(D(c));var d=V("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");a.push(d)}(o?d:g).className+=" CodeMirror-merge-pane-rightmost",a.push(V("div",null,null,"height: 0; clear: both;"));var u=this.wrap=e.appendChild(V("div",a,"CodeMirror-merge CodeMirror-merge-"+l+"pane"));this.edit=p(g,P(t)),s&&s.init(f,i,t),c&&c.init(d,r,t),t.collapseIdentical&&this.editor().operation(function(){!function(e,t){"number"!=typeof t&&(t=2);for(var i=[],r=e.editor(),n=r.firstLine(),o=n,l=r.lastLine();o<=l;o++)i.push(!0);e.left&&W(e.left,t,n,i);e.right&&W(e.right,t,n,i);for(var a=0;a<i.length;a++)if(i[a]){for(var s=a+n,c=1;a<i.length-1&&i[a+1];a++,c++);if(t<c){var h=[{line:s,cm:r}];e.left&&h.push({line:T(s,e.left.chunks),cm:e.left.orig}),e.right&&h.push({line:T(s,e.right.chunks),cm:e.right.orig});var f=R(c,h);e.options.onCollapse&&e.options.onCollapse(e,s,c,f)}}}(h,t.collapseIdentical)}),"align"==t.connect&&(this.aligners=[],y(this.left||this.right,!0)),s&&s.registerEvents(c),c&&c.registerEvents(s);var m=function(){s&&w(s),c&&w(c)};p.on(window,"resize",m);var v=setInterval(function(){for(var e=u.parentNode;e&&e!=document.body;e=e.parentNode);e||(clearInterval(v),p.off(window,"resize",m))},5e3)};function D(i){var e=i.lockButton=V("div",null,"CodeMirror-merge-scrolllock"),t=V("div",[e],"CodeMirror-merge-scrolllock-wrap");p.on(e,"click",function(){o(i,!i.lockScroll)});var r=[t];if(!1!==i.mv.options.revertButtons&&(i.copyButtons=V("div",null,"CodeMirror-merge-copybuttons-"+i.type),p.on(i.copyButtons,"click",function(e){var t=e.target||e.srcElement;t.chunk&&("CodeMirror-merge-copy-reverse"!=t.className?S(i,i.edit,i.orig,t.chunk):S(i,i.orig,i.edit,t.chunk))}),r.unshift(i.copyButtons)),"align"!=i.mv.options.connect){var n=document.createElementNS&&document.createElementNS(k,"svg");n&&!n.createSVGRect&&(n=null),(i.svg=n)&&r.push(n)}return i.gap=V("div",r,"CodeMirror-merge-gap")}function n(e){return"string"==typeof e?e:e.getValue()}function O(e,t,i){M||(M=new diff_match_patch);for(var r=M.diff_main(e,t),n=0;n<r.length;++n){var o=r[n];(i?/[^ \t]/.test(o[1]):o[1])?n&&r[n-1][0]==o[0]&&(r.splice(n--,1),r[n][1]+=o[1]):r.splice(n--,1)}return r}function x(e){var t=[];if(!e.length)return t;for(var i=0,r=0,n=A(0,0),o=A(0,0),l=0;l<e.length;++l){var a=e[l],s=a[0];if(s==DIFF_EQUAL){var c=!I(e,l)||n.line<i||o.line<r?1:0,h=n.line+c,f=o.line+c;j(n,a[1],null,o);var g=B(e,l)?1:0,d=n.line+g,u=o.line+g;h<d&&(l&&t.push({origFrom:r,origTo:f,editFrom:i,editTo:h}),i=d,r=u)}else j(s==DIFF_INSERT?n:o,a[1])}return(i<=n.line||r<=o.line)&&t.push({origFrom:r,origTo:o.line+1,editFrom:i,editTo:n.line+1}),t}function B(e,t){if(t==e.length-1)return!0;var i=e[t+1][1];return!(1==i.length&&t<e.length-2||10!=i.charCodeAt(0))&&(t==e.length-2||(1<(i=e[t+2][1]).length||t==e.length-3)&&10==i.charCodeAt(0))}function I(e,t){if(0==t)return!0;var i=e[t-1][1];return 10==i.charCodeAt(i.length-1)&&(1==t||10==(i=e[t-2][1]).charCodeAt(i.length-1))}function N(e,t,i){e.addLineClass(t,"wrap","CodeMirror-merge-collapsed-line");var r=document.createElement("span");r.className="CodeMirror-merge-collapsed-widget",r.title=e.phrase("Identical text collapsed. Click to expand.");var n=e.markText(A(t,0),A(i-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:r,clearOnEnter:!0});function o(){n.clear(),e.removeLineClass(t,"wrap","CodeMirror-merge-collapsed-line")}return n.explicitlyCleared&&o(),p.on(r,"click",o),n.on("clear",o),p.on(r,"click",o),{mark:n,clear:o}}function R(e,t){var i=[];function r(){for(var e=0;e<i.length;e++)i[e].clear()}for(var n=0;n<t.length;n++){var o=t[n],l=N(o.cm,o.line,o.line+e);i.push(l),l.mark.on("clear",r)}return i[0].mark}function W(e,t,i,r){for(var n=0;n<e.chunks.length;n++)for(var o=e.chunks[n],l=o.editFrom-t;l<o.editTo+t;l++){var a=l+i;0<=a&&a<r.length&&(r[a]=!1)}}function V(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),"string"==typeof t)n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)n.appendChild(t[o]);return n}function _(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild)}function H(e){for(var t=1;t<arguments.length;t+=2)e.setAttribute(arguments[t],arguments[t+1])}function P(e,t){for(var i in t||(t={}),e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function j(e,t,i,r){for(var n=i?A(e.line,e.ch):e,o=0;;){var l=t.indexOf("\n",o);if(-1==l)break;++n.line,r&&++r.line,o=l+1}return n.ch=(o?0:n.ch)+(t.length-o),r&&(r.ch=(o?0:r.ch)+(t.length-o)),n}L.prototype={constructor:L,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(e){this.right&&this.right.setShowDifferences(e),this.left&&this.left.setShowDifferences(e)},rightChunks:function(){if(this.right)return h(this.right),this.right.chunks},leftChunks:function(){if(this.left)return h(this.left),this.left.chunks}};var r=1,U=2,z=4;function Q(e){this.cm=e,this.alignable=[],this.height=e.doc.height;var l=this;e.on("markerAdded",function(e,t){if(t.collapsed){var i=t.find(1);null!=i&&l.set(i.line,z)}}),e.on("markerCleared",function(e,t,i,r){null!=r&&t.collapsed&&l.check(r,z,l.hasMarker)}),e.on("markerChanged",this.signal.bind(this)),e.on("lineWidgetAdded",function(e,t,i){t.mergeSpacer||(t.above?l.set(i-1,U):l.set(i,r))}),e.on("lineWidgetCleared",function(e,t,i){t.mergeSpacer||(t.above?l.check(i-1,U,l.hasWidgetBelow):l.check(i,r,l.hasWidget))}),e.on("lineWidgetChanged",this.signal.bind(this)),e.on("change",function(e,t){var i=t.from.line,r=t.to.line-t.from.line,n=t.text.length-1,o=i+n;(r||n)&&l.map(i,r,n),l.check(o,z,l.hasMarker),(r||n)&&l.check(t.from.line,z,l.hasMarker)}),e.on("viewportChange",function(){l.cm.doc.height!=l.height&&l.signal()})}function q(e,t,i){for(var r=e.length-1;0<=r;r--){var n=e[r],o=(i?n.origTo:n.editTo)-1;if(o<t)return o}}function G(e,t,i){for(var r=0;r<e.length;r++){var n=e[r],o=i?n.origFrom:n.editFrom;if(t<o)return o}}function t(e,t){var i=null,r=e.state.diffViews,n=e.getCursor().line;if(r)for(var o=0;o<r.length;o++){var l=r[o],a=e==l.orig;h(l);var s=t<0?q(l.chunks,n,a):G(l.chunks,n,a);null==s||null!=i&&!(t<0?i<s:s<i)||(i=s)}if(null==i)return p.Pass;e.setCursor(i,0)}Q.prototype={signal:function(){p.signal(this,"realign"),this.height=this.cm.doc.height},set:function(e,t){for(var i=-1;i<this.alignable.length;i+=2){var r=this.alignable[i]-e;if(0==r){if((this.alignable[i+1]&t)==t)return;return this.alignable[i+1]|=t,void this.signal()}if(0<r)break}this.signal(),this.alignable.splice(i,0,e,t)},find:function(e){for(var t=0;t<this.alignable.length;t+=2)if(this.alignable[t]==e)return t;return-1},check:function(e,t,i){var r=this.find(e);if(-1!=r&&this.alignable[r+1]&t&&!i.call(this,e)){this.signal();var n=this.alignable[r+1]&~t;n?this.alignable[r+1]=n:this.alignable.splice(r,2)}},hasMarker:function(e){var t=this.cm.getLineHandle(e);if(t.markedSpans)for(var i=0;i<t.markedSpans.length;i++)if(t.markedSpans[i].mark.collapsed&&null!=t.markedSpans[i].to)return!0;return!1},hasWidget:function(e){var t=this.cm.getLineHandle(e);if(t.widgets)for(var i=0;i<t.widgets.length;i++)if(!t.widgets[i].above&&!t.widgets[i].mergeSpacer)return!0;return!1},hasWidgetBelow:function(e){if(e==this.cm.lastLine())return!1;var t=this.cm.getLineHandle(e+1);if(t.widgets)for(var i=0;i<t.widgets.length;i++)if(t.widgets[i].above&&!t.widgets[i].mergeSpacer)return!0;return!1},map:function(e,t,i){for(var r=i-t,n=e+t,o=-1,l=-1,a=0;a<this.alignable.length;a+=2){var s=this.alignable[a];s==e&&this.alignable[a+1]&U&&(o=a),s==n&&this.alignable[a+1]&U&&(l=a),s<=e||(s<n?this.alignable.splice(a--,2):this.alignable[a]+=r)}if(-1<o){var c=this.alignable[o+1];c==U?this.alignable.splice(o,2):this.alignable[o+1]=c&~U}-1<l&&i&&this.set(e+i,U)}},p.commands.goNextDiff=function(e){return t(e,1)},p.commands.goPrevDiff=function(e){return t(e,-1)}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){"use strict";o.overlayMode=function(a,n,t){return{startState:function(){return{base:o.startState(a),overlay:o.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(e){return{base:o.copyState(a,e.base),overlay:o.copyState(n,e.overlay),basePos:e.basePos,baseCur:null,overlayPos:e.overlayPos,overlayCur:null}},token:function(e,o){return(e!=o.streamSeen||Math.min(o.basePos,o.overlayPos)<e.start)&&(o.streamSeen=e,o.basePos=o.overlayPos=e.start),e.start==o.basePos&&(o.baseCur=a.token(e,o.base),o.basePos=e.pos),e.start==o.overlayPos&&(e.pos=e.start,o.overlayCur=n.token(e,o.overlay),o.overlayPos=e.pos),e.pos=Math.min(o.basePos,o.overlayPos),null==o.overlayCur?o.baseCur:null!=o.baseCur&&o.overlay.combineTokens||t&&null==o.overlay.combineTokens?o.baseCur+" "+o.overlayCur:o.overlayCur},indent:a.indent&&function(e,o,r){return a.indent(e.base,o,r)},electricChars:a.electricChars,innerMode:function(e){return{state:e.base,mode:a}},blankLine:function(e){var o,r;return a.blankLine&&(o=a.blankLine(e.base)),n.blankLine&&(r=n.blankLine(e.overlay)),null==r?o:t&&null!=o?o+" "+r:r}}}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var l=e.Pos;function c(e,n){return e.line-n.line||e.ch-n.ch}var n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+n+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,n,t,i){this.line=n,this.ch=t,this.cm=e,this.text=e.getLine(n),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function r(e,n){var t=e.cm.getTokenTypeAt(l(e.line,n));return t&&/\btag\b/.test(t)}function u(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function f(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(u(e))continue;return}if(r(e,n+1)){var t=e.text.lastIndexOf("/",n),i=-1<t&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n+1}}function h(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(f(e))continue;return}if(r(e,n+1)){i.lastIndex=n,e.ch=n;var t=i.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function F(e){for(;;){i.lastIndex=e.ch;var n=i.exec(e.text);if(!n){if(u(e))continue;return}if(r(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}function x(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(f(e))continue;return}if(r(e,n+1)){var t=e.text.lastIndexOf("/",n),i=-1<t&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n}}function g(e,n){for(var t=[];;){var i,r=F(e),u=e.line,f=e.ch-(r?r[0].length:0);if(!r||!(i=s(e)))return;if("selfClose"!=i)if(r[1]){for(var o=t.length-1;0<=o;--o)if(t[o]==r[2]){t.length=o;break}if(o<0&&(!n||n==r[2]))return{tag:r[2],from:l(u,f),to:l(e.line,e.ch)}}else t.push(r[2])}}function v(e,n){for(var t=[];;){var i=x(e);if(!i)return;if("selfClose"!=i){var r=e.line,u=e.ch,f=h(e);if(!f)return;if(f[1])t.push(f[2]);else{for(var o=t.length-1;0<=o;--o)if(t[o]==f[2]){t.length=o;break}if(o<0&&(!n||n==f[2]))return{tag:f[2],from:l(e.line,e.ch),to:l(r,u)}}}else h(e)}}e.registerHelper("fold","xml",function(e,n){for(var t=new a(e,n.line,0);;){var i=F(t);if(!i||t.line!=n.line)return;var r=s(t);if(!r)return;if(!i[1]&&"selfClose"!=r){var u=l(t.line,t.ch),f=g(t,i[2]);return f&&0<c(f.from,u)?{from:u,to:f.from}:null}}}),e.findMatchingTag=function(e,n,t){var i=new a(e,n.line,n.ch,t);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var r=s(i),u=r&&l(i.line,i.ch),f=r&&h(i);if(r&&f&&!(0<c(i,n))){var o={from:l(i.line,i.ch),to:u,tag:f[2]};return"selfClose"==r?{open:o,close:null,at:"open"}:f[1]?{open:v(i,f[2]),close:o,at:"close"}:{open:o,close:g(i=new a(e,u.line,u.ch,t),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,n,t,i){for(var r=new a(e,n.line,n.ch,t);;){var u=v(r,i);if(!u)break;var f=g(new a(e,n.line,n.ch,t),u.tag);if(f)return{open:u,close:f}}},e.scanForClosingTag=function(e,n,t,i){return g(new a(e,n.line,n.ch,i?{from:0,to:i}:null),t)}});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],t):t(CodeMirror)}(function(n){"use strict";function c(t){t.state.tagHit&&t.state.tagHit.clear(),t.state.tagOther&&t.state.tagOther.clear(),t.state.tagHit=t.state.tagOther=null}function o(r){r.state.failedTagMatch=!1,r.operation(function(){if(c(r),!r.somethingSelected()){var t=r.getCursor(),e=r.getViewport();e.from=Math.min(e.from,t.line),e.to=Math.max(t.line+1,e.to);var a=n.findMatchingTag(r,t,e);if(a){if(r.state.matchBothTags){var o="open"==a.at?a.open:a.close;o&&(r.state.tagHit=r.markText(o.from,o.to,{className:"CodeMirror-matchingtag"}))}var i="close"==a.at?a.open:a.close;i?r.state.tagOther=r.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function i(t){t.state.failedTagMatch&&o(t)}n.defineOption("matchTags",!1,function(t,e,a){a&&a!=n.Init&&(t.off("cursorActivity",o),t.off("viewportChange",i),c(t)),e&&(t.state.matchBothTags="object"==typeof e&&e.bothTags,t.on("cursorActivity",o),t.on("viewportChange",i),o(t))}),n.commands.toMatchingTag=function(t){var e=n.findMatchingTag(t,t.getCursor());if(e){var a="close"==e.at?e.open:e.close;a&&t.extendSelection(a.to,a.from)}}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(r){"use strict";function i(e){e.state.markedSelection&&e.operation(function(){!function(e){if(!e.somethingSelected())return c(e);if(1<e.listSelections().length)return a(e);var t=e.getCursor("start"),n=e.getCursor("end"),o=e.state.markedSelection;if(!o.length)return f(e,t,n);var r=o[0].find(),i=o[o.length-1].find();if(!r||!i||n.line-t.line<=m||0<=S(t,i.to)||S(n,r.from)<=0)return a(e);for(;0<S(t,r.from);)o.shift().clear(),r=o[0].find();S(t,r.from)<0&&(r.to.line-t.line<m?(o.shift().clear(),f(e,t,r.to,0)):f(e,t,r.from,0));for(;S(n,i.to)<0;)o.pop().clear(),i=o[o.length-1].find();0<S(n,i.to)&&(n.line-i.from.line<m?(o.pop().clear(),f(e,i.from,n)):f(e,i.to,n))}(e)})}function l(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation(function(){c(e)})}r.defineOption("styleSelectedText",!1,function(e,t,n){var o=n&&n!=r.Init;t&&!o?(e.state.markedSelection=[],e.state.markedSelectionStyle="string"==typeof t?t:"CodeMirror-selectedtext",a(e),e.on("cursorActivity",i),e.on("change",l)):!t&&o&&(e.off("cursorActivity",i),e.off("change",l),c(e),e.state.markedSelection=e.state.markedSelectionStyle=null)});var m=8,u=r.Pos,S=r.cmpPos;function f(e,t,n,o){if(0!=S(t,n))for(var r=e.state.markedSelection,i=e.state.markedSelectionStyle,l=t.line;;){var f=l==t.line?t:u(l,0),c=l+m,a=c>=n.line,s=a?n:u(c,0),d=e.markText(f,s,{className:i});if(null==o?r.push(d):r.splice(o++,0,d),a)break;l=c}}function c(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function a(e){c(e);for(var t=e.listSelections(),n=0;n<t.length;n++)f(e,t[n].from(),t[n].to())}});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(q){"use strict";var L=q.Pos;function k(t,e,r){return r?0<=t.indexOf(e):0==t.lastIndexOf(e,0)}q.registerHelper("hint","xml",function(t,e){var r=e&&e.schemaInfo,n=e&&e.quoteChar||'"',s=e&&e.matchInMiddle;if(r){var i=t.getCursor(),a=t.getTokenAt(i);a.end>i.ch&&(a.end=i.ch,a.string=a.string.slice(0,i.ch-a.start));var o=q.innerMode(t.getMode(),a.state);if("xml"==o.mode.name){var l,g,f=[],c=!1,h=/\btag\b/.test(a.type)&&!/>$/.test(a.string),p=h&&/^\w/.test(a.string);if(p){var u=t.getLine(i.line).slice(Math.max(0,a.start-2),a.start),d=/<\/$/.test(u)?"close":/<$/.test(u)?"open":null;d&&(g=a.start-("close"==d?2:1))}else h&&"<"==a.string?d="open":h&&"</"==a.string&&(d="close");if(!h&&!o.state.tagName||d){p&&(l=a.string),c=d;var m=o.state.context,v=m&&r[m.tagName],y=m?v&&v.children:r["!top"];if(y&&"close"!=d)for(var b=0;b<y.length;++b)l&&!k(y[b],l,s)||f.push("<"+y[b]);else if("close"!=d)for(var x in r)!r.hasOwnProperty(x)||"!top"==x||"!attrs"==x||l&&!k(x,l,s)||f.push("<"+x);m&&(!l||"close"==d&&k(m.tagName,l,s))&&f.push("</"+m.tagName+">")}else{var O=(v=r[o.state.tagName])&&v.attrs,w=r["!attrs"];if(!O&&!w)return;if(O){if(w){var A={};for(var M in w)w.hasOwnProperty(M)&&(A[M]=w[M]);for(var M in O)O.hasOwnProperty(M)&&(A[M]=O[M]);O=A}}else O=w;if("string"==a.type||"="==a.string){var P,N=(u=t.getRange(L(i.line,Math.max(0,i.ch-60)),L(i.line,"string"==a.type?a.start:a.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!N||!O.hasOwnProperty(N[1])||!(P=O[N[1]]))return;if("function"==typeof P&&(P=P.call(this,t)),"string"==a.type){l=a.string;var $=0;/['"]/.test(a.string.charAt(0))&&(n=a.string.charAt(0),l=a.string.slice(1),$++);var C=a.string.length;if(/['"]/.test(a.string.charAt(C-1))&&(n=a.string.charAt(C-1),l=a.string.substr($,C-2)),$){var I=t.getLine(i.line);I.length>a.end&&I.charAt(a.end)==n&&a.end++}c=!0}for(b=0;b<P.length;++b)l&&!k(P[b],l,s)||f.push(n+P[b]+n)}else for(var j in"attribute"==a.type&&(l=a.string,c=!0),O)!O.hasOwnProperty(j)||l&&!k(j,l,s)||f.push(j)}return{list:f,from:c?L(i.line,null==g?a.start:g):i,to:c?L(i.line,a.end):i}}}})});;
  ;!function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],l):l(CodeMirror)}(function(n){"use strict";var l="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),t=["_blank","_self","_top","_parent"],e=["ascii","utf-8","utf-16","latin1","latin1"],a=["get","post","put","delete"],r=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],o=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:o,target:t,hreflang:l}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:o,hreflang:l,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:t}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:r,formmethod:a,formnovalidate:["","novalidate"],formtarget:t,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":e,autocomplete:["on","off"],enctype:r,method:a,novalidate:["","novalidate"],target:t}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:r,formmethod:a,formnovalidate:["","novalidate"],formtarget:t,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:l,media:o,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:e,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:s,noframes:s,noscript:s,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:s,param:{attrs:{name:null,value:null}},pre:s,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:s,rt:s,ruby:s,s:s,samp:s,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:e}},section:s,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:s,source:{attrs:{src:null,type:null,media:null}},span:s,strike:s,strong:s,style:{attrs:{type:["text/css"],media:o,scoped:null}},sub:s,summary:s,sup:s,table:s,tbody:s,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:s,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:s,time:{attrs:{datetime:null}},title:s,tr:s,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:l}},tt:s,u:s,ul:s,var:s,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:s},i={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function d(l){for(var t in i)i.hasOwnProperty(t)&&(l.attrs[t]=i[t])}for(var c in d(s),u)u.hasOwnProperty(c)&&u[c]!=s&&d(u[c]);n.htmlSchema=u,n.registerHelper("hint","html",function(l,t){var e={schemaInfo:u};if(t)for(var a in t)e[a]=t[a];return n.hint.xml(l,e)})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(l){"use strict";var p="CodeMirror-lint-markers";function a(t){t.parentNode&&t.parentNode.removeChild(t)}function c(t,e,n){var o=function(t,e){var n=document.createElement("div");function o(t){if(!n.parentNode)return l.off(document,"mousemove",o);n.style.top=Math.max(0,t.clientY-n.offsetHeight-5)+"px",n.style.left=t.clientX+5+"px"}return n.className="CodeMirror-lint-tooltip",n.appendChild(e.cloneNode(!0)),document.body.appendChild(n),l.on(document,"mousemove",o),o(t),null!=n.style.opacity&&(n.style.opacity=1),n}(t,e);function r(){var t;l.off(n,"mouseout",r),o&&((t=o).parentNode&&(null==t.style.opacity&&a(t),t.style.opacity=0,setTimeout(function(){a(t)},600)),o=null)}var i=setInterval(function(){if(o)for(var t=n;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){r();break}}if(!o)return clearInterval(i)},400);l.on(n,"mouseout",r)}function u(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(t,e){var n=e.target||e.srcElement;if(!/\bCodeMirror-lint-mark-/.test(n.className))return;for(var o=n.getBoundingClientRect(),r=(o.left+o.right)/2,i=(o.top+o.bottom)/2,a=t.findMarksAt(t.coordsChar({left:r,top:i},"client")),s=[],l=0;l<a.length;++l){var u=a[l].__annotation;u&&s.push(u)}s.length&&function(t,e){for(var n=e.target||e.srcElement,o=document.createDocumentFragment(),r=0;r<t.length;r++){var i=t[r];o.appendChild(g(i))}c(e,o,n)}(s,e)}(e,t)},this.waitingFor=0}function h(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(p);for(var n=0;n<e.marked.length;++n)e.marked[n].clear();e.marked.length=0}function v(e,t,n,o){var r=document.createElement("div"),i=r;return r.className="CodeMirror-lint-marker-"+t,n&&((i=r.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker-multiple"),0!=o&&l.on(i,"mouseover",function(t){c(t,e,i)}),r}function g(t){var e=t.severity;e||(e="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message-"+e,void 0!==t.messageHTML?n.innerHTML=t.messageHTML:n.appendChild(document.createTextNode(t.message)),n}function f(e){var t=e.state.lint.options,n=t.options||t,o=t.getAnnotations||e.getHelper(l.Pos(0,0),"lint");if(o)if(t.async||o.async)!function(n,t,e){var o=n.state.lint,r=++o.waitingFor;function i(){r=-1,n.off("change",i)}n.on("change",i),t(n.getValue(),function(t,e){n.off("change",i),o.waitingFor==r&&(e&&t instanceof l&&(t=e),n.operation(function(){s(n,t)}))},e,n)}(e,o,n);else{var r=o(e.getValue(),n,e);if(!r)return;r.then?r.then(function(t){e.operation(function(){s(e,t)})}):e.operation(function(){s(e,r)})}}function s(t,e){h(t);for(var n,o,r=t.state.lint,i=r.options,a=function(t){for(var e=[],n=0;n<t.length;++n){var o=t[n],r=o.from.line;(e[r]||(e[r]=[])).push(o)}return e}(e),s=0;s<a.length;++s){var l=a[s];if(l){for(var u=null,c=r.hasGutter&&document.createDocumentFragment(),f=0;f<l.length;++f){var m=l[f],d=m.severity;d||(d="error"),o=d,u="error"==(n=u)?n:o,i.formatAnnotation&&(m=i.formatAnnotation(m)),r.hasGutter&&c.appendChild(g(m)),m.to&&r.marked.push(t.markText(m.from,m.to,{className:"CodeMirror-lint-mark-"+d,__annotation:m}))}r.hasGutter&&t.setGutterMarker(s,p,v(c,u,1<l.length,r.options.tooltips))}}i.onUpdateLinting&&i.onUpdateLinting(e,a,t)}function m(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){f(t)},e.options.delay||500))}l.defineOption("lint",!1,function(t,e,n){if(n&&n!=l.Init&&(h(t),!1!==t.state.lint.options.lintOnChange&&t.off("change",m),l.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),e){for(var o=t.getOption("gutters"),r=!1,i=0;i<o.length;++i)o[i]==p&&(r=!0);var a=t.state.lint=new u(t,(s=e)instanceof Function?{getAnnotations:s}:(s&&!0!==s||(s={}),s),r);!1!==a.options.lintOnChange&&t.on("change",m),0!=a.options.tooltips&&"gutter"!=a.options.tooltips&&l.on(t.getWrapperElement(),"mouseover",a.onMouseOver),f(t)}var s}),l.defineExtension("performLint",function(){this.state.lint&&f(this)})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(c){"use strict";c.registerHelper("lint","javascript",function(e,r){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];r.indent||(r.indent=1),JSHINT(e,r,r.globals);var n=JSHINT.data().errors,o=[];return n&&function(e,r){for(var n=0;n<e.length;n++){var o=e[n];if(o){if(o.line<=0){window.console&&window.console.warn("Cannot display JSHint error (invalid line "+o.line+")",o);continue}var i=o.character-1,t=i+1;if(o.evidence){var a=o.evidence.substring(i).search(/.\b/);-1<a&&(t+=a)}var d={message:o.reason,severity:o.code&&o.code.startsWith("W")?"warning":"error",from:c.Pos(o.line-1,i),to:c.Pos(o.line-1,t)};r.push(d)}}}(n,o),o})});;
  ;!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}(function(i){"use strict";i.registerHelper("lint","json",function(o){var e=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),e;var n=window.jsonlint.parser||window.jsonlint;n.parseError=function(o,n){var r=n.loc;e.push({from:i.Pos(r.first_line-1,r.first_column),to:i.Pos(r.last_line-1,r.last_column),message:o})};try{n.parse(o)}catch(o){}return e})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(l){"use strict";l.registerHelper("lint","css",function(e,o){var r=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),r;for(var n=CSSLint.verify(e,o).messages,i=null,t=0;t<n.length;t++){var s=(i=n[t]).line-1,c=i.line-1,d=i.col-1,f=i.col;r.push({from:l.Pos(s,d),to:l.Pos(c,f),message:i.message,severity:i.type})}return r})});;
  ;!function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(e){r(e,"amd")}):r(CodeMirror,"plain")}(function(a,d){a.modeURL||(a.modeURL="../mode/%N/%N.js");var f={};function u(e,r){var o=a.modes[e].dependencies;if(!o)return r();for(var n=[],t=0;t<o.length;++t)a.modes.hasOwnProperty(o[t])||n.push(o[t]);if(!n.length)return r();var i,d,f,u=(i=r,d=n.length,f=d,function(){0==--f&&i()});for(t=0;t<n.length;++t)a.requireMode(n[t],u)}a.requireMode=function(e,r){if("string"!=typeof e&&(e=e.name),a.modes.hasOwnProperty(e))return u(e,r);if(f.hasOwnProperty(e))return f[e].push(r);var o=a.modeURL.replace(/%N/g,e);if("plain"==d){var n=document.createElement("script");n.src=o;var t=document.getElementsByTagName("script")[0],i=f[e]=[r];a.on(n,"load",function(){u(e,function(){for(var e=0;e<i.length;++e)i[e]()})}),t.parentNode.insertBefore(n,t)}else"cjs"==d?(require(o),r()):"amd"==d&&requirejs([o],r)},a.autoLoadMode=function(e,r){a.modes.hasOwnProperty(r)||a.requireMode(r,function(){e.setOption("mode",e.getOption("mode"))})}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(x){"use strict";x.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"]},{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"]},{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","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:"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 e=0;e<x.modeInfo.length;e++){var m=x.modeInfo[e];m.mimes&&(m.mime=m.mimes[0])}x.findModeByMIME=function(e){e=e.toLowerCase();for(var m=0;m<x.modeInfo.length;m++){var t=x.modeInfo[m];if(t.mime==e)return t;if(t.mimes)for(var a=0;a<t.mimes.length;a++)if(t.mimes[a]==e)return t}return/\+xml$/.test(e)?x.findModeByMIME("application/xml"):/\+json$/.test(e)?x.findModeByMIME("application/json"):void 0},x.findModeByExtension=function(e){for(var m=0;m<x.modeInfo.length;m++){var t=x.modeInfo[m];if(t.ext)for(var a=0;a<t.ext.length;a++)if(t.ext[a]==e)return t}},x.findModeByFileName=function(e){for(var m=0;m<x.modeInfo.length;m++){var t=x.modeInfo[m];if(t.file&&t.file.test(e))return t}var a=e.lastIndexOf("."),i=-1<a&&e.substring(a+1,e.length);if(i)return x.findModeByExtension(i)},x.findModeByName=function(e){e=e.toLowerCase();for(var m=0;m<x.modeInfo.length;m++){var t=x.modeInfo[m];if(t.name.toLowerCase()==e)return t;if(t.alias)for(var a=0;a<t.alias.length;a++)if(t.alias[a].toLowerCase()==e)return t}}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(b){b.defineOption("autoCloseTags",!1,function(e,t,n){if(n!=b.Init&&n&&e.removeKeyMap("autoCloseTags"),t){var o={name:"autoCloseTags"};("object"!=typeof t||t.whenClosing)&&(o["'/'"]=function(e){return(t=e).getOption("disableInput")?b.Pass:a(t,!0);var t}),("object"!=typeof t||t.whenOpening)&&(o["'>'"]=function(e){return function(e){if(e.getOption("disableInput"))return b.Pass;for(var t=e.listSelections(),n=[],o=e.getOption("autoCloseTags"),a=0;a<t.length;a++){if(!t[a].empty())return b.Pass;var r=t[a].head,i=e.getTokenAt(r),s=b.innerMode(e.getMode(),i.state),l=s.state;if("xml"!=s.mode.name||!l.tagName)return b.Pass;var c="html"==s.mode.configuration,d="object"==typeof o&&o.dontCloseTags||c&&x,f="object"==typeof o&&o.indentTags||c&&P,g=l.tagName;i.end>r.ch&&(g=g.slice(0,g.length-i.end+r.ch));var u=g.toLowerCase();if(!g||"string"==i.type&&(i.end!=r.ch||!/[\"\']/.test(i.string.charAt(i.string.length-1))||1==i.string.length)||"tag"==i.type&&"closeTag"==l.type||i.string.indexOf("/")==i.string.length-1||d&&-1<T(d,u)||C(e,g,r,l,!0))return b.Pass;var m="object"==typeof o&&o.emptyTags;if(m&&-1<T(m,g))n[a]={text:"/>",newPos:b.Pos(r.line,r.ch+2)};else{var h=f&&-1<T(f,u);n[a]={indent:h,text:">"+(h?"\n\n":"")+"</"+g+">",newPos:h?b.Pos(r.line+1,0):b.Pos(r.line,r.ch+1)}}}for(var p="object"==typeof o&&o.dontIndentOnAutoClose,a=t.length-1;0<=a;a--){var v=n[a];e.replaceRange(v.text,t[a].head,t[a].anchor,"+insert");var y=e.listSelections().slice(0);y[a]={head:v.newPos,anchor:v.newPos},e.setSelections(y),!p&&v.indent&&(e.indentLine(v.newPos.line,null,!0),e.indentLine(v.newPos.line+1,null,!0))}}(e)}),e.addKeyMap(o)}});var x=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function a(e,t){for(var n=e.listSelections(),o=[],a=t?"/":"</",r=e.getOption("autoCloseTags"),i="object"==typeof r&&r.dontIndentOnSlash,s=0;s<n.length;s++){if(!n[s].empty())return b.Pass;var l,c=n[s].head,d=e.getTokenAt(c),f=b.innerMode(e.getMode(),d.state),g=f.state;if(t&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=c.ch-1))return b.Pass;if("xml"!=f.mode.name)if("htmlmixed"==e.getMode().name&&"javascript"==f.mode.name)l=a+"script";else{if("htmlmixed"!=e.getMode().name||"css"!=f.mode.name)return b.Pass;l=a+"style"}else{if(!g.context||!g.context.tagName||C(e,g.context.tagName,c,g))return b.Pass;l=a+g.context.tagName}">"!=e.getLine(c.line).charAt(d.end)&&(l+=">"),o[s]=l}if(e.replaceSelections(o),n=e.listSelections(),!i)for(s=0;s<n.length;s++)(s==n.length-1||n[s].head.line<n[s+1].head.line)&&e.indentLine(n[s].head.line)}function T(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;++n)if(e[n]==t)return n;return-1}function C(e,t,n,o,a){if(!b.scanForClosingTag)return!1;var r=Math.min(e.lastLine()+1,n.line+500),i=b.scanForClosingTag(e,n,null,r);if(!i||i.tag!=t)return!1;for(var s=o.context,l=a?1:0;s&&s.tagName==t;s=s.prev)++l;n=i.to;for(var c=1;c<l;c++){var d=b.scanForClosingTag(e,n,null,r);if(!d||d.tag!=t)return!1;n=d.to}return!0}b.commands.closeTag=function(e){return a(e)}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(D){"use strict";function L(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function P(e,t,n,r){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(o=e.context.indented),e.context=new L(o,t,n,r,null,e.context)}function E(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function z(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function F(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function R(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}D.defineMode("clike",function(e,l){var i,s,c=e.indentUnit,u=l.statementIndentUnit||c,d=l.dontAlignCalls,f=l.keywords||{},p=l.types||{},m=l.builtin||{},h=l.blockKeywords||{},y=l.defKeywords||{},g=l.atoms||{},x=l.hooks||{},b=l.multiLineStrings,a=!1!==l.indentStatements,t=!1!==l.indentSwitch,k=l.namespaceSeparator,v=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,_=l.numberStart||/[\d\.]/,w=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,S=l.isOperatorChar||/[+\-*&%=<>!?|\/]/,T=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,C=l.isReservedIdentifier||!1;function I(e,t){var a,n=e.next();if(x[n]){var r=x[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=(a=n,function(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if(n==a&&!r){o=!0;break}r=!r&&"\\"==n}return(o||!r&&!b)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(v.test(n))return i=n,null;if(_.test(n)){if(e.backUp(1),e.match(w))return"number";e.next()}if("/"==n){if(e.eat("*"))return(t.tokenize=M)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(S.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(S););return"operator"}if(e.eatWhile(T),k)for(;e.match(k);)e.eatWhile(T);var o=e.current();return R(f,o)?(R(h,o)&&(i="newstatement"),R(y,o)&&(s=!0),"keyword"):R(p,o)?"type":R(m,o)||C&&C(o)?(R(h,o)&&(i="newstatement"),"builtin"):R(g,o)?"atom":"variable"}function M(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function N(e,t){l.typeFirstDefinitions&&e.eol()&&F(t.context)&&(t.typeAtEndOfLine=z(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new L((e||0)-c,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return N(e,t),null;i=s=null;var r=(t.tokenize||I)(e,t);if("comment"==r||"meta"==r)return r;if(null==n.align&&(n.align=!0),";"==i||":"==i||","==i&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)E(t);else if("{"==i)P(t,e.column(),"}");else if("["==i)P(t,e.column(),"]");else if("("==i)P(t,e.column(),")");else if("}"==i){for(;"statement"==n.type;)n=E(t);for("}"==n.type&&(n=E(t));"statement"==n.type;)n=E(t)}else i==n.type?E(t):a&&(("}"==n.type||"top"==n.type)&&";"!=i||"statement"==n.type&&"newstatement"==i)&&P(t,e.column(),"statement",e.current());if("variable"==r&&("def"==t.prevToken||l.typeFirstDefinitions&&z(e,t,e.start)&&F(t.context)&&e.match(/^\s*\(/,!1))&&(r="def"),x.token){var o=x.token(e,t,r);void 0!==o&&(r=o)}return"def"==r&&!1===l.styleDefs&&(r="variable"),t.startOfLine=!1,t.prevToken=s?"def":r||i,N(e,t),r},indent:function(e,t){if(e.tokenize!=I&&null!=e.tokenize||e.typeAtEndOfLine)return D.Pass;var n=e.context,r=t&&t.charAt(0),o=r==n.type;if("statement"==n.type&&"}"==r&&(n=n.prev),l.dontIndentStatements)for(;"statement"==n.type&&l.dontIndentStatements.test(n.info);)n=n.prev;if(x.indent){var a=x.indent(e,n,t,c);if("number"==typeof a)return a}var i=n.prev&&"switch"==n.prev.info;if(l.allmanIndentation&&/[{(]/.test(r)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==r?0:u):!n.align||d&&")"==n.type?")"!=n.type||o?n.indented+(o?0:c)+(o||!i||/^(?:case|default)\b/.test(t)?0:c):n.indented+u:n.column+(o?0:1)},electricInput:t?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var t="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",n=e("int long char short double float unsigned signed void bool"),r=e("SEL instancetype id Class Protocol BOOL");function o(e){return R(n,e)||/.+_t$/.test(e)}var a="case do else for if switch while struct enum union",i="struct enum union";function l(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=l;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function s(e,t){return"type"==t.prevToken&&"type"}function c(e){return!(!e||e.length<2)&&("_"==e[0]&&("_"==e[1]||e[1]!==e[1].toLowerCase()))}function u(e){return e.eatWhile(/[\w\.']/),"number"}function d(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],(t.tokenize=p)(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function f(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function p(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function m(e,t){"string"==typeof e&&(e=[e]);var n=[];function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&n.push(t)}r(t.keywords),r(t.types),r(t.builtin),r(t.atoms),n.length&&(t.helperType=e[0],D.registerHelper("hintWords",e[0],n));for(var o=0;o<e.length;++o)D.defineMIME(e[o],t)}function h(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}m(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:e(t),types:o,blockKeywords:e(a),defKeywords:e(i),typeFirstDefinitions:!0,atoms:e("NULL true false"),isReservedIdentifier:c,hooks:{"#":l,"*":s},modeProps:{fold:["brace","include"]}}),m(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:e(t+"alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq"),types:o,blockKeywords:e(a+" class try catch"),defKeywords:e(i+" class namespace"),typeFirstDefinitions:!0,atoms:e("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:c,hooks:{"#":l,"*":s,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&(r=e.current(),(o=/(\w+)::~?(\w+)$/.exec(r))&&o[1]==o[2]))return"def";var r,o}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),m("text/x-java",{name:"clike",keywords:e("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:e("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:e("catch class do else finally for if switch try while"),defKeywords:e("class interface enum @interface"),typeFirstDefinitions:!0,atoms:e("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),m("text/x-csharp",{name:"clike",keywords:e("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:e("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:e("catch class do else finally for foreach if struct switch try while"),defKeywords:e("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:e("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=f)(e,t):(e.eatWhile(/[\w\$_]/),"meta")}}}),m("text/x-scala",{name:"clike",keywords:e("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:e("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:e("catch class enum do else finally for forSome if match switch try while"),defKeywords:e("class enum def object package trait type val var"),atoms:e("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=h,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,t){var n=t.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(t.context=new L(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function r(o){return function(e,t){for(var n;n=e.next();){if("*"==n&&e.eat("/")){if(1!=o)return t.tokenize=r(o-1),t.tokenize(e,t);t.tokenize=null;break}if("/"==n&&e.eat("*"))return t.tokenize=r(o+1),t.tokenize(e,t)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),m("text/x-kotlin",{name:"clike",keywords:e("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:e("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:e("catch class do else finally for if where try while enum"),defKeywords:e("class val var object interface fun"),atoms:e("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){var a;return t.tokenize=(a=e.match('""'),function(e,t){for(var n,r=!1,o=!1;!e.eol();){if(!a&&!r&&e.match('"')){o=!0;break}if(a&&e.match('"""')){o=!0;break}n=e.next(),!r&&"$"==n&&e.match("{")&&e.skipTo("}"),r=!r&&"\\"==n&&!a}return!o&&a||(t.tokenize=null),"string"}),t.tokenize(e,t)},indent:function(e,t,n,r){var o=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n||"variable"==e.prevToken&&"."==o||("}"==e.prevToken||")"==e.prevToken)&&"."==o?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),m(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:e("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:e("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:e("for while do if else struct"),builtin:e("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:e("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":l},modeProps:{fold:["brace","include"]}}),m("text/x-nesc",{name:"clike",keywords:e(t+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:o,blockKeywords:e(a),atoms:e("null true false"),hooks:{"#":l},modeProps:{fold:["brace","include"]}}),m("text/x-objectivec",{name:"clike",keywords:e(t+" bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available"),types:function(e){return o(e)||R(r,e)},builtin:e("FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINED NS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"),blockKeywords:e(a+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:e(i+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:e("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:c,hooks:{"#":l,"*":s},modeProps:{fold:["brace","include"]}}),m("text/x-squirrel",{name:"clike",keywords:e("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o,blockKeywords:e("case catch class else for foreach if switch try while"),defKeywords:e("function local class"),typeFirstDefinitions:!0,atoms:e("true false null"),hooks:{"#":l},modeProps:{fold:["brace","include"]}});var y=null;m("text/x-ceylon",{name:"clike",keywords:e("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:e("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:e("class dynamic function interface module object package value"),builtin:e("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:e("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function a(i){return function(e,t){for(var n,r=!1,o=!1;!e.eol();){if(!r&&e.match('"')&&("single"==i||e.match('""'))){o=!0;break}if(!r&&e.match("``")){y=a(i),o=!0;break}n=e.next(),r="single"==i&&!r&&"\\"==n}return o&&(t.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!y||!e.match("`"))&&(t.tokenize=y,y=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var c=t.Pos;function u(t,e){return t.line==e.line&&t.ch==e.ch}var i=[];function l(t){i.push(t),50<i.length&&i.shift()}function n(t){return i[i.length-(t?Math.min(t,1):1)]||""}var a=null;function f(t,e,n,r,o){null==o&&(o=t.getRange(e,n)),"grow"==r&&a&&a.cm==t&&u(e,a.pos)&&t.isClean(a.gen)?function(t){if(!i.length)return l(t);i[i.length-1]+=t}(o):!1!==r&&l(o),t.replaceRange("",e,n,"+delete"),a="grow"==r?{cm:t,pos:e,gen:t.changeGeneration()}:null}function e(t,e,n){return t.findPosH(e,n,"char",!0)}function r(t,e,n){return t.findPosH(e,n,"word",!0)}function o(t,e,n){return t.findPosV(e,n,"line",t.doc.sel.goalColumn)}function s(t,e,n){return t.findPosV(e,n,"page",t.doc.sel.goalColumn)}function g(t,e,n){for(var r=e.line,o=t.getLine(r),i=/\S/.test(n<0?o.slice(0,e.ch):o.slice(e.ch)),l=t.firstLine(),a=t.lastLine();;){if((r+=n)<l||a<r)return t.clipPos(c(r-n,n<0?0:null));if(o=t.getLine(r),/\S/.test(o))i=!0;else if(i)return c(r,0)}}function C(t,e,n){for(var r=e.line,o=e.ch,i=t.getLine(e.line),l=!1;;){var a=i.charAt(o+(n<0?-1:0));if(a){if(l&&/[!?.]/.test(a))return c(r,o+(0<n?1:0));l||(l=/\w/.test(a)),o+=n}else{if(r==(n<0?t.firstLine():t.lastLine()))return c(r,o);if(i=t.getLine(r+n),!/\S/.test(i))return c(r,o);r+=n,o=n<0?i.length:0}}}function d(t,e,n){var r;if(t.findMatchingBracket&&(r=t.findMatchingBracket(e,{strict:!0}))&&r.match&&(r.forward?1:-1)==n)return 0<n?c(r.to.line,r.to.ch+1):r.to;for(var o=!0;;o=!1){var i=t.getTokenAt(e),l=c(e.line,n<0?i.start:i.end);if(!(o&&0<n&&i.end==e.ch)&&/\w/.test(i.string))return l;var a=t.findPosH(l,n,"char");if(u(l,a))return e;e=a}}function p(t,e){var n=t.state.emacsPrefix;return n?(L(t),"-"==n?-1:Number(n)):e?null:1}function h(e){var r="string"==typeof e?function(t){t.execCommand(e)}:e;return function(t){var e=p(t);r(t);for(var n=1;n<e;++n)r(t)}}function A(t,e,n,r){var o=p(t);o<0&&(r=-r,o=-o);for(var i=0;i<o;++i){var l=n(t,e,r);if(u(l,e))break;e=l}return e}function v(e,n){var t=function(t){t.extendSelection(A(t,t.getCursor(),e,n))};return t.motion=!0,t}function m(t,e,n,r){for(var o,i=t.listSelections(),l=i.length;l--;)f(t,o=i[l].head,A(t,o,e,n),r)}function S(t,e){if(t.somethingSelected()){for(var n,r=t.listSelections(),o=r.length;o--;)f(t,(n=r[o]).anchor,n.head,e);return!0}}function P(t,e){t.state.emacsPrefix?"-"!=e&&(t.state.emacsPrefix+=e):(t.state.emacsPrefix=e,t.on("keyHandled",x),t.on("inputRead",R))}var w={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};function x(t,e){t.state.emacsPrefixMap||w.hasOwnProperty(e)||L(t)}function L(t){t.state.emacsPrefix=null,t.off("keyHandled",x),t.off("inputRead",R)}function R(t,e){var n=p(t);if(1<n&&"+input"==e.origin){for(var r=e.text.join("\n"),o="",i=1;i<n;++i)o+=r;t.replaceSelection(o)}}function y(t,e){("string"!=typeof e||!/^\d$/.test(e)&&"Ctrl-U"!=e)&&(t.removeKeyMap(D),t.state.emacsPrefixMap=!1,t.off("keyHandled",y),t.off("inputRead",y))}function k(t){t.setCursor(t.getCursor()),t.setExtending(!t.getExtending()),t.on("change",function(){t.setExtending(!1)})}function b(t){t.setExtending(!1),t.setCursor(t.getCursor())}function U(t,e){var n=t.getCursor(),r=t.findPosH(n,1,"word");t.replaceRange(e(t.getRange(n,r)),n,r),t.setCursor(r)}t.emacs={kill:f,killRegion:S,repeated:h};var X=t.keyMap.emacs=t.normalizeKeyMap({"Ctrl-W":function(t){f(t,t.getCursor("start"),t.getCursor("end"),!0)},"Ctrl-K":h(function(t){var e=t.getCursor(),n=t.clipPos(c(e.line)),r=t.getRange(e,n);/\S/.test(r)||(r+="\n",n=c(e.line+1,0)),f(t,e,n,"grow",r)}),"Alt-W":function(t){l(t.getSelection()),b(t)},"Ctrl-Y":function(t){var e=t.getCursor();t.replaceRange(n(p(t)),e,e,"paste"),t.setSelection(e,t.getCursor())},"Alt-Y":function(t){t.replaceSelection((1<i.length&&i.pop(),n()),"around","paste")},"Ctrl-Space":k,"Ctrl-Shift-2":k,"Ctrl-F":v(e,1),"Ctrl-B":v(e,-1),Right:v(e,1),Left:v(e,-1),"Ctrl-D":function(t){m(t,e,1,!1)},Delete:function(t){S(t,!1)||m(t,e,1,!1)},"Ctrl-H":function(t){m(t,e,-1,!1)},Backspace:function(t){S(t,!1)||m(t,e,-1,!1)},"Alt-F":v(r,1),"Alt-B":v(r,-1),"Alt-Right":v(r,1),"Alt-Left":v(r,-1),"Alt-D":function(t){m(t,r,1,"grow")},"Alt-Backspace":function(t){m(t,r,-1,"grow")},"Ctrl-N":v(o,1),"Ctrl-P":v(o,-1),Down:v(o,1),Up:v(o,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":v(s,-1),"Ctrl-V":v(s,1),PageUp:v(s,-1),PageDown:v(s,1),"Ctrl-Up":v(g,-1),"Ctrl-Down":v(g,1),"Alt-A":v(C,-1),"Alt-E":v(C,1),"Alt-K":function(t){m(t,C,1,"grow")},"Ctrl-Alt-K":function(t){m(t,d,1,"grow")},"Ctrl-Alt-Backspace":function(t){m(t,d,-1,"grow")},"Ctrl-Alt-F":v(d,1),"Ctrl-Alt-B":v(d,-1),"Shift-Ctrl-Alt-2":function(t){var e=t.getCursor();t.setSelection(A(t,e,d,1),e)},"Ctrl-Alt-T":function(t){var e=d(t,t.getCursor(),-1),n=d(t,e,1),r=d(t,n,1),o=d(t,r,-1);t.replaceRange(t.getRange(o,r)+t.getRange(n,o)+t.getRange(e,n),e,r)},"Ctrl-Alt-U":h(function(t){for(var e=t.getCursor(),n=e.line,r=e.ch,o=[];n>=t.firstLine();){for(var i=t.getLine(n),l=null==r?i.length:r;0<l;)if(")"==(r=i.charAt(--l)))o.push("(");else if("]"==r)o.push("[");else if("}"==r)o.push("{");else if(/[\(\{\[]/.test(r)&&(!o.length||o.pop()!=r))return t.extendSelection(c(n,l));--n,r=null}}),"Alt-Space":function(t){for(var e=t.getCursor(),n=e.ch,r=e.ch,o=t.getLine(e.line);n&&/\s/.test(o.charAt(n-1));)--n;for(;r<o.length&&/\s/.test(o.charAt(r));)++r;t.replaceRange(" ",c(e.line,n),c(e.line,r))},"Ctrl-O":h(function(t){t.replaceSelection("\n","start")}),"Ctrl-T":h(function(t){t.execCommand("transposeChars")}),"Alt-C":h(function(t){U(t,function(t){var e=t.search(/\w/);return-1==e?t:t.slice(0,e)+t.charAt(e).toUpperCase()+t.slice(e+1).toLowerCase()})}),"Alt-U":h(function(t){U(t,function(t){return t.toUpperCase()})}),"Alt-L":h(function(t){U(t,function(t){return t.toLowerCase()})}),"Alt-;":"toggleComment","Ctrl-/":h("undo"),"Shift-Ctrl--":h("undo"),"Ctrl-Z":h("undo"),"Cmd-Z":h("undo"),"Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findPersistentNext","Ctrl-R":"findPersistentPrev","Ctrl-G":function(t){t.execCommand("clearSearch"),b(t)},"Shift-Alt-5":"replace","Alt-/":"autocomplete",Enter:"newlineAndIndent","Ctrl-J":h(function(t){t.replaceSelection("\n","end")}),Tab:"indentAuto","Alt-G G":function(n){var t,e,r,o=p(n,!0);if(null!=o&&0<o)return n.setCursor(o-1);e="Goto line",r=function(t){var e;t&&!isNaN(e=Number(t))&&e==(0|e)&&0<e&&n.setCursor(e-1)},(t=n).openDialog?t.openDialog(e+': <input type="text" style="width: 10em"/>',r,{bottom:!0}):r(prompt(e,""))},"Ctrl-X Tab":function(t){t.indentSelection(p(t,!0)||t.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(t){t.setSelection(t.getCursor("head"),t.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":h("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(t){f(t,t.getCursor(),C(t,t.getCursor(),1),"grow")},"Ctrl-X H":"selectAll","Ctrl-Q Tab":h("insertTab"),"Ctrl-U":function(t){t.state.emacsPrefixMap=!0,t.addKeyMap(D),t.on("keyHandled",y),t.on("inputRead",y)}}),D={"Ctrl-G":L};function E(e){D[e]=function(t){P(t,e)},X["Ctrl-"+e]=function(t){P(t,e)},w["Ctrl-"+e]=!0}for(var H=0;H<10;++H)E(String(H));E("-")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("scheme",function(){var f="comment",h="string",g="atom",x="number",b="bracket";function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var v=e("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),k=e("define let letrec let* lambda");function r(e,t,n){this.indent=e,this.type=t,this.prev=n}function y(e,t,n){e.indentStack=new r(t,n,e.indentStack)}var t=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),n=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),i=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),a=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function w(e){return e.match(t)}function E(e){return e.match(n)}function q(e,t){return!0===t&&e.backUp(1),e.match(a)}function S(e){return e.match(i)}return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(e,t){if(null==t.indentStack&&e.sol()&&(t.indentation=e.indentation()),e.eatSpace())return null;var n,r=null;switch(t.mode){case"string":for(var i=!1;null!=(a=e.next());){if('"'==a&&!i){t.mode=!1;break}i=!i&&"\\"==a}r=h;break;case"comment":for(var a,c=!1;null!=(a=e.next());){if("#"==a&&c){t.mode=!1;break}c="|"==a}r=f;break;case"s-expr-comment":if(t.mode=!1,"("!=e.peek()&&"["!=e.peek()){e.eatWhile(/[^\s\(\)\[\]]/),r=f;break}t.sExprComment=0;default:var o=e.next();if('"'==o)t.mode="string",r=h;else if("'"==o)r=("("==e.peek()||"["==e.peek()?"number"!=typeof t.sExprQuote&&(t.sExprQuote=0):e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),g);else if("#"==o)if(e.eat("|"))t.mode="comment",r=f;else if(e.eat(/[tf]/i))r=g;else if(e.eat(";"))t.mode="s-expr-comment",r=f;else{var s=null,l=!1,d=!0;e.eat(/[ei]/i)?l=!0:e.backUp(1),e.match(/^#b/i)?s=w:e.match(/^#o/i)?s=E:e.match(/^#x/i)?s=S:e.match(/^#d/i)?s=q:e.match(/^[-+0-9.]/,!1)?(d=!1,s=q):l||e.eat("#"),null!=s&&(d&&!l&&e.match(/^#[ei]/i),s(e)&&(r=x))}else if(/^[-+0-9.]/.test(o)&&q(e,!0))r=x;else if(";"==o)e.skipToEnd(),r=f;else if("("==o||"["==o){for(var u,p="",m=e.column();null!=(u=e.eat(/[^\s\(\[\;\)\]]/));)p+=u;0<p.length&&k.propertyIsEnumerable(p)?y(t,m+2,o):(e.eatSpace(),e.eol()||";"==e.peek()?y(t,m+1,o):y(t,m+e.current().length,o)),e.backUp(e.current().length-1),"number"==typeof t.sExprComment&&t.sExprComment++,"number"==typeof t.sExprQuote&&t.sExprQuote++,r=b}else")"==o||"]"==o?(r=b,null!=t.indentStack&&t.indentStack.type==(")"==o?"(":"[")&&((n=t).indentStack=n.indentStack.prev,"number"==typeof t.sExprComment&&0==--t.sExprComment&&(r=f,t.sExprComment=!1),"number"==typeof t.sExprQuote&&0==--t.sExprQuote&&(r=g,t.sExprQuote=!1))):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),r=v&&v.propertyIsEnumerable(e.current())?"builtin":"variable")}return"number"==typeof t.sExprComment?f:"number"==typeof t.sExprQuote?g:r},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),e.defineMIME("text/x-scheme","scheme")});;
  ;!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],o):o(CodeMirror)}(function(r){"use strict";r.defineOption("foldGutter",!1,function(o,t,e){e&&e!=r.Init&&(o.clearGutter(o.state.foldGutter.options.gutter),o.state.foldGutter=null,o.off("gutterClick",d),o.off("change",a),o.off("viewportChange",p),o.off("fold",s),o.off("unfold",s),o.off("swapDoc",a)),t&&(o.state.foldGutter=new n(function(o){!0===o&&(o={});null==o.gutter&&(o.gutter="CodeMirror-foldgutter");null==o.indicatorOpen&&(o.indicatorOpen="CodeMirror-foldgutter-open");null==o.indicatorFolded&&(o.indicatorFolded="CodeMirror-foldgutter-folded");return o}(t)),f(o),o.on("gutterClick",d),o.on("change",a),o.on("viewportChange",p),o.on("fold",s),o.on("unfold",s),o.on("swapDoc",a))});var u=r.Pos;function n(o){this.options=o,this.from=this.to=0}function l(o,t){for(var e=o.findMarks(u(t,0),u(t+1,0)),r=0;r<e.length;++r)if(e[r].__isFold&&e[r].find().from.line==t)return e[r]}function c(o){if("string"!=typeof o)return o.cloneNode(!0);var t=document.createElement("div");return t.className=o+" CodeMirror-guttermarker-subtle",t}function i(n,o,t){var i=n.state.foldGutter.options,f=o,d=n.foldOption(i,"minFoldSize"),a=n.foldOption(i,"rangeFinder");n.eachLine(o,t,function(o){var t=null;if(l(n,f))t=c(i.indicatorFolded);else{var e=u(f,0),r=a&&a(n,e);r&&r.to.line-r.from.line>=d&&(t=c(i.indicatorOpen))}n.setGutterMarker(o,i.gutter,t),++f})}function f(o){var t=o.getViewport(),e=o.state.foldGutter;e&&(o.operation(function(){i(o,t.from,t.to)}),e.from=t.from,e.to=t.to)}function d(o,t,e){var r=o.state.foldGutter;if(r){var n=r.options;if(e==n.gutter){var i=l(o,t);i?i.clear():o.foldCode(u(t,0),n.rangeFinder)}}}function a(o){var t=o.state.foldGutter;if(t){var e=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){f(o)},e.foldOnChangeTimeSpan||600)}}function p(t){var e=t.state.foldGutter;if(e){var o=e.options;clearTimeout(e.changeUpdate),e.changeUpdate=setTimeout(function(){var o=t.getViewport();e.from==e.to||20<o.from-e.to||20<e.from-o.to?f(t):t.operation(function(){o.from<e.from&&(i(t,o.from,e.from),e.from=o.from),o.to>e.to&&(i(t,e.to,o.to),e.to=o.to)})},o.updateViewportTimeSpan||400)}}function s(o,t){var e=o.state.foldGutter;if(e){var r=t.line;r>=e.from&&r<e.to&&i(o,r,r+1)}}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(f){"use strict";function u(e,n){var t=e.getLine(n),i=t.search(/\S/);return-1==i||/\bcomment\b/.test(e.getTokenTypeAt(f.Pos(n,i+1)))?-1:f.countColumn(t,null,e.getOption("tabSize"))}f.registerHelper("fold","indent",function(e,n){var t=u(e,n.line);if(!(t<0)){for(var i=null,o=n.line+1,r=e.lastLine();o<=r;++o){var l=u(e,o);if(-1==l);else{if(!(t<l))break;i=o}}return i?{from:f.Pos(n.line,e.getLine(n.line).length),to:f.Pos(i,e.getLine(i).length)}:void 0}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(d){"use strict";d.registerHelper("fold","markdown",function(t,e){function i(e){var n=t.getTokenTypeAt(d.Pos(e,0));return n&&/\bheader\b/.test(n)}function n(e,n,t){var r=n&&n.match(/^#+/);return r&&i(e)?r[0].length:(r=t&&t.match(/^[=\-]+\s*$/))&&i(e+1)?"="==t[0]?1:2:100}var r=t.getLine(e.line),o=t.getLine(e.line+1),f=n(e.line,r,o);if(100!==f){for(var l=t.lastLine(),c=e.line,u=t.getLine(c+2);c<l&&!(n(c+1,o,u)<=f);)++c,o=u,u=t.getLine(c+2);return{from:d.Pos(e.line,r.length),to:d.Pos(c,t.getLine(c).length)}}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(y){"use strict";y.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(e,t){var n=e.getModeAt(t),o=n.blockCommentStart,r=n.blockCommentEnd;if(o&&r){for(var i,f=t.line,l=e.getLine(f),c=t.ch,m=0;;){var a=c<=0?-1:l.lastIndexOf(o,c-1);if(-1!=a){if(1==m&&a<t.ch)return;if(/comment/.test(e.getTokenTypeAt(y.Pos(f,a+1)))&&(0==a||l.slice(a-r.length,a)==r||!/comment/.test(e.getTokenTypeAt(y.Pos(f,a))))){i=a+o.length;break}c=a-1}else{if(1==m)return;m=1,c=l.length}}var d,s,u=1,b=e.lastLine();e:for(var g=f;g<=b;++g)for(var h=e.getLine(g),k=g==f?i:0;;){var p=h.indexOf(o,k),v=h.indexOf(r,k);if(p<0&&(p=h.length),v<0&&(v=h.length),(k=Math.min(p,v))==h.length)break;if(k==p)++u;else if(!--u){d=g,s=k;break e}++k}if(null!=d&&(f!=d||s!=i))return{from:y.Pos(f,i),to:y.Pos(d,s)}}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(k){"use strict";function v(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var x=v(["and","or","not","is"]),_=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],z=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function w(e){return e.scopes[e.scopes.length-1]}k.registerHelper("hintWords","python",_.concat(z)),k.defineMode("python",function(t,l){for(var c="error",a=l.delimiters||l.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,s=[l.singleOperators,l.doubleOperators,l.doubleDelimiters,l.tripleDelimiters,l.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],e=0;e<s.length;e++)s[e]||s.splice(e--,1);var u=l.hangingIndent||t.indentUnit,n=_,r=z;null!=l.extra_keywords&&(n=n.concat(l.extra_keywords)),null!=l.extra_builtins&&(r=r.concat(l.extra_builtins));var f=!(l.version&&Number(l.version)<3);if(f){var p=l.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;n=n.concat(["nonlocal","False","True","None","async","await"]),r=r.concat(["ascii","bytes","exec","print"]);var d=new RegExp("^(([rbuf]|(br)|(fr))?('{3}|\"{3}|['\"]))","i")}else{p=l.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;n=n.concat(["exec","print"]),r=r.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"]);d=new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var m=v(n),h=v(r);function i(e,t){var n=e.sol()&&"\\"!=t.lastToken;if(n&&(t.indent=e.indentation()),n&&"py"==w(t).type){var r=w(t).offset;if(e.eatSpace()){var i=e.indentation();return r<i?y(t):i<r&&g(e,t)&&"#"!=e.peek()&&(t.errorToken=!0),null}var o=b(e,t);return 0<r&&g(e,t)&&(o+=" "+c),o}return b(e,t)}function b(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var n=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),e.match(/^[\d_]+\.\d*/)&&(n=!0),e.match(/^\.\d+/)&&(n=!0),n)return e.eat(/J/i),"number";var r=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(r=!0),e.match(/^0b[01_]+/i)&&(r=!0),e.match(/^0o[0-7_]+/i)&&(r=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),r=!0),e.match(/^0(?![\dx])/i)&&(r=!0),r)return e.eat(/L/i),"number"}if(e.match(d)){var i=-1!==e.current().toLowerCase().indexOf("f");return t.tokenize=i?function(n,r){for(;0<="rubf".indexOf(n.charAt(0).toLowerCase());)n=n.substr(1);var i=1==n.length,o="string";function a(r){return function(e,t){var n=b(e,t);return"punctuation"==n&&("{"==e.current()?t.tokenize=a(r+1):"}"==e.current()&&(t.tokenize=1<r?a(r-1):s)),n}}function s(e,t){for(;!e.eol();)if(e.eatWhile(/[^'"\{\}\\]/),e.eat("\\")){if(e.next(),i&&e.eol())return o}else{if(e.match(n))return t.tokenize=r,o;if(e.match("{{"))return o;if(e.match("{",!1))return t.tokenize=a(0),e.current()?o:t.tokenize(e,t);if(e.match("}}"))return o;if(e.match("}"))return c;e.eat(/['"]/)}if(i){if(l.singleLineStringErrors)return c;t.tokenize=r}return o}return s.isString=!0,s}(e.current(),t.tokenize):function(n,r){for(;0<="rubf".indexOf(n.charAt(0).toLowerCase());)n=n.substr(1);var i=1==n.length,o="string";function e(e,t){for(;!e.eol();)if(e.eatWhile(/[^'"\\]/),e.eat("\\")){if(e.next(),i&&e.eol())return o}else{if(e.match(n))return t.tokenize=r,o;e.eat(/['"]/)}if(i){if(l.singleLineStringErrors)return c;t.tokenize=r}return o}return e.isString=!0,e}(e.current(),t.tokenize),t.tokenize(e,t)}for(var o=0;o<s.length;o++)if(e.match(s[o]))return"operator";return e.match(a)?"punctuation":"."==t.lastToken&&e.match(p)?"property":e.match(m)||e.match(x)?"keyword":e.match(h)?"builtin":e.match(/^(self|cls)\b/)?"variable-2":e.match(p)?"def"==t.lastToken||"class"==t.lastToken?"def":"variable":(e.next(),c)}function y(e){for(;"py"!=w(e).type;)e.scopes.pop();e.scopes.push({offset:w(e).offset+t.indentUnit,type:"py",align:null})}function g(e,t){for(var n=e.indentation();1<t.scopes.length&&w(t).offset>n;){if("py"!=w(t).type)return!0;t.scopes.pop()}return w(t).offset!=n}function o(e,t){e.sol()&&(t.beginningOfLine=!0);var n,r,i,o,a=t.tokenize(e,t),s=e.current();if(t.beginningOfLine&&"@"==s)return e.match(p,!1)?"meta":f?"operator":c;if(/\S/.test(s)&&(t.beginningOfLine=!1),"variable"!=a&&"builtin"!=a||"meta"!=t.lastToken||(a="meta"),"pass"!=s&&"return"!=s||(t.dedent+=1),"lambda"==s&&(t.lambda=!0),":"!=s||t.lambda||"py"!=w(t).type||y(t),1==s.length&&!/string|comment/.test(a)){var l="[({".indexOf(s);if(-1!=l&&(n=e,r=t,i="])}".slice(l,l+1),o=n.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:n.column()+1,r.scopes.push({offset:r.indent+u,type:i,align:o})),-1!=(l="])}".indexOf(s))){if(w(t).type!=s)return c;t.indent=t.scopes.pop().offset-u}}return 0<t.dedent&&e.eol()&&"py"==w(t).type&&(1<t.scopes.length&&t.scopes.pop(),t.dedent-=1),a}return{startState:function(e){return{tokenize:i,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=o(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+c:r},indent:function(e,t){if(e.tokenize!=i)return e.tokenize.isString?k.Pass:0;var n=w(e),r=n.type==t.charAt(0);return null!=n.align?n.align-(r?1:0):n.offset-(r?u:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),k.defineMIME("text/x-python","python");var e;k.defineMIME("text/x-cython",{name:"python",extra_keywords:(e="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",e.split(" "))})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";i.defineOption("fullScreen",!1,function(e,t,o){var r,l;(o==i.Init&&(o=!1),!o!=!t)&&(t?(l=(r=e).getWrapperElement(),r.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:l.style.width,height:l.style.height},l.style.width="",l.style.height="auto",l.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",r.refresh()):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=e.state.fullScreenRestore;t.style.width=o.width,t.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),e.refresh()}(e))})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(y){"use strict";var b=/[\w$]+/;y.registerHelper("hint","anyword",function(e,r){for(var t=r&&r.word||b,o=r&&r.range||500,i=e.getCursor(),n=e.getLine(i.line),f=i.ch,s=f;s&&t.test(n.charAt(s-1));)--s;for(var a=s!=f&&n.slice(s,f),c=r&&r.list||[],l={},d=new RegExp(t.source,"g"),u=-1;u<=1;u+=2)for(var p=i.line,g=Math.min(Math.max(p+u*o,e.firstLine()),e.lastLine())+u;p!=g;p+=u)for(var h,m=e.getLine(p);h=d.exec(m);)p==i.line&&h[0]===a||a&&0!=h[0].lastIndexOf(a,0)||Object.prototype.hasOwnProperty.call(l,h[0])||(l[h[0]]=!0,c.push(h[0]));return{list:c,from:y.Pos(i.line,s),to:y.Pos(i.line,f)}})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(f){var c=f.Pos;function u(t,e){for(var r=0,n=t.length;r<n;++r)e(t[r])}function r(t,e,r,n){var i=t.getCursor(),o=r(t,i);if(!/\b(?:string|comment)\b/.test(o.type)){var s=f.innerMode(t.getMode(),o.state);if("json"!==s.mode.helperType){o.state=s.state,/^[\w$_]*$/.test(o.string)?o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start)):o={start:i.ch,end:i.ch,string:"",state:o.state,type:"."==o.string?"property":null};for(var a=o;"property"==a.type;){if("."!=(a=r(t,c(i.line,a.start))).string)return;if(a=r(t,c(i.line,a.start)),!l)var l=[];l.push(a)}return{list:function(t,e,r,n){var i=[],o=t.string,s=n&&n.globalScope||window;function a(t){0!=t.lastIndexOf(o,0)||function(t,e){if(Array.prototype.indexOf)return-1!=t.indexOf(e);for(var r=t.length;r--;)if(t[r]===e)return!0;return!1}(i,t)||i.push(t)}function l(t){"string"==typeof t?u(d,a):t instanceof Array?u(g,a):t instanceof Function&&u(y,a),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,a)}if(e&&e.length){var f,c=e.pop();for(c.type&&0===c.type.indexOf("variable")?(n&&n.additionalContext&&(f=n.additionalContext[c.string]),n&&!1===n.useGlobalScope||(f=f||s[c.string])):"string"==c.type?f="":"atom"==c.type?f=1:"function"==c.type&&(null==s.jQuery||"$"!=c.string&&"jQuery"!=c.string||"function"!=typeof s.jQuery?null!=s._&&"_"==c.string&&"function"==typeof s._&&(f=s._()):f=s.jQuery());null!=f&&e.length;)f=f[e.pop().string];null!=f&&l(f)}else{for(var p=t.state.localVars;p;p=p.next)a(p.name);for(var p=t.state.globalVars;p;p=p.next)a(p.name);n&&!1===n.useGlobalScope||l(s),u(r,a)}return i}(o,l,e,n),from:c(i.line,o.start),to:c(i.line,o.end)}}}}function n(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}f.registerHelper("hint","javascript",function(t,e){return r(t,i,function(t,e){return t.getTokenAt(e)},e)}),f.registerHelper("hint","coffeescript",function(t,e){return r(t,o,n,e)});var d="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),g="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),y="prototype apply call bind".split(" "),i="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),o="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(Qe){"use strict";var ze=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Ze=ze.length,Ge=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Xe=Qe.Pos;Qe.Vim=function(){function e(e,t){var r;this==Qe.keyMap.vim&&(Qe.rmClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();e.state.fatCursorMarks=null,e.off("cursorActivity",a)}(e),e.getInputField().style.caretColor="")),t&&t.attach==o||((r=e).setOption("disableInput",!1),r.off("cursorActivity",De),Qe.off(r.getInputField(),"paste",c(r)),r.state.vim=null)}function o(e,t){var r,n;this==Qe.keyMap.vim&&(Qe.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&((r=e).state.fatCursorMarks=i(r),r.on("cursorActivity",a),e.getInputField().style.caretColor="transparent")),t&&t.attach==o||((n=e).setOption("disableInput",!0),n.setOption("showCursorWhenSelecting",!1),Qe.signal(n,"vim-mode-change",{mode:"normal"}),n.on("cursorActivity",De),R(n),Qe.on(n.getInputField(),"paste",c(n)))}function i(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var o=t[n];if(o.empty())if(o.anchor.ch<e.getLine(o.anchor.line).length)r.push(e.markText(o.anchor,Xe(o.anchor.line,o.anchor.ch+1),{className:"cm-fat-cursor-mark"}));else{var i=document.createElement("span");i.textContent=" ",i.className="cm-fat-cursor-mark",r.push(e.setBookmark(o.anchor,{widget:i}))}}return r}function a(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();e.state.fatCursorMarks=i(e)}function t(e,t){if(t){if(this[e])return this[e];var r=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var n=!1,o=0;o<t.length;o++){var i=t[o];i in s?t[o]=s[i]:n=!0,i in l&&(t[o]=l[i])}return!!n&&(k(r)&&(t[t.length-1]=r.toLowerCase()),"<"+t.join("-")+">")}(e);if(!r)return!1;var n=Qe.Vim.findKey(t,r);return"function"==typeof n&&Qe.signal(t,"vim-keypress",r),n}}Qe.defineOption("vimMode",!1,function(e,t,r){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&r!=Qe.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},l={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function c(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor($(e.getCursor(),0,1)),V.enterInsertMode(e,{},t))}),t.onPasteFn}var m=/[\d]/,g=[Qe.isWordChar,function(e){return e&&!Qe.isWordChar(e)&&!/\s/.test(e)}],v=[function(e){return/\S/.test(e)}];function r(e,t){for(var r=[],n=e;n<e+t;n++)r.push(String.fromCharCode(n));return r}var n=r(65,26),u=r(97,26),h=r(48,10),p=[].concat(n,u,h,["<",">"]),f=[].concat(n,u,h,["-",'"',".",":","/"]);function y(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function d(e){return/^[a-z]$/.test(e)}function k(e){return/^[A-Z]$/.test(e)}function I(e){return/^\s*$/.test(e)}function C(e){return-1!=".?!".indexOf(e)}function w(e,t){for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1}var x={};function M(e,t,r,n,o){if(void 0===t&&!o)throw Error("defaultValue is required unless callback is provided");if(r||(r="string"),x[e]={type:r,defaultValue:t,callback:o},n)for(var i=0;i<n.length;i++)x[n[i]]=x[e];t&&S(e,t)}function S(e,t,r,n){var o=x[e],i=(n=n||{}).scope;if(!o)return new Error("Unknown option: "+e);if("boolean"==o.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}o.callback?("local"!==i&&o.callback(t,void 0),"global"!==i&&r&&o.callback(t,r)):("local"!==i&&(o.value="boolean"==o.type?!!t:t),"global"!==i&&r&&(r.state.vim.options[e]={value:t}))}function A(e,t,r){var n=x[e],o=(r=r||{}).scope;if(!n)return new Error("Unknown option: "+e);if(n.callback){var i=t&&n.callback(void 0,t);return"global"!==o&&void 0!==i?i:"local"!==o?n.callback():void 0}return((i="global"!==o&&t&&t.state.vim.options[e])||"local"!==o&&n||{}).value}M("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e)return"null"==(r=t.getOption("mode"))?"":r;var r=""==e?"null":e;t.setOption("mode",r)}});var H,b,L=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function T(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=L()}function R(e){return e.state.vim||(e.state.vim={inputState:new B,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function E(){var a,s,l,c,u;for(var e in H={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:(a=100,s=-1,l=0,c=0,u=new Array(a),{cachedCursor:void 0,add:function(n,e,t){var r=u[s%a];function o(e){var t=++s%a,r=u[t];r&&r.clear(),u[t]=n.setBookmark(e)}if(r){var i=r.find();i&&!Z(i,e)&&o(e)}else o(e);o(t),(c=(l=s)-a+1)<0&&(c=0)},move:function(e,t){l<(s+=t)?s=l:s<c&&(s=c);var r=u[(a+s)%a];if(r&&!r.find()){var n,o=0<t?1:-1,i=e.getCursor();do{if((r=u[(a+(s+=o))%a])&&(n=r.find())&&!Z(i,n))break}while(s<l&&c<s)}return r}}),macroModeState:new T,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new P({}),searchHistoryController:new j,exCommandHistoryController:new j},x){var t=x[e];t.value=t.defaultValue}}var O={buildKeyMap:function(){},getRegisterController:function(){return H.registerController},resetVimGlobalState_:E,getVimGlobalState_:function(){return H},maybeInitVimState_:R,suppressErrorLogging:(T.prototype={exitMacroRecordMode:function(){var e=H.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=H.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}},!1),InsertModeKey:Ue,map:function(e,t,r){je.map(e,t,r)},unmap:function(e,t){je.unmap(e,t)},noremap:function(e,t,r){function n(e){return e?[e]:["normal","insert","visual"]}for(var o=n(r),i=ze.length,a=i-Ze;a<i&&o.length;a++){var s=ze[a];if(!(s.keys!=t||r&&s.context&&s.context!==r||"ex"===s.type.substr(0,2)||"key"===s.type.substr(0,3))){var l={};for(var c in s)l[c]=s[c];l.keys=e,r&&!l.context&&(l.context=r),this._mapCommand(l);var u=n(s.context);o=o.filter(function(e){return-1===u.indexOf(e)})}}},mapclear:function(e){var t=ze.length,r=Ze,n=ze.slice(0,t-r);if(ze=ze.slice(t-r),e)for(var o=n.length-1;0<=o;o--){var i=n[o];if(e!==i.context)if(i.context)this._mapCommand(i);else{var a=["normal","insert","visual"];for(var s in a)if(a[s]!==e){var l={};for(var c in i)l[c]=i[c];l.context=a[s],this._mapCommand(l)}}}},setOption:S,getOption:A,defineOption:M,defineEx:function(e,t,r){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Pe[e]=r,je.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(s,l,t){var e,c=R(s);function o(){var e=H.macroModeState;if(e.isRecording){if("q"==l)return e.exitMacroRecordMode(),K(s),!0;"mapping"!=t&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=H.registerController.getRegister(r);n&&n.pushText(t)}}(e,l)}}function u(){if("<Esc>"==l)return K(s),c.visualMode?le(s):c.insertMode&&_e(s),!0}return!1===(e=c.insertMode?function(){if(u())return!0;for(var e=c.inputState.keyBuffer=c.inputState.keyBuffer+l,t=1==l.length,r=_.matchCommand(e,ze,c.inputState,"insert");1<e.length&&"full"!=r.type;){e=c.inputState.keyBuffer=e.slice(1);var n=_.matchCommand(e,ze,c.inputState,"insert");"none"!=n.type&&(r=n)}if("none"==r.type)return K(s),!1;if("partial"==r.type)return b&&window.clearTimeout(b),b=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&K(s)},A("insertModeEscKeysTimeout")),!t;if(b&&window.clearTimeout(b),t){for(var o=s.listSelections(),i=0;i<o.length;i++){var a=o[i].head;s.replaceRange("",$(a,0,-(e.length-1)),a,"+input")}H.macroModeState.lastInsertModeChanges.changes.pop()}return K(s),r.command}():function(){if(o()||u())return!0;var e=c.inputState.keyBuffer=c.inputState.keyBuffer+l;if(/^[1-9]\d*$/.test(e))return!0;if(!(t=/^(\d*)(.*)$/.exec(e)))return K(s),!1;var t,r=c.visualMode?"visual":"normal",n=_.matchCommand(t[2]||t[1],ze,c.inputState,r);return"none"==n.type?(K(s),!1):"partial"==n.type||(c.inputState.keyBuffer="",(t=/^(\d*)(.*)$/.exec(e))[1]&&"0"!=t[1]&&c.inputState.pushRepeatDigit(t[1]),n.command)}())?c.insertMode||1!==l.length?void 0:function(){return!0}:!0===e?function(){return!0}:function(){return s.operation(function(){s.curOp.isVimOp=!0;try{"keyToKey"==e.type?function(e){for(var t;e;)t=/<\w+-.+?>|<\w+>|./.exec(e),l=t[0],e=e.substring(t.index+l.length),Qe.Vim.handleKey(s,l,"mapping")}(e.toKeys):_.processCommand(s,c,e)}catch(e){throw s.state.vim=void 0,R(s),Qe.Vim.suppressErrorLogging||console.log(e),e}return!0})}},handleEx:function(e,t){je.processCommand(e,t)},defineMotion:function(e,t){F[e]=t},defineAction:function(e,t){V[e]=t},defineOperator:function(e,t){D[e]=t},mapCommand:function(e,t,r,n,o){var i={keys:e,type:t};for(var a in i[t]=r,i[t+"Args"]=n,o)i[a]=o[a];He(i)},_mapCommand:He,defineRegister:function(e,t){var r=H.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(r[e])throw Error("Register already defined "+e);r[e]=t,f.push(e)},exitVisualMode:le,exitInsertMode:_e};function B(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function K(e,t){e.state.vim.inputState=new B,Qe.signal(e,"vim-command-done",t)}function N(e,t,r){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!r}function P(e){this.registers=e,this.unnamedRegister=e['"']=new N,e["."]=new N,e[":"]=new N,e["/"]=new N}function j(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}B.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},B.prototype.getRepeat=function(){var e=0;return(0<this.prefixRepeat.length||0<this.motionRepeat.length)&&(e=1,0<this.prefixRepeat.length&&(e*=parseInt(this.prefixRepeat.join(""),10)),0<this.motionRepeat.length&&(e*=parseInt(this.motionRepeat.join(""),10))),e},N.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(L(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},P.prototype={pushText:function(e,t,r,n,o){n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(i)k(e)?i.pushText(r,n):i.setText(r,n,o),this.unnamedRegister.setText(i.toString(),n);else{switch(t){case"yank":this.registers[0]=new N(r,n,o);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new N(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new N(r,n))}this.unnamedRegister.setText(r,n,o)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new N),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&w(e,f)},shiftNumericRegisters_:function(){for(var e=9;2<=e;e--)this.registers[e]=this.getRegister(""+(e-1))}},j.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+n;t?0<=o:o<r.length;o+=n)for(var i=r[o],a=0;a<=i.length;a++)if(this.initialPrefix==i.substring(0,a))return this.iterator=o,i;return o>=r.length?(this.iterator=r.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1<t&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var _={matchCommand:function(e,t,r,n){var o,i=function(e,t,r,n){for(var o,i=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==r&&"insert"!=l.context||l.context&&l.context!=r||n.operator&&"action"==l.type||!(o=q(e,l.keys))||("partial"==o&&i.push(l),"full"==o&&a.push(l))}return{partial:i.length&&i,full:a.length&&a}}(e,t,n,r);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial"};for(var a=0;a<i.full.length;a++){var s=i.full[a];o||(o=s)}if("<character>"==o.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(1<r.length)switch(r){case"<CR>":r="\n";break;case"<Space>":r=" ";break;default:r=""}return r}(e);if(!l)return{type:"none"};r.selectedCharacter=l}return{type:"full",command:o}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=J(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);K(e)}n.operator=r.operator,n.operatorArgs=J(r.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,o=J(r.operatorMotionArgs);o&&n&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,o=n.getRepeat(),i=!!o,a=J(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=n.registerName,K(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),V[r.action](e,a,t)},processSearch:function(s,n,o){if(s.getSearchCursor){var l=o.searchArgs.forward,e=o.searchArgs.wholeWordOnly;Ce(s).setReversed(!l);var t=l?"/":"?",i=Ce(s).getQuery(),c=s.getScrollInfo();switch(o.searchArgs.querySrc){case"prompt":var r=H.macroModeState;r.isPlaying?p(h=r.replaySearchQueries.shift(),!0,!1):Te(s,{onClose:function(e){s.scrollTo(c.left,c.top),p(e,!0,!0);var t=H.macroModeState;t.isRecording&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=H.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}}(t,e)},prefix:t,desc:Le,onKeyUp:function(e,t,r){var n,o,i,a=Qe.keyName(e);"Up"==a||"Down"==a?(n="Up"==a,o=e.target?e.target.selectionEnd:0,r(t=H.searchHistoryController.nextMatch(t,n)||""),o&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(o,e.target.value.length))):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&H.searchHistoryController.reset();try{i=Re(s,t,!0,!0)}catch(e){}i?s.scrollIntoView(Oe(s,!l,i),30):(Ie(s),s.scrollTo(c.left,c.top))},onKeyDown:function(e,t,r){var n=Qe.keyName(e);"Esc"==n||"Ctrl-C"==n||"Ctrl-["==n||"Backspace"==n&&""==t?(H.searchHistoryController.pushInput(t),H.searchHistoryController.reset(),Re(s,i),Ie(s),s.scrollTo(c.left,c.top),Qe.e_stop(e),K(s),r(),s.focus()):"Up"==n||"Down"==n?Qe.e_stop(e):"Ctrl-U"==n&&(Qe.e_stop(e),r(""))}});break;case"wordUnderCursor":var a=ue(s,!1,0,!1,!0),u=!0;if(a||(a=ue(s,!1,0,!1,!1),u=!1),!a)return;var h=s.getLine(a.start.line).substring(a.start.ch,a.end.ch);h=u&&e?"\\b"+h+"\\b":h.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),H.jumpList.cachedCursor=s.getCursor(),s.setCursor(a.start),p(h,!0,!1)}}function p(t,e,r){H.searchHistoryController.pushInput(t),H.searchHistoryController.reset();try{Re(s,t,e,r)}catch(e){return be(s,"Invalid regex: "+t),void K(s)}_.processMotion(s,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:o.searchArgs.toJumplist}})}},processEx:function(a,e,t){function r(e){H.exCommandHistoryController.pushInput(e),H.exCommandHistoryController.reset(),je.processCommand(a,e)}function n(e,t,r){var n,o,i=Qe.keyName(e);("Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==t)&&(H.exCommandHistoryController.pushInput(t),H.exCommandHistoryController.reset(),Qe.e_stop(e),K(a),r(),a.focus()),"Up"==i||"Down"==i?(Qe.e_stop(e),n="Up"==i,o=e.target?e.target.selectionEnd:0,r(t=H.exCommandHistoryController.nextMatch(t,n)||""),o&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(o,e.target.value.length))):"Ctrl-U"==i?(Qe.e_stop(e),r("")):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&H.exCommandHistoryController.reset()}"keyToEx"==t.type?je.processCommand(a,t.exArgs.input):e.visualMode?Te(a,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:n,selectValueOnOpen:!1}):Te(a,{onClose:r,prefix:":",onKeyDown:n})},evalInput:function(e,t){var r,n,o,i,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},h=a.registerName,p=t.sel,f=z(t.visualMode?U(e,p.head):e.getCursor("head")),d=z(t.visualMode?U(e,p.anchor):e.getCursor("anchor")),m=z(f),g=z(d);if(c&&this.recordLastEdit(t,a),0<(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=o,K(e),s){var v=F[s](e,f,l,t);if(t.lastMotion=F[s],!v)return;if(l.toJumplist){var y=H.jumpList,k=y.cachedCursor;k?(he(e,k,v),delete y.cachedCursor):he(e,f,v)}(r=v instanceof Array?(n=v[0],v[1]):v)||(r=z(f)),t.visualMode?(t.visualBlock&&r.ch===1/0||(r=U(e,r,t.visualBlock)),n&&(n=U(e,n,!0)),n=n||g,p.anchor=n,p.head=r,ae(e),ve(e,t,"<",G(n,r)?n:r),ve(e,t,">",G(n,r)?r:n)):c||(r=U(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){n=g;var C=u.lastSel,w=Math.abs(C.head.line-C.anchor.line),x=Math.abs(C.head.ch-C.anchor.ch);r=C.visualLine?Xe(g.line+w,g.ch):C.visualBlock?Xe(g.line+w,g.ch+x):C.head.line==C.anchor.line?Xe(g.line,g.ch+x):Xe(g.line+w,g.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,p=t.sel={anchor:n,head:r},ae(e)}else t.visualMode&&(u.lastSel={anchor:z(p.anchor),head:z(p.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var M,S,A,b,L;if(t.visualMode){if(M=X(p.head,p.anchor),S=Y(p.head,p.anchor),A=t.visualLine||u.linewise,L=se(e,{anchor:M,head:S},b=t.visualBlock?"block":A?"line":"char"),A){var T=L.ranges;if("block"==b)for(var R=0;R<T.length;R++)T[R].head.ch=te(e,T[R].head.line);else"line"==b&&(T[0].head=Xe(T[0].head.line+1,0))}}else{if(M=z(n||g),G(S=z(r||m),M)){var E=M;M=S,S=E}(A=l.linewise||u.linewise)?(i=S,M.ch=0,i.ch=0,i.line++):l.forward&&function(e,t,r){var n=e.getRange(t,r);if(/\n\s*$/.test(n)){var o=n.split("\n");o.pop();for(var i=o.pop();0<o.length&&i&&I(i);i=o.pop())r.line--,r.ch=0;r.ch=i?(r.line--,te(e,r.line)):0}}(e,M,S),L=se(e,{anchor:M,head:S},b="char",!l.inclusive||A)}e.setSelections(L.ranges,L.primary),t.lastMotion=null,u.repeat=o,u.registerName=h,u.linewise=A;var O=D[c](e,u,L.ranges,g,r);t.visualMode&&le(e,null!=O),O&&e.setCursor(O)}},recordLastEdit:function(e,t,r){var n=H.macroModeState;n.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=r,n.lastInsertModeChanges.changes=[],n.lastInsertModeChanges.expectCursorActivityForChange=!1)}},F={moveToTopLine:function(e,t,r){var n=Be(e).top+r.repeat-1;return Xe(n,ce(e.getLine(n)))},moveToMiddleLine:function(e){var t=Be(e),r=Math.floor(.5*(t.top+t.bottom));return Xe(r,ce(e.getLine(r)))},moveToBottomLine:function(e,t,r){var n=Be(e).bottom-r.repeat+1;return Xe(n,ce(e.getLine(n)))},expandToLine:function(e,t,r){return Xe(t.line+r.repeat-1,1/0)},findNext:function(e,t,r){var n=Ce(e),o=n.getQuery();if(o){var i=!r.forward;return i=n.isReversed()?!i:i,Ee(e,o),Oe(e,i,o,r.repeat)}},goToMark:function(e,t,r,n){var o=Ke(e,n,r.selectedCharacter);return o?r.linewise?{line:o.line,ch:ce(e.getLine(o.line))}:o:null},moveToOtherHighlightedEnd:function(e,t,r,n){if(n.visualBlock&&r.sameLine){var o=n.sel;return[U(e,Xe(o.anchor.line,o.head.ch)),U(e,Xe(o.head.line,o.anchor.ch))]}return[n.sel.head,n.sel.anchor]},jumpToMark:function(e,t,r,n){for(var o=t,i=0;i<r.repeat;i++){var a=o;for(var s in n.marks)if(d(s)){var l=n.marks[s].find();if(!((r.forward?G(l,a):G(a,l))||r.linewise&&l.line==a.line)){var c=Z(a,o),u=r.forward?ee(a,l,o):ee(o,l,a);(c||u)&&(o=l)}}}return r.linewise&&(o=Xe(o.line,ce(e.getLine(o.line)))),o},moveByCharacters:function(e,t,r){var n=t,o=r.repeat,i=r.forward?n.ch+o:n.ch-o;return Xe(n.line,i)},moveByLines:function(e,t,r,n){var o=t,i=o.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:i=n.lastHPos;break;default:n.lastHPos=i}var a=r.repeat+(r.repeatOffset||0),s=r.forward?o.line+a:o.line-a,l=e.firstLine(),c=e.lastLine();return s<l&&o.line==l?this.moveToStartOfLine(e,t,r,n):c<s&&o.line==c?this.moveToEol(e,t,r,n):(r.toFirstChar&&(i=ce(e.getLine(s)),n.lastHPos=i),n.lastHSPos=e.charCoords(Xe(s,i),"div").left,Xe(s,i))},moveByDisplayLines:function(e,t,r,n){var o=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(o,"div").left}var i=r.repeat;if((s=e.findPosV(o,r.forward?i:-i,"line",n.lastHSPos)).hitSide)if(r.forward)var a={top:e.charCoords(s,"div").top+8,left:n.lastHSPos},s=e.coordsChar(a,"div");else{var l=e.charCoords(Xe(e.firstLine(),0),"div");l.left=n.lastHSPos,s=e.coordsChar(l,"div")}return n.lastHPos=s.ch,s},moveByPage:function(e,t,r){var n=t,o=r.repeat;return e.findPosV(n,r.forward?o:-o,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return ye(e,t,r.repeat,n)},moveBySentence:function(e,t,r){var n=r.forward?1:-1;return function(e,t,r,n){function u(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!y(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0<t.dir?0:t.line.length-1}else t.pos+=t.dir}function o(e,t,r,n){var o=e.getLine(t),i=""===o,a={line:o,ln:t,pos:r,dir:n},s={ln:a.ln,pos:a.pos},l=""===a.line;for(u(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!I(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!C(a.line[a.pos])||i||a.pos!==a.line.length-1&&!I(a.line[a.pos+1])||(i=!0),u(e,a)}var o=e.getLine(s.ln);s.pos=0;for(var c=o.length-1;0<=c;--c)if(!I(o[c])){s.pos=c;break}return s}function i(e,t,r,n){var o=e.getLine(t),i={line:o,ln:t,pos:r,dir:n},a={ln:i.ln,pos:null},s=""===i.line;for(u(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(C(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||I(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),u(e,i)}for(var o=e.getLine(a.ln),l=a.pos=0;l<o.length;++l)if(!I(o[l])){a.pos=l;break}return a}for(var a={ln:t.line,pos:t.ch};0<r;)a=n<0?i(e,a.ln,a.pos,n):o(e,a.ln,a.pos,n),r--;return Xe(a.ln,a.pos)}(e,t,r.repeat,n)},moveByScroll:function(e,t,r,n){var o=e.getScrollInfo(),i=null,a=r.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(r.repeat=a,!(i=F.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(i,"local");return e.scrollTo(null,o.top+l.top-s.top),i},moveByWords:function(e,t,r){return function(e,t,r,n,o,i){var a=z(t),s=[];(n&&!o||!n&&o)&&r++;for(var l=!(n&&o),c=0;c<r;c++){var u=me(e,t,n,i,l);if(!u){var h=te(e,e.lastLine());s.push(n?{line:e.lastLine(),from:h,to:h}:{line:0,from:0,to:0});break}s.push(u),t=Xe(u.line,n?u.to-1:u.from)}var p=s.length!=r,f=s[0],d=s.pop();return n&&!o?(p||f.from==a.ch&&f.line==a.line||(d=s.pop()),Xe(d.line,d.from)):n&&o?Xe(d.line,d.to-1):!n&&o?(p||f.to==a.ch&&f.line==a.line||(d=s.pop()),Xe(d.line,d.to)):Xe(d.line,d.from)}(e,t,r.repeat,!!r.forward,!!r.wordEnd,!!r.bigWord)},moveTillCharacter:function(e,t,r){var n=ge(e,r.repeat,r.forward,r.selectedCharacter),o=r.forward?-1:1;return pe(o,r),n?(n.ch+=o,n):null},moveToCharacter:function(e,t,r){var n=r.repeat;return pe(0,r),ge(e,n,r.forward,r.selectedCharacter)||t},moveToSymbol:function(e,t,r){return function(e,t,r,n){var o=z(e.getCursor()),i=r?1:-1,a=r?e.lineCount():-1,s=o.ch,l=o.line,c=e.getLine(l),u={lineText:c,nextCh:c.charAt(s),lastCh:null,index:s,symb:n,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[n],forward:r,depth:0,curMoveThrough:!1},h=fe[n];if(!h)return o;var p=de[h].init,f=de[h].isComplete;for(p&&p(u);l!==a&&t;){if(u.index+=i,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(l+=i,u.lineText=e.getLine(l)||"",0<i)u.index=0;else{var d=u.lineText.length;u.index=0<d?d-1:0}u.nextCh=u.lineText.charAt(u.index)}f(u)&&(o.line=l,o.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?Xe(l,u.index):o}(e,r.repeat,r.forward,r.selectedCharacter)||t},moveToColumn:function(e,t,r,n){var o,i,a,s=r.repeat;return n.lastHPos=s-1,n.lastHSPos=e.charCoords(t,"div").left,i=s,a=(o=e).getCursor().line,U(o,Xe(a,i-1))},moveToEol:function(e,t,r,n){var o=t;n.lastHPos=1/0;var i=Xe(o.line+r.repeat-1,1/0),a=e.clipPos(i);return a.ch--,n.lastHSPos=e.charCoords(a,"div").left,i},moveToFirstNonWhiteSpaceCharacter:function(e,t){var r=t;return Xe(r.line,ce(e.getLine(r.line)))},moveToMatchedSymbol:function(e,t){for(var r,n=t,o=n.line,i=n.ch,a=e.getLine(o);i<a.length;i++)if((r=a.charAt(i))&&-1!="()[]{}".indexOf(r)){var s=e.getTokenTypeAt(Xe(o,i+1));if("string"!==s&&"comment"!==s)break}if(i<a.length){var l="<"===i||">"===i?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(Xe(o,i),{bracketRegex:l}).to}return n},moveToStartOfLine:function(e,t){return Xe(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,r){var n=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(n=r.repeat-e.getOption("firstLineNumber")),Xe(n,ce(e.getLine(n)))},textObjectManipulation:function(e,t,r,n){var o=r.selectedCharacter;"b"==o?o="(":"B"==o&&(o="{");var i,a,s,l,c,u,h,p,f=!r.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[o])i=function(e,t,r,n){var o,i,a=t,s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],c=e.getLine(a.line).charAt(a.ch)===l?1:0;if(o=e.scanForBracket(Xe(a.line,a.ch+c),-1,void 0,{bracketRegex:s}),i=e.scanForBracket(Xe(a.line,a.ch+c),1,void 0,{bracketRegex:s}),!o||!i)return{start:a,end:a};if(o=o.pos,i=i.pos,o.line==i.line&&o.ch>i.ch||o.line>i.line){var u=o;o=i,i=u}return n?i.ch+=1:o.ch+=1,{start:o,end:i}}(e,t,o,f);else if({"'":!0,'"':!0}[o])i=function(e,t,r,n){var o,i,a,s,l=z(t),c=e.getLine(l.line).split(""),u=c.indexOf(r);if(l.ch<u?l.ch=u:u<l.ch&&c[l.ch]==r&&(i=l.ch,--l.ch),c[l.ch]!=r||i)for(a=l.ch;-1<a&&!o;a--)c[a]==r&&(o=a+1);else o=l.ch+1;if(o&&!i)for(a=o,s=c.length;a<s&&!i;a++)c[a]==r&&(i=a);return o&&i?(n&&(--o,++i),{start:Xe(l.line,o),end:Xe(l.line,i)}):{start:l,end:l}}(e,t,o,f);else if("W"===o)i=ue(e,f,0,!0);else if("w"===o)i=ue(e,f,0,!1);else{if("p"!==o)return null;if(i=ye(e,t,r.repeat,0,f),r.linewise=!0,n.visualMode)n.visualLine||(n.visualLine=!0);else{var d=n.inputState.operatorArgs;d&&(d.linewise=!0),i.end.line--}}return e.state.vim.visualMode?(a=e,s=i.start,l=i.end,u=a.state.vim.sel,h=u.head,p=u.anchor,G(l,s)&&(c=l,l=s,s=c),G(h,p)?(h=X(s,h),p=Y(p,l)):(p=X(s,p),-1==(h=$(h=Y(h,l),0,-1)).ch&&h.line!=a.firstLine()&&(h=Xe(h.line-1,te(a,h.line-1)))),[p,h]):[i.start,i.end]},repeatLastCharacterSearch:function(e,t,r){var n=H.lastCharacterSearch,o=r.repeat,i=r.forward===n.forward,a=(n.increment?1:0)*(i?-1:1);e.moveH(-a,"char"),r.inclusive=!!i;var s=ge(e,o,i,n.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function W(e,t){for(var r=[],n=0;n<t;n++)r.push(e);return r}var D={change:function(e,t,r){var n,o,i=e.state.vim;if(H.macroModeState.lastInsertModeChanges.inVisualBlock=i.visualBlock,i.visualMode){o=e.getSelection();var a=W("",r.length);e.replaceSelections(a),n=X(r[0].head,r[0].anchor)}else{var s=r[0].anchor,l=r[0].head;o=e.getRange(s,l);var c=i.lastEditInputState||{};if("moveByWords"==c.motion&&!I(o)){var u=/\s+$/.exec(o);u&&c.motionArgs&&c.motionArgs.forward&&(l=$(l,0,-u[0].length),o=o.slice(0,-u[0].length))}var h=new Xe(s.line-1,Number.MAX_VALUE),p=e.firstLine()==e.lastLine();l.line>e.lastLine()&&t.linewise&&!p?e.replaceRange("",h,l):e.replaceRange("",s,l),t.linewise&&(p||(e.setCursor(h),Qe.commands.newlineAndIndent(e)),s.ch=Number.MAX_VALUE),n=s}H.registerController.pushText(t.registerName,"change",o,t.linewise,1<r.length),V.enterInsertMode(e,{head:n},e.state.vim)},delete:function(e,t,r){var n,o,i=e.state.vim;if(i.visualBlock){o=e.getSelection();var a=W("",r.length);e.replaceSelections(a),n=r[0].anchor}else{var s=r[0].anchor,l=r[0].head;t.linewise&&l.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==l.line-1&&(s.line==e.firstLine()?s.ch=0:s=Xe(s.line-1,te(e,s.line-1))),o=e.getRange(s,l),e.replaceRange("",s,l),n=s,t.linewise&&(n=F.moveToFirstNonWhiteSpaceCharacter(e,s))}return H.registerController.pushText(t.registerName,"delete",o,t.linewise,i.visualBlock),U(e,n,i.insertMode)},indent:function(e,t,r){var n=e.state.vim,o=r[0].anchor.line,i=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var l=0;l<a;l++)e.indentLine(s,t.indentRight);return F.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},indentAuto:function(e,t,r){return e.execCommand("indentAuto"),F.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},changeCase:function(e,t,r,n,o){for(var i=e.getSelections(),a=[],s=t.toLower,l=0;l<i.length;l++){var c=i[l],u="";if(!0===s)u=c.toLowerCase();else if(!1===s)u=c.toUpperCase();else for(var h=0;h<c.length;h++){var p=c.charAt(h);u+=k(p)?p.toLowerCase():p.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?o:!e.state.vim.visualMode&&t.linewise&&r[0].anchor.line+1==r[0].head.line?F.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:X(r[0].anchor,r[0].head)},yank:function(e,t,r,n){var o=e.state.vim,i=e.getSelection(),a=o.visualMode?X(o.sel.anchor,o.sel.head,r[0].head,r[0].anchor):n;return H.registerController.pushText(t.registerName,"yank",i,t.linewise,o.visualBlock),a}};var V={jumpListWalk:function(e,t,r){if(!r.visualMode){var n=t.repeat,o=t.forward,i=H.jumpList.move(e,o?n:-n),a=i?i.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,r){if(!r.visualMode){var n=t.repeat||1,o=e.defaultTextHeight(),i=e.getScrollInfo().top,a=o*n,s=t.forward?i+a:i-a,l=z(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/o,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/o,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var r=e.getCursor().line,n=e.charCoords(Xe(r,0),"local"),o=e.getScrollInfo().clientHeight,i=n.top,a=n.bottom-i;switch(t.position){case"center":i=i-o/2+a;break;case"bottom":i=i-o+a}e.scrollTo(null,i)},replayMacro:function(e,t,r){var n=t.selectedCharacter,o=t.repeat,i=H.macroModeState;for("@"==n&&(n=i.latestRegister);o--;)Fe(e,r,i,n)},enterMacroRecordMode:function(e,t){var r=H.macroModeState,n=t.selectedCharacter;H.registerController.isValidRegister(n)&&r.enterMacroRecordMode(e,n)},toggleOverwrite:function(e){e.state.overwrite?(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),Qe.signal(e,"vim-mode-change",{mode:"insert"})):(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),Qe.signal(e,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(e,t,r){if(!e.getOption("readOnly")){r.insertMode=!0,r.insertModeRepeat=t&&t.repeat||1;var n=t?t.insertAt:null,o=r.sel,i=t.head||e.getCursor("head"),a=e.listSelections().length;if("eol"==n)i=Xe(i.line,te(e,i.line));else if("charAfter"==n)i=$(i,0,1);else if("firstNonBlank"==n)i=F.moveToFirstNonWhiteSpaceCharacter(e,i);else if("startOfSelectedArea"==n)r.visualBlock?(i=Xe(Math.min(o.head.line,o.anchor.line),Math.min(o.head.ch,o.anchor.ch)),a=Math.abs(o.head.line-o.anchor.line)+1):i=o.head.line<o.anchor.line?o.head:Xe(o.anchor.line,0);else if("endOfSelectedArea"==n)r.visualBlock?(i=Xe(Math.min(o.head.line,o.anchor.line),Math.max(o.head.ch+1,o.anchor.ch)),a=Math.abs(o.head.line-o.anchor.line)+1):i=o.head.line>=o.anchor.line?$(o.head,0,1):Xe(o.anchor.line,0);else if("inplace"==n&&r.visualMode)return;e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),Qe.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),Qe.signal(e,"vim-mode-change",{mode:"insert"})),H.macroModeState.isPlaying||(e.on("change",We),Qe.on(e.getInputField(),"keydown",Je)),r.visualMode&&le(e),oe(e,i,a)}},toggleVisualMode:function(e,t,r){var n,o=t.repeat,i=e.getCursor();r.visualMode?r.visualLine^t.linewise||r.visualBlock^t.blockwise?(r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,Qe.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ae(e)):le(e):(r.visualMode=!0,r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,n=U(e,Xe(i.line,i.ch+o-1),!0),r.sel={anchor:i,head:n},Qe.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ae(e),ve(e,r,"<",X(i,n)),ve(e,r,">",Y(i,n)))},reselectLastSelection:function(e,t,r){var n=r.lastSelection;if(r.visualMode&&ie(e,r),n){var o=n.anchorMark.find(),i=n.headMark.find();if(!o||!i)return;r.sel={anchor:o,head:i},r.visualMode=!0,r.visualLine=n.visualLine,r.visualBlock=n.visualBlock,ae(e),ve(e,r,"<",X(o,i)),ve(e,r,">",Y(o,i)),Qe.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,r){var n,o;if(r.visualMode){if(n=e.getCursor("anchor"),G(o=e.getCursor("head"),n)){var i=o;o=n,n=i}o.ch=te(e,o.line)-1}else{var a=Math.max(t.repeat,2);n=e.getCursor(),o=U(e,Xe(n.line+a-1,1/0))}for(var s=0,l=n.line;l<o.line;l++){s=te(e,n.line),i=Xe(n.line+1,te(e,n.line+1));var c=e.getRange(n,i);c=c.replace(/\n\s*/g," "),e.replaceRange(c,n,i)}var u=Xe(n.line,s);r.visualMode&&le(e,!1),e.setCursor(u)},newLineAndEnterInsertMode:function(e,t,r){r.insertMode=!0;var n=z(e.getCursor());n.line!==e.firstLine()||t.after?(n.line=t.after?n.line:n.line-1,n.ch=te(e,n.line),e.setCursor(n),(Qe.commands.newlineAndIndentContinueComment||Qe.commands.newlineAndIndent)(e)):(e.replaceRange("\n",Xe(e.firstLine(),0)),e.setCursor(e.firstLine(),0)),this.enterInsertMode(e,{repeat:t.repeat},r)},paste:function(n,e,t){var r,o,i,a,s,l=z(n.getCursor()),c=H.registerController.getRegister(e.registerName);if(v=c.toString()){if(e.matchIndent){var u=n.getOption("tabSize"),h=function(e){var t=e.split("\t").length-1,r=e.split(" ").length-1;return t*u+1*r},p=n.getLine(n.getCursor().line),f=h(p.match(/^\s*/)[0]),d=v.replace(/\n$/,""),m=v!==d,g=h(v.match(/^\s*/)[0]),v=d.replace(/^\s*/gm,function(e){var t=f+(h(e)-g);if(t<0)return"";if(n.getOption("indentWithTabs")){var r=Math.floor(t/u);return Array(r+1).join("\t")}return Array(t+1).join(" ")});v+=m?"\n":""}1<e.repeat&&(v=Array(e.repeat+1).join(v));var y,k,C,w,x,M,S,A,b,L,T=c.linewise,R=c.blockwise;if(T)t.visualMode?v=t.visualLine?v.slice(0,-1):"\n"+v.slice(0,v.length-1)+"\n":e.after?(v="\n"+v.slice(0,v.length-1),l.ch=te(n,l.line)):l.ch=0;else{if(R){v=v.split("\n");for(var E=0;E<v.length;E++)v[E]=""==v[E]?" ":v[E]}l.ch+=e.after?1:0}if(t.visualMode){var O;t.lastPastedText=v;var I=(C=n,x=(w=t).lastSelection,w.visualMode?(M=C.listSelections(),S=M[0],A=M[M.length-1],b=G(S.anchor,S.head)?S.anchor:S.head,L=G(A.anchor,A.head)?A.head:A.anchor,[b,L]):function(){var e=C.getCursor(),t=C.getCursor(),r=x.visualBlock;if(r){var n=r.width,o=r.height;t=Xe(e.line+o,e.ch+n);for(var i=[],a=e.line;a<t.line;a++){var s=Xe(a,e.ch),l=Xe(a,t.ch),c={anchor:s,head:l};i.push(c)}C.setSelections(i)}else{var u=x.anchorMark.find(),h=x.headMark.find(),p=h.line-u.line,f=h.ch-u.ch;t={line:t.line+p,ch:p?t.ch:f+t.ch},x.visualLine&&(e=Xe(e.line,0),t=Xe(t.line,te(C,t.line))),C.setSelection(e,t)}return[e,t]}()),B=I[0],K=I[1],N=n.getSelection(),P=n.listSelections(),j=new Array(P.length).join("1").split("1");t.lastSelection&&(O=t.lastSelection.headMark.find()),H.registerController.unnamedRegister.setText(N),y=R?(n.replaceSelections(j),K=Xe(B.line+v.length-1,B.ch),n.setCursor(B),ne(n,K),n.replaceSelections(v),B):t.visualBlock?(n.replaceSelections(j),n.setCursor(B),n.replaceRange(v,B,B),B):(n.replaceRange(v,B,K),n.posFromIndex(n.indexFromPos(B)+v.length-1)),O&&(t.lastSelection.headMark=n.setBookmark(O)),T&&(y.ch=0)}else if(R){for(n.setCursor(l),E=0;E<v.length;E++){var _=l.line+E;_>n.lastLine()&&n.replaceRange("\n",Xe(_,0)),te(n,_)<l.ch&&(r=n,o=_,i=l.ch,void 0,a=te(r,o),s=new Array(i-a+1).join(" "),r.setCursor(Xe(o,a)),r.replaceRange(s,r.getCursor()))}n.setCursor(l),ne(n,Xe(l.line+v.length-1,l.ch)),n.replaceSelections(v),y=l}else n.replaceRange(v,l),y=T&&e.after?Xe(l.line+1,ce(n.getLine(l.line+1))):T&&!e.after?Xe(l.line,ce(n.getLine(l.line))):!T&&e.after?(k=n.indexFromPos(l),n.posFromIndex(k+v.length-1)):(k=n.indexFromPos(l),n.posFromIndex(k+v.length));t.visualMode&&le(n,!1),n.setCursor(y)}},undo:function(e,t){e.operation(function(){Q(e,Qe.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))})},redo:function(e,t){Q(e,Qe.commands.redo,t.repeat)()},setRegister:function(e,t,r){r.inputState.registerName=t.selectedCharacter},setMark:function(e,t,r){ve(e,r,t.selectedCharacter,e.getCursor())},replace:function(e,t,r){var n,o,i=t.selectedCharacter,a=e.getCursor(),s=e.listSelections();if(r.visualMode)a=e.getCursor("start"),o=e.getCursor("end");else{var l=e.getLine(a.line);(n=a.ch+t.repeat)>l.length&&(n=l.length),o=Xe(a.line,n)}if("\n"==i)r.visualMode||e.replaceRange("",a,o),(Qe.commands.newlineAndIndentContinueComment||Qe.commands.newlineAndIndent)(e);else{var c=e.getRange(a,o);if(c=c.replace(/[^\n]/g,i),r.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");c=(c=e.getSelection()).replace(/\t/g,u).replace(/[^\n]/g,i).split("\n"),e.replaceSelections(c)}else e.replaceRange(c,a,o);r.visualMode?(a=G(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(a),le(e,!1)):e.setCursor($(o,0,-1))}},incrementNumberToken:function(e,t){for(var r,n,o,i,a=e.getCursor(),s=e.getLine(a.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=l.exec(s))&&(o=(n=r.index)+r[0].length,!(a.ch<o)););if((t.backtrack||!(o<=a.ch))&&r){var c=r[2]||r[4],u=r[3]||r[5],h=t.increase?1:-1,p={"0b":2,0:8,"":10,"0x":16}[c.toLowerCase()];i=(parseInt(r[1]+u,p)+h*t.repeat).toString(p);var f=c?new Array(u.length-i.length+1+r[1].length).join("0"):"";i="-"===i.charAt(0)?"-"+c+f+i.substr(1):c+f+i;var d=Xe(a.line,n),m=Xe(a.line,o);e.replaceRange(i,d,m),e.setCursor(Xe(a.line,n+i.length-1))}},repeatLastEdit:function(e,t,r){if(r.lastEditInputState){var n=t.repeat;n&&t.repeatIsExplicit?r.lastEditInputState.repeatOverride=n:n=r.lastEditInputState.repeatOverride||n,$e(e,r,n,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:_e};function U(e,t,r){var n=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),o=te(e,n)-1;o=r?o+1:o;var i=Math.min(Math.max(0,t.ch),o);return Xe(n,i)}function J(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function $(e,t,r){return"object"==typeof t&&(r=t.ch,t=t.line),Xe(e.line+t,e.ch+r)}function q(e,t){if("<character>"!=t.slice(-11))return e==t?"full":0==t.indexOf(e)&&"partial";var r=t.length-11,n=e.slice(0,r),o=t.slice(0,r);return n==o&&e.length>r?"full":0==o.indexOf(n)&&"partial"}function Q(t,r,n){return function(){for(var e=0;e<n;e++)r(t)}}function z(e){return Xe(e.line,e.ch)}function Z(e,t){return e.ch==t.ch&&e.line==t.line}function G(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function X(e,t){return 2<arguments.length&&(t=X.apply(void 0,Array.prototype.slice.call(arguments,1))),G(e,t)?e:t}function Y(e,t){return 2<arguments.length&&(t=Y.apply(void 0,Array.prototype.slice.call(arguments,1))),G(e,t)?t:e}function ee(e,t,r){var n=G(e,t),o=G(t,r);return n&&o}function te(e,t){return e.getLine(t).length}function re(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ne(e,t){var r=[],n=e.listSelections(),o=z(e.clipPos(t)),i=!Z(t,o),a=function(e,t,r){for(var n=0;n<e.length;n++){var o="head"!=r&&Z(e[n].anchor,t),i="anchor"!=r&&Z(e[n].head,t);if(o||i)return n}return-1}(n,e.getCursor("head")),s=Z(n[a].head,n[a].anchor),l=n.length-1,c=a<l-a?l:0,u=n[c].anchor,h=Math.min(u.line,o.line),p=Math.max(u.line,o.line),f=u.ch,d=o.ch,m=n[c].head.ch-f,g=d-f;0<m&&g<=0?(f++,i||d--):m<0&&0<=g?(f--,s||d++):m<0&&-1==g&&(f--,d++);for(var v=h;v<=p;v++){var y={anchor:new Xe(v,f),head:new Xe(v,d)};r.push(y)}return e.setSelections(r),t.ch=d,u.ch=f,u}function oe(e,t,r){for(var n=[],o=0;o<r;o++){var i=$(t,o,0);n.push({anchor:i,head:i})}e.setSelections(n,0)}function ie(e,t){var r=t.sel.anchor,n=t.sel.head;t.lastPastedText&&(n=e.posFromIndex(e.indexFromPos(r)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(r),headMark:e.setBookmark(n),anchor:z(r),head:z(n),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function ae(e,t,r){var n=e.state.vim,o=se(e,t=t||n.sel,r=r||n.visualLine?"line":n.visualBlock?"block":"char");e.setSelections(o.ranges,o.primary),Ve(e)}function se(e,t,r,n){var o=z(t.head),i=z(t.anchor);if("char"==r){var a=n||G(t.head,t.anchor)?0:1,s=G(t.head,t.anchor)?1:0;return o=$(t.head,0,a),{ranges:[{anchor:i=$(t.anchor,0,s),head:o}],primary:0}}if("line"==r){if(G(t.head,t.anchor))o.ch=0,i.ch=te(e,i.line);else{i.ch=0;var l=e.lastLine();o.line>l&&(o.line=l),o.ch=te(e,o.line)}return{ranges:[{anchor:i,head:o}],primary:0}}if("block"==r){for(var c=Math.min(i.line,o.line),u=Math.min(i.ch,o.ch),h=Math.max(i.line,o.line),p=Math.max(i.ch,o.ch)+1,f=h-c+1,d=o.line==c?0:f-1,m=[],g=0;g<f;g++)m.push({anchor:Xe(c+g,u),head:Xe(c+g,p)});return{ranges:m,primary:d}}}function le(e,t){var r=e.state.vim;!1!==t&&e.setCursor(U(e,r.sel.head)),ie(e,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,Qe.signal(e,"vim-mode-change",{mode:"normal"}),r.fakeCursor&&r.fakeCursor.clear()}function ce(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function ue(e,t,r,n,o){for(var i,a,s=(a=(i=e).getCursor("head"),1==i.getSelection().length&&(a=X(a,i.getCursor("anchor"))),a),l=e.getLine(s.line),c=s.ch,u=o?g[0]:v[0];!u(l.charAt(c));)if(++c>=l.length)return null;n?u=v[0]:(u=g[0])(l.charAt(c))||(u=g[1]);for(var h=c,p=c;u(l.charAt(h))&&h<l.length;)h++;for(;u(l.charAt(p))&&0<=p;)p--;if(p++,t){for(var f=h;/\s/.test(l.charAt(h))&&h<l.length;)h++;if(f==h){for(var d=p;/\s/.test(l.charAt(p-1))&&0<p;)p--;p||(p=d)}}return{start:Xe(s.line,p),end:Xe(s.line,h)}}function he(e,t,r){Z(t,r)||H.jumpList.add(e,t,r)}function pe(e,t){H.lastCharacterSearch.increment=e,H.lastCharacterSearch.forward=t.forward,H.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var fe={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},de={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,1<=e.depth)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function me(e,t,r,n,o){var i=t.line,a=t.ch,s=e.getLine(i),l=r?1:-1,c=n?v:g;if(o&&""==s){if(i+=l,s=e.getLine(i),!y(e,i))return null;a=r?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=0<l?s.length:-1,h=u,p=u;a!=u;){for(var f=!1,d=0;d<c.length&&!f;++d)if(c[d](s.charAt(a))){for(h=a;a!=u&&c[d](s.charAt(a));)a+=l;if(f=h!=(p=a),h==t.ch&&i==t.line&&p==h+l)continue;return{from:Math.min(h,p+1),to:Math.max(h,p),line:i}}f||(a+=l)}if(!y(e,i+=l))return null;s=e.getLine(i),a=0<l?0:s.length}}function ge(e,t,r,n){for(var o,i=e.getCursor(),a=i.ch,s=0;s<t;s++){if(-1==(l=a,c=e.getLine(i.line),u=n,h=!0,p=void 0,r?-1==(p=c.indexOf(u,l+1))||h||(p-=1):-1==(p=c.lastIndexOf(u,l-1))||h||(p+=1),o=p))return null;a=o}var l,c,u,h,p;return Xe(e.getCursor().line,o)}function ve(e,t,r,n){w(r,p)&&(t.marks[r]&&t.marks[r].clear(),t.marks[r]=e.setBookmark(n))}function ye(t,e,r,n,o){var i,a=e.line,s=t.firstLine(),l=t.lastLine(),c=a;function u(e){return!t.getLine(e)}function h(e,t,r){return r?u(e)!=u(e+t):!u(e)&&u(e+t)}if(n){for(;s<=c&&c<=l&&0<r;)h(c,n)&&r--,c+=n;return new Xe(c,0)}var p=t.state.vim;if(p.visualLine&&h(a,1,!0)){var f=p.sel.anchor;h(f.line,-1,!0)&&(o&&f.line==a||(a+=1))}var d=u(a);for(c=a;c<=l&&r;c++)h(c,1,!0)&&(o&&u(c)==d||r--);for(i=new Xe(c,0),l<c&&!d?d=!0:o=!1,c=a;s<c&&(o&&u(c)!=d&&c!=a||!h(c,-1,!0));c--);return{start:new Xe(c,0),end:i}}function ke(){}function Ce(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new ke)}function we(e,t){var r=xe(e,t)||[];if(!r.length)return[];var n=[];if(0===r[0]){for(var o=0;o<r.length;o++)"number"==typeof r[o]&&n.push(e.substring(r[o]+1,r[o+1]));return n}}function xe(e,t){t||(t="/");for(var r=!1,n=[],o=0;o<e.length;o++){var i=e.charAt(o);r||i!=t||n.push(o),r=!r&&"\\"==i}return n}M("pcre",!0,"boolean"),ke.prototype={getQuery:function(){return H.query},setQuery:function(e){H.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return H.isReversed},setReversed:function(e){H.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Me={"\\n":"\n","\\r":"\r","\\t":"\t"};var Se={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"};function Ae(e,t,r){if(H.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var n,o,i=xe(e,"/");return i.length?(n=e.substring(0,i[0]),o=-1!=e.substring(i[0]).indexOf("i")):n=e,n?(A("pcre")||(n=function(e){for(var t=!1,r=[],n=-1;n<e.length;n++){var o=e.charAt(n)||"",i=e.charAt(n+1)||"",a=i&&-1!="|(){".indexOf(i);t?("\\"===o&&a||r.push(o),t=!1):"\\"===o?(t=!0,i&&-1!="}".indexOf(i)&&(a=!0),a&&"\\"!==i||r.push(o)):(r.push(o),a&&"\\"!==i&&r.push("\\"))}return r.join("")}(n)),r&&(t=/^[^A-Z]*$/.test(n)),new RegExp(n,t||o?"i":void 0)):null}function be(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}var Le="(Javascript regexp)";function Te(e,t){var r,n,o,i,a,s,l,c,u=(t.prefix||"")+" "+(t.desc||""),h=(r=t.prefix,n=t.desc,o='<span style="font-family: monospace; white-space: pre">'+(r||"")+'<input type="text"></span>',n&&(o+=' <span style="color: #888">'+n+"</span>"),o);i=e,a=h,s=u,l=t.onClose,c=t,i.openDialog?i.openDialog(a,l,{bottom:!0,value:c.value,onKeyDown:c.onKeyDown,onKeyUp:c.onKeyUp,selectValueOnOpen:!1}):l(prompt(s,""))}function Re(e,t,r,n){if(t){var o=Ce(e),i=Ae(t,!!r,!!n);if(i)return Ee(e,i),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var r=["global","multiline","ignoreCase","source"],n=0;n<r.length;n++){var o=r[n];if(e[o]!==t[o])return!1}return!0}return!1}(i,o.getQuery())||o.setQuery(i),i}}function Ee(e,t){var r=Ce(e),n=r.getOverlay();n&&t==n.query||(n&&e.removeOverlay(n),n=function(r){if("^"==r.source.charAt(0))var n=!0;return{token:function(e){if(!n||e.sol()){var t=e.match(r,!1);if(t)return 0==t[0].length?(e.next(),"searching"):e.sol()||(e.backUp(1),r.exec(e.next()+t[0]))?(e.match(r),"searching"):(e.next(),null);for(;!e.eol()&&(e.next(),!e.match(r,!1)););}else e.skipToEnd()},query:r}}(t),e.addOverlay(n),e.showMatchesOnScrollbar&&(r.getScrollbarAnnotate()&&r.getScrollbarAnnotate().clear(),r.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),r.setOverlay(n))}function Oe(o,i,a,s){return void 0===s&&(s=1),o.operation(function(){for(var e=o.getCursor(),t=o.getSearchCursor(a,e),r=0;r<s;r++){var n=t.find(i);if(0==r&&n&&Z(t.from(),e)&&(n=t.find(i)),!n&&!(t=o.getSearchCursor(a,i?Xe(o.lastLine()):Xe(o.firstLine(),0))).find(i))return}return t.from()})}function Ie(e){var t=Ce(e);e.removeOverlay(Ce(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function Be(e){var t=e.getScrollInfo(),r=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,o=e.coordsChar({left:0,top:n},"local");return{top:r.line,bottom:o.line}}function Ke(e,t,r){if("'"==r){var n=e.doc.history.done,o=n[n.length-2];return o&&o.ranges&&o.ranges[0].head}if("."==r){if(0==e.doc.history.lastModTime)return;var i=e.doc.history.done.filter(function(e){if(void 0!==e.changes)return e});return i.reverse(),i[0].changes[0].to}var a=t.marks[r];return a&&a.find()}var Ne=function(){this.buildCommandMap_()};Ne.prototype={processCommand:function(e,t,r){var n=this;e.operation(function(){e.curOp.isVimOp=!0,n._processCommand(e,t,r)})},_processCommand:function(t,e,r){var n=t.state.vim,o=H.registerController.getRegister(":"),i=o.toString();n.visualMode&&le(t);var a=new Qe.StringStream(e);o.setText(e);var s,l,c=r||{};c.input=e;try{this.parseInput_(t,a,c)}catch(e){throw be(t,e),e}if(c.commandName){if(s=this.matchCommand_(c.commandName)){if(l=s.name,s.excludeFromCommandHistory&&o.setText(i),this.parseCommandArgs_(a,c,s),"exToKey"==s.type){for(var u=0;u<s.toKeys.length;u++)Qe.Vim.handleKey(t,s.toKeys[u],"mapping");return}if("exToEx"==s.type)return void this.processCommand(t,s.toInput)}}else void 0!==c.line&&(l="move");if(l)try{Pe[l](t,c),s&&s.possiblyAsync||!c.callback||c.callback()}catch(e){throw be(t,e),e}else be(t,'Not an editor command ":'+e+'"')},parseInput_:function(e,t,r){t.eatWhile(":"),t.eat("%")?(r.line=e.firstLine(),r.lineEnd=e.lastLine()):(r.line=this.parseLineSpec_(e,t),void 0!==r.line&&t.eat(",")&&(r.lineEnd=this.parseLineSpec_(e,t)));var n=t.match(/^(\w+)/);return r.commandName=n?n[1]:t.match(/.*/)[0],r},parseLineSpec_:function(e,t){var r=t.match(/^(\d+)/);if(r)return parseInt(r[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var n=t.next(),o=Ke(e,e.state.vim,n);if(!o)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,o.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var r=e.match(/^([+-])?(\d+)/);if(r){var n=parseInt(r[2],10);"-"==r[1]?t-=n:t+=n}return t},parseCommandArgs_:function(e,t,r){if(!e.eol()){t.argString=e.match(/.*/)[0];var n=r.argDelimiter||/\s+/,o=re(t.argString).split(n);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length;0<t;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<Ge.length;e++){var t=Ge[e],r=t.shortName||t.name;this.commandMap_[r]=t}},map:function(e,t,r){if(":"!=e&&":"==e.charAt(0)){if(r)throw Error("Mode not supported for ex mappings");var n=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[n]={name:n,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[n]={name:n,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};r&&(o.context=r),ze.unshift(o)}else o={keys:e,type:"keyToKey",toKeys:t},r&&(o.context=r),ze.unshift(o)},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var r=e.substring(1);if(this.commandMap_[r]&&this.commandMap_[r].user)return void delete this.commandMap_[r]}else for(var n=e,o=0;o<ze.length;o++)if(n==ze[o].keys&&ze[o].context===t)return void ze.splice(o,1);throw Error("No such mapping.")}};var Pe={colorscheme:function(e,t){!t.args||t.args.length<1?be(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,r){var n=t.args;!n||n.length<2?e&&be(e,"Invalid mapping: "+t.input):je.map(n[0],n[1],r)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,r){var n=t.args;!n||n.length<1?e&&be(e,"No such mapping: "+t.input):je.unmap(n[0],r)},move:function(e,t){_.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var r=t.args,n=t.setCfg||{};if(!r||r.length<1)e&&be(e,"Invalid mapping: "+t.input);else{var o=r[0].split("="),i=o[0],a=o[1],s=!1;if("?"==i.charAt(i.length-1)){if(a)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),s=!0}void 0===a&&"no"==i.substring(0,2)&&(i=i.substring(2),a=!1);var l=x[i]&&"boolean"==x[i].type;if(l&&null==a&&(a=!0),!l&&void 0===a||s){var c=A(i,e,n);c instanceof Error?be(e,c.message):be(e,!0===c||!1===c?" "+(c?"":"no")+i:"  "+i+"="+c)}else{var u=S(i,a,e,n);u instanceof Error&&be(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var r=t.args,n=H.registerController.registers,o="----------Registers----------<br><br>";if(r){r=r.join("");for(var i=0;i<r.length;i++)a=r.charAt(i),H.registerController.isValidRegister(a)&&(o+='"'+a+"    "+(n[a]||new N).toString()+"<br>")}else for(var a in n){var s=n[a].toString();s.length&&(o+='"'+a+"    "+s+"<br>")}be(e,o)},sort:function(e,i){var a,s,l,c,u,t=function(){if(i.argString){var e=new Qe.StringStream(i.argString);if(e.eat("!")&&(a=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var t=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!t&&!e.eol())return"Invalid arguments";if(t[1]){s=-1!=t[1].indexOf("i"),l=-1!=t[1].indexOf("u");var r=-1!=t[1].indexOf("d")||-1!=t[1].indexOf("n")&&1,n=-1!=t[1].indexOf("x")&&1,o=-1!=t[1].indexOf("o")&&1;if(1<r+n+o)return"Invalid arguments";c=(r?"decimal":n&&"hex")||o&&"octal"}t[2]&&(u=new RegExp(t[2].substr(1,t[2].length-2),s?"i":""))}}();if(t)be(e,t+": "+i.argString);else{var r=i.line||e.firstLine(),n=i.lineEnd||i.line||e.lastLine();if(r!=n){var o=Xe(r,0),h=Xe(n,te(e,n)),p=e.getRange(o,h).split("\n"),f=u||("decimal"==c?/(-?)([\d]+)/:"hex"==c?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==c?/([0-7]+)/:null),d="decimal"==c?10:"hex"==c?16:"octal"==c?8:null,m=[],g=[];if(c||u)for(var v=0;v<p.length;v++){var y=u?p[v].match(u):null;y&&""!=y[0]?m.push(y):!u&&f.exec(p[v])?m.push(p[v]):g.push(p[v])}else g=p;if(m.sort(u?function(e,t){var r;return a&&(r=e,e=t,t=r),s&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:w),u)for(v=0;v<m.length;v++)m[v]=m[v].input;else c||g.sort(w);if(p=a?m.concat(g):g.concat(m),l){var k,C=p;for(p=[],v=0;v<C.length;v++)C[v]!=k&&p.push(C[v]),k=C[v]}e.replaceRange(p.join("\n"),o,h)}}function w(e,t){var r;a&&(r=e,e=t,t=r),s&&(e=e.toLowerCase(),t=t.toLowerCase());var n=c&&f.exec(e),o=c&&f.exec(t);return n?(n=parseInt((n[1]+n[2]).toLowerCase(),d))-(o=parseInt((o[1]+o[2]).toLowerCase(),d)):e<t?-1:1}},global:function(t,e){var r=e.argString;if(r){var n,o=void 0!==e.line?e.line:t.firstLine(),i=e.lineEnd||e.line||t.lastLine(),a=we(r,"/"),s=r;if(a.length&&(s=a[0],n=a.slice(1,a.length).join("/")),s)try{Re(t,s,!0,!0)}catch(e){return void be(t,"Invalid regex: "+s)}for(var l=Ce(t).getQuery(),c=[],u="",h=o;h<=i;h++)l.test(t.getLine(h))&&(c.push(h+1),u+=t.getLine(h)+"<br>");if(n){var p=0,f=function(){if(p<c.length){var e=c[p]+n;je.processCommand(t,e,{callback:f})}p++};f()}else be(t,u)}else be(t,"Regular Expression missing from global")},substitute:function(t,e){if(!t.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var r,n,o,i,a=e.argString,s=a?we(a,a[0]):[],l="",c=!1,u=!1;if(s.length)r=s[0],l=s[1],r&&"$"===r[r.length-1]&&(r=r.slice(0,r.length-1)+"\\n",l=l?l+"\n":"\n"),void 0!==l&&(l=A("pcre")?function(e){for(var t=new Qe.StringStream(e),r=[];!t.eol();){for(;t.peek()&&"\\"!=t.peek();)r.push(t.next());var n=!1;for(var o in Se)if(t.match(o,!0)){n=!0,r.push(Se[o]);break}n||r.push(t.next())}return r.join("")}(l):function(e){for(var t,r=!1,n=[],o=-1;o<e.length;o++){var i=e.charAt(o)||"",a=e.charAt(o+1)||"";Me[i+a]?(n.push(Me[i+a]),o++):r?(n.push(i),r=!1):"\\"===i?(r=!0,t=a,m.test(t)||"$"===a?n.push("$"):"/"!==a&&"\\"!==a&&n.push("\\")):("$"===i&&n.push("$"),n.push(i),"/"===a&&n.push("\\"))}return n.join("")}(l),H.lastSubstituteReplacePart=l),n=s[2]?s[2].split(" "):[];else if(a&&a.length)return void be(t,"Substitutions should be of the form :s/pattern/replace/");if(n&&(o=n[0],i=parseInt(n[1]),o&&(-1!=o.indexOf("c")&&(c=!0,o.replace("c","")),-1!=o.indexOf("g")&&(u=!0,o.replace("g","")),r=r.replace(/\//g,"\\/")+"/"+o)),r)try{Re(t,r,!0,!0)}catch(e){return void be(t,"Invalid regex: "+r)}if(void 0!==(l=l||H.lastSubstituteReplacePart)){var h=Ce(t).getQuery(),p=void 0!==e.line?e.line:t.getCursor().line,f=e.lineEnd||p;p==t.firstLine()&&f==t.lastLine()&&(f=1/0),i&&(f=(p=f)+i-1);var d=U(t,Xe(p,0));!function(o,e,n,i,a,s,r,l,c){var u=!(o.state.vim.exMode=!0),h=s.from();function p(){o.operation(function(){for(;!u;)f(),d();m()})}function f(){var e=o.getRange(s.from(),s.to()),t=e.replace(r,l);s.replace(t)}function d(){for(;s.findNext()&&(e=s.from(),t=i,r=a,"number"!=typeof e&&(e=e.line),t instanceof Array?w(e,t):r?t<=e&&e<=r:e==t);)if(n||!h||s.from().line!=h.line)return o.scrollIntoView(s.from(),30),o.setSelection(s.from(),s.to()),h=s.from(),void(u=!1);var e,t,r;u=!0}function m(e){if(e&&e(),o.focus(),h){o.setCursor(h);var t=o.state.vim;t.exMode=!1,t.lastHPos=t.lastHSPos=h.ch}c&&c()}d(),u?be(o,"No matches for "+r.source):e?Te(o,{prefix:"replace with <strong>"+l+"</strong> (y/n/a/q/l)",onKeyDown:function(e,t,r){switch(Qe.e_stop(e),Qe.keyName(e)){case"Y":f(),d();break;case"N":d();break;case"A":var n=c;c=void 0,o.operation(p),c=n;break;case"L":f();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(r)}return u&&m(r),!0}}):(p(),c&&c())}(t,c,u,p,f,t.getSearchCursor(h,d),h,l,e.callback)}else be(t,"No previous substitute regular expression")},redo:Qe.commands.redo,undo:Qe.commands.undo,write:function(e){Qe.commands.save?Qe.commands.save(e):e.save&&e.save()},nohlsearch:function(e){Ie(e)},yank:function(e){var t=z(e.getCursor()).line,r=e.getLine(t);H.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(e,t){if(t.argString&&re(t.argString))for(var r=e.state.vim,n=new Qe.StringStream(re(t.argString));!n.eol();){n.eatSpace();var o=n.pos;if(!n.match(/[a-zA-Z]/,!1))return void be(e,"Invalid argument: "+t.argString.substring(o));var i=n.next();if(n.match("-",!0)){if(!n.match(/[a-zA-Z]/,!1))return void be(e,"Invalid argument: "+t.argString.substring(o));var a=i,s=n.next();if(!(d(a)&&d(s)||k(a)&&k(s)))return void be(e,"Invalid argument: "+a+"-");var l=a.charCodeAt(0),c=s.charCodeAt(0);if(c<=l)return void be(e,"Invalid argument: "+t.argString.substring(o));for(var u=0;u<=c-l;u++){var h=String.fromCharCode(l+u);delete r.marks[h]}}else delete r.marks[i]}else be(e,"Argument required")}},je=new Ne;function _e(e){var t=e.state.vim,r=H.macroModeState,n=H.registerController.getRegister("."),o=r.isPlaying,i=r.lastInsertModeChanges;o||(e.off("change",We),Qe.off(e.getInputField(),"keydown",Je)),!o&&1<t.insertModeRepeat&&($e(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),n.setText(i.changes.join("")),Qe.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,r=H.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}}(r)}function He(e){ze.unshift(e)}function Fe(e,t,r,n){var o=H.registerController.getRegister(n);if(":"==n)return o.keyBuffer[0]&&je.processCommand(e,o.keyBuffer[0]),void(r.isPlaying=!1);var i=o.keyBuffer,a=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var s=0;s<i.length;s++)for(var l,c,u=i[s];u;)if(c=(l=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(l.index+c.length),Qe.Vim.handleKey(e,c,"macro"),t.insertMode){var h=o.insertModeChanges[a++].changes;qe(e,H.macroModeState.lastInsertModeChanges.changes=h,1),_e(e)}r.isPlaying=!1}function We(e,t){var r=H.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,1<n.ignoreCount)n.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=e.listSelections().length;1<o&&(n.ignoreCount=o);var i=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),i&&(e.state.overwrite&&!/\n/.test(i)?n.changes.push([i]):n.changes.push(i))}t=t.next}}function De(e){var t=e.state.vim;if(t.insertMode){var r=H.macroModeState;if(r.isPlaying)return;var n=r.lastInsertModeChanges;n.expectCursorActivityForChange?n.expectCursorActivityForChange=!1:n.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var r=e.getCursor("anchor"),n=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?le(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,Qe.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var o=G(n,r)?0:-1,i=G(n,r)?-1:0;n=$(n,0,o),r=$(r,0,i),t.sel={anchor:r,head:n},ve(e,t,"<",X(n,r)),ve(e,t,">",Y(n,r))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t);t.visualMode&&Ve(e)}function Ve(e){var t=e.state.vim,r=U(e,z(t.sel.head)),n=$(r,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(r,n,{className:"cm-animate-fat-cursor"})}function Ue(e){this.keyName=e}function Je(e){var t=H.macroModeState.lastInsertModeChanges,r=Qe.keyName(e);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||Qe.lookupKey(r,"vim-insert",function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new Ue(r)),!0}))}function $e(r,n,e,t){var o=H.macroModeState;o.isPlaying=!0;var i=!!n.lastEditActionCommand,a=n.inputState;function s(){i?_.processAction(r,n,n.lastEditActionCommand):_.evalInput(r,n)}function l(e){if(0<o.lastInsertModeChanges.changes.length){e=n.lastEditActionCommand?e:1;var t=o.lastInsertModeChanges;qe(r,t.changes,e)}}if(n.inputState=n.lastEditInputState,i&&n.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<e;c++)s(),l(1);else t||s(),l(e);n.inputState=a,n.insertMode&&!t&&_e(r),o.isPlaying=!1}function qe(t,e,r){function n(e){return"string"==typeof e?Qe.commands[e](t):e(t),!0}var o,i,a=t.getCursor("head"),s=H.macroModeState.lastInsertModeChanges.inVisualBlock;if(s){var l=t.state.vim.lastSelection,c=(o=l.anchor,{line:(i=l.head).line-o.line,ch:i.line-o.line});oe(t,a,c.line+1),r=t.listSelections().length,t.setCursor(a)}for(var u=0;u<r;u++){s&&t.setCursor($(a,u,0));for(var h=0;h<e.length;h++){var p=e[h];if(p instanceof Ue)Qe.lookupKey(p.keyName,"vim-insert",n);else if("string"==typeof p){var f=t.getCursor();t.replaceRange(p,f,f)}else{var d=t.getCursor(),m=$(d,0,p[0].length);t.replaceRange(p[0],d,m)}}}s&&t.setCursor($(a,0,1))}return Qe.keyMap.vim={attach:o,detach:e,call:t},M("insertModeEscKeysTimeout",200,"number"),Qe.keyMap["vim-insert"]={fallthrough:["default"],attach:o,detach:e,call:t},Qe.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:o,detach:e,call:t},E(),O}()});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(r){"use strict";var s="CodeMirror-activeline",c="CodeMirror-activeline-background",l="CodeMirror-activeline-gutter";function f(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",s),e.removeLineClass(e.state.activeLines[t],"background",c),e.removeLineClass(e.state.activeLines[t],"gutter",l)}function o(t,e){for(var n=[],i=0;i<e.length;i++){var r=e[i],o=t.getOption("styleActiveLine");if("object"==typeof o&&o.nonEmpty?r.anchor.line==r.head.line:r.empty()){var a=t.getLineHandleVisualStart(r.head.line);n[n.length-1]!=a&&n.push(a)}}(function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0})(t.state.activeLines,n)||t.operation(function(){f(t);for(var e=0;e<n.length;e++)t.addLineClass(n[e],"wrap",s),t.addLineClass(n[e],"background",c),t.addLineClass(n[e],"gutter",l);t.state.activeLines=n})}function a(e,t){o(e,t.ranges)}r.defineOption("styleActiveLine",!1,function(e,t,n){var i=n!=r.Init&&n;t!=i&&(i&&(e.off("beforeSelectionChange",a),f(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){o.defineOption("showTrailingSpace",!1,function(e,i,n){n==o.Init&&(n=!1),n&&!i?e.removeOverlay("trailingspace"):!n&&i&&e.addOverlay({token:function(e){for(var i=e.string.length,n=i;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=i,"trailingspace")},name:"trailingspace"})})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(u){function l(n){if(n.getOption("disableInput"))return u.Pass;for(var e,t=n.listSelections(),o=[],i=0;i<t.length;i++){var l=t[i].head;if(!/\bcomment\b/.test(n.getTokenTypeAt(l)))return u.Pass;var r=n.getModeAt(l);if(e){if(e!=r)return u.Pass}else e=r;var m=null;if(e.blockCommentStart&&e.blockCommentContinue){var c,f,s=(c=n.getLine(l.line).slice(0,l.ch)).lastIndexOf(e.blockCommentEnd);if(-1!=s&&s==l.ch-e.blockCommentEnd.length);else if(-1<(f=c.lastIndexOf(e.blockCommentStart))&&s<f){if(m=c.slice(0,f),/\S/.test(m)){m="";for(var a=0;a<f;++a)m+=" "}}else-1<(f=c.indexOf(e.blockCommentContinue))&&!/\S/.test(c.slice(0,f))&&(m=c.slice(0,f));null!=m&&(m+=e.blockCommentContinue)}if(null==m&&e.lineComment&&d(n))-1<(f=(c=n.getLine(l.line)).indexOf(e.lineComment))&&(m=c.slice(0,f),/\S/.test(m)?m=null:m+=e.lineComment+c.slice(f+e.lineComment.length).match(/^\s*/)[0]);if(null==m)return u.Pass;o[i]="\n"+m}n.operation(function(){for(var e=t.length-1;0<=e;e--)n.replaceRange(o[e],t[e].from(),t[e].to(),"+insert")})}function d(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}u.defineOption("continueComments",null,function(e,n,t){if(t&&t!=u.Init&&e.removeKeyMap("continueComment"),n){var o="Enter";"string"==typeof n?o=n:"object"==typeof n&&n.key&&(o=n.key);var i={name:"continueComment"};i[o]=l,e.addKeyMap(i)}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";function r(e,t){clearTimeout(t.timeout),i.off(window,"mouseup",t.hurry),i.off(window,"keyup",t.hurry)}i.defineOption("autoRefresh",!1,function(e,t){e.state.autoRefresh&&(r(e,e.state.autoRefresh),e.state.autoRefresh=null),t&&0==e.display.wrapper.offsetHeight&&function(e,t){function o(){e.display.wrapper.offsetHeight?(r(e,t),e.display.lastWrapHeight!=e.display.wrapper.clientHeight&&e.refresh()):t.timeout=setTimeout(o,t.delay)}t.timeout=setTimeout(o,t.delay),t.hurry=function(){clearTimeout(t.timeout),t.timeout=setTimeout(o,50)},i.on(window,"mouseup",t.hurry),i.on(window,"keyup",t.hurry)}(e,e.state.autoRefresh={delay:t.delay||250})})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(m){"use strict";var v=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,x=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,I=/[*+-]\s/;function w(e,n){var t=n.line,i=0,r=0,l=v.exec(e.getLine(t)),o=l[1];do{var s=t+(i+=1),a=e.getLine(s),c=v.exec(a);if(c){var d=c[1],f=parseInt(l[3],10)+i-r,u=parseInt(c[3],10),p=u;if(o!==d||isNaN(u)){if(o.length>d.length)return;if(o.length<d.length&&1===i)return;r+=1}else f===u&&(p=u+1),u<f&&(p=f+1),e.replaceRange(a.replace(v,d+p+c[4]+c[5]),{line:s,ch:0},{line:s,ch:a.length})}}while(c)}m.commands.newlineAndIndentContinueMarkdownList=function(e){if(e.getOption("disableInput"))return m.Pass;for(var n=e.listSelections(),t=[],i=0;i<n.length;i++){var r=n[i].head,l=e.getStateAfter(r.line),o=m.innerMode(e.getMode(),l);if("markdown"!==o.mode.name)return void e.execCommand("newlineAndIndent");var s=!1!==(l=o.state).list,a=0!==l.quote,c=e.getLine(r.line),d=v.exec(c),f=/^\s*$/.test(c.slice(0,r.ch));if(!n[i].empty()||!s&&!a||!d||f)return void e.execCommand("newlineAndIndent");if(x.test(c))/>\s*$/.test(c)||e.replaceRange("",{line:r.line,ch:0},{line:r.line,ch:r.ch+1}),t[i]="\n";else{var u=d[1],p=d[5],g=!(I.test(d[2])||0<=d[2].indexOf(">")),h=g?parseInt(d[3],10)+1+d[4]:d[2].replace("x"," ");t[i]="\n"+u+h+p,g&&w(e,r)}}e.replaceSelections(t)}});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}(function(l){"use strict";var p={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};l.registerHelper("hint","css",function(e){var r=e.getCursor(),t=e.getTokenAt(r),o=l.innerMode(e.getMode(),t.state);if("css"==o.mode.name){if("keyword"==t.type&&0=="!important".indexOf(t.string))return{list:["!important"],from:l.Pos(r.line,t.start),to:l.Pos(r.line,t.end)};var s=t.start,i=r.ch,n=t.string.slice(0,i-s);/[^\w$_-]/.test(n)&&(n="",s=i=r.ch);var a=l.resolveMode("text/css"),d=[],c=o.state.state;return"pseudo"==c||"variable-3"==t.type?f(p):"block"==c||"maybeprop"==c?f(a.propertyKeywords):"prop"==c||"parens"==c||"at"==c||"params"==c?(f(a.valueKeywords),f(a.colorKeywords)):"media"!=c&&"media_parens"!=c||(f(a.mediaTypes),f(a.mediaFeatures)),d.length?{list:d,from:l.Pos(r.line,s),to:l.Pos(r.line,i)}:void 0}function f(e){for(var r in e)n&&0!=r.lastIndexOf(n,0)||d.push(r)}})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}(function(d){"use strict";var g,h,v,x,m={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},b=d.Pos,y=d.cmpPos;function C(t){return"[object Array]"==Object.prototype.toString.call(t)}function A(t){return"string"==typeof t?t:t.text}function q(t,e){return C(e)&&(e={columns:e}),e.text||(e.text=t),e}function U(t){return g[t.toUpperCase()]}function j(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function a(t,e){var r=t.length,n=A(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function w(t,e,r,n){if(C(r))for(var o=0;o<r.length;o++)a(e,r[o])&&t.push(n(r[o]));else for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];a(e,s=s&&!0!==s?s.displayText?{text:s.text,displayText:s.displayText}:s.text:i)&&t.push(n(s))}}function O(t){"."==t.charAt(0)&&(t=t.substr(1));for(var e=t.split(x+x),r=0;r<e.length;r++)e[r]=e[r].replace(new RegExp(x,"g"),"");return e.join(x)}function L(t){for(var e=A(t).split("."),r=0;r<e.length;r++)e[r]=x+e[r].replace(new RegExp(x,"g"),x+x)+x;var n=e.join(".");return"string"==typeof t?n:((t=j(t)).text=n,t)}function R(t,e){for(var r=t.split(/\s+/),n=0;n<r.length;n++)r[n]&&e(r[n].replace(/[,;]/g,""))}function k(t,e){for(var r=e.doc,n=r.getValue(),o=t.toUpperCase(),i="",s="",a=[],l={start:b(0,0),end:b(e.lastLine(),e.getLineHandle(e.lastLine()).length)},u=n.indexOf(m.QUERY_DIV);-1!=u;)a.push(r.posFromIndex(u)),u=n.indexOf(m.QUERY_DIV,u+1);a.unshift(b(0,0)),a.push(b(e.lastLine(),e.getLineHandle(e.lastLine()).text.length));for(var f=null,c=e.getCursor(),p=0;p<a.length;p++){if((null==f||0<y(c,f))&&y(c,a[p])<=0){l={start:f,end:a[p]};break}f=a[p]}if(l.start){var d=r.getRange(l.start,l.end,!1);for(p=0;p<d.length;p++){if(R(d[p],function(t){var e=t.toUpperCase();e===o&&U(i)&&(s=i),e!==m.ALIAS_KEYWORD&&(i=t)}),s)break}}return s}d.registerHelper("hint","sql",function(t,e){g=function(t){var e={};if(C(t))for(var r=t.length-1;0<=r;r--){var n=t[r];e[A(n).toUpperCase()]=q(A(n),n)}else if(t)for(var o in t)e[o.toUpperCase()]=q(o,t[o]);return e}(e&&e.tables);var r,n,o=e&&e.defaultTable,i=e&&e.disableKeywords;h=o&&U(o),"sql"===(r=t.doc.modeOption)&&(r="text/x-sql"),v=d.resolveMode(r).keywords,"sql"===(n=t.doc.modeOption)&&(n="text/x-sql"),x=d.resolveMode(n).identifierQuote||"`",o&&!h&&(h=k(o,t)),(h=h||[]).columns&&(h=h.columns);var s,a,l,u=t.getCursor(),f=[],c=t.getTokenAt(u);if(c.end>u.ch&&(c.end=u.ch,c.string=c.string.slice(0,u.ch-c.start)),c.string.match(/^[.`"\w@]\w*$/)?(l=c.string,s=c.start,a=c.end):(s=a=u.ch,l=""),"."==l.charAt(0)||l.charAt(0)==x)s=function(t,e,r,n){for(var o=!1,i=[],s=e.start,a=!0;a;)a="."==e.string.charAt(0),o=o||e.string.charAt(0)==x,s=e.start,i.unshift(O(e.string)),"."==(e=n.getTokenAt(b(t.line,e.start))).string&&(a=!0,e=n.getTokenAt(b(t.line,e.start)));var l=i.join(".");w(r,l,g,function(t){return o?L(t):t}),w(r,l,h,function(t){return o?L(t):t}),l=i.pop();var u=i.join("."),f=!1,c=u;if(!U(u)){var p=u;(u=k(u,n))!==p&&(f=!0)}var d=U(u);return d&&d.columns&&(d=d.columns),d&&w(r,l,d,function(t){var e=u;return 1==f&&(e=c),"string"==typeof t?t=e+"."+t:(t=j(t)).text=e+"."+t.text,o?L(t):t}),s}(u,c,f,t);else{var p=function(t,e){return"object"==typeof t?t.className=e:t={text:t,className:e},t};w(f,l,h,function(t){return p(t,"CodeMirror-hint-table CodeMirror-hint-default-table")}),w(f,l,g,function(t){return p(t,"CodeMirror-hint-table")}),i||w(f,l,v,function(t){return p(t.toUpperCase(),"CodeMirror-hint-keyword")})}return{list:f,from:b(u.line,s),to:b(u.line,a)}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(f){"use strict";f.registerHelper("lint","coffeescript",function(e){var o=[];if(!window.coffeelint)return window.console&&window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run."),o;var r,i;try{for(var n=coffeelint.lint(e),t=0;t<n.length;t++)r=n[t],void 0,i=r.lineNumber,o.push({from:f.Pos(i-1,0),to:f.Pos(i,0),severity:r.level,message:r.message})}catch(e){o.push({from:f.Pos(e.location.first_line,0),to:f.Pos(e.location.last_line,e.location.last_column),severity:"error",message:e.message})}return o})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("htmlhint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","htmlhint"],e):e(CodeMirror,window.HTMLHint)}(function(c,s){"use strict";var f={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};c.registerHelper("lint","html",function(e,r){var o=[];if(s&&!s.verify&&(s=void 0!==s.default?s.default:s.HTMLHint),s||(s=window.HTMLHint),!s)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),o;for(var t=s.verify(e,r&&r.rules||f),i=0;i<t.length;i++){var n=t[i],a=n.line-1,l=n.line-1,d=n.col-1,u=n.col;o.push({from:c.Pos(a,d),to:c.Pos(l,u),message:n.message,severity:n.type})}return o})});;
  ;!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}(function(t){"use strict";t.registerHelper("lint","yaml",function(o){var e=[];if(!window.jsyaml)return window.console&&window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."),e;try{jsyaml.loadAll(o)}catch(o){var r=o.mark,n=r?t.Pos(r.line,r.column):t.Pos(0,0),i=n;e.push({from:n,to:i,message:o.message})}return e})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./runmode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./runmode"],e):e(CodeMirror)}(function(d){"use strict";var n=/^(p|li|div|h\\d|pre|blockquote|td)$/;function u(e,o){if(3==e.nodeType)return o.push(e.nodeValue);for(var r=e.firstChild;r;r=r.nextSibling)u(r,o),n.test(e.nodeType)&&o.push("\n")}d.colorize=function(e,o){e||(e=document.body.getElementsByTagName("pre"));for(var r=0;r<e.length;++r){var n=e[r],t=n.getAttribute("data-lang")||o;if(t){var i=[];u(n,i),n.innerHTML="",d.runMode(i.join(""),t,n),n.className+=" cm-s-default"}}}});;
  ;window.CodeMirror={},function(){"use strict";function t(t){this.pos=this.start=0,this.string=t,this.lineStart=0}t.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||null},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(t){var r=this.string.charAt(this.pos);if("string"==typeof t)var e=r==t;else e=r&&(t.test?t.test(r):t(r));if(e)return++this.pos,r},eatWhile:function(t){for(var r=this.pos;this.eat(t););return this.pos>r},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var r=this.string.indexOf(t,this.pos);if(-1<r)return this.pos=r,!0},backUp:function(t){this.pos-=t},column:function(){return this.start-this.lineStart},indentation:function(){return 0},match:function(t,r,e){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&0<n.index?null:(n&&!1!==r&&(this.pos+=n[0].length),n)}var i=function(t){return e?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==r&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,r){this.lineStart+=t;try{return r()}finally{this.lineStart-=t}},lookAhead:function(){return null}},CodeMirror.StringStream=t,CodeMirror.startState=function(t,r,e){return!t.startState||t.startState(r,e)};var n=CodeMirror.modes={},e=CodeMirror.mimeModes={};CodeMirror.defineMode=function(t,r){2<arguments.length&&(r.dependencies=Array.prototype.slice.call(arguments,2)),n[t]=r},CodeMirror.defineMIME=function(t,r){e[t]=r},CodeMirror.resolveMode=function(t){return"string"==typeof t&&e.hasOwnProperty(t)?t=e[t]:t&&"string"==typeof t.name&&e.hasOwnProperty(t.name)&&(t=e[t.name]),"string"==typeof t?{name:t}:t||{name:"null"}},CodeMirror.getMode=function(t,r){r=CodeMirror.resolveMode(r);var e=n[r.name];if(!e)throw new Error("Unknown mode: "+r);return e(t,r)},CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null"),CodeMirror.runMode=function(t,r,e,n){var i=CodeMirror.getMode({indentUnit:2},r);if(1==e.nodeType){var h=n&&n.tabSize||4,u=e,d=0;u.innerHTML="",e=function(t,r){if("\n"==t)return u.appendChild(document.createElement("br")),void(d=0);for(var e="",n=0;;){var i=t.indexOf("\t",n);if(-1==i){e+=t.slice(n),d+=t.length-n;break}d+=i-n,e+=t.slice(n,i);var o=h-d%h;d+=o;for(var s=0;s<o;++s)e+=" ";n=i+1}if(r){var a=u.appendChild(document.createElement("span"));a.className="cm-"+r.replace(/ +/g," cm-"),a.appendChild(document.createTextNode(e))}else u.appendChild(document.createTextNode(e))}}for(var o=t.split(/\r?\n|\r/),s=n&&n.state||CodeMirror.startState(i),a=0,l=o.length;a<l;++a){a&&e("\n");var c=new CodeMirror.StringStream(o[a]);for(!c.string&&i.blankLine&&i.blankLine(s);!c.eol();){var f=i.token(c,s);e(c.current(),f,a,c.start,s),c.start=c.pos}}}}();;
  ;function splitLines(t){return t.split(/\r\n?|\n/)}var countColumn=exports.countColumn=function(t,e,n,s,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var i=s||0,o=r||0;;){var a=t.indexOf("\t",i);if(a<0||e<=a)return o+(e-i);o+=a-i,o+=n-o%n,i=a+1}};function StringStream(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.context=n}StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(t){var e=this.string.charAt(this.pos);if("string"==typeof t)var n=e==t;else n=e&&(t.test?t.test(e):t(e));if(n)return++this.pos,e},eatWhile:function(t){for(var e=this.pos;this.eat(t););return this.pos>e},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(-1<e)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},match:function(t,e,n){if("string"!=typeof t){var s=this.string.slice(this.pos).match(t);return s&&0<s.index?null:(s&&!1!==e&&(this.pos+=s[0].length),s)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},lookAhead:function(t){var e=this.context.line+t;return e>=this.context.lines.length?null:this.context.lines[e]}},exports.StringStream=StringStream,exports.startState=function(t,e,n){return!t.startState||t.startState(e,n)};var modes=exports.modes={},mimeModes=exports.mimeModes={};function copyObj(t,e,n){for(var s in e||(e={}),t)!t.hasOwnProperty(s)||!1===n&&e.hasOwnProperty(s)||(e[s]=t[s]);return e}exports.defineMode=function(t,e){2<arguments.length&&(e.dependencies=Array.prototype.slice.call(arguments,2)),modes[t]=e},exports.defineMIME=function(t,e){mimeModes[t]=e},exports.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),exports.defineMIME("text/plain","null"),exports.resolveMode=function(t){return"string"==typeof t&&mimeModes.hasOwnProperty(t)?t=mimeModes[t]:t&&"string"==typeof t.name&&mimeModes.hasOwnProperty(t.name)&&(t=mimeModes[t.name]),"string"==typeof t?{name:t}:t||{name:"null"}};var modeExtensions=exports.modeExtensions={};exports.extendMode=function(t,e){copyObj(e,modeExtensions.hasOwnProperty(t)?modeExtensions[t]:modeExtensions[t]={})},exports.getMode=function(t,e){e=exports.resolveMode(e);var n=modes[e.name];if(!n)return exports.getMode(t,"text/plain");var s=n(t,e);if(modeExtensions.hasOwnProperty(e.name)){var r=modeExtensions[e.name];for(var i in r)r.hasOwnProperty(i)&&(s.hasOwnProperty(i)&&(s["_"+i]=s[i]),s[i]=r[i])}if(s.name=e.name,e.helperType&&(s.helperType=e.helperType),e.modeProps)for(var i in e.modeProps)s[i]=e.modeProps[i];return s},exports.innerMode=function(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}},exports.registerHelper=exports.registerGlobalHelper=Math.min,exports.runMode=function(t,e,n,s){for(var r=exports.getMode({indentUnit:2},e),i=splitLines(t),o=s&&s.state||exports.startState(r),a={lines:i,line:0},h=0,u=i.length;h<u;++h,++a.line){h&&n("\n");var l=new exports.StringStream(i[h],4,a);for(!l.string&&r.blankLine&&r.blankLine(o);!l.eol();){var p=r.token(l,o);n(l.current(),p,h,l.start,o),l.start=l.pos}}},require.cache[require.resolve("../../lib/codemirror")]=require.cache[require.resolve("./runmode.node")],require.cache[require.resolve("../../addon/runmode/runmode")]=require.cache[require.resolve("./runmode.node")];;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";function o(e,n){i.changeEnd(n).line==e.lastLine()&&d(e)}function d(e){var n="";1<e.lineCount()&&(n=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px");e.state.scrollPastEndPadding!=n&&(e.state.scrollPastEndPadding=n,e.display.lineSpace.parentNode.style.paddingBottom=n,e.off("refresh",d),e.setSize(),e.on("refresh",d))}i.defineOption("scrollPastEnd",!1,function(e,n,t){t&&t!=i.Init&&(e.off("change",o),e.off("refresh",d),e.display.lineSpace.parentNode.style.paddingBottom="",e.state.scrollPastEndPadding=null),n&&(e.on("change",o),e.on("refresh",d),d(e))})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(n){"use strict";function i(e){e.state.selectionPointer.rects=null,l(e)}function l(e){e.state.selectionPointer.willUpdate||(e.state.selectionPointer.willUpdate=!0,setTimeout(function(){!function(e){var t=e.state.selectionPointer;if(!t)return;if(null==t.rects&&null!=t.mouseX&&(t.rects=[],e.somethingSelected()))for(var o=e.display.selectionDiv.firstChild;o;o=o.nextSibling)t.rects.push(o.getBoundingClientRect());var n=!1;if(null!=t.mouseX)for(var i=0;i<t.rects.length;i++){var l=t.rects[i];l.left<=t.mouseX&&l.right>=t.mouseX&&l.top<=t.mouseY&&l.bottom>=t.mouseY&&(n=!0)}var s=n?t.value:"";e.display.lineDiv.style.cursor!=s&&(e.display.lineDiv.style.cursor=s)}(e),e.state.selectionPointer.willUpdate=!1},50))}n.defineOption("selectionPointer",!1,function(t,e){var o=t.state.selectionPointer;o&&(n.off(t.getWrapperElement(),"mousemove",o.mousemove),n.off(t.getWrapperElement(),"mouseout",o.mouseout),n.off(window,"scroll",o.windowScroll),t.off("cursorActivity",i),t.off("scroll",i),t.state.selectionPointer=null,t.display.lineDiv.style.cursor=""),e&&(o=t.state.selectionPointer={value:"string"==typeof e?e:"default",mousemove:function(e){!function(e,t){var o=e.state.selectionPointer;(null==t.buttons?t.which:t.buttons)?o.mouseX=o.mouseY=null:(o.mouseX=t.clientX,o.mouseY=t.clientY);l(e)}(t,e)},mouseout:function(e){!function(e,t){if(!e.getWrapperElement().contains(t.relatedTarget)){var o=e.state.selectionPointer;o.mouseX=o.mouseY=null,l(e)}}(t,e)},windowScroll:function(){i(t)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},n.on(t.getWrapperElement(),"mousemove",o.mousemove),n.on(t.getWrapperElement(),"mouseout",o.mouseout),n.on(window,"scroll",o.windowScroll),t.on("cursorActivity",i),t.on("scroll",i))})});;
  ;var server;this.onmessage=function(e){var r=e.data;switch(r.type){case"init":return startServer(r.defs,r.plugins,r.scripts);case"add":return server.addFile(r.name,r.text);case"del":return server.delFile(r.name);case"req":return server.request(r.body,function(e,t){postMessage({id:r.id,body:t,err:e&&String(e)})});case"getFile":var t=pending[r.id];return delete pending[r.id],t(r.err,r.text);default:throw new Error("Unknown message type: "+r.type)}};var nextId=0,pending={};function getFile(e,t){postMessage({type:"getFile",name:e,id:++nextId}),pending[nextId]=t}function startServer(e,t,r){r&&importScripts.apply(null,r),server=new tern.Server({getFile:getFile,async:!0,defs:e,plugins:t})}this.console={log:function(e){postMessage({type:"debug",message:e})}};;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("apl",function(){var i={".":"innerProduct","\\":"scan","/":"reduce","⌿":"reduce1Axis","⍀":"scan1Axis","¨":"each","⍣":"power"},o={"+":["conjugate","add"],"−":["negate","subtract"],"×":["signOf","multiply"],"÷":["reciprocal","divide"],"⌈":["ceiling","greaterOf"],"⌊":["floor","lesserOf"],"∣":["absolute","residue"],"⍳":["indexGenerate","indexOf"],"?":["roll","deal"],"⋆":["exponentiate","toThePowerOf"],"⍟":["naturalLog","logToTheBase"],"○":["piTimes","circularFuncs"],"!":["factorial","binomial"],"⌹":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"≤":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"≥":[null,"greaterThanOrEqual"],"≠":[null,"notEqual"],"≡":["depth","match"],"≢":[null,"notMatch"],"∈":["enlist","membership"],"⍷":[null,"find"],"∪":["unique","union"],"∩":[null,"intersection"],"∼":["not","without"],"∨":[null,"or"],"∧":[null,"and"],"⍱":[null,"nor"],"⍲":[null,"nand"],"⍴":["shapeOf","reshape"],",":["ravel","catenate"],"⍪":[null,"firstAxisCatenate"],"⌽":["reverse","rotate"],"⊖":["axis1Reverse","axis1Rotate"],"⍉":["transpose",null],"↑":["first","take"],"↓":[null,"drop"],"⊂":["enclose","partitionWithAxis"],"⊃":["diclose","pick"],"⌷":[null,"index"],"⍋":["gradeUp",null],"⍒":["gradeDown",null],"⊤":["encode",null],"⊥":["decode",null],"⍕":["format","formatByExample"],"⍎":["execute",null],"⊣":["stop","left"],"⊢":["pass","right"]},u=/[\.\/⌿⍀¨⍣]/,s=/⍬/,c=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,p=/←/,d=/[⍝#].*$/;return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(e,n){var t,l,r,a;return e.eatSpace()?null:'"'===(t=e.next())||"'"===t?(e.eatWhile((r=t,a=!1,function(e){return(a=e)!==r||"\\"===a})),e.next(),n.prev=!0,"string"):/[\[{\(]/.test(t)?(n.prev=!1,null):/[\]}\)]/.test(t)?(n.prev=!0,null):s.test(t)?(n.prev=!1,"niladic"):/[¯\d]/.test(t)?(n.func?(n.func=!1,n.prev=!1):n.prev=!0,e.eatWhile(/[\w\.]/),"number"):u.test(t)?"operator apl-"+i[t]:p.test(t)?"apl-arrow":c.test(t)?(l="apl-",null!=o[t]&&(n.prev?l+=o[t][1]:l+=o[t][0]),n.func=!0,n.prev=!1,"function "+l):d.test(t)?(e.skipToEnd(),"comment"):"∘"===t&&"."===e.peek()?(e.next(),"function jot-dot"):(e.eatWhile(/[\w\$_]/),n.prev=!0,"keyword")}}}),e.defineMIME("text/apl","apl")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function i(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}e.defineMode("asciiarmor",function(){return{token:function(e,t){var r;if("top"==t.state)return e.sol()&&(r=e.match(/^-----BEGIN (.*)?-----\s*$/))?(t.state="headers",t.type=r[1],"tag"):i(e);if("headers"!=t.state)return"header"==t.state?(e.skipToEnd(),t.state="headers","string"):"body"==t.state?e.sol()&&(r=e.match(/^-----END (.*)?-----\s*$/))?r[1]!=t.type?"error":(t.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error"):"end"==t.state?i(e):void 0;if(e.sol()&&e.match(/^\w+:/))return t.state="header","atom";var a=i(e);return a&&(t.state="body"),a},blankLine:function(e){"headers"==e.state&&(e.state="body")},startState:function(){return{state:"top",type:null}}}}),e.defineMIME("application/pgp","asciiarmor"),e.defineMIME("application/pgp-encrypted","asciiarmor"),e.defineMIME("application/pgp-keys","asciiarmor"),e.defineMIME("application/pgp-signature","asciiarmor")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}e.defineMode("asn.1",function(e,t){var i,n=e.indentUnit,o=t.keywords||{},a=t.cmipVerbs||{},s=t.compareTypes||{},I=t.status||{},T=t.tags||{},u=t.storage||{},S=t.modifier||{},l=t.accessTypes||{},c=t.multiLineStrings,E=!1!==t.indentStatements,A=/[\|\^]/;function p(e,t){var E,n=e.next();if('"'==n||"'"==n)return t.tokenize=(E=n,function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==E&&!r){var o=e.peek();o&&("b"!=(o=o.toLowerCase())&&"h"!=o&&"o"!=o||e.next()),i=!0;break}r=!r&&"\\"==n}return(i||!r&&!c)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]\(\){}:=,;]/.test(n))return i=n,"punctuation";if("-"==n&&e.eat("-"))return e.skipToEnd(),"comment";if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(A.test(n))return e.eatWhile(A),"operator";e.eatWhile(/[\w\-]/);var r=e.current();return o.propertyIsEnumerable(r)?"keyword":a.propertyIsEnumerable(r)?"variable cmipVerbs":s.propertyIsEnumerable(r)?"atom compareTypes":I.propertyIsEnumerable(r)?"comment status":T.propertyIsEnumerable(r)?"variable-3 tags":u.propertyIsEnumerable(r)?"builtin storage":S.propertyIsEnumerable(r)?"string-2 modifier":l.propertyIsEnumerable(r)?"atom accessTypes":"variable"}function N(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function m(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new N(r,t,n,null,e.context)}function O(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new N((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;i=null;var r=(t.tokenize||p)(e,t);if("comment"==r)return r;if(null==n.align&&(n.align=!0),";"!=i&&":"!=i&&","!=i||"statement"!=n.type)if("{"==i)m(t,e.column(),"}");else if("["==i)m(t,e.column(),"]");else if("("==i)m(t,e.column(),")");else if("}"==i){for(;"statement"==n.type;)n=O(t);for("}"==n.type&&(n=O(t));"statement"==n.type;)n=O(t)}else i==n.type?O(t):E&&(("}"==n.type||"top"==n.type)&&";"!=i||"statement"==n.type&&"newstatement"==i)&&m(t,e.column(),"statement");else O(t);return t.startOfLine=!1,r},electricChars:"{}",lineComment:"--",fold:"brace"}}),e.defineMIME("text/x-ttcn-asn",{name:"asn.1",keywords:t("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),cmipVerbs:t("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),compareTypes:t("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),status:t("current deprecated mandatory obsolete"),tags:t("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),storage:t("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminAtring TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),modifier:t("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),accessTypes:t("not-accessible accessible-for-notify read-only read-create read-write"),multiLineStrings:!0})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("asterisk",function(){var a=["exten","same","include","ignorepat","switch"],r=["#include","#exec"],n=["addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi","alarmreceiver","amd","answer","authenticate","background","backgrounddetect","bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent","changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge","congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge","dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility","datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa","dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy","externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif","goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete","ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus","jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme","meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete","minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode","mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish","originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce","parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones","privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten","readfile","receivefax","receivefax","receivefax","record","removequeuemember","resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun","saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax","sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags","setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel","slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground","speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound","speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor","stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec","trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate","vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring","waitforsilence","waitmusiconhold","waituntil","while","zapateller"];return{startState:function(){return{extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(e,t){var i="";return e.eatSpace()?null:t.extenStart?(e.eatWhile(/[^\s]/),i=e.current(),/^=>?$/.test(i)?(t.extenExten=!0,t.extenStart=!1,"strong"):(t.extenStart=!1,e.skipToEnd(),"error")):t.extenExten?(t.extenExten=!1,t.extenPriority=!0,e.eatWhile(/[^,]/),t.extenInclude&&(e.skipToEnd(),t.extenPriority=!1,t.extenInclude=!1),t.extenSame&&(t.extenPriority=!1,t.extenSame=!1,t.extenApplication=!0),"tag"):t.extenPriority?(t.extenPriority=!1,t.extenApplication=!0,e.next(),t.extenSame?null:(e.eatWhile(/[^,]/),"number")):t.extenApplication?(e.eatWhile(/,/),","===(i=e.current())?null:(e.eatWhile(/\w/),i=e.current().toLowerCase(),t.extenApplication=!1,-1!==n.indexOf(i)?"def strong":null)):function(e,t){var i="",n=e.next();if(";"==n)return e.skipToEnd(),"comment";if("["==n)return e.skipTo("]"),e.eat("]"),"header";if('"'==n)return e.skipTo('"'),"string";if("'"==n)return e.skipTo("'"),"string-2";if("#"==n&&(e.eatWhile(/\w/),i=e.current(),-1!==r.indexOf(i)))return e.skipToEnd(),"strong";if("$"==n&&"{"==e.peek())return e.skipTo("}"),e.eat("}"),"variable-3";if(e.eatWhile(/\w/),i=e.current(),-1!==a.indexOf(i)){switch(t.extenStart=!0,i){case"same":t.extenSame=!0;break;case"include":case"switch":case"ignorepat":t.extenInclude=!0}return"atom"}}(e,t)}}}),e.defineMIME("text/x-asterisk","asterisk")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var o="><+-.,[]".split("");e.defineMode("brainfuck",function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(e,n){if(e.eatSpace())return null;e.sol()&&(n.commentLine=!1);var t=e.next().toString();return-1===o.indexOf(t)?(n.commentLine=!0,e.eol()&&(n.commentLine=!1),"comment"):!0===n.commentLine?(e.eol()&&(n.commentLine=!1),"comment"):"]"===t||"["===t?("["===t?n.left++:n.right++,"bracket"):"+"===t||"-"===t?"keyword":"<"===t||">"===t?"atom":"."===t||","===t?"def":void(e.eol()&&(n.commentLine=!1))}}}),e.defineMIME("text/x-brainfuck","brainfuck")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(b){"use strict";b.defineMode("clojure",function(s){var e=["false","nil","true"],t=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],n=["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"];b.registerHelper("hintWords","clojure",[].concat(e,t,n));var a=r(e),o=r(t),i=r(n),c=r(["->","->>","as->","binding","bound-fn","case","catch","comment","cond","cond->","cond->>","condp","def","definterface","defmethod","defn","defmacro","defprotocol","defrecord","defstruct","deftype","do","doseq","dotimes","doto","extend","extend-protocol","extend-type","fn","for","future","if","if-let","if-not","if-some","let","letfn","locking","loop","ns","proxy","reify","struct-map","some->","some->>","try","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn"]),d=/^(?:[\\\[\]\s"(),;@^`{}~]|$)/,l=/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,u=/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,p=/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;function m(e,t){if(e.eatSpace())return["space",null];if(e.match(l))return[null,"number"];if(e.match(u))return[null,"string-2"];if(e.eat(/^"/))return(t.tokenize=f)(e,t);if(e.eat(/^[(\[{]/))return["open","bracket"];if(e.eat(/^[)\]}]/))return["close","bracket"];if(e.eat(/^;/))return e.skipToEnd(),["space","comment"];if(e.eat(/^[#'@^`~]/))return[null,"meta"];var n=e.match(p),r=n&&n[0];return r?"comment"===r&&"("===t.lastToken?(t.tokenize=h)(e,t):y(r,a)||":"===r.charAt(0)?["symbol","atom"]:y(r,o)||y(r,i)?["symbol","keyword"]:"("===t.lastToken?["symbol","builtin"]:["symbol","variable"]:(e.next(),e.eatWhile(function(e){return!y(e,d)}),[null,"error"])}function f(e,t){for(var n,r=!1;n=e.next();){if('"'===n&&!r){t.tokenize=m;break}r=!r&&"\\"===n}return[null,"string"]}function h(e,t){for(var n,r=1;n=e.next();)if(")"===n&&r--,"("===n&&r++,0===r){e.backUp(1),t.tokenize=m;break}return["space","comment"]}function r(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function y(e,t){return t instanceof RegExp?t.test(e):t instanceof Object?t.propertyIsEnumerable(e):void 0}return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastToken:null,tokenize:m}},token:function(e,t){e.sol()&&"number"!=typeof t.ctx.indentTo&&(t.ctx.indentTo=t.ctx.start+1);var n=t.tokenize(e,t),r=n[0],a=n[1],o=e.current();return"space"!==r&&("("===t.lastToken&&null===t.ctx.indentTo?"symbol"===r&&y(o,c)?t.ctx.indentTo=t.ctx.start+s.indentUnit:t.ctx.indentTo="next":"next"===t.ctx.indentTo&&(t.ctx.indentTo=e.column()),t.lastToken=o),"open"===r?t.ctx={prev:t.ctx,start:e.column(),indentTo:null}:"close"===r&&(t.ctx=t.ctx.prev||t.ctx),a},indent:function(e){var t=e.ctx.indentTo;return"number"==typeof t?t:e.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),b.defineMIME("text/x-clojure","clojure"),b.defineMIME("text/x-clojurescript","clojure"),b.defineMIME("application/edn","clojure")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("cmake",function(){var o=/({)?[a-zA-Z0-9_]+(})?/;function c(e,n){for(var t,i,r=!1;!e.eol()&&(t=e.next())!=n.pending;){if("$"===t&&"\\"!=i&&'"'==n.pending){r=!0;break}i=t}return r&&e.backUp(1),t==n.pending?n.continueString=!1:n.continueString=!0,"string"}return{startState:function(){var e={inDefinition:!1,inInclude:!1,continueString:!1,pending:!1};return e},token:function(e,n){return e.eatSpace()?null:(i=n,"$"===(r=(t=e).next())?t.match(o)?"variable-2":"variable":i.continueString?(t.backUp(1),c(t,i)):t.match(/(\s+)?\w+\(/)||t.match(/(\s+)?\w+\ \(/)?(t.backUp(1),"def"):"#"==r?(t.skipToEnd(),"comment"):"'"==r||'"'==r?(i.pending=r,c(t,i)):"("==r||")"==r?"bracket":r.match(/[0-9]/)?"number":(t.eatWhile(/[\w-]/),null));var t,i,r}}}),e.defineMIME("text/x-cmake","cmake")});;
  ;!function(E){"object"==typeof exports&&"object"==typeof module?E(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],E):E(CodeMirror)}(function(E){"use strict";E.defineMode("cobol",function(){var L="string",D="atom";function E(E){for(var T={},I=E.split(" "),N=0;N<I.length;++N)T[I[N]]=!0;return T}var S=E("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "),U=E("ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALIAS ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT ATTRIBUTE AUTHOR AUTO AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP BEFORE BELL BINARY BIT BITS BLANK BLINK BLOCK BOOLEAN BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-0 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EBCDIC EGI EJECT ELSE EMI EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE END-XML ENTER ENTRY ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL FILE-STREAM FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID INVOKE IS JUST JUSTIFIED KANJI KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE LOCALE LOCALLY LOCK MEMBER MEMORY MERGE MESSAGE METACLASS MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PARSE PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PREFIX PRESENT PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS RECURSIVE REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REPOSITORY REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO REVERSED REWIND REWRITE RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TYPE TYPEDEF UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING VLR WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE XML XML-CODE XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL "),P=E("- * ** / + < <= = > >= "),e={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+\-]/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(E,T){if(null==T.indentStack&&E.sol()&&(T.indentation=6),E.eatSpace())return null;var I,N,R=null;switch(T.mode){case"string":for(var A=!1;null!=(A=E.next());)if('"'==A||"'"==A){T.mode=!1;break}R=L;break;default:var O=E.next(),C=E.column();if(0<=C&&C<=5)R="def";else if(72<=C&&C<=79)E.skipToEnd(),R="header";else if("*"==O&&6==C)E.skipToEnd(),R="comment";else if('"'==O||"'"==O)T.mode="string",R=L;else if("'"!=O||e.digit_or_colon.test(E.peek()))if("."==O)R="link";else if(N=E,"0"===(I=O)&&N.eat(/x/i)?(N.eatWhile(e.hex),1):("+"!=I&&"-"!=I||!e.digit.test(N.peek())||(N.eat(e.sign),I=N.next()),e.digit.test(I)&&(N.eat(I),N.eatWhile(e.digit),"."==N.peek()&&(N.eat("."),N.eatWhile(e.digit)),N.eat(e.exponent)&&(N.eat(e.sign),N.eatWhile(e.digit)),1)))R="number";else{if(E.current().match(e.symbol))for(;C<71&&void 0!==E.eat(e.symbol);)C++;R=U&&U.propertyIsEnumerable(E.current().toUpperCase())?"keyword":P&&P.propertyIsEnumerable(E.current().toUpperCase())?"builtin":S&&S.propertyIsEnumerable(E.current().toUpperCase())?D:null}else R=D}return R},indent:function(E){return null==E.indentStack?E.indentation:E.indentStack.indent}}}),E.defineMIME("text/x-cobol","cobol")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("coffeescript",function(f,i){var p="error";function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var a=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,s=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,u=/^[_A-Za-z$][_A-Za-z$0-9]*/,l=/^@[_A-Za-z$][_A-Za-z$0-9]*/,d=e(["and","or","not","is","isnt","in","instanceof","typeof"]),c=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],m=e(c.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));c=e(c);var h=/^('{3}|\"{3}|['\"])/,v=/^(\/{3}|\/)/,k=e(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function y(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var n=t.scope.offset;if(e.eatSpace()){var r=e.indentation();return n<r&&"coffee"==t.scope.type?"indent":r<n?"dedent":null}0<n&&x(e,t)}if(e.eatSpace())return null;var o=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=b,t.tokenize(e,t);if("#"===o)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var i=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^-?\d+\.\d*/)&&(i=!0),e.match(/^-?\.\d+/)&&(i=!0),i)return"."==e.peek()&&e.backUp(1),"number";var c=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(c=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(c=!0),e.match(/^-?0(?![\dx])/i)&&(c=!0),c)return"number"}if(e.match(h))return t.tokenize=g(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(v)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=g(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(a)||e.match(d)?"operator":e.match(s)?"punctuation":e.match(k)?"atom":e.match(l)||t.prop&&e.match(u)?"property":e.match(m)?"keyword":e.match(u)?"variable":(e.next(),p)}function g(n,r,o){return function(e,t){for(;!e.eol();)if(e.eatWhile(/[^'"\/\\]/),e.eat("\\")){if(e.next(),r&&e.eol())return o}else{if(e.match(n))return t.tokenize=y,o;e.eat(/['"\/]/)}return r&&(i.singleLineStringErrors?o=p:t.tokenize=y),o}}function b(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=y;break}e.eatWhile("#")}return"comment"}function z(e,t,n){n=n||"coffee";for(var r=0,o=!1,i=null,c=t.scope;c;c=c.prev)if("coffee"===c.type||"}"==c.type){r=c.offset+f.indentUnit;break}"coffee"!==n?(o=null,i=e.column()+e.current().length):t.scope.align&&(t.scope.align=!1),t.scope={offset:r,type:n,prev:t.scope,align:o,alignOffset:i}}function x(e,t){if(t.scope.prev){if("coffee"!==t.scope.type)return t.scope=t.scope.prev,!1;for(var n=e.indentation(),r=!1,o=t.scope;o;o=o.prev)if(n===o.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}}return{startState:function(e){return{tokenize:y,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var n=null===t.scope.align&&t.scope;n&&e.sol()&&(n.align=!1);var r=function(e,t){var n=t.tokenize(e,t),r=e.current();"return"===r&&(t.dedent=!0),(("->"===r||"=>"===r)&&e.eol()||"indent"===n)&&z(e,t);var o="[({".indexOf(r);if(-1!==o&&z(e,t,"])}".slice(o,o+1)),c.exec(r)&&z(e,t),"then"==r&&x(e,t),"dedent"===n&&x(e,t))return p;if(-1!==(o="])}".indexOf(r))){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==r&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),n}(e,t);return r&&"comment"!=r&&(n&&(n.align=!0),t.prop="punctuation"==r&&"."==e.current()),r},indent:function(e,t){if(e.tokenize!=y)return 0;var n=e.scope,r=t&&-1<"])}".indexOf(t.charAt(0));if(r)for(;"coffee"==n.type&&n.prev;)n=n.prev;var o=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(o?1:0):(o?n.prev:n).offset},lineComment:"#",fold:"indent"}}),e.defineMIME("application/vnd.coffeescript","coffeescript"),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("commonlisp",function(r){var o,i=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,l=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,c=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,n=/[^\s'`,@()\[\]";]/;function u(t){for(var e;e=t.next();)if("\\"==e)t.next();else if(!n.test(e)){t.backUp(1);break}return t.current()}function a(t,e){if(t.eatSpace())return o="ws",null;if(t.match(c))return"number";var n;if("\\"==(n=t.next())&&(n=t.next()),'"'==n)return(e.tokenize=s)(t,e);if("("==n)return o="open","bracket";if(")"==n||"]"==n)return o="close","bracket";if(";"==n)return t.skipToEnd(),o="ws","comment";if(/['`,@]/.test(n))return null;if("|"==n)return t.skipTo("|")?(t.next(),"symbol"):(t.skipToEnd(),"error");if("#"==n)return"("==(n=t.next())?(o="open","bracket"):/[+\-=\.']/.test(n)?null:/\d/.test(n)&&t.match(/^\d*#/)?null:"|"==n?(e.tokenize=d)(t,e):":"==n?(u(t),"meta"):"\\"==n?(t.next(),u(t),"string-2"):"error";var r=u(t);return"."==r?null:(o="symbol","nil"==r||"t"==r||":"==r.charAt(0)?"atom":"open"==e.lastType&&(i.test(r)||l.test(r))?"keyword":"&"==r.charAt(0)?"variable-2":"variable")}function s(t,e){for(var n,r=!1;n=t.next();){if('"'==n&&!r){e.tokenize=a;break}r=!r&&"\\"==n}return"string"}function d(t,e){for(var n,r;n=t.next();){if("#"==n&&"|"==r){e.tokenize=a;break}r=n}return o="ws","comment"}return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:a}},token:function(t,e){t.sol()&&"number"!=typeof e.ctx.indentTo&&(e.ctx.indentTo=e.ctx.start+1),o=null;var n=e.tokenize(t,e);return"ws"!=o&&(null==e.ctx.indentTo?"symbol"==o&&l.test(t.current())?e.ctx.indentTo=e.ctx.start+r.indentUnit:e.ctx.indentTo="next":"next"==e.ctx.indentTo&&(e.ctx.indentTo=t.column()),e.lastType=o),"open"==o?e.ctx={prev:e.ctx,start:t.column(),indentTo:null}:"close"==o&&(e.ctx=e.ctx.prev||e.ctx),n},indent:function(t,e){var n=t.ctx.indentTo;return"number"==typeof n?n:t.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}}),t.defineMIME("text/x-common-lisp","commonlisp")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("crystal",function(n){function e(e,t){return new RegExp((t?"":"^")+"(?:"+e.join("|")+")"+(t?"$":"\\b"))}function c(e,t,n){return n.tokenize.push(e),e(t,n)}var s=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,f=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,l=/^(?:\[\][?=]?)/,m=/^(?:\.(?:\.{2})?|->|[?:])/,h=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,p=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,d=e(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),k=e(["true","false","nil","self"]),z=e(["def","fun","macro","class","module","struct","lib","enum","union","do","for"]),F=e(["if","unless","case","while","until","begin","then"]),t=["end","else","elsif","rescue","ensure"],r=e(t),a=["\\)","\\}","\\]"],u=new RegExp("^(?:"+a.join("|")+")$"),b={def:i,fun:i,macro:function(e,t){if(e.eatSpace())return null;var n;if(n=e.match(h)){if("def"==n)return"keyword";e.eat(/[?!]/)}return t.tokenize.pop(),"def"},class:g,module:g,struct:g,lib:g,enum:g,union:g},_={"[":"]","{":"}","(":")","<":">"};function o(e,t){if(e.eatSpace())return null;if("\\"!=t.lastToken&&e.match("{%",!1))return c(y("%","%"),e,t);if("\\"!=t.lastToken&&e.match("{{",!1))return c(y("{","}"),e,t);if("#"==e.peek())return e.skipToEnd(),"comment";var n,r,a;if(e.match(h))return e.eat(/[?!]/),n=e.current(),e.eat(":")?"atom":"."==t.lastToken?"property":d.test(n)?(z.test(n)?"fun"==n&&0<=t.blocks.indexOf("lib")||"def"==n&&"abstract"==t.lastToken||(t.blocks.push(n),t.currentIndent+=1):"operator"!=t.lastStyle&&t.lastStyle||!F.test(n)?"end"==n&&(t.blocks.pop(),t.currentIndent-=1):(t.blocks.push(n),t.currentIndent+=1),b.hasOwnProperty(n)&&t.tokenize.push(b[n]),"keyword"):k.test(n)?"atom":"variable";if(e.eat("@"))return"["==e.peek()?c(x("[","]","meta"),e,t):(e.eat("@"),e.match(h)||e.match(p),"variable-2");if(e.match(p))return"tag";if(e.eat(":"))return e.eat('"')?c(I('"',"atom",!1),e,t):e.match(h)||e.match(p)||e.match(s)||e.match(f)||e.match(l)?"atom":(e.eat(":"),"operator");if(e.eat('"'))return c(I('"',"string",!0),e,t);if("%"!=e.peek())return(n=e.match(/^<<-('?)([A-Z]\w*)\1/))?c((r=n[2],a=!n[1],function(e,t){if(e.sol()&&(e.eatSpace(),e.match(r)))return t.tokenize.pop(),"string";for(var n=!1;e.peek();)if(n)e.next(),n=!1;else{if(e.match("{%",!1))return t.tokenize.push(y("%","%")),"string";if(e.match("{{",!1))return t.tokenize.push(y("{","}")),"string";if(a&&e.match("#{",!1))return t.tokenize.push(x("#{","}","meta")),"string";n=a&&"\\"==e.next()}return"string"}),e,t):e.eat("'")?(e.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),e.eat("'"),"atom"):e.eat("0")?(e.eat("x")?e.match(/^[0-9a-fA-F]+/):e.eat("o")?e.match(/^[0-7]+/):e.eat("b")&&e.match(/^[01]+/),"number"):e.eat(/^\d/)?(e.match(/^\d*(?:\.\d+)?(?:[eE][+-]?\d+)?/),"number"):e.match(s)?(e.eat("="),"operator"):e.match(f)||e.match(m)?"operator":(n=e.match(/[({[]/,!1))?c(x(n=n[0],_[n],null),e,t):e.eat("\\")?(e.next(),"meta"):(e.next(),null);var u,i="string",o=!0;if(e.match("%r"))i="string-2",u=e.next();else if(e.match("%w"))o=!1,u=e.next();else if(e.match("%q"))o=!1,u=e.next();else{if(!(u=e.match(/^%([^\w\s=])/)))return e.match(/^%[a-zA-Z0-9_\u009F-\uFFFF]*/)?"meta":"operator";u=u[1]}return _.hasOwnProperty(u)&&(u=_[u]),c(I(u,i,o),e,t)}function x(r,a,u,i){return function(e,t){if(!i&&e.match(r))return t.tokenize[t.tokenize.length-1]=x(r,a,u,!0),t.currentIndent+=1,u;var n=o(e,t);return e.current()===a&&(t.tokenize.pop(),t.currentIndent-=1,n=u),n}}function y(n,r,a){return function(e,t){return!a&&e.match("{"+n)?(t.currentIndent+=1,t.tokenize[t.tokenize.length-1]=y(n,r,!0),"meta"):e.match(r+"}")?(t.currentIndent-=1,t.tokenize.pop(),"meta"):o(e,t)}}function i(e,t){return e.eatSpace()?null:(e.match(h)?e.eat(/[!?]/):e.match(s)||e.match(f)||e.match(l),t.tokenize.pop(),"def")}function g(e,t){return e.eatSpace()?null:(e.match(p),t.tokenize.pop(),"def")}function I(a,u,i){return function(e,t){for(var n=!1;e.peek();)if(n)e.next(),n=!1;else{if(e.match("{%",!1))return t.tokenize.push(y("%","%")),u;if(e.match("{{",!1))return t.tokenize.push(y("{","}")),u;if(i&&e.match("#{",!1))return t.tokenize.push(x("#{","}","meta")),u;var r=e.next();if(r==a)return t.tokenize.pop(),u;n=i&&"\\"==r}return u}}return{startState:function(){return{tokenize:[o],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(e,t){var n=t.tokenize[t.tokenize.length-1](e,t),r=e.current();return n&&"comment"!=n&&(t.lastToken=r,t.lastStyle=n),n},indent:function(e,t){return t=t.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),r.test(t)||u.test(t)?n.indentUnit*(e.currentIndent-1):n.indentUnit*e.currentIndent},fold:"indent",electricInput:e(a.concat(t),!0),lineComment:"#"}}),e.defineMIME("text/x-crystal","crystal")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(u){"use strict";var n=function(e){return new RegExp("^(?:"+e.join("|")+")$","i")};u.defineMode("cypher",function(e){var r,t=function(e){var t=e.next();if('"'===t)return e.match(/.*?"/),"string";if("'"===t)return e.match(/.*?'/),"string";if(/[{}\(\),\.;\[\]]/.test(t))return r=t,"node";if("/"===t&&e.eat("/"))return e.skipToEnd(),"comment";if(d.test(t))return e.eatWhile(d),null;if(e.eatWhile(/[_\w\d]/),e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var n=e.current();return c.test(n)?"builtin":s.test(n)?"def":l.test(n)?"keyword":"variable"},i=function(e,t,n){return e.context={prev:e.context,indent:e.indent,col:n,type:t}},o=function(e){return e.indent=e.context.indent,e.context=e.context.prev},a=e.indentUnit,c=n(["abs","acos","allShortestPaths","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endnode","exp","extract","filter","floor","haversin","head","id","keys","labels","last","left","length","log","log10","lower","ltrim","max","min","node","nodes","percentileCont","percentileDisc","pi","radians","rand","range","reduce","rel","relationship","relationships","replace","reverse","right","round","rtrim","shortestPath","sign","sin","size","split","sqrt","startnode","stdev","stdevp","str","substring","sum","tail","tan","timestamp","toFloat","toInt","toString","trim","type","upper"]),s=n(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),l=n(["as","asc","ascending","assert","by","case","commit","constraint","create","csv","cypher","delete","desc","descending","detach","distinct","drop","else","end","ends","explain","false","fieldterminator","foreach","from","headers","in","index","is","join","limit","load","match","merge","null","on","optional","order","periodic","profile","remove","return","scan","set","skip","start","starts","then","true","union","unique","unwind","using","when","where","with","call","yield"]),d=/[*+\-<>=&|~%^]/;return{startState:function(){return{tokenize:t,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"!==n&&t.context&&null==t.context.align&&"pattern"!==t.context.type&&(t.context.align=!0),"("===r)i(t,")",e.column());else if("["===r)i(t,"]",e.column());else if("{"===r)i(t,"}",e.column());else if(/[\]\}\)]/.test(r)){for(;t.context&&"pattern"===t.context.type;)o(t);t.context&&r===t.context.type&&o(t)}else"."===r&&t.context&&"pattern"===t.context.type?o(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?i(t,"pattern",e.column()):"pattern"!==t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(n))for(;r&&"pattern"===r.type;)r=r.prev;var i=r&&n===r.type;return r?"keywords"===r.type?u.commands.newlineAndIndent:r.align?r.col+(i?0:1):r.indent+(i?0:a):0}}}),u.modeExtensions.cypher={autoFormatLineBreaks:function(e){for(var t=e.split("\n"),n=/\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g,r=0;r<t.length;r++)t[r]=t[r].replace(n," \n$1 ").trim();return t.join("\n")}},u.defineMIME("application/x-cypher-query","cypher")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(x){"use strict";function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}x.defineMode("d",function(e,t){var a,o=e.indentUnit,l=t.statementIndentUnit||o,u=t.keywords||{},s=t.builtin||{},c=t.blockKeywords||{},f=t.atoms||{},d=t.hooks||{},m=t.multiLineStrings,p=/[+\-*&%=<>!?|\/]/;function y(e,t){var o,n=e.next();if(d[n]){var r=d[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n||"`"==n)return t.tokenize=(o=n,function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==o&&!r){i=!0;break}r=!r&&"\\"==n}return(i||!r&&!m)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return a=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if("/"==n){if(e.eat("+"))return(t.tokenize=h)(e,t);if(e.eat("*"))return(t.tokenize=b)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(p.test(n))return e.eatWhile(p),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var i=e.current();return u.propertyIsEnumerable(i)?(c.propertyIsEnumerable(i)&&(a="newstatement"),"keyword"):s.propertyIsEnumerable(i)?(c.propertyIsEnumerable(i)&&(a="newstatement"),"builtin"):f.propertyIsEnumerable(i)?"atom":"variable"}function b(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function h(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="+"==n}return"comment"}function i(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function k(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new i(r,t,n,null,e.context)}function v(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new i((e||0)-o,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;a=null;var r=(t.tokenize||y)(e,t);if("comment"==r||"meta"==r)return r;if(null==n.align&&(n.align=!0),";"!=a&&":"!=a&&","!=a||"statement"!=n.type)if("{"==a)k(t,e.column(),"}");else if("["==a)k(t,e.column(),"]");else if("("==a)k(t,e.column(),")");else if("}"==a){for(;"statement"==n.type;)n=v(t);for("}"==n.type&&(n=v(t));"statement"==n.type;)n=v(t)}else a==n.type?v(t):(("}"==n.type||"top"==n.type)&&";"!=a||"statement"==n.type&&"newstatement"==a)&&k(t,e.column(),"statement");else v(t);return t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=y&&null!=e.tokenize)return x.Pass;var n=e.context,r=t&&t.charAt(0);"statement"==n.type&&"}"==r&&(n=n.prev);var i=r==n.type;return"statement"==n.type?n.indented+("{"==r?0:l):n.align?n.column+(i?0:1):n.indented+(i?0:o)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var t="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";x.defineMIME("text/x-d",{name:"d",keywords:e("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters "+t),blockKeywords:e(t),builtin:e("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),atoms:e("exit failure success true false null"),hooks:{"@":function(e,t){return e.eatWhile(/[\w\$_]/),"meta"}}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../clike/clike"],e):e(CodeMirror)}(function(t){"use strict";var e="this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as".split(" "),n="try catch finally do else for if switch while".split(" "),i="true false null".split(" "),r="void bool num int double dynamic var String".split(" ");function o(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function a(e){return(e.interpolationStack||(e.interpolationStack=[])).pop()}function c(o,e,t,a){var c=!1;if(e.eat(o)){if(!e.eat(o))return"string";c=!0}function n(e,t){for(var n,i=!1;!e.eol();){if(!a&&!i&&"$"==e.peek())return((n=t).interpolationStack||(n.interpolationStack=[])).push(n.tokenize),t.tokenize=l,"string";var r=e.next();if(r==o&&!i&&(!c||e.match(o+o))){t.tokenize=null;break}i=!a&&!i&&"\\"==r}return"string"}return(t.tokenize=n)(e,t)}function l(e,t){return e.eat("$"),e.eat("{")?t.tokenize=null:t.tokenize=u,null}function u(e,t){return e.eatWhile(/[\w_]/),t.tokenize=a(t),"variable"}t.defineMIME("application/dart",{name:"clike",keywords:o(e),blockKeywords:o(n),builtin:o(r),atoms:o(i),hooks:{"@":function(e){return e.eatWhile(/[\w\$_\.]/),"meta"},"'":function(e,t){return c("'",e,t,!1)},'"':function(e,t){return c('"',e,t,!1)},r:function(e,t){var n=e.peek();return("'"==n||'"'==n)&&c(e.next(),e,t,!0)},"}":function(e,t){return 0<((n=t).interpolationStack?n.interpolationStack.length:0)&&(t.tokenize=a(t),null);var n},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function i(r){return function(e,t){for(var n;n=e.next();){if("*"==n&&e.eat("/")){if(1!=r)return t.tokenize=i(r-1),t.tokenize(e,t);t.tokenize=null;break}if("/"==n&&e.eat("*"))return t.tokenize=i(r+1),t.tokenize(e,t)}return"comment"}}(1),t.tokenize(e,t))}}}),t.registerHelper("hintWords","application/dart",e.concat(i).concat(r)),t.defineMode("dart",function(e){return t.getMode(e,"application/dart")},"clike")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("diff",function(){var o={"+":"positive","-":"negative","@":"meta"};return{token:function(e){var r=e.string.search(/[\t ]+?$/);if(!e.sol()||0===r)return e.skipToEnd(),("error "+(o[e.string.charAt(0)]||"")).replace(/ $/,"");var i=o[e.peek()]||e.skipToEnd();return-1===r?e.skipToEnd():e.pos=r,i}}}),e.defineMIME("text/x-diff","diff")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}(function(i){"use strict";i.defineMode("django:inner",function(){var i=["block","endblock","for","endfor","true","false","filter","endfilter","loop","none","self","super","if","elif","endif","as","else","import","with","endwith","without","context","ifequal","endifequal","ifnotequal","endifnotequal","extends","include","load","comment","endcomment","empty","url","static","trans","blocktrans","endblocktrans","now","regroup","lorem","ifchanged","endifchanged","firstof","debug","cycle","csrf_token","autoescape","endautoescape","spaceless","endspaceless","ssi","templatetag","verbatim","endverbatim","widthratio"],n=["add","addslashes","capfirst","center","cut","date","default","default_if_none","dictsort","dictsortreversed","divisibleby","escape","escapejs","filesizeformat","first","floatformat","force_escape","get_digit","iriencode","join","last","length","length_is","linebreaks","linebreaksbr","linenumbers","ljust","lower","make_list","phone2numeric","pluralize","pprint","random","removetags","rjust","safe","safeseq","slice","slugify","stringformat","striptags","time","timesince","timeuntil","title","truncatechars","truncatechars_html","truncatewords","truncatewords_html","unordered_list","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap","yesno"],o=["==","!=","<",">","<=",">="],a=["in","not","or","and"];function l(e,t){if(e.match("{{"))return t.tokenize=r,"tag";if(e.match("{%"))return t.tokenize=c,"tag";if(e.match("{#"))return t.tokenize=m,"comment";for(;null!=e.next()&&!e.match(/\{[{%#]/,!1););return null}function u(r,i){return function(e,t){!t.escapeNext&&e.eat(r)?t.tokenize=i:(t.escapeNext&&(t.escapeNext=!1),"\\"==e.next()&&(t.escapeNext=!0));return"string"}}function r(e,t){if(t.waitDot){if(t.waitDot=!1,"."!=e.peek())return"null";if(e.match(/\.\W+/))return"error";if(e.eat("."))return t.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(t.waitPipe){if(t.waitPipe=!1,"|"!=e.peek())return"null";if(e.match(/\.\W+/))return"error";if(e.eat("|"))return t.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return t.waitProperty&&(t.waitProperty=!1,e.match(/\b(\w+)\b/))?(t.waitDot=!0,t.waitPipe=!0,"property"):t.waitFilter&&(t.waitFilter=!1,e.match(n))?"variable-2":e.eatSpace()?(t.waitProperty=!1,"null"):e.match(/\b\d+(\.\d+)?\b/)?"number":e.match("'")?(t.tokenize=u("'",t.tokenize),"string"):e.match('"')?(t.tokenize=u('"',t.tokenize),"string"):e.match(/\b(\w+)\b/)&&!t.foundVariable?(t.waitDot=!0,t.waitPipe=!0,"variable"):e.match("}}")?(t.waitProperty=null,t.waitFilter=null,t.waitDot=null,t.waitPipe=null,t.tokenize=l,"tag"):(e.next(),"null")}function c(e,t){if(t.waitDot){if(t.waitDot=!1,"."!=e.peek())return"null";if(e.match(/\.\W+/))return"error";if(e.eat("."))return t.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(t.waitPipe){if(t.waitPipe=!1,"|"!=e.peek())return"null";if(e.match(/\.\W+/))return"error";if(e.eat("|"))return t.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(t.waitProperty&&(t.waitProperty=!1,e.match(/\b(\w+)\b/)))return t.waitDot=!0,t.waitPipe=!0,"property";if(t.waitFilter&&(t.waitFilter=!1,e.match(n)))return"variable-2";if(e.eatSpace())return t.waitProperty=!1,"null";if(e.match(/\b\d+(\.\d+)?\b/))return"number";if(e.match("'"))return t.tokenize=u("'",t.tokenize),"string";if(e.match('"'))return t.tokenize=u('"',t.tokenize),"string";if(e.match(o))return"operator";if(e.match(a))return"keyword";var r=e.match(i);return r?("comment"==r[0]&&(t.blockCommentTag=!0),"keyword"):e.match(/\b(\w+)\b/)?(t.waitDot=!0,t.waitPipe=!0,"variable"):e.match("%}")?(t.waitProperty=null,t.waitFilter=null,t.waitDot=null,t.waitPipe=null,t.blockCommentTag?(t.blockCommentTag=!1,t.tokenize=f):t.tokenize=l,"tag"):(e.next(),"null")}function m(e,t){return e.match(/^.*?#\}/)?t.tokenize=l:e.skipToEnd(),"comment"}function f(e,t){return e.match(/\{%\s*endcomment\s*%\}/,!1)?(t.tokenize=c,e.match("{%"),"tag"):(e.next(),"comment")}return i=new RegExp("^\\b("+i.join("|")+")\\b"),n=new RegExp("^\\b("+n.join("|")+")\\b"),o=new RegExp("^\\b("+o.join("|")+")\\b"),a=new RegExp("^\\b("+a.join("|")+")\\b"),{startState:function(){return{tokenize:l}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}}),i.defineMode("django",function(e){var t=i.getMode(e,"text/html"),r=i.getMode(e,"django:inner");return i.overlayMode(t,r)}),i.defineMIME("text/x-django","django")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";var n="from",t=new RegExp("^(\\s*)\\b("+n+")\\b","i"),r=["run","cmd","entrypoint","shell"],o=new RegExp("^(\\s*)("+r.join("|")+")(\\s+\\[)","i"),l="expose",s=new RegExp("^(\\s*)("+l+")(\\s+)","i"),x="("+[n,l].concat(r).concat(["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"]).join("|")+")",g=new RegExp("^(\\s*)"+x+"(\\s*)(#.*)?$","i"),i=new RegExp("^(\\s*)"+x+"(\\s+)","i");e.defineSimpleMode("dockerfile",{start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:t,token:[null,"keyword"],sol:!0,next:"from"},{regex:g,token:[null,"keyword",null,"error"],sol:!0},{regex:o,token:[null,"keyword",null],sol:!0,next:"array"},{regex:s,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:i,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],meta:{lineComment:"#"}}),e.defineMIME("text/x-dockerfile","dockerfile")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("dtd",function(t){var a,r=t.indentUnit;function o(t,e){return a=e,t}function c(t,e){var a,n,r,i=t.next();if("<"==i&&t.eat("!"))return t.eatWhile(/[\-]/)?(e.tokenize=l)(t,e):t.eatWhile(/[\w]/)?o("keyword","doindent"):void 0;if("<"==i&&t.eat("?"))return e.tokenize=(n="meta",r="?>",function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=c;break}t.next()}return n}),o("meta",i);if("#"==i&&t.eatWhile(/[\w]/))return o("atom","tag");if("|"==i)return o("keyword","seperator");if(i.match(/[\(\)\[\]\-\.,\+\?>]/))return o(null,i);if(i.match(/[\[\]]/))return o("rule",i);if('"'==i||"'"==i)return e.tokenize=(a=i,function(t,e){for(var n,r=!1;null!=(n=t.next());){if(n==a&&!r){e.tokenize=c;break}r=!r&&"\\"==n}return o("string","tag")}),e.tokenize(t,e);if(t.eatWhile(/[a-zA-Z\?\+\d]/)){var u=t.current();return null!==u.substr(u.length-1,u.length).match(/\?|\+/)&&t.backUp(1),o("tag","tag")}return"%"==i||"*"==i?o("number","number"):(t.eatWhile(/[\w\\\-_%.{,]/),o(null,null))}function l(t,e){for(var n,r=0;null!=(n=t.next());){if(2<=r&&">"==n){e.tokenize=c;break}r="-"==n?r+1:0}return o("comment","comment")}return{startState:function(t){return{tokenize:c,baseIndent:t||0,stack:[]}},token:function(t,e){if(t.eatSpace())return null;var n=e.tokenize(t,e),r=e.stack[e.stack.length-1];return"["==t.current()||"doindent"===a||"["==a?e.stack.push("rule"):"endtag"===a?e.stack[e.stack.length-1]="endtag":"]"==t.current()||"]"==a||">"==a&&"rule"==r?e.stack.pop():"["==a&&e.stack.push("["),n},indent:function(t,e){var n=t.stack.length;return e.match(/\]\s+|\]/)?n-=1:">"===e.substr(e.length-1,e.length)&&("<"===e.substr(0,1)||"doindent"==a&&1<e.length||("doindent"==a?n--:">"==a&&1<e.length||"tag"==a&&">"!==e||("tag"==a&&"rule"==t.stack[t.stack.length-1]?n--:"tag"==a?n++:">"===e&&"rule"==t.stack[t.stack.length-1]&&">"===a?n--:">"===e&&"rule"==t.stack[t.stack.length-1]||("<"!==e.substr(0,1)&&">"===e.substr(0,1)?n-=1:">"===e||(n-=1)))),null!=a&&"]"!=a||n--),t.baseIndent+n*r},electricChars:"]>"}}),t.defineMIME("application/xml-dtd","dtd")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function b(e,n){for(var t=0;t<e.length;t++)n(e[t],t)}function p(e,n){for(var t=0;t<e.length;t++)if(n(e[t],t))return!0;return!1}e.defineMode("dylan",function(e){var t={unnamedDefinition:["interface"],namedDefinition:["module","library","macro","C-struct","C-union","C-function","C-callable-wrapper"],typeParameterizedDefinition:["class","C-subtype","C-mapped-subtype"],otherParameterizedDefinition:["method","function","C-variable","C-address"],constantSimpleDefinition:["constant"],variableSimpleDefinition:["variable"],otherSimpleDefinition:["generic","domain","C-pointer-type","table"],statement:["if","block","begin","method","case","for","select","when","unless","until","while","iterate","profiling","dynamic-bind"],separator:["finally","exception","cleanup","else","elseif","afterwards"],other:["above","below","by","from","handler","in","instance","let","local","otherwise","slot","subclass","then","to","keyed-by","virtual"],signalingCalls:["signal","error","cerror","break","check-type","abort"]};t.otherDefinition=t.unnamedDefinition.concat(t.namedDefinition).concat(t.otherParameterizedDefinition),t.definition=t.typeParameterizedDefinition.concat(t.otherDefinition),t.parameterizedDefinition=t.typeParameterizedDefinition.concat(t.otherParameterizedDefinition),t.simpleDefinition=t.constantSimpleDefinition.concat(t.variableSimpleDefinition).concat(t.otherSimpleDefinition),t.keyword=t.statement.concat(t.separator).concat(t.other);var n="[-_a-zA-Z?!*@<>$%]+",o=new RegExp("^"+n),a={symbolKeyword:n+":",symbolClass:"<"+n+">",symbolGlobal:"\\*"+n+"\\*",symbolConstant:"\\$"+n},f={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variable-2",symbolConstant:"variable-3"};for(var i in a)a.hasOwnProperty(i)&&(a[i]=new RegExp("^"+a[i]));a.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var r={keyword:"keyword",definition:"def",simpleDefinition:"def",signalingCalls:"builtin"},l={},c={};function u(e,n,t){return(n.tokenize=t)(e,n)}function s(n,e){var t=n.peek();if("'"==t||'"'==t)return n.next(),u(n,e,d(t,"string"));if("/"==t){if(n.next(),n.eat("*"))return u(n,e,m);if(n.eat("/"))return n.skipToEnd(),"comment";n.backUp(1)}else if(/[+\-\d\.]/.test(t)){if(n.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i)||n.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i)||n.match(/^[+-]?\d+/))return"number"}else{if("#"==t)return n.next(),'"'==(t=n.peek())?(n.next(),u(n,e,d('"',"string"))):"b"==t?(n.next(),n.eatWhile(/[01]/),"number"):"x"==t?(n.next(),n.eatWhile(/[\da-f]/i),"number"):"o"==t?(n.next(),n.eatWhile(/[0-7]/),"number"):"#"==t?(n.next(),"punctuation"):"["==t||"("==t?(n.next(),"bracket"):n.match(/f|t|all-keys|include|key|next|rest/i)?"atom":(n.eatWhile(/[-a-zA-Z]/),"error");if("~"==t)return n.next(),"="==(t=n.peek())&&(n.next(),"="==(t=n.peek())&&n.next()),"operator";if(":"==t){if(n.next(),"="==(t=n.peek()))return n.next(),"operator";if(":"==t)return n.next(),"punctuation"}else{if(-1!="[](){}".indexOf(t))return n.next(),"bracket";if(-1!=".,".indexOf(t))return n.next(),"punctuation";if(n.match("end"))return"keyword"}}for(var i in a)if(a.hasOwnProperty(i)){var r=a[i];if(r instanceof Array&&p(r,function(e){return n.match(e)})||n.match(r))return f[i]}return/[+\-*\/^=<>&|]/.test(t)?(n.next(),"operator"):n.match("define")?"def":(n.eatWhile(/[\w\-]/),l.hasOwnProperty(n.current())?c[n.current()]:n.current().match(o)?"variable":(n.next(),"variable-2"))}function m(e,n){for(var t,i=!1,r=!1,o=0;t=e.next();){if("/"==t&&i){if(!(0<o)){n.tokenize=s;break}o--}else"*"==t&&r&&o++;i="*"==t,r="/"==t}return"comment"}function d(o,a){return function(e,n){for(var t,i=!1,r=!1;null!=(t=e.next());){if(t==o&&!i){r=!0;break}i=!i&&"\\"==t}return!r&&i||(n.tokenize=s),a}}return b(["keyword","definition","simpleDefinition","signalingCalls"],function(n){b(t[n],function(e){l[e]=n,c[e]=r[n]})}),{startState:function(){return{tokenize:s,currentIndent:0}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-dylan","dylan")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(h){"use strict";h.defineMode("ebnf",function(e){var i=0,o=1,s=0,m=1,f=2,u=null;return e.bracesMode&&(u=h.getMode(e,e.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(e,t){if(e){switch(0===t.stack.length&&('"'==e.peek()||"'"==e.peek()?(t.stringType=e.peek(),e.next(),t.stack.unshift(m)):e.match(/^\/\*/)?(t.stack.unshift(s),t.commentType=i):e.match(/^\(\*/)&&(t.stack.unshift(s),t.commentType=o)),t.stack[0]){case m:for(;t.stack[0]===m&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property string":"string";case s:for(;t.stack[0]===s&&!e.eol();)t.commentType===i&&e.match(/\*\//)?(t.stack.shift(),t.commentType=null):t.commentType===o&&e.match(/\*\)/)?(t.stack.shift(),t.commentType=null):e.match(/^.[^\*]*/);return"comment";case f:for(;t.stack[0]===f&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||t.stack.shift();return"operator"}var a=e.peek();if(null!==u&&(t.braced||"{"===a)){null===t.localState&&(t.localState=h.startState(u));var r=u.token(e,t.localState),c=e.current();if(!r)for(var n=0;n<c.length;n++)"{"===c[n]?(0===t.braced&&(r="matchingbracket"),t.braced++):"}"===c[n]&&(t.braced--,0===t.braced&&(r="matchingbracket"));return r}switch(a){case"[":return e.next(),t.stack.unshift(f),"bracket";case":":case"|":case";":return e.next(),"operator";case"%":if(e.match("%%"))return"header";if(e.match(/[%][A-Za-z]+/))return"keyword";if(e.match(/[%][}]/))return"matchingbracket";break;case"/":if(e.match(/[\/][A-Za-z]+/))return"keyword";case"\\":if(e.match(/[\][a-z]+/))return"string-2";case".":if(e.match("."))return"atom";case"*":case"-":case"+":case"^":if(e.match(a))return"atom";case"$":if(e.match("$$"))return"builtin";if(e.match(/[$][0-9]+/))return"variable-3";case"<":if(e.match(/<<[a-zA-Z_]+>>/))return"builtin"}return e.match(/^\/\//)?(e.skipToEnd(),"comment"):e.match(/return/)?"operator":e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?e.match(/(?=[\(.])/)?"variable":e.match(/(?=[\s\n]*[:=])/)?"def":"variable-2":-1!=["[","]","(",")"].indexOf(e.peek())?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}}}),h.defineMIME("text/x-ebnf","ebnf")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ecl",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var s,i=e.indentUnit,c=t("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),u=t("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),d=t("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),p=t("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),f=t("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),m=t("catch class do else finally for if switch try while"),h=t("true false null"),y={"#":function(e,t){return!!t.startOfLine&&(e.skipToEnd(),"meta")}},b=/[+\-*&%=<>!?|\/]/;function g(e,t){var i,n=e.next();if(y[n]){var r=y[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=(i=n,function(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if(n==i&&!r){o=!0;break}r=!r&&"\\"==n}return!o&&r||(t.tokenize=g),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return s=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if("/"==n){if(e.eat("*"))return(t.tokenize=v)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(b.test(n))return e.eatWhile(b),"operator";e.eatWhile(/[\w\$_]/);var o=e.current().toLowerCase();if(c.propertyIsEnumerable(o))return m.propertyIsEnumerable(o)&&(s="newstatement"),"keyword";if(u.propertyIsEnumerable(o))return m.propertyIsEnumerable(o)&&(s="newstatement"),"variable";if(d.propertyIsEnumerable(o))return m.propertyIsEnumerable(o)&&(s="newstatement"),"variable-2";if(p.propertyIsEnumerable(o))return m.propertyIsEnumerable(o)&&(s="newstatement"),"variable-3";if(f.propertyIsEnumerable(o))return m.propertyIsEnumerable(o)&&(s="newstatement"),"builtin";for(var a=o.length-1;0<=a&&(!isNaN(o[a])||"_"==o[a]);)--a;if(0<a){var l=o.substr(0,a+1);if(p.propertyIsEnumerable(l))return m.propertyIsEnumerable(l)&&(s="newstatement"),"variable-3"}return h.propertyIsEnumerable(o)?"atom":null}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return"comment"}function r(e,t,n,r,o){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=o}function o(e,t,n){return e.context=new r(e.indented,t,n,null,e.context)}function a(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new r((e||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;s=null;var r=(t.tokenize||g)(e,t);if("comment"==r||"meta"==r)return r;if(null==n.align&&(n.align=!0),";"!=s&&":"!=s||"statement"!=n.type)if("{"==s)o(t,e.column(),"}");else if("["==s)o(t,e.column(),"]");else if("("==s)o(t,e.column(),")");else if("}"==s){for(;"statement"==n.type;)n=a(t);for("}"==n.type&&(n=a(t));"statement"==n.type;)n=a(t)}else s==n.type?a(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==s)&&o(t,e.column(),"statement");else a(t);return t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=g&&null!=e.tokenize)return 0;var n=e.context,r=t&&t.charAt(0);"statement"==n.type&&"}"==r&&(n=n.prev);var o=r==n.type;return"statement"==n.type?n.indented+("{"==r?0:i):n.align?n.column+(o?0:1):n.indented+(o?0:i)},electricChars:"{}"}}),e.defineMIME("text/x-ecl","ecl")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("eiffel",function(){function e(e){for(var t={},r=0,n=e.length;r<n;++r)t[e[r]]=!0;return t}var i=e(["note","across","when","variant","until","unique","undefine","then","strip","select","retry","rescue","require","rename","reference","redefine","prefix","once","old","obsolete","loop","local","like","is","inspect","infix","include","if","frozen","from","external","export","ensure","end","elseif","else","do","creation","create","check","alias","agent","separate","invariant","inherit","indexing","feature","expanded","deferred","class","Void","True","Result","Precursor","False","Current","create","attached","detachable","as","and","implies","not","or"]),o=e([":=","and then","and","or","<<",">>"]);function t(e,t){if(e.eatSpace())return null;var r,n,i,o,a,u,f=e.next();return'"'==f||"'"==f?(o=f,a="string",r=function(e,t){for(var r,n=!1;null!=(r=e.next());){if(r==o&&(u||!n)){t.tokenize.pop();break}n=!n&&"%"==r}return a},n=e,(i=t).tokenize.push(r),r(n,i)):"-"==f&&e.eat("-")?(e.skipToEnd(),"comment"):":"==f&&e.eat("=")?"operator":/[0-9]/.test(f)?(e.eatWhile(/[xXbBCc0-9\.]/),e.eat(/[\?\!]/),"ident"):/[a-zA-Z_0-9]/.test(f)?(e.eatWhile(/[a-zA-Z_0-9]/),e.eat(/[\?\!]/),"ident"):/[=+\-\/*^%<>~]/.test(f)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}return{startState:function(){return{tokenize:[t]}},token:function(e,t){var r=t.tokenize[t.tokenize.length-1](e,t);if("ident"==r){var n=e.current();r=i.propertyIsEnumerable(e.current())?"keyword":o.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(n)?"tag":/^0[bB][0-1]+$/g.test(n)?"number":/^0[cC][0-7]+$/g.test(n)?"number":/^0[xX][a-fA-F0-9]+$/g.test(n)?"number":/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(n)?"number":/^[0-9]+$/g.test(n)?"number":"variable"}return r},lineComment:"--"}}),e.defineMIME("text/x-eiffel","eiffel")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("elm",function(){function u(e,t,r){return t(r),r(e,t)}var f=/[a-z_]/,o=/[A-Z]/,a=/[0-9]/,l=/[0-9A-Fa-f]/,c=/[0-7]/,s=/[a-z_A-Z0-9\']/,m=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,p=/[(),;[\]`{}]/,d=/[ \t\v\f]/;function h(){return function(e,t){if(e.eatWhile(d))return null;var r=e.next();if(p.test(r)){if("{"==r&&e.eat("-")){var n="comment";return e.eat("#")&&(n="meta"),u(e,t,function i(u,f){if(0==f)return h();return function(e,t){for(var r=f;!e.eol();){var n=e.next();if("{"==n&&e.eat("-"))++r;else if("-"==n&&e.eat("}")&&0==--r)return t(h()),u}return t(i(u,r)),u}}(n,1))}return null}if("'"==r)return e.eat("\\"),e.next(),e.eat("'")?"string":"error";if('"'==r)return u(e,t,x);if(o.test(r))return e.eatWhile(s),e.eat(".")?"qualifier":"variable-2";if(f.test(r)){var i=1===e.pos;return e.eatWhile(s),i?"type":"variable"}if(a.test(r)){if("0"==r){if(e.eat(/[xX]/))return e.eatWhile(l),"integer";if(e.eat(/[oO]/))return e.eatWhile(c),"number"}e.eatWhile(a);n="number";return e.eat(".")&&(n="number",e.eatWhile(a)),e.eat(/[eE]/)&&(n="number",e.eat(/[-+]/),e.eatWhile(a)),n}return m.test(r)?"-"==r&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(m))?(e.skipToEnd(),"comment"):(e.eatWhile(m),"builtin"):"error"}}function x(e,t){for(;!e.eol();){var r=e.next();if('"'==r)return t(h()),"string";if("\\"==r){if(e.eol()||e.eat(d))return t(n),"string";e.eat("&")||e.next()}}return t(h()),"error"}function n(e,t){return e.eat("\\")?u(e,t,x):(e.next(),t(h()),"error")}var i=function(){for(var e={},t=["case","of","as","if","then","else","let","in","infix","infixl","infixr","type","alias","input","output","foreign","loopback","module","where","import","exposing","_","..","|",":","=","\\",'"',"->","<-"],r=t.length;r--;)e[t[r]]="keyword";return e}();return{startState:function(){return{f:h()}},copyState:function(e){return{f:e.f}},token:function(e,t){var r=t.f(e,function(e){t.f=e}),n=e.current();return i.hasOwnProperty(n)?i[n]:r}}}),e.defineMIME("text/x-elm","elm")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(j){"use strict";j.defineMIME("text/x-erlang","erlang"),j.defineMode("erlang",function(p){var a=["-type","-spec","-export_type","-opaque"],c=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],s=/[\->,;]/,u=["->",";",","],l=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],_=/[\+\-\*\/<>=\|:!]/,f=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],m=/[<\(\[\{]/,d=["<<","(","[","{"],b=/[>\)\]\}]/,g=["}","]",")",">>"],k=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],h=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],y=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,v=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function w(e,t,r){if(1==e.current().length&&t.test(e.current())){for(e.backUp(1);t.test(e.peek());)if(e.next(),W(e.current(),r))return!0;e.backUp(e.current().length-1)}return!1}function x(e,t,r){if(1==e.current().length&&t.test(e.current())){for(;t.test(e.peek());)e.next();for(;0<e.current().length;){if(W(e.current(),r))return!0;e.backUp(1)}e.next()}return!1}function S(e){return t(e,'"',"\\")}function z(e){return t(e,"'","\\")}function t(e,t,r){for(;!e.eol();){var n=e.next();if(n==t)return!0;n==r&&e.next()}return!1}function W(e,t){return-1<t.indexOf(e)}function U(e,t,r){var n,i,o,a,c,s,u;switch(a=e,s=r,"comment"!=(c=E((u=t).current(),u.column(),u.indentation(),s)).type&&"whitespace"!=c.type&&(a.tokenStack=(n=a.tokenStack,i=c,0<(o=n.length-1)&&"record"===n[o].type&&"dot"===i.type?n.pop():(0<o&&"group"===n[o].type&&n.pop(),n.push(i)),n),a.tokenStack=function(e){if(!e.length)return e;var t=e.length-1;if("dot"===e[t].type)return[];if(1<t&&"fun"===e[t].type&&"fun"===e[t-1].token)return e.slice(0,t-1);switch(e[t].token){case"}":return Z(e,{g:["{"]});case"]":return Z(e,{i:["["]});case")":return Z(e,{i:["("]});case">>":return Z(e,{i:["<<"]});case"end":return Z(e,{i:["begin","case","fun","if","receive","try"]});case",":return Z(e,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return Z(e,{r:["when"],m:["try","if","case","receive"]});case";":return Z(e,{E:["case","fun","if","receive","try","when"]});case"catch":return Z(e,{e:["try"]});case"of":return Z(e,{e:["case"]});case"after":return Z(e,{e:["receive","try"]});default:return e}}(a.tokenStack)),r){case"atom":return"atom";case"attribute":return"attribute";case"boolean":return"atom";case"builtin":return"builtin";case"close_paren":case"colon":return null;case"comment":return"comment";case"dot":return null;case"error":return"error";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"variable-2";case"number":return"number";case"open_paren":return null;case"operator":return"operator";case"record":return"bracket";case"separator":return null;case"string":return"string";case"type":return"def";case"variable":return"variable";default:return null}}function E(e,t,r,n){return{token:e,column:t,indent:r,type:n}}function A(e,t){var r=e.tokenStack.length,n=t||1;return!(r<n)&&e.tokenStack[r-n]}function Z(e,t){for(var r in t)for(var n=e.length-1,i=t[r],o=n-1;-1<o;o--)if(W(e[o].token,i)){var a=e.slice(0,o);switch(r){case"m":return a.concat(e[o]).concat(e[n]);case"r":return a.concat(e[n]);case"i":return a;case"g":return a.concat(E(c="group",0,0,c));case"E":case"e":return a.concat(e[o])}}var c;return"E"==r?[]:e}function r(e,t){var r,n,i,o,a,c,s,u=p.indentUnit,l=P(n=t.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/))&&0===n.index?n[0]:"",_=A(e,1),f=A(e,2);return e.in_string||e.in_atom?j.Pass:f?"when"==_.token?_.column+u:"when"===l&&"function"===f.type?f.indent+u:"("===l&&"fun"===_.token?_.column+3:"catch"===l&&(r=M(e,["try"]))?r.column:W(l,["end","after","of"])?(r=M(e,["begin","case","fun","if","receive","try"]))?r.column:j.Pass:W(l,g)?(r=M(e,d))?r.column:j.Pass:W(_.token,[",","|","||"])||W(l,[",","|","||"])?(c=e.tokenStack.slice(0,-1),s=q(c,"type",["open_paren"]),(r=!!P(c[s])&&c[s])?r.column+r.token.length:u):"->"==_.token?W(f.token,["receive","case","if","try"])?f.column+u+u:f.column+u:W(_.token,d)?_.column+_.token.length:(i=e.tokenStack,o=q(i,"type",["open_paren","separator","keyword"]),a=q(i,"type",["operator"]),P(r=P(o)&&P(a)&&o<a?i[o+1]:!!P(o)&&i[o])?r.column+u:0):0}function M(e,t){var r=e.tokenStack,n=q(r,"token",t);return!!P(r[n])&&r[n]}function q(e,t,r){for(var n=e.length-1;-1<n;n--)if(W(e[n][t],r))return n;return!1}function P(e){return!1!==e&&null!=e}return{startState:function(){return{tokenStack:[],in_string:!1,in_atom:!1}},token:function(e,t){return function(e,t){if(t.in_string)return t.in_string=!S(e),U(t,e,"string");if(t.in_atom)return t.in_atom=!z(e),U(t,e,"atom");if(e.eatSpace())return U(t,e,"whitespace");if(!A(t)&&e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return W(e.current(),a)?U(t,e,"type"):U(t,e,"attribute");var r,n=e.next();if("%"==n)return e.skipToEnd(),U(t,e,"comment");if(":"==n)return U(t,e,"colon");if("?"==n)return e.eatSpace(),e.eatWhile(y),U(t,e,"macro");if("#"==n)return e.eatSpace(),e.eatWhile(y),U(t,e,"record");if("$"==n)return"\\"!=e.next()||e.match(v)?U(t,e,"number"):U(t,e,"error");if("."==n)return U(t,e,"dot");if("'"==n){if(!(t.in_atom=!z(e))){if(e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),U(t,e,"fun");if(e.match(/\s*\(/,!1)||e.match(/\s*:/,!1))return U(t,e,"function")}return U(t,e,"atom")}if('"'==n)return t.in_string=!S(e),U(t,e,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(n))return e.eatWhile(y),U(t,e,"variable");if(/[a-z_ß-öø-ÿ]/.test(n)){if(e.eatWhile(y),e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),U(t,e,"fun");var i=e.current();return W(i,c)?U(t,e,"keyword"):W(i,l)?U(t,e,"operator"):e.match(/\s*\(/,!1)?!W(i,h)||":"==A(t).token&&"erlang"!=A(t,2).token?W(i,k)?U(t,e,"guard"):U(t,e,"function"):U(t,e,"builtin"):":"==((r=e.match(/([\n\s]+|%[^\n]*\n)*(.)/,!1))?r.pop():"")?U(t,e,"erlang"==i?"builtin":"function"):W(i,["true","false"])?U(t,e,"boolean"):U(t,e,"atom")}var o=/[0-9]/;return o.test(n)?(e.eatWhile(o),e.eat("#")?e.eatWhile(/[0-9a-zA-Z]/)||e.backUp(1):e.eat(".")&&(e.eatWhile(o)?e.eat(/[eE]/)&&(e.eat(/[-+]/)?e.eatWhile(o)||e.backUp(2):e.eatWhile(o)||e.backUp(1)):e.backUp(1)),U(t,e,"number")):w(e,m,d)?U(t,e,"open_paren"):w(e,b,g)?U(t,e,"close_paren"):x(e,s,u)?U(t,e,"separator"):x(e,_,f)?U(t,e,"operator"):U(t,e,null)}(e,t)},indent:function(e,t){return r(e,t)},lineComment:"%"}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("factor",{start:[{regex:/#?!.*/,token:"comment"},{regex:/"""/,token:"string",next:"string3"},{regex:/(STRING:)(\s)/,token:["keyword",null],next:"string2"},{regex:/\S*?"/,token:"string",next:"string"},{regex:/(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/,token:"number"},{regex:/((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/,token:["keyword",null,"def",null,"bracket"],next:"stack"},{regex:/(M\:)(\s+)(\S+)(\s+)(\S+)/,token:["keyword",null,"def",null,"tag"]},{regex:/USING\:/,token:"keyword",next:"vocabulary"},{regex:/(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"tag"]},{regex:/(\S+\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"def"]},{regex:/(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>|<PRIVATE|\.|\S*\[|\]|\S*\{|\})(?=\s|$)/,token:"keyword"},{regex:/\S+[\)>\.\*\?]+(?=\s|$)/,token:"builtin"},{regex:/[\)><]+\S+(?=\s|$)/,token:"builtin"},{regex:/(?:[\+\-\=\/\*<>])(?=\s|$)/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/\s+|./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"tag"},{regex:/\s+|./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string2:[{regex:/^;/,token:"keyword",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"bracket",next:"start"},{regex:/--/,token:"bracket"},{regex:/\S+/,token:"meta"},{regex:/\s+|./,token:null}],meta:{dontIndentStates:["start","vocabulary","string","string3","stack"],lineComment:["!","#!"]}}),e.defineMIME("text/x-factor","factor")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("fcl",function(e){var o=e.indentUnit,i={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},c={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},f={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},u={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},a=/[+\-*&^%:=<>!|\/]/;function l(e,t){var n=e.next();if(/[\d\.]/.test(n))return"."==n?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==n?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if("/"==n||"("==n){if(e.eat("*"))return(t.tokenize=d)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(a.test(n))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current().toLowerCase();return i.propertyIsEnumerable(r)||c.propertyIsEnumerable(r)||f.propertyIsEnumerable(r)?"keyword":u.propertyIsEnumerable(r)?"atom":"variable"}function d(e,t){for(var n,r=!1;n=e.next();){if(("/"==n||")"==n)&&r){t.tokenize=l;break}r="*"==n}return"comment"}function m(e,t,n,r,o){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=o}return{startState:function(e){return{tokenize:null,context:new m((e||0)-o,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;var r=(t.tokenize||l)(e,t);if("comment"==r)return r;null==n.align&&(n.align=!0);var o,i,u,a=e.current().toLowerCase();return c.propertyIsEnumerable(a)?(o=t,i=e.column(),u="end_block",o.context=new m(o.indented,i,u,null,o.context)):f.propertyIsEnumerable(a)&&function(e){if(e.context.prev)"end_block"==e.context.type&&(e.indented=e.context.indented),e.context=e.context.prev}(t),t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=l&&null!=e.tokenize)return 0;var n=e.context,r=f.propertyIsEnumerable(t);return n.align?n.column+(r?0:1):n.indented+(r?0:o)},electricChars:"ryk",fold:"brace",blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:"//"}}),e.defineMIME("text/x-fcl","fcl")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t){var e=[];return t.split(" ").forEach(function(t){e.push({name:t})}),e}var E=e("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),r=e("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");t.defineMode("forth",function(){function i(t,e){var E;for(E=t.length-1;0<=E;E--)if(t[E].name===e.toUpperCase())return t[E]}return{startState:function(){return{state:"",base:10,coreWordList:E,immediateWordList:r,wordList:[]}},token:function(t,e){var E;if(t.eatSpace())return null;if(""===e.state){if(t.match(/^(\]|:NONAME)(\s|$)/i))return e.state=" compilation","builtin compilation";if(E=t.match(/^(\:)\s+(\S+)(\s|$)+/))return e.wordList.push({name:E[2].toUpperCase()}),e.state=" compilation","def"+e.state;if(E=t.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i))return e.wordList.push({name:E[2].toUpperCase()}),"def"+e.state;if(E=t.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/))return"builtin"+e.state}else{if(t.match(/^(\;|\[)(\s)/))return e.state="",t.backUp(1),"builtin compilation";if(t.match(/^(\;|\[)($)/))return e.state="","builtin compilation";if(t.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}return(E=t.match(/^(\S+)(\s+|$)/))?void 0!==i(e.wordList,E[1])?"variable"+e.state:"\\"===E[1]?(t.skipToEnd(),"comment"+e.state):void 0!==i(e.coreWordList,E[1])?"builtin"+e.state:void 0!==i(e.immediateWordList,E[1])?"keyword"+e.state:"("===E[1]?(t.eatWhile(function(t){return")"!==t}),t.eat(")"),"comment"+e.state):".("===E[1]?(t.eatWhile(function(t){return")"!==t}),t.eat(")"),"string"+e.state):'S"'===E[1]||'."'===E[1]||'C"'===E[1]?(t.eatWhile(function(t){return'"'!==t}),t.eat('"'),"string"+e.state):E[1]-68719476735?"number"+e.state:"atom"+e.state:void 0}}}),t.defineMIME("text/x-forth","forth")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("fortran",function(){function e(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}var a=e(["abstract","accept","allocatable","allocate","array","assign","asynchronous","backspace","bind","block","byte","call","case","class","close","common","contains","continue","cycle","data","deallocate","decode","deferred","dimension","do","elemental","else","encode","end","endif","entry","enumerator","equivalence","exit","external","extrinsic","final","forall","format","function","generic","go","goto","if","implicit","import","include","inquire","intent","interface","intrinsic","module","namelist","non_intrinsic","non_overridable","none","nopass","nullify","open","optional","options","parameter","pass","pause","pointer","print","private","program","protected","public","pure","read","recursive","result","return","rewind","save","select","sequence","stop","subroutine","target","then","to","type","use","value","volatile","where","while","write"]),o=e(["abort","abs","access","achar","acos","adjustl","adjustr","aimag","aint","alarm","all","allocated","alog","amax","amin","amod","and","anint","any","asin","associated","atan","besj","besjn","besy","besyn","bit_size","btest","cabs","ccos","ceiling","cexp","char","chdir","chmod","clog","cmplx","command_argument_count","complex","conjg","cos","cosh","count","cpu_time","cshift","csin","csqrt","ctime","c_funloc","c_loc","c_associated","c_null_ptr","c_null_funptr","c_f_pointer","c_null_char","c_alert","c_backspace","c_form_feed","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","dabs","dacos","dasin","datan","date_and_time","dbesj","dbesj","dbesjn","dbesy","dbesy","dbesyn","dble","dcos","dcosh","ddim","derf","derfc","dexp","digits","dim","dint","dlog","dlog","dmax","dmin","dmod","dnint","dot_product","dprod","dsign","dsinh","dsin","dsqrt","dtanh","dtan","dtime","eoshift","epsilon","erf","erfc","etime","exit","exp","exponent","extends_type_of","fdate","fget","fgetc","float","floor","flush","fnum","fputc","fput","fraction","fseek","fstat","ftell","gerror","getarg","get_command","get_command_argument","get_environment_variable","getcwd","getenv","getgid","getlog","getpid","getuid","gmtime","hostnm","huge","iabs","iachar","iand","iargc","ibclr","ibits","ibset","ichar","idate","idim","idint","idnint","ieor","ierrno","ifix","imag","imagpart","index","int","ior","irand","isatty","ishft","ishftc","isign","iso_c_binding","is_iostat_end","is_iostat_eor","itime","kill","kind","lbound","len","len_trim","lge","lgt","link","lle","llt","lnblnk","loc","log","logical","long","lshift","lstat","ltime","matmul","max","maxexponent","maxloc","maxval","mclock","merge","move_alloc","min","minexponent","minloc","minval","mod","modulo","mvbits","nearest","new_line","nint","not","or","pack","perror","precision","present","product","radix","rand","random_number","random_seed","range","real","realpart","rename","repeat","reshape","rrspacing","rshift","same_type_as","scale","scan","second","selected_int_kind","selected_real_kind","set_exponent","shape","short","sign","signal","sinh","sin","sleep","sngl","spacing","spread","sqrt","srand","stat","sum","symlnk","system","system_clock","tan","tanh","time","tiny","transfer","transpose","trim","ttynam","ubound","umask","unlink","unpack","verify","xor","zabs","zcos","zexp","zlog","zsin","zsqrt"]),c=e(["c_bool","c_char","c_double","c_double_complex","c_float","c_float_complex","c_funptr","c_int","c_int16_t","c_int32_t","c_int64_t","c_int8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_int_fast8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_least8_t","c_intmax_t","c_intptr_t","c_long","c_long_double","c_long_double_complex","c_long_long","c_ptr","c_short","c_signed_char","c_size_t","character","complex","double","integer","logical","real"]),l=/[+\-*&=<>\/\:]/,s=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");return{startState:function(){return{tokenize:null}},token:function(e,t){if(e.eatSpace())return null;var n=(t.tokenize||function(e,t){if(e.match(s))return"operator";var r,n=e.next();if("!"==n)return e.skipToEnd(),"comment";if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){for(var n,i=!1,a=!1;null!=(n=e.next());){if(n==r&&!i){a=!0;break}i=!i&&"\\"==n}return!a&&i||(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]\(\),]/.test(n))return null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(l.test(n))return e.eatWhile(l),"operator";e.eatWhile(/[\w\$_]/);var i=e.current().toLowerCase();return a.hasOwnProperty(i)?"keyword":o.hasOwnProperty(i)||c.hasOwnProperty(i)?"builtin":"variable"})(e,t);return n}}}),e.defineMIME("text/x-fortran","fortran")});;
  ;!function(i){"object"==typeof exports&&"object"==typeof module?i(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)}(function(i){"use strict";i.defineMode("gas",function(i,t){var r=[],u="",a={".abort":"builtin",".align":"builtin",".altmacro":"builtin",".ascii":"builtin",".asciz":"builtin",".balign":"builtin",".balignw":"builtin",".balignl":"builtin",".bundle_align_mode":"builtin",".bundle_lock":"builtin",".bundle_unlock":"builtin",".byte":"builtin",".cfi_startproc":"builtin",".comm":"builtin",".data":"builtin",".def":"builtin",".desc":"builtin",".dim":"builtin",".double":"builtin",".eject":"builtin",".else":"builtin",".elseif":"builtin",".end":"builtin",".endef":"builtin",".endfunc":"builtin",".endif":"builtin",".equ":"builtin",".equiv":"builtin",".eqv":"builtin",".err":"builtin",".error":"builtin",".exitm":"builtin",".extern":"builtin",".fail":"builtin",".file":"builtin",".fill":"builtin",".float":"builtin",".func":"builtin",".global":"builtin",".gnu_attribute":"builtin",".hidden":"builtin",".hword":"builtin",".ident":"builtin",".if":"builtin",".incbin":"builtin",".include":"builtin",".int":"builtin",".internal":"builtin",".irp":"builtin",".irpc":"builtin",".lcomm":"builtin",".lflags":"builtin",".line":"builtin",".linkonce":"builtin",".list":"builtin",".ln":"builtin",".loc":"builtin",".loc_mark_labels":"builtin",".local":"builtin",".long":"builtin",".macro":"builtin",".mri":"builtin",".noaltmacro":"builtin",".nolist":"builtin",".octa":"builtin",".offset":"builtin",".org":"builtin",".p2align":"builtin",".popsection":"builtin",".previous":"builtin",".print":"builtin",".protected":"builtin",".psize":"builtin",".purgem":"builtin",".pushsection":"builtin",".quad":"builtin",".reloc":"builtin",".rept":"builtin",".sbttl":"builtin",".scl":"builtin",".section":"builtin",".set":"builtin",".short":"builtin",".single":"builtin",".size":"builtin",".skip":"builtin",".sleb128":"builtin",".space":"builtin",".stab":"builtin",".string":"builtin",".struct":"builtin",".subsection":"builtin",".symver":"builtin",".tag":"builtin",".text":"builtin",".title":"builtin",".type":"builtin",".uleb128":"builtin",".val":"builtin",".version":"builtin",".vtable_entry":"builtin",".vtable_inherit":"builtin",".warning":"builtin",".weak":"builtin",".weakref":"builtin",".word":"builtin"},o={};var l=(t.architecture||"x86").toLowerCase();function s(i,t){for(var l,n=!1;null!=(l=i.next());){if("/"===l&&n){t.tokenize=null;break}n="*"===l}return"comment"}return"x86"===l?(u="#",o.ax="variable",o.eax="variable-2",o.rax="variable-3",o.bx="variable",o.ebx="variable-2",o.rbx="variable-3",o.cx="variable",o.ecx="variable-2",o.rcx="variable-3",o.dx="variable",o.edx="variable-2",o.rdx="variable-3",o.si="variable",o.esi="variable-2",o.rsi="variable-3",o.di="variable",o.edi="variable-2",o.rdi="variable-3",o.sp="variable",o.esp="variable-2",o.rsp="variable-3",o.bp="variable",o.ebp="variable-2",o.rbp="variable-3",o.ip="variable",o.eip="variable-2",o.rip="variable-3",o.cs="keyword",o.ds="keyword",o.ss="keyword",o.es="keyword",o.fs="keyword",o.gs="keyword"):"arm"!==l&&"armv6"!==l||(u="@",a.syntax="builtin",o.r0="variable",o.r1="variable",o.r2="variable",o.r3="variable",o.r4="variable",o.r5="variable",o.r6="variable",o.r7="variable",o.r8="variable",o.r9="variable",o.r10="variable",o.r11="variable",o.r12="variable",o.sp="variable-2",o.lr="variable-2",o.pc="variable-2",o.r13=o.sp,o.r14=o.lr,o.r15=o.pc,r.push(function(i,t){if("#"===i)return t.eatWhile(/\w/),"number"})),{startState:function(){return{tokenize:null}},token:function(i,t){if(t.tokenize)return t.tokenize(i,t);if(i.eatSpace())return null;var l,n,e=i.next();if("/"===e&&i.eat("*"))return(t.tokenize=s)(i,t);if(e===u)return i.skipToEnd(),"comment";if('"'===e)return function(i,t){for(var l,n=!1;null!=(l=i.next());){if(l===t&&!n)return;n=!n&&"\\"===l}}(i,'"'),"string";if("."===e)return i.eatWhile(/\w/),n=i.current().toLowerCase(),(l=a[n])||null;if("="===e)return i.eatWhile(/\w/),"tag";if("{"===e)return"braket";if("}"===e)return"braket";if(/\d/.test(e))return"0"===e&&i.eat("x")?i.eatWhile(/[0-9a-fA-F]/):i.eatWhile(/\d/),"number";if(/\w/.test(e))return i.eatWhile(/\w/),i.eat(":")?"tag":(n=i.current().toLowerCase(),(l=o[n])||null);for(var b=0;b<r.length;b++)if(l=r[b](e,i,t))return l},lineComment:u,blockCommentStart:"/*",blockCommentEnd:"*/"}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../markdown/markdown"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],e):e(CodeMirror)}(function(r){"use strict";var s=/^((?:(?: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;r.defineMode("gfm",function(e,n){var i=0;var t={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,t){if(t.combineTokens=null,t.codeBlock)return e.match(/^```+/)?t.codeBlock=!1:e.skipToEnd(),null;if(e.sol()&&(t.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),t.codeBlock=!0,null;if("`"===e.peek()){e.next();var a=e.pos;e.eatWhile("`");var o=1+e.pos-a;return t.code?o===i&&(t.code=!1):(i=o,t.code=!0),null}if(t.code)return e.next(),null;if(e.eatSpace())return t.ateSpace=!0,null;if((e.sol()||t.ateSpace)&&(t.ateSpace=!1)!==n.gitHubSpice){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return t.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return t.combineTokens=!0,"link"}return e.match(s)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(t.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},a={taskLists:!0,strikethrough:!0,emoji:!0};for(var o in n)a[o]=n[o];return a.name="markdown",r.overlayMode(r.getMode(e,a),t)},"markdown"),r.defineMIME("text/x-gfm","gfm")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("gherkin",function(){return{startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(e,a){if(e.sol()&&(a.lineNumber++,a.inKeywordLine=!1,a.inMultilineTable&&(a.tableHeaderLine=!1,e.match(/\s*\|/,!1)||(a.allowMultilineArgument=!1,a.inMultilineTable=!1))),e.eatSpace(),a.allowMultilineArgument){if(a.inMultilineString)return e.match('"""')?(a.inMultilineString=!1,a.allowMultilineArgument=!1):e.match(/.*/),"string";if(a.inMultilineTable)return e.match(/\|\s*/)?"bracket":(e.match(/[^\|]*/),a.tableHeaderLine?"header":"string");if(e.match('"""'))return a.inMultilineString=!0,"string";if(e.match("|"))return a.inMultilineTable=!0,a.tableHeaderLine=!0,"bracket"}return e.match(/#.*/)?"comment":!a.inKeywordLine&&e.match(/@\S+/)?"tag":!a.inKeywordLine&&a.allowFeature&&e.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(a.allowScenario=!0,a.allowBackground=!0,a.allowPlaceholders=!1,a.allowSteps=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowBackground&&e.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(a.allowPlaceholders=!0,a.allowSteps=!0,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):a.allowScenario&&e.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowSteps&&e.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(a.inStep=!0,a.allowPlaceholders=!0,a.allowMultilineArgument=!0,a.inKeywordLine=!0,"keyword"):e.match(/"[^"]*"?/)?"string":a.allowPlaceholders&&e.match(/<[^>]*>?/)?"variable":(e.next(),e.eatWhile(/[^@"<#]/),null)}}}),e.defineMIME("text/x-feature","gherkin")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(p){"use strict";p.defineMode("go",function(e){var i,o=e.indentUnit,a={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},c={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},u=/[+\-*&^%:=<>!|\/]/;function l(e,t){var o,n=e.next();if('"'==n||"'"==n||"`"==n)return t.tokenize=(o=n,function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==o&&!r){i=!0;break}r=!r&&"`"!=o&&"\\"==n}return(i||!r&&"`"!=o)&&(t.tokenize=l),"string"}),t.tokenize(e,t);if(/[\d\.]/.test(n))return"."==n?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==n?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(n))return i=n,null;if("/"==n){if(e.eat("*"))return(t.tokenize=f)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(u.test(n))return e.eatWhile(u),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();return a.propertyIsEnumerable(r)?("case"!=r&&"default"!=r||(i="case"),"keyword"):c.propertyIsEnumerable(r)?"atom":"variable"}function f(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=l;break}r="*"==n}return"comment"}function r(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function s(e,t,n){return e.context=new r(e.indented,t,n,null,e.context)}function d(e){if(e.context.prev){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}}return{startState:function(e){return{tokenize:null,context:new r((e||0)-o,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"case"==n.type&&(n.type="}")),e.eatSpace())return null;i=null;var r=(t.tokenize||l)(e,t);return"comment"==r||(null==n.align&&(n.align=!0),"{"==i?s(t,e.column(),"}"):"["==i?s(t,e.column(),"]"):"("==i?s(t,e.column(),")"):"case"==i?n.type="case":"}"==i&&"}"==n.type?d(t):i==n.type&&d(t),t.startOfLine=!1),r},indent:function(e,t){if(e.tokenize!=l&&null!=e.tokenize)return p.Pass;var n=e.context,r=t&&t.charAt(0);if("case"==n.type&&/^(?:case|default)\b/.test(t))return e.context.type="}",n.indented;var i=r==n.type;return n.align?n.column+(i?0:1):n.indented+(i?0:o)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),p.defineMIME("text/x-go","go")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(k){"use strict";k.defineMode("groovy",function(o){function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var i,a=e("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws trait transient try void volatile while"),l=e("catch class def do else enum finally for if interface switch trait try while"),s=e("return break continue"),u=e("null true false this");function r(e,t){var n=e.next();if('"'==n||"'"==n)return f(n,e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return i=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),"number";if("/"==n){if(e.eat("*"))return t.tokenize.push(p),p(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";if(d(t.lastToken,!1))return f(n,e,t)}if("-"==n&&e.eat(">"))return i="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),"@"==n)return e.eatWhile(/[\w\$_\.]/),"meta";if("."==t.lastToken)return"property";if(e.eat(":"))return i="proplabel","property";var r=e.current();return u.propertyIsEnumerable(r)?"atom":a.propertyIsEnumerable(r)?(l.propertyIsEnumerable(r)?i="newstatement":s.propertyIsEnumerable(r)&&(i="standalone"),"keyword"):"variable"}function f(o,e,t){var a=!1;if("/"!=o&&e.eat(o)){if(!e.eat(o))return"string";a=!0}function n(e,t){for(var n,r=!1,i=!a;null!=(n=e.next());){if(n==o&&!r){if(!a)break;if(e.match(o+o)){i=!0;break}}if('"'==o&&"$"==n&&!r&&e.eat("{"))return t.tokenize.push(c()),"string";r=!r&&"\\"==n}return i&&t.tokenize.pop(),"string"}return t.tokenize.push(n),n(e,t)}function c(){var n=1;function e(e,t){if("}"==e.peek()){if(0==--n)return t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t)}else"{"==e.peek()&&n++;return r(e,t)}return e.isBase=!0,e}function p(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize.pop();break}r="*"==n}return"comment"}function d(e,t){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!t}function m(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function y(e,t,n){return e.context=new m(e.indented,t,n,null,e.context)}function h(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return r.isBase=!0,{startState:function(e){return{tokenize:[r],context:new m((e||0)-o.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"statement"!=n.type||d(t.lastToken,!0)||(h(t),n=t.context)),e.eatSpace())return null;i=null;var r=t.tokenize[t.tokenize.length-1](e,t);if("comment"==r)return r;if(null==n.align&&(n.align=!0),";"!=i&&":"!=i||"statement"!=n.type)if("->"==i&&"statement"==n.type&&"}"==n.prev.type)h(t),t.context.align=!1;else if("{"==i)y(t,e.column(),"}");else if("["==i)y(t,e.column(),"]");else if("("==i)y(t,e.column(),")");else if("}"==i){for(;"statement"==n.type;)n=h(t);for("}"==n.type&&(n=h(t));"statement"==n.type;)n=h(t)}else i==n.type?h(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==i)&&y(t,e.column(),"statement");else h(t);return t.startOfLine=!1,t.lastToken=i||r,r},indent:function(e,t){if(!e.tokenize[e.tokenize.length-1].isBase)return k.Pass;var n=t&&t.charAt(0),r=e.context;"statement"!=r.type||d(e.lastToken,!0)||(r=r.prev);var i=n==r.type;return"statement"==r.type?r.indented+("{"==n?0:o.indentUnit):r.align?r.column+(i?0:1):r.indented+(i?0:o.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace"}}),k.defineMIME("text/x-groovy","groovy")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],e):e(CodeMirror)}(function(t){"use strict";t.defineMode("haml",function(e){var i=t.getMode(e,{name:"htmlmixed"}),n=t.getMode(e,"ruby");function r(n){return function(e,t){return e.peek()==n&&1==t.rubyState.tokenize.length?(e.next(),t.tokenize=u,"closeAttributeTag"):o(e,t)}}function o(e,t){return e.match("-#")?(e.skipToEnd(),"comment"):n.token(e,t.rubyState)}function u(e,t){var n=e.peek();if("comment"==t.previousToken.style&&t.indented>t.previousToken.indented)return e.skipToEnd(),"commentLine";if(t.startOfLine){if("!"==n&&e.match("!!"))return e.skipToEnd(),"tag";if(e.match(/^%[\w:#\.]+=/))return t.tokenize=o,"hamlTag";if(e.match(/^%[\w:]+/))return"hamlTag";if("/"==n)return e.skipToEnd(),"comment"}if((t.startOfLine||"hamlTag"==t.previousToken.style)&&("#"==n||"."==n))return e.match(/[\w-#\.]*/),"hamlAttribute";if(t.startOfLine&&!e.match("--\x3e",!1)&&("="==n||"-"==n))return t.tokenize=o,t.tokenize(e,t);if("hamlTag"==t.previousToken.style||"closeAttributeTag"==t.previousToken.style||"hamlAttribute"==t.previousToken.style){if("("==n)return t.tokenize=r(")"),t.tokenize(e,t);if("{"==n&&!e.match(/^\{%.*/))return t.tokenize=r("}"),t.tokenize(e,t)}return i.token(e,t.htmlState)}return{startState:function(){return{htmlState:t.startState(i),rubyState:t.startState(n),indented:0,previousToken:{style:null,indented:0},tokenize:u}},copyState:function(e){return{htmlState:t.copyState(i,e.htmlState),rubyState:t.copyState(n,e.rubyState),indented:e.indented,previousToken:e.previousToken,tokenize:e.tokenize}},token:function(e,t){if(e.sol()&&(t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;var n=t.tokenize(e,t);if(t.startOfLine=!1,n&&"commentLine"!=n&&(t.previousToken={style:n,indented:t.indented}),e.eol()&&t.tokenize==o){e.backUp(1);var i=e.peek();e.next(),i&&","!=i&&(t.tokenize=u)}return"hamlTag"==n?n="tag":"commentLine"==n?n="comment":"hamlAttribute"==n?n="attribute":"closeAttributeTag"==n&&(n=null),n}}},"htmlmixed","ruby"),t.defineMIME("text/x-haml","haml")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(n){"use strict";n.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),n.defineMode("handlebars",function(e,o){var t=n.getMode(e,"handlebars-tags");return o&&o.base?n.multiplexingMode(n.getMode(e,o.base),{open:"{{",close:"}}",mode:t,parseDelimiters:!0}):t}),n.defineMIME("text/x-handlebars-template","handlebars")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../haskell/haskell")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../haskell/haskell"],e):e(CodeMirror)}(function(o){"use strict";o.defineMode("haskell-literate",function(e,t){var n=o.getMode(e,t&&t.base||"haskell");return{startState:function(){return{inCode:!1,baseState:o.startState(n)}},token:function(e,t){return e.sol()&&(t.inCode=e.eat(">"))?"meta":t.inCode?n.token(e,t.baseState):(e.skipToEnd(),"comment")},innerMode:function(e){return e.inCode?{state:e.baseState,mode:n}:null}}},"haskell"),o.defineMIME("text/x-literate-haskell","haskell-literate")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("haskell",function(e,i){function a(e,r,t){return r(t),t(e,r)}var o=/[a-z_]/,l=/[A-Z]/,u=/\d/,f=/[0-9A-Fa-f]/,s=/[0-7]/,c=/[a-z_A-Z0-9'\xa1-\uffff]/,d=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,h=/[ \t\v\f]/;function p(e,r){if(e.eatWhile(h))return null;var t=e.next();if(m.test(t)){if("{"==t&&e.eat("-")){var n="comment";return e.eat("#")&&(n="meta"),a(e,r,function i(a,o){if(0==o)return p;return function(e,r){for(var t=o;!e.eol();){var n=e.next();if("{"==n&&e.eat("-"))++t;else if("-"==n&&e.eat("}")&&0==--t)return r(p),a}return r(i(a,t)),a}}(n,1))}return null}if("'"==t)return e.eat("\\"),e.next(),e.eat("'")?"string":"string error";if('"'==t)return a(e,r,g);if(l.test(t))return e.eatWhile(c),e.eat(".")?"qualifier":"variable-2";if(o.test(t))return e.eatWhile(c),"variable";if(u.test(t)){if("0"==t){if(e.eat(/[xX]/))return e.eatWhile(f),"integer";if(e.eat(/[oO]/))return e.eatWhile(s),"number"}e.eatWhile(u);n="number";return e.match(/^\.\d+/)&&(n="number"),e.eat(/[eE]/)&&(n="number",e.eat(/[-+]/),e.eatWhile(u)),n}if("."==t&&e.eat("."))return"keyword";if(d.test(t)){if("-"==t&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(d)))return e.skipToEnd(),"comment";n="variable";return":"==t&&(n="variable-2"),e.eatWhile(d),n}return"error"}function g(e,r){for(;!e.eol();){var t=e.next();if('"'==t)return r(p),"string";if("\\"==t){if(e.eol()||e.eat(h))return r(n),"string";e.eat("&")||e.next()}}return r(p),"string error"}function n(e,r){return e.eat("\\")?a(e,r,g):(e.next(),r(p),"error")}var v=function(){var t={};function e(r){return function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=r}}e("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),e("keyword")("..",":","::","=","\\","<-","->","@","~","=>"),e("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),e("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),e("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var r=i.overrideKeywords;if(r)for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n]);return t}();return{startState:function(){return{f:p}},copyState:function(e){return{f:e.f}},token:function(e,r){var t=r.f(e,function(e){r.f=e}),n=e.current();return v.hasOwnProperty(n)?v[n]:t},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),e.defineMIME("text/x-haskell","haskell")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("haxe",function(e,n){var o=e.indentUnit;function t(e){return{type:e,style:"keyword"}}var r,a=t("keyword a"),i=t("keyword b"),l=t("keyword c"),u=t("operator"),c={type:"atom",style:"atom"},f={type:"attribute",style:"attribute"},s=t("typedef"),d={if:a,while:a,else:i,do:i,try:i,return:l,break:l,continue:l,new:l,throw:l,var:t("var"),inline:f,static:f,using:t("import"),public:f,private:f,cast:t("cast"),import:t("import"),macro:t("macro"),function:t("function"),catch:t("catch"),untyped:t("untyped"),callback:t("cb"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:u,never:t("property_access"),trace:t("trace"),class:s,abstract:s,enum:s,interface:s,typedef:s,extends:s,implements:s,dynamic:s,true:c,false:c,null:c},p=/[+\-*&%=<>!?|]/;function m(e,t,n){return(t.tokenize=n)(e,t)}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==t&&!r)return!0;r=!r&&"\\"==n}}function b(e,t,n){return s=e,r=n,t}function y(e,t){var n=e.next();if('"'==n||"'"==n)return m(e,t,(r=n,function(e,t){return v(e,r)&&(t.tokenize=y),b("string","string")}));if(/[\[\]{}\(\),;\:\.]/.test(n))return b(n);if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),b("number","number");if(/\d/.test(n)||"-"==n&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),b("number","number");if(t.reAllowed&&"~"==n&&e.eat(/\//))return v(e,"/"),e.eatWhile(/[gimsu]/),b("regexp","string-2");if("/"==n)return e.eat("*")?m(e,t,x):e.eat("/")?(e.skipToEnd(),b("comment","comment")):(e.eatWhile(p),b("operator",null,e.current()));if("#"==n)return e.skipToEnd(),b("conditional","meta");if("@"==n)return e.eat(/:/),e.eatWhile(/[\w_]/),b("metadata","meta");if(p.test(n))return e.eatWhile(p),b("operator",null,e.current());if(/[A-Z]/.test(n))return e.eatWhile(/[\w_<>]/),b("type","variable-3",a=e.current());e.eatWhile(/[\w_]/);var r,a=e.current(),i=d.propertyIsEnumerable(a)&&d[a];return i&&t.kwAllowed?b(i.type,i.style,a):b("variable","variable",a)}function x(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=y;break}r="*"==n}return b("comment","comment")}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};function k(e,t,n,r,a,i){this.indented=e,this.column=t,this.type=n,this.prev=a,this.info=i,null!=r&&(this.align=r)}function w(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function g(e,t){if(/[a-z]/.test(t.charAt(0)))return!1;for(var n=e.importedtypes.length,r=0;r<n;r++)if(e.importedtypes[r]==t)return!0}function V(e){for(var t=A.state,n=t.importedtypes;n;n=n.next)if(n.name==e)return;t.importedtypes={name:e,next:t.importedtypes}}var A={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;0<=e;e--)A.cc.push(arguments[e])}function E(){return S.apply(null,arguments),!0}function W(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function z(e){var t=A.state;if(t.context){if(A.marked="def",W(e,t.localVars))return;t.localVars={name:e,next:t.localVars}}else if(t.globalVars){if(W(e,t.globalVars))return;t.globalVars={name:e,next:t.globalVars}}}var M={name:"this",next:null};function C(){A.state.context||(A.state.localVars=M),A.state.context={prev:A.state.context,vars:A.state.localVars}}function T(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function Z(t,n){var e=function(){var e=A.state;e.lexical=new k(e.indented,A.stream.column(),t,null,e.lexical,n)};return e.lex=!0,e}function I(){var e=A.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function O(n){return function e(t){return t==n?E():";"==n?S():E(e)}}function P(e){return"@"==e?E(B):"var"==e?E(Z("vardef"),N,O(";"),I):"keyword a"==e?E(Z("form"),_,P,I):"keyword b"==e?E(Z("form"),P,I):"{"==e?E(Z("}"),C,L,I,T):";"==e?E():"attribute"==e?E(q):"function"==e?E(Y):"for"==e?E(Z("form"),O("("),Z(")"),R,O(")"),I,P,I):"variable"==e?E(Z("stat"),G):"switch"==e?E(Z("form"),_,Z("}","switch"),O("{"),L,I,I):"case"==e?E(_,O(":")):"default"==e?E(O(":")):"catch"==e?E(Z("form"),C,O("("),re,O(")"),P,I,T):"import"==e?E(U,O(";")):"typedef"==e?E($):S(Z("stat"),_,O(";"),I)}function _(e){return h.hasOwnProperty(e)?E(D):"type"==e?E(D):"function"==e?E(Y):"keyword c"==e?E(j):"("==e?E(Z(")"),j,O(")"),I,D):"operator"==e?E(_):"["==e?E(Z("]"),K(j,"]"),I,D):"{"==e?E(Z("}"),K(J,"}"),I,D):E()}function j(e){return e.match(/[;\}\)\],]/)?S():S(_)}function D(e,t){return"operator"==e&&/\+\+|--/.test(t)?E(D):"operator"==e||":"==e?E(_):";"!=e?"("==e?E(Z(")"),K(_,")"),I,D):"."==e?E(H,D):"["==e?E(Z("]"),_,O("]"),I,D):void 0:void 0}function q(e){return"attribute"==e?E(q):"function"==e?E(Y):"var"==e?E(N):void 0}function B(e){return":"==e?E(B):"variable"==e?E(B):"("==e?E(Z(")"),K(F,")"),I,P):void 0}function F(e){if("variable"==e)return E()}function U(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(V(t),E()):"variable"==e||"property"==e||"."==e||"*"==t?E(U):void 0}function $(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(V(t),E()):"type"==e&&/[A-Z]/.test(t.charAt(0))?E():void 0}function G(e){return":"==e?E(I,P):S(D,O(";"),I)}function H(e){if("variable"==e)return A.marked="property",E()}function J(e){if("variable"==e&&(A.marked="property"),h.hasOwnProperty(e))return E(O(":"),_)}function K(t,n){function r(e){return","==e?E(t,r):e==n?E():E(O(n))}return function(e){return e==n?E():S(t,r)}}function L(e){return"}"==e?E():S(P,L)}function N(e,t){return"variable"==e?(z(t),E(ee,Q)):E()}function Q(e,t){return"="==t?E(_,Q):","==e?E(N):void 0}function R(e,t){return"variable"==e?(z(t),E(X,_)):S()}function X(e,t){if("in"==t)return E()}function Y(e,t){return"variable"==e||"type"==e?(z(t),E(Y)):"new"==t?E(Y):"("==e?E(Z(")"),C,K(re,")"),I,ee,P,T):void 0}function ee(e){if(":"==e)return E(te)}function te(e){return"type"==e?E():"variable"==e?E():"{"==e?E(Z("}"),K(ne,"}"),I):void 0}function ne(e){if("variable"==e)return E(ee)}function re(e,t){if("variable"==e)return z(t),E(ee)}return I.lex=T.lex=!0,{startState:function(e){var t={tokenize:y,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new k((e||0)-o,0,"block",!1),localVars:n.localVars,importedtypes:["Int","Float","String","Void","Std","Bool","Dynamic","Array"],context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==s?n:(t.reAllowed=!("operator"!=s&&"keyword c"!=s&&!s.match(/^[\[{}\(,;:]$/)),t.kwAllowed="."!=s,function(e,t,n,r,a){var i=e.cc;for(A.state=e,A.stream=a,A.marked=null,A.cc=i,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():P)(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return A.marked?A.marked:"variable"==n&&w(e,r)?"variable-2":"variable"==n&&g(e,r)?"variable-3":t}}(t,n,s,r,e))},indent:function(e,t){if(e.tokenize!=y)return 0;var n=t&&t.charAt(0),r=e.lexical;"stat"==r.type&&"}"==n&&(r=r.prev);var a=r.type,i=n==a;return"vardef"==a?r.indented+4:"form"==a&&"{"==n?r.indented:"stat"==a||"form"==a?r.indented+o:"switch"!=r.info||i?r.align?r.column+(i?0:1):r.indented+(i?0:o):r.indented+(/^(?:case|default)\b/.test(t)?o:2*o)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-haxe","haxe"),e.defineMode("hxml",function(){return{startState:function(){return{define:!1,inString:!1}},token:function(e,t){var n=e.peek(),r=e.sol();if("#"==n)return e.skipToEnd(),"comment";if(r&&"-"==n){var a="variable-2";return e.eat(/-/),"-"==e.peek()&&(e.eat(/-/),a="keyword a"),"D"==e.peek()&&(e.eat(/[D]/),a="keyword c",t.define=!0),e.eatWhile(/[A-Z]/i),a}n=e.peek();return 0==t.inString&&"'"==n&&(t.inString=!0,e.next()),1==t.inString?(e.skipTo("'")||e.skipToEnd(),"'"==e.peek()&&(e.next(),t.inString=!1),"string"):(e.next(),null)},lineComment:"#"}}),e.defineMIME("text/x-hxml","hxml")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(d){"use strict";d.defineMode("htmlembedded",function(e,i){var t=i.closeComment||"--%>";return d.multiplexingMode(d.getMode(e,"htmlmixed"),{open:i.openComment||"<%--",close:t,delimStyle:"comment",mode:{token:function(e){return e.skipTo(t)||e.skipToEnd(),"comment"}}},{open:i.open||i.scriptStartRegex||"<%",close:i.close||i.scriptEndRegex||"%>",mode:d.getMode(e,i.scriptingModeSpec)})},"htmlmixed"),d.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),d.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),d.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),d.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})});;
  ;!function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)}(function(r){"use strict";r.defineMode("http",function(){function o(r,e){return r.skipToEnd(),e.cur=c,"error"}function r(r,e){return r.match(/^HTTP\/\d\.\d/)?(e.cur=t,"keyword"):r.match(/^[A-Z]+/)&&/[ \t]/.test(r.peek())?(e.cur=n,"keyword"):o(r,e)}function t(r,e){var t=r.match(/^\d+/);if(!t)return o(r,e);e.cur=i;var n=Number(t[0]);return 100<=n&&n<200?"positive informational":200<=n&&n<300?"positive success":300<=n&&n<400?"positive redirect":400<=n&&n<500?"negative client-error":500<=n&&n<600?"negative server-error":"error"}function i(r,e){return r.skipToEnd(),e.cur=c,null}function n(r,e){return r.eatWhile(/\S/),e.cur=u,"string-2"}function u(r,e){return r.match(/^HTTP\/\d\.\d$/)?(e.cur=c,"keyword"):o(r,e)}function c(r){return r.sol()&&!r.eat(/[ \t]/)?r.match(/^.*?:/)?"atom":(r.skipToEnd(),"error"):(r.skipToEnd(),"string")}function d(r){return r.skipToEnd(),null}return{token:function(r,e){var t=e.cur;return t!=c&&t!=d&&r.eatSpace()?null:t(r,e)},blankLine:function(r){r.cur=d},startState:function(){return{cur:r}}}}),r.defineMIME("message/http","http")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var r=["a_correlate","abs","acos","adapt_hist_equal","alog","alog2","alog10","amoeba","annotate","app_user_dir","app_user_dir_query","arg_present","array_equal","array_indices","arrow","ascii_template","asin","assoc","atan","axis","axis","bandpass_filter","bandreject_filter","barplot","bar_plot","beseli","beselj","beselk","besely","beta","biginteger","bilinear","bin_date","binary_template","bindgen","binomial","bit_ffs","bit_population","blas_axpy","blk_con","boolarr","boolean","boxplot","box_cursor","breakpoint","broyden","bubbleplot","butterworth","bytarr","byte","byteorder","bytscl","c_correlate","calendar","caldat","call_external","call_function","call_method","call_procedure","canny","catch","cd","cdf","ceil","chebyshev","check_math","chisqr_cvf","chisqr_pdf","choldc","cholsol","cindgen","cir_3pnt","clipboard","close","clust_wts","cluster","cluster_tree","cmyk_convert","code_coverage","color_convert","color_exchange","color_quan","color_range_map","colorbar","colorize_sample","colormap_applicable","colormap_gradient","colormap_rotation","colortable","comfit","command_line_args","common","compile_opt","complex","complexarr","complexround","compute_mesh_normals","cond","congrid","conj","constrained_min","contour","contour","convert_coord","convol","convol_fft","coord2to3","copy_lun","correlate","cos","cosh","cpu","cramer","createboxplotdata","create_cursor","create_struct","create_view","crossp","crvlength","ct_luminance","cti_test","cursor","curvefit","cv_coord","cvttobm","cw_animate","cw_animate_getp","cw_animate_load","cw_animate_run","cw_arcball","cw_bgroup","cw_clr_index","cw_colorsel","cw_defroi","cw_field","cw_filesel","cw_form","cw_fslider","cw_light_editor","cw_light_editor_get","cw_light_editor_set","cw_orient","cw_palette_editor","cw_palette_editor_get","cw_palette_editor_set","cw_pdmenu","cw_rgbslider","cw_tmpl","cw_zoom","db_exists","dblarr","dcindgen","dcomplex","dcomplexarr","define_key","define_msgblk","define_msgblk_from_file","defroi","defsysv","delvar","dendro_plot","dendrogram","deriv","derivsig","determ","device","dfpmin","diag_matrix","dialog_dbconnect","dialog_message","dialog_pickfile","dialog_printersetup","dialog_printjob","dialog_read_image","dialog_write_image","dictionary","digital_filter","dilate","dindgen","dissolve","dist","distance_measure","dlm_load","dlm_register","doc_library","double","draw_roi","edge_dog","efont","eigenql","eigenvec","ellipse","elmhes","emboss","empty","enable_sysrtn","eof","eos","erase","erf","erfc","erfcx","erode","errorplot","errplot","estimator_filter","execute","exit","exp","expand","expand_path","expint","extrac","extract_slice","f_cvf","f_pdf","factorial","fft","file_basename","file_chmod","file_copy","file_delete","file_dirname","file_expand_path","file_gunzip","file_gzip","file_info","file_lines","file_link","file_mkdir","file_move","file_poll_input","file_readlink","file_same","file_search","file_tar","file_test","file_untar","file_unzip","file_which","file_zip","filepath","findgen","finite","fix","flick","float","floor","flow3","fltarr","flush","format_axis_values","forward_function","free_lun","fstat","fulstr","funct","function","fv_test","fx_root","fz_roots","gamma","gamma_ct","gauss_cvf","gauss_pdf","gauss_smooth","gauss2dfit","gaussfit","gaussian_function","gaussint","get_drive_list","get_dxf_objects","get_kbrd","get_login_info","get_lun","get_screen_size","getenv","getwindows","greg2jul","grib","grid_input","grid_tps","grid3","griddata","gs_iter","h_eq_ct","h_eq_int","hanning","hash","hdf","hdf5","heap_free","heap_gc","heap_nosave","heap_refcount","heap_save","help","hilbert","hist_2d","hist_equal","histogram","hls","hough","hqr","hsv","i18n_multibytetoutf8","i18n_multibytetowidechar","i18n_utf8tomultibyte","i18n_widechartomultibyte","ibeta","icontour","iconvertcoord","idelete","identity","idl_base64","idl_container","idl_validname","idlexbr_assistant","idlitsys_createtool","idlunit","iellipse","igamma","igetcurrent","igetdata","igetid","igetproperty","iimage","image","image_cont","image_statistics","image_threshold","imaginary","imap","indgen","int_2d","int_3d","int_tabulated","intarr","interpol","interpolate","interval_volume","invert","ioctl","iopen","ir_filter","iplot","ipolygon","ipolyline","iputdata","iregister","ireset","iresolve","irotate","isa","isave","iscale","isetcurrent","isetproperty","ishft","isocontour","isosurface","isurface","itext","itranslate","ivector","ivolume","izoom","journal","json_parse","json_serialize","jul2greg","julday","keyword_set","krig2d","kurtosis","kw_test","l64indgen","la_choldc","la_cholmprove","la_cholsol","la_determ","la_eigenproblem","la_eigenql","la_eigenvec","la_elmhes","la_gm_linear_model","la_hqr","la_invert","la_least_square_equality","la_least_squares","la_linear_equation","la_ludc","la_lumprove","la_lusol","la_svd","la_tridc","la_trimprove","la_triql","la_trired","la_trisol","label_date","label_region","ladfit","laguerre","lambda","lambdap","lambertw","laplacian","least_squares_filter","leefilt","legend","legendre","linbcg","lindgen","linfit","linkimage","list","ll_arc_distance","lmfit","lmgr","lngamma","lnp_test","loadct","locale_get","logical_and","logical_or","logical_true","lon64arr","lonarr","long","long64","lsode","lu_complex","ludc","lumprove","lusol","m_correlate","machar","make_array","make_dll","make_rt","map","mapcontinents","mapgrid","map_2points","map_continents","map_grid","map_image","map_patch","map_proj_forward","map_proj_image","map_proj_info","map_proj_init","map_proj_inverse","map_set","matrix_multiply","matrix_power","max","md_test","mean","meanabsdev","mean_filter","median","memory","mesh_clip","mesh_decimate","mesh_issolid","mesh_merge","mesh_numtriangles","mesh_obj","mesh_smooth","mesh_surfacearea","mesh_validate","mesh_volume","message","min","min_curve_surf","mk_html_help","modifyct","moment","morph_close","morph_distance","morph_gradient","morph_hitormiss","morph_open","morph_thin","morph_tophat","multi","n_elements","n_params","n_tags","ncdf","newton","noise_hurl","noise_pick","noise_scatter","noise_slur","norm","obj_class","obj_destroy","obj_hasmethod","obj_isa","obj_new","obj_valid","objarr","on_error","on_ioerror","online_help","openr","openu","openw","oplot","oploterr","orderedhash","p_correlate","parse_url","particle_trace","path_cache","path_sep","pcomp","plot","plot3d","plot","plot_3dbox","plot_field","ploterr","plots","polar_contour","polar_surface","polyfill","polyshade","pnt_line","point_lun","polarplot","poly","poly_2d","poly_area","poly_fit","polyfillv","polygon","polyline","polywarp","popd","powell","pref_commit","pref_get","pref_set","prewitt","primes","print","printf","printd","pro","product","profile","profiler","profiles","project_vol","ps_show_fonts","psafm","pseudo","ptr_free","ptr_new","ptr_valid","ptrarr","pushd","qgrid3","qhull","qromb","qromo","qsimp","query_*","query_ascii","query_bmp","query_csv","query_dicom","query_gif","query_image","query_jpeg","query_jpeg2000","query_mrsid","query_pict","query_png","query_ppm","query_srf","query_tiff","query_video","query_wav","r_correlate","r_test","radon","randomn","randomu","ranks","rdpix","read","readf","read_ascii","read_binary","read_bmp","read_csv","read_dicom","read_gif","read_image","read_interfile","read_jpeg","read_jpeg2000","read_mrsid","read_pict","read_png","read_ppm","read_spr","read_srf","read_sylk","read_tiff","read_video","read_wav","read_wave","read_x11_bitmap","read_xwd","reads","readu","real_part","rebin","recall_commands","recon3","reduce_colors","reform","region_grow","register_cursor","regress","replicate","replicate_inplace","resolve_all","resolve_routine","restore","retall","return","reverse","rk4","roberts","rot","rotate","round","routine_filepath","routine_info","rs_test","s_test","save","savgol","scale3","scale3d","scatterplot","scatterplot3d","scope_level","scope_traceback","scope_varfetch","scope_varname","search2d","search3d","sem_create","sem_delete","sem_lock","sem_release","set_plot","set_shading","setenv","sfit","shade_surf","shade_surf_irr","shade_volume","shift","shift_diff","shmdebug","shmmap","shmunmap","shmvar","show3","showfont","signum","simplex","sin","sindgen","sinh","size","skewness","skip_lun","slicer3","slide_image","smooth","sobel","socket","sort","spawn","sph_4pnt","sph_scat","spher_harm","spl_init","spl_interp","spline","spline_p","sprsab","sprsax","sprsin","sprstp","sqrt","standardize","stddev","stop","strarr","strcmp","strcompress","streamline","streamline","stregex","stretch","string","strjoin","strlen","strlowcase","strmatch","strmessage","strmid","strpos","strput","strsplit","strtrim","struct_assign","struct_hide","strupcase","surface","surface","surfr","svdc","svdfit","svsol","swap_endian","swap_endian_inplace","symbol","systime","t_cvf","t_pdf","t3d","tag_names","tan","tanh","tek_color","temporary","terminal_size","tetra_clip","tetra_surface","tetra_volume","text","thin","thread","threed","tic","time_test2","timegen","timer","timestamp","timestamptovalues","tm_test","toc","total","trace","transpose","tri_surf","triangulate","trigrid","triql","trired","trisol","truncate_lun","ts_coef","ts_diff","ts_fcast","ts_smooth","tv","tvcrs","tvlct","tvrd","tvscl","typename","uindgen","uint","uintarr","ul64indgen","ulindgen","ulon64arr","ulonarr","ulong","ulong64","uniq","unsharp_mask","usersym","value_locate","variance","vector","vector_field","vel","velovect","vert_t3d","voigt","volume","voronoi","voxel_proj","wait","warp_tri","watershed","wdelete","wf_draw","where","widget_base","widget_button","widget_combobox","widget_control","widget_displaycontextmenu","widget_draw","widget_droplist","widget_event","widget_info","widget_label","widget_list","widget_propertysheet","widget_slider","widget_tab","widget_table","widget_text","widget_tree","widget_tree_move","widget_window","wiener_filter","window","window","write_bmp","write_csv","write_gif","write_image","write_jpeg","write_jpeg2000","write_nrif","write_pict","write_png","write_ppm","write_spr","write_srf","write_sylk","write_tiff","write_video","write_wav","write_wave","writeu","wset","wshow","wtn","wv_applet","wv_cwt","wv_cw_wavelet","wv_denoise","wv_dwt","wv_fn_coiflet","wv_fn_daubechies","wv_fn_gaussian","wv_fn_haar","wv_fn_morlet","wv_fn_paul","wv_fn_symlet","wv_import_data","wv_import_wavelet","wv_plot3d_wps","wv_plot_multires","wv_pwt","wv_tool_denoise","xbm_edit","xdisplayfile","xdxf","xfont","xinteranimate","xloadct","xmanager","xmng_tmpl","xmtool","xobjview","xobjview_rotate","xobjview_write_image","xpalette","xpcolor","xplot3d","xregistered","xroi","xsq_test","xsurface","xvaredit","xvolume","xvolume_rotate","xvolume_write_image","xyouts","zlib_compress","zlib_uncompress","zoom","zoom_24"],i=t(r),a=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],_=t(a);e.registerHelper("hintWords","idl",r.concat(a));var o=new RegExp("^[_a-z¡-][_a-z0-9¡-]*","i"),l=/[+\-*&=<>\/@#~$]/,s=new RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");e.defineMode("idl",function(){return{token:function(e){return function(e){if(e.eatSpace())return null;if(e.match(";"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)?"string":e.match(/^'([^']|(''))*'/)?"string":e.match(_)?"keyword":e.match(i)?"builtin":e.match(o)?"variable":e.match(l)||e.match(s)?"operator":(e.next(),null)}(e)}}}),e.defineMIME("text/x-idl","idl")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("jinja2",function(){var i=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","plural"],r=/^[+\-*&%=<>!?|~^]/,o=/^[:\[\(\{]/,a=["true","false"],c=/^(\d[+\-\*\/])?\d+(\.\d+)?/;function e(e,n){var t=e.peek();if(n.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),n.incomment=!1):e.skipToEnd(),"comment";if(n.intag){if(n.operator){if(n.operator=!1,e.match(a))return"atom";if(e.match(c))return"number"}if(n.sign){if(n.sign=!1,e.match(a))return"atom";if(e.match(c))return"number"}if(n.instring)return t==n.instring&&(n.instring=!1),e.next(),"string";if("'"==t||'"'==t)return n.instring=t,e.next(),"string";if(e.match(n.intag+"}")||e.eat("-")&&e.match(n.intag+"}"))return n.intag=!1,"tag";if(e.match(r))return n.operator=!0,"operator";if(e.match(o))n.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(i))return"keyword";if(e.match(a))return"atom";if(e.match(c))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return n.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),n.incomment=!1):e.skipToEnd(),"comment";if(t=e.eat(/\{|%/))return"{"==(n.intag=t)&&(n.intag="}"),e.eat("-"),"tag"}e.next()}return i=new RegExp("(("+i.join(")|(")+"))\\b"),a=new RegExp("(("+a.join(")|(")+"))\\b"),{startState:function(){return{tokenize:e}},token:function(e,n){return n.tokenize(e,n)},blockCommentStart:"{#",blockCommentEnd:"#}"}}),e.defineMIME("text/jinja2","jinja2")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],t):t(CodeMirror)}(function(f){"use strict";function l(t,e,n,r){this.state=t,this.mode=e,this.depth=n,this.prev=r}f.defineMode("jsx",function(c,t){var p=f.getMode(c,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),d=f.getMode(c,t&&t.base||"javascript");function u(t){var e=t.tagName;t.tagName=null;var n=p.indent(t,"","");return t.tagName=e,n}function x(t,e){return e.context.mode==p?function(t,e,n){if(2==n.depth)return t.match(/^.*?\*\//)?n.depth=1:t.skipToEnd(),"comment";if("{"==t.peek()){p.skipAttribute(n.state);var r=u(n.state),i=n.state.context;if(i&&t.match(/^[^>]*>\s*$/,!1)){for(;i.prev&&!i.startOfLine;)i=i.prev;i.startOfLine?r-=c.indentUnit:n.prev.state.lexical&&(r=n.prev.state.lexical.indented)}else 1==n.depth&&(r+=c.indentUnit);return e.context=new l(f.startState(d,r),d,0,e.context),null}if(1==n.depth){if("<"==t.peek())return p.skipAttribute(n.state),e.context=new l(f.startState(p,u(n.state)),p,0,e.context),null;if(t.match("//"))return t.skipToEnd(),"comment";if(t.match("/*"))return n.depth=2,x(t,e)}var a,o=p.token(t,n.state),s=t.current();/\btag\b/.test(o)?/>$/.test(s)?n.state.context?n.depth=0:e.context=e.context.prev:/^</.test(s)&&(n.depth=1):!o&&-1<(a=s.indexOf("{"))&&t.backUp(s.length-a);return o}(t,e,e.context):function(t,e,n){if("<"==t.peek()&&d.expressionAllowed(t,n.state))return d.skipExpression(n.state),e.context=new l(f.startState(p,d.indent(n.state,"","")),p,0,e.context),null;var r=d.token(t,n.state);if(!r&&null!=n.depth){var i=t.current();"{"==i?n.depth++:"}"==i&&0==--n.depth&&(e.context=e.context.prev)}return r}(t,e,e.context)}return{startState:function(){return{context:new l(f.startState(d),d)}},copyState:function(t){return{context:function t(e){return new l(f.copyState(e.mode,e.state),e.mode,e.depth,e.prev&&t(e.prev))}(t.context)}},token:x,indent:function(t,e,n){return t.context.mode.indent(t.context.state,e,n)},innerMode:function(t){return t.context}}},"xml","javascript"),f.defineMIME("text/jsx","jsx"),f.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){"use strict";o.defineMode("julia",function(r,e){function t(e,t){return void 0===t&&(t="\\b"),new RegExp("^(("+e.join(")|(")+"))"+t)}var c=e.operators||t(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),u=e.delimiters||/^[;,()[\]{}]/,f=e.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,a=t(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}","\\\\[abefnrtv0%?'\"\\\\]","([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"],"'"),n=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],i=["true","false","nothing","NaN","Inf"];o.registerHelper("hintWords","julia",n.concat(i));var l=t(["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),m=t(["end","else","elseif","catch","finally"]),p=t(n),d=t(i),h=/^@[_A-Za-z][\w]*/,k=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,b=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function v(e){return 0<e.nestedArrays}function F(e,t){return void 0===t&&(t=0),e.scopes.length<=t?null:e.scopes[e.scopes.length-(t+1)]}function g(e,t){if(e.match(/^#=/,!1))return t.tokenize=z,t.tokenize(e,t);var n=t.leavingExpr;if(e.sol()&&(n=!1),t.leavingExpr=!1,n&&e.match(/^'+/))return"operator";if(e.match(/\.{4,}/))return"error";if(e.match(/\.{1,3}/))return"operator";if(e.eatSpace())return null;var r,i=e.peek();if("#"===i)return e.skipToEnd(),"comment";if("["===i&&(t.scopes.push("["),t.nestedArrays++),"("===i&&(t.scopes.push("("),t.nestedGenerators++),v(t)&&"]"===i){for("if"===F(t)&&t.scopes.pop();"for"===F(t);)t.scopes.pop();t.scopes.pop(),t.nestedArrays--,t.leavingExpr=!0}if(0<t.nestedGenerators&&")"===i){for("if"===F(t)&&t.scopes.pop();"for"===F(t);)t.scopes.pop();t.scopes.pop(),t.nestedGenerators--,t.leavingExpr=!0}if(v(t)){if("end"==t.lastToken&&e.match(/^:/))return"operator";if(e.match(/^end/))return"number"}if((r=e.match(l,!1))&&t.scopes.push(r[0]),e.match(m,!1)&&t.scopes.pop(),e.match(/^::(?![:\$])/))return t.tokenize=x,t.tokenize(e,t);if(!n&&e.match(k)||e.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(e.match(c))return"operator";if(e.match(/^\.?\d/,!1)){var a=RegExp(/^im\b/),o=!1;if(e.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)&&(o=!0),e.match(/^\d+\.(?!\.)\d*/)&&(o=!0),e.match(/^\.\d+/)&&(o=!0),e.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)&&(o=!0),e.match(/^0x[0-9a-f]+/i)&&(o=!0),e.match(/^0b[01]+/i)&&(o=!0),e.match(/^0o[0-7]+/i)&&(o=!0),e.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.match(a),t.leavingExpr=!0,"number"}if(e.match(/^'/))return t.tokenize=y,t.tokenize(e,t);if(e.match(b))return t.tokenize=function(n){'"""'===n.substr(-3)?n='"""':'"'===n.substr(-1)&&(n='"');return function(e,t){if(e.eat("\\"))e.next();else{if(e.match(n))return t.tokenize=g,t.leavingExpr=!0,"string";e.eat(/[`"]/)}return e.eatWhile(/[^\\`"]/),"string"}}(e.current()),t.tokenize(e,t);if(e.match(h))return"meta";if(e.match(u))return null;if(e.match(p))return"keyword";if(e.match(d))return"builtin";var s=t.isDefinition||"function"==t.lastToken||"macro"==t.lastToken||"type"==t.lastToken||"struct"==t.lastToken||"immutable"==t.lastToken;return e.match(f)?s?"."===e.peek()?(t.isDefinition=!0,"variable"):(t.isDefinition=!1,"def"):e.match(/^({[^}]*})*\(/,!1)?(t.tokenize=A,t.tokenize(e,t)):(t.leavingExpr=!0,"variable"):(e.next(),"error")}function A(e,t){var n=e.match(/^(\(\s*)/);if(n&&(t.firstParenPos<0&&(t.firstParenPos=t.scopes.length),t.scopes.push("("),t.charsAdvanced+=n[1].length),"("==F(t)&&e.match(/^\)/)&&(t.scopes.pop(),t.charsAdvanced+=1,t.scopes.length<=t.firstParenPos)){var r=e.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);return e.backUp(t.charsAdvanced),t.firstParenPos=-1,t.charsAdvanced=0,t.tokenize=g,r?"def":"builtin"}if(e.match(/^$/g,!1)){for(e.backUp(t.charsAdvanced);t.scopes.length>t.firstParenPos;)t.scopes.pop();return t.firstParenPos=-1,t.charsAdvanced=0,t.tokenize=g,"builtin"}return t.charsAdvanced+=e.match(/^([^()]*)/)[1].length,t.tokenize(e,t)}function x(e,t){return e.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),e.match(/^{/)?t.nestedParameters++:e.match(/^}/)&&0<t.nestedParameters&&t.nestedParameters--,0<t.nestedParameters?e.match(/.*?(?={|})/)||e.next():0==t.nestedParameters&&(t.tokenize=g),"builtin"}function z(e,t){return e.match(/^#=/)&&t.nestedComments++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match(/^=#/)&&(t.nestedComments--,0==t.nestedComments&&(t.tokenize=g)),"comment"}function y(e,t){var n,r=!1;if(e.match(a))r=!0;else if(n=e.match(/\\u([a-f0-9]{1,4})(?=')/i)){((i=parseInt(n[1],16))<=55295||57344<=i)&&(r=!0,e.next())}else if(n=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i;(i=parseInt(n[1],16))<=1114111&&(r=!0,e.next())}return r?(t.leavingExpr=!0,t.tokenize=g,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match(/^'/)&&(t.tokenize=g),"error")}return{startState:function(){return{tokenize:g,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,charsAdvanced:0,firstParenPos:-1}},token:function(e,t){var n=t.tokenize(e,t),r=e.current();return r&&n&&(t.lastToken=r),n},indent:function(e,t){var n=0;return"]"!==t&&")"!==t&&"end"!==t&&"else"!==t&&"catch"!==t&&"elseif"!==t&&"finally"!==t||(n=-1),(e.scopes.length+n)*r.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"}}),o.defineMIME("text/x-julia","julia")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("livescript",function(){var n=function(e,t){var r=t.next||"start";if(r){t.next=t.next;var n=x[r];if(n.splice){for(var o=0;o<n.length;++o){var g=n[o];if(g.regex&&e.match(g.regex))return t.next=g.next||t.next,g.token}return e.next(),"error"}if(e.match(g=x[r]))return g.regex&&e.match(g.regex)?(t.next=g.next,g.token):(e.next(),"error")}return e.next(),"error"};return{startState:function(){return{next:"start",lastToken:{style:null,indent:0,content:""}}},token:function(e,t){for(;e.pos==e.start;)var r=n(e,t);return t.lastToken={style:r,indent:e.indentation(),content:e.current()},r.replace(/\./g," ")},indent:function(e){var t=e.lastToken.indent;return e.lastToken.content.match(r)&&(t+=2),t}}});var t="(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*",r=RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+t+")?))\\s*$"),n="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",o={token:"string",regex:".+"},x={start:[{token:"comment.doc",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+n},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+n},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+n},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+n},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+n},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+n},{token:"identifier",regex:t+"\\s*:(?![:=])"},{token:"variable",regex:t},{token:"keyword.operator",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword.variable",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"keyword.operator",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"string.doc",regex:"'''",next:"qdoc"},{token:"string.doc",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"string.regex",regex:"//",next:"heregex"},{token:"string.regex",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[)}\\]]",next:"key"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"string.regex",regex:"\\s*#{"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],key:[{token:"keyword.operator",regex:"[.?@!]+"},{token:"identifier",regex:t,next:"start"},{token:"text",regex:"",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{token:"comment.doc",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},o],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},o],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},o],words:[{token:"string",regex:".*?\\]>",next:"key"},o]};for(var g in x){var i=x[g];if(i.splice)for(var a=0,s=i.length;a<s;++a){var k=i[a];"string"==typeof k.regex&&(x[g][a].regex=new RegExp("^"+k.regex))}else"string"==typeof k.regex&&(x[g].regex=new RegExp("^"+i.regex))}e.defineMIME("text/x-livescript","livescript")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("lua",function(e,t){var a=e.indentUnit;function n(e){return new RegExp("^(?:"+e.join("|")+")$","i")}var r=n(t.specials||[]),o=n(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),i=n(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),l=n(["function","if","repeat","do","\\(","{"]),s=n(["end","until","\\)","}"]),u=new RegExp("^(?:"+["end","until","\\)","}","else","elseif"].join("|")+")","i");function c(e){for(var t=0;e.eat("=");)++t;return e.eat("["),t}function m(e,t){var r,n=e.next();return"-"==n&&e.eat("-")?e.eat("[")&&e.eat("[")?(t.cur=d(c(e),"comment"))(e,t):(e.skipToEnd(),"comment"):'"'==n||"'"==n?(t.cur=(r=n,function(e,t){for(var n,a=!1;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.cur=m),"string"}))(e,t):"["==n&&/[\[=]/.test(e.peek())?(t.cur=d(c(e),"string"))(e,t):/\d/.test(n)?(e.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(n)?(e.eatWhile(/[\w\\\-_.]/),"variable"):null}function d(r,o){return function(e,t){for(var n,a=null;null!=(n=e.next());)if(null==a)"]"==n&&(a=0);else if("="==n)++a;else{if("]"==n&&a==r){t.cur=m;break}a=null}return o}}return{startState:function(e){return{basecol:e||0,indentDepth:0,cur:m}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),a=e.current();return"variable"==n&&(i.test(a)?n="keyword":o.test(a)?n="builtin":r.test(a)&&(n="variable-2")),"comment"!=n&&"string"!=n&&(l.test(a)?++t.indentDepth:s.test(a)&&--t.indentDepth),n},indent:function(e,t){var n=u.test(t);return e.basecol+a*(e.indentDepth-(n?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),e.defineMIME("text/x-lua","lua")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("mathematica",function(e,t){var a="[a-zA-Z\\$][a-zA-Z0-9\\$]*",n="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",r="(?:`(?:`?"+n+")?)",o=new RegExp("(?:(?:\\d+)(?:\\^\\^(?:\\.\\w+|\\w+\\.\\w*|\\w+)"+r+"?(?:\\*\\^[+-]?\\d+)?))"),m=new RegExp("(?:"+n+r+"?(?:\\*\\^[+-]?\\d+)?)"),c=new RegExp("(?:`?)(?:"+a+")(?:`(?:"+a+"))*(?:`?)");function i(e,t){var a;return'"'===(a=e.next())?(t.tokenize=z,t.tokenize(e,t)):"("===a&&e.eat("*")?(t.commentLevel++,t.tokenize=A,t.tokenize(e,t)):(e.backUp(1),e.match(o,!0,!1)?"number":e.match(m,!0,!1)?"number":e.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/,!0,!1)?"meta":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string-2":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)?"variable-2":e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)?"variable-2":e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"variable-3":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variable-2":e.match(c,!0,!1)?"keyword":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(e.next(),"error"))}function z(e,t){for(var a,n=!1,r=!1;null!=(a=e.next());){if('"'===a&&!r){n=!0;break}r=!r&&"\\"===a}return n&&!r&&(t.tokenize=i),"string"}function A(e,t){for(var a,n;0<t.commentLevel&&null!=(n=e.next());)"("===a&&"*"===n&&t.commentLevel++,"*"===a&&")"===n&&t.commentLevel--,a=n;return t.commentLevel<=0&&(t.tokenize=i),"comment"}return{startState:function(){return{tokenize:i,commentLevel:0}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(*",blockCommentEnd:"*)"}}),e.defineMIME("text/x-mathematica",{name:"mathematica"})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var r=["From","Sender","Reply-To","To","Cc","Bcc","Message-ID","In-Reply-To","References","Resent-From","Resent-Sender","Resent-To","Resent-Cc","Resent-Bcc","Resent-Message-ID","Return-Path","Received"],n=["Date","Subject","Comments","Keywords","Resent-Date"];e.registerHelper("hintWords","mbox",r.concat(n));var a=/^[ \t]/,o=/^From /,d=new RegExp("^("+r.join("|")+"): "),c=new RegExp("^("+n.join("|")+"): "),m=/^[^:]+:/,s=/^[^ ]+@[^ ]+/,u=/^.*?(?=[^ ]+?@[^ ]+)/,l=/^<.*?>/,f=/^.*?(?=<.*>)/;function t(e,r){if(e.sol()){if(r.inSeparator=!1,r.inHeader&&e.match(a))return null;if(r.inHeader=!1,r.header=null,e.match(o))return r.inHeaders=!0,r.inSeparator=!0,"atom";var n,t=!1;return(n=e.match(c))||(t=!0)&&(n=e.match(d))?(r.inHeaders=!0,r.inHeader=!0,r.emailPermitted=t,r.header=n[1],"atom"):r.inHeaders&&(n=e.match(m))?(r.inHeader=!0,r.emailPermitted=!0,r.header=n[1],"atom"):(r.inHeaders=!1,e.skipToEnd(),null)}if(r.inSeparator)return e.match(s)?"link":(e.match(u)||e.skipToEnd(),"atom");if(r.inHeader){var i="Subject"===r.header?"header":"string";if(r.emailPermitted){if(e.match(l))return i+" link";if(e.match(f))return i}return e.skipToEnd(),i}return e.skipToEnd(),null}e.defineMode("mbox",function(){return{startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:t,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1}}}),e.defineMIME("application/mbox","mbox")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMIME("text/mirc","mirc"),e.defineMode("mirc",function(){function e(e){for(var i={},$=e.split(" "),r=0;r<$.length;++r)i[$[r]]=!0;return i}var o=e("$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"),n=e("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item"),a=e("if elseif else and not or eq ne in ni for foreach while switch"),s=/[+\-*&%=<>!?^\/\|]/;function l(e,i,$){return(i.tokenize=$)(e,i)}function t(e,i){var $=i.beforeParams;i.beforeParams=!1;var r=e.next();if(/[\[\]{}\(\),\.]/.test(r))return"("==r&&$?i.inParams=!0:")"==r&&(i.inParams=!1),null;if(/\d/.test(r))return e.eatWhile(/[\w\.]/),"number";if("\\"==r)return e.eat("\\"),e.eat(/./),"number";if("/"==r&&e.eat("*"))return l(e,i,c);if(";"==r&&e.match(/ *\( *\(/))return l(e,i,d);if(";"!=r||i.inParams){if('"'==r)return e.eat(/"/),"keyword";if("$"==r)return e.eatWhile(/[$_a-z0-9A-Z\.:]/),o&&o.propertyIsEnumerable(e.current().toLowerCase())?"keyword":(i.beforeParams=!0,"builtin");if("%"==r)return e.eatWhile(/[^,\s()]/),i.beforeParams=!0,"string";if(s.test(r))return e.eatWhile(s),"operator";e.eatWhile(/[\w\$_{}]/);var t=e.current().toLowerCase();return n&&n.propertyIsEnumerable(t)?"keyword":a&&a.propertyIsEnumerable(t)?(i.beforeParams=!0,"keyword"):null}return e.skipToEnd(),"comment"}function c(e,i){for(var $,r=!1;$=e.next();){if("/"==$&&r){i.tokenize=t;break}r="*"==$}return"comment"}function d(e,i){for(var $,r=0;$=e.next();){if(";"==$&&2==r){i.tokenize=t;break}")"==$?r++:" "!=$&&(r=0)}return"meta"}return{startState:function(){return{tokenize:t,beforeParams:!1,inParams:!1}},token:function(e,i){return e.eatSpace()?null:i.tokenize(e,i)}}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(a){"use strict";a.defineMode("mllike",function(e,i){var n={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},r=i.extraWords||{};for(var o in r)r.hasOwnProperty(o)&&(n[o]=i.extraWords[o]);var t=[];for(var d in n)t.push(d);function k(e,r){var o=e.next();if('"'===o)return r.tokenize=y,r.tokenize(e,r);if("{"===o&&e.eat("|"))return r.longString=!0,r.tokenize=w,r.tokenize(e,r);if("("===o&&e.eat("*"))return r.commentLevel++,r.tokenize=l,r.tokenize(e,r);if("~"===o||"?"===o)return e.eatWhile(/\w/),"variable-2";if("`"===o)return e.eatWhile(/\w/),"quote";if("/"===o&&i.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(o))return"0"===o&&e.eat(/[bB]/)&&e.eatWhile(/[01]/),"0"===o&&e.eat(/[xX]/)&&e.eatWhile(/[0-9a-fA-F]/),"0"===o&&e.eat(/[oO]/)?e.eatWhile(/[0-7]/):(e.eatWhile(/[\d_]/),e.eat(".")&&e.eatWhile(/[\d]/),e.eat(/[eE]/)&&e.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(o))return"operator";if(/[\w\xa1-\uffff]/.test(o)){e.eatWhile(/[\w\xa1-\uffff]/);var t=e.current();return n.hasOwnProperty(t)?n[t]:"variable"}return null}function y(e,r){for(var o,t=!1,i=!1;null!=(o=e.next());){if('"'===o&&!i){t=!0;break}i=!i&&"\\"===o}return t&&!i&&(r.tokenize=k),"string"}function l(e,r){for(var o,t;0<r.commentLevel&&null!=(t=e.next());)"("===o&&"*"===t&&r.commentLevel++,"*"===o&&")"===t&&r.commentLevel--,o=t;return r.commentLevel<=0&&(r.tokenize=k),"comment"}function w(e,r){for(var o,t;r.longString&&null!=(t=e.next());)"|"===o&&"}"===t&&(r.longString=!1),o=t;return r.longString||(r.tokenize=k),"string"}return a.registerHelper("hintWords","mllike",t),{startState:function(){return{tokenize:k,commentLevel:0,longString:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),a.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),a.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),a.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(h){"use strict";function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}h.defineMode("modelica",function(e,t){var r=e.indentUnit,o=t.keywords||{},i=t.builtin||{},l=t.atoms||{},a=/[;=\(:\),{}.*<>+\-\/^\[\]]/,u=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,s=/[0-9]/,c=/[_a-zA-Z]/;function f(e,t){return e.skipToEnd(),t.tokenize=null,"comment"}function p(e,t){for(var n,r=!1;n=e.next();){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return"comment"}function d(e,t){for(var n,r=!1;null!=(n=e.next());){if('"'==n&&!r){t.tokenize=null,t.sol=!1;break}r=!r&&"\\"==n}return"string"}function m(e,t){for(e.eatWhile(s);e.eat(s)||e.eat(c););var n=e.current();return!t.sol||"package"!=n&&"model"!=n&&"when"!=n&&"connector"!=n?t.sol&&"end"==n&&0<t.level&&t.level--:t.level++,t.tokenize=null,t.sol=!1,o.propertyIsEnumerable(n)?"keyword":i.propertyIsEnumerable(n)?"builtin":l.propertyIsEnumerable(n)?"atom":"variable"}function k(e,t){for(;e.eat(/[^']/););return t.tokenize=null,t.sol=!1,e.eat("'")?"variable":"error"}function b(e,t){return e.eatWhile(s),e.eat(".")&&e.eatWhile(s),(e.eat("e")||e.eat("E"))&&(e.eat("-")||e.eat("+"),e.eatWhile(s)),t.tokenize=null,t.sol=!1,"number"}return{startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(e,t){if(null!=t.tokenize)return t.tokenize(e,t);if(e.sol()&&(t.sol=!0),e.eatSpace())return t.tokenize=null;var n=e.next();if("/"==n&&e.eat("/"))t.tokenize=f;else if("/"==n&&e.eat("*"))t.tokenize=p;else{if(u.test(n+e.peek()))return e.next(),t.tokenize=null,"operator";if(a.test(n))return t.tokenize=null,"operator";if(c.test(n))t.tokenize=m;else if("'"==n&&e.peek()&&"'"!=e.peek())t.tokenize=k;else if('"'==n)t.tokenize=d;else{if(!s.test(n))return t.tokenize=null,"error";t.tokenize=b}}return t.tokenize(e,t)},indent:function(e,t){if(null!=e.tokenize)return h.Pass;var n=e.level;return/(algorithm)/.test(t)&&n--,/(equation)/.test(t)&&n--,/(initial algorithm)/.test(t)&&n--,/(initial equation)/.test(t)&&n--,/(end)/.test(t)&&n--,0<n?r*n:0},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});!function(e,t){"string"==typeof e&&(e=[e]);var n=[];function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&n.push(t)}r(t.keywords),r(t.builtin),r(t.atoms),n.length&&(t.helperType=e[0],h.registerHelper("hintWords",e[0],n));for(var o=0;o<e.length;++o)h.defineMIME(e[o],t)}(["text/x-modelica"],{name:"modelica",keywords:e("algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within"),builtin:e("abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh"),atoms:e("Real Boolean Integer String")})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var o={mscgen:{keywords:["msc"],options:["hscale","width","arcgradient","wordwraparcs"],constants:["true","false","on","off"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]},xu:{keywords:["msc","xu"],options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip","title","deactivate","activate","activation"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]},msgenny:{keywords:null,options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:null,brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}};function i(t){return new RegExp("\\b("+t.join("|")+")\\b","i")}function c(t){return new RegExp("("+t.join("|")+")","i")}function a(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function s(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}}t.defineMode("mscgen",function(t,r){var e,n=o[r&&r.language||"mscgen"];return{startState:a,copyState:s,token:(e=n,function(t,r){if(t.match(c(e.brackets),!0,!0))return"bracket";if(!r.inComment){if(t.match(/\/\*[^\*\/]*/,!0,!0))return r.inComment=!0,"comment";if(t.match(c(e.singlecomment),!0,!0))return t.skipToEnd(),"comment"}if(r.inComment)return t.match(/[^\*\/]*\*\//,!0,!0)?r.inComment=!1:t.skipToEnd(),"comment";if(!r.inString&&t.match(/\"(\\\"|[^\"])*/,!0,!0))return r.inString=!0,"string";if(r.inString)return t.match(/[^\"]*\"/,!0,!0)?r.inString=!1:t.skipToEnd(),"string";if(e.keywords&&t.match(i(e.keywords),!0,!0))return"keyword";if(t.match(i(e.options),!0,!0))return"keyword";if(t.match(i(e.arcsWords),!0,!0))return"keyword";if(t.match(c(e.arcsOthers),!0,!0))return"keyword";if(e.operators&&t.match(c(e.operators),!0,!0))return"operator";if(e.constants&&t.match(c(e.constants),!0,!0))return"variable";if(!e.inAttributeList&&e.attributes&&t.match(/\[/,!0,!0))return e.inAttributeList=!0,"bracket";if(e.inAttributeList){if(null!==e.attributes&&t.match(i(e.attributes),!0,!0))return"attribute";if(t.match(/]/,!0,!0))return e.inAttributeList=!1,"bracket"}return t.next(),"base"}),lineComment:"#",blockCommentStart:"/*",blockCommentEnd:"*/"}}),t.defineMIME("text/x-mscgen","mscgen"),t.defineMIME("text/x-xu",{name:"mscgen",language:"xu"}),t.defineMIME("text/x-msgenny",{name:"mscgen",language:"msgenny"})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("mumps",function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var o=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),r=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),$=new RegExp("^[\\.,:]"),a=new RegExp("[()]"),i=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),c=e(["\\$ascii","\\$char","\\$data","\\$ecode","\\$estack","\\$etrap","\\$extract","\\$find","\\$fnumber","\\$get","\\$horolog","\\$io","\\$increment","\\$job","\\$justify","\\$length","\\$name","\\$next","\\$order","\\$piece","\\$qlength","\\$qsubscript","\\$query","\\$quit","\\$random","\\$reverse","\\$select","\\$stack","\\$test","\\$text","\\$translate","\\$view","\\$x","\\$y","\\$a","\\$c","\\$d","\\$e","\\$ec","\\$es","\\$et","\\$f","\\$fn","\\$g","\\$h","\\$i","\\$j","\\$l","\\$n","\\$na","\\$o","\\$p","\\$q","\\$ql","\\$qs","\\$r","\\$re","\\$s","\\$st","\\$t","\\$tr","\\$v","\\$z"]),m=e(["break","close","do","else","for","goto","halt","hang","if","job","kill","lock","merge","new","open","quit","read","set","tcommit","trollback","tstart","use","view","write","xecute","b","c","d","e","f","g","h","i","j","k","l","m","n","o","q","r","s","tc","tro","ts","u","v","w","x"]);return{startState:function(){return{label:!1,commandMode:0}},token:function(e,t){var n=function(e,t){e.sol()&&(t.label=!0,t.commandMode=0);var n=e.peek();return" "==n||"\t"==n?(t.label=!1,0==t.commandMode?t.commandMode=1:(t.commandMode<0||2==t.commandMode)&&(t.commandMode=0)):"."!=n&&0<t.commandMode&&(t.commandMode=":"==n?-1:2),"("!==n&&"\t"!==n||(t.label=!1),";"===n?(e.skipToEnd(),"comment"):e.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":'"'==n?e.skipTo('"')?(e.next(),"string"):(e.skipToEnd(),"error"):e.match(r)||e.match(o)?"operator":e.match($)?null:a.test(n)?(e.next(),"bracket"):0<t.commandMode&&e.match(m)?"variable-2":e.match(c)?"builtin":e.match(i)?"variable":"$"===n||"^"===n?(e.next(),"builtin"):"@"===n?(e.next(),"string-2"):/[\w%]/.test(n)?(e.eatWhile(/[\w%]/),"variable"):(e.next(),"error")}(e,t);return t.label?"tag":n}}}),e.defineMIME("text/x-mumps","mumps")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("nginx",function(e){function _(e){for(var _={},t=e.split(" "),i=0;i<t.length;++i)_[t[i]]=!0;return _}var r,s=_("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),a=_("http mail events server types location upstream charset_map limit_except if geo map"),o=_("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),i=e.indentUnit;function n(e,_){return r=_,e}function c(e,_){e.eatWhile(/[\w\$_]/);var t=e.current();if(s.propertyIsEnumerable(t))return"keyword";if(a.propertyIsEnumerable(t))return"variable-2";if(o.propertyIsEnumerable(t))return"string-2";var r,i=e.next();return"@"==i?(e.eatWhile(/[\w\\\-]/),n("meta",e.current())):"/"==i&&e.eat("*")?(_.tokenize=l)(e,_):"<"==i&&e.eat("!")?(_.tokenize=p)(e,_):"="!=i?"~"!=i&&"|"!=i||!e.eat("=")?'"'==i||"'"==i?(_.tokenize=(r=i,function(e,_){for(var t,i=!1;null!=(t=e.next())&&(t!=r||i);)i=!i&&"\\"==t;return i||(_.tokenize=c),n("string","string")}),_.tokenize(e,_)):"#"==i?(e.skipToEnd(),n("comment","comment")):"!"==i?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(i)?(e.eatWhile(/[\w.%]/),n("number","unit")):/[,.+>*\/]/.test(i)?n(null,"select-op"):/[;{}:\[\]]/.test(i)?n(null,i):(e.eatWhile(/[\w\\\-]/),n("variable","variable")):n(null,"compare"):void n(null,"compare")}function l(e,_){for(var t,i=!1;null!=(t=e.next());){if(i&&"/"==t){_.tokenize=c;break}i="*"==t}return n("comment","comment")}function p(e,_){for(var t,i=0;null!=(t=e.next());){if(2<=i&&">"==t){_.tokenize=c;break}i="-"==t?i+1:0}return n("comment","comment")}return{startState:function(e){return{tokenize:c,baseIndent:e||0,stack:[]}},token:function(e,_){if(e.eatSpace())return null;r=null;var t=_.tokenize(e,_),i=_.stack[_.stack.length-1];return"hash"==r&&"rule"==i?t="atom":"variable"==t&&("rule"==i?t="number":i&&"@media{"!=i||(t="tag")),"rule"==i&&/^[\{\};]$/.test(r)&&_.stack.pop(),"{"==r?"@media"==i?_.stack[_.stack.length-1]="@media{":_.stack.push("{"):"}"==r?_.stack.pop():"@media"==r?_.stack.push("@media"):"{"==i&&"comment"!=r&&_.stack.push("rule"),t},indent:function(e,_){var t=e.stack.length;return/^\}/.test(_)&&(t-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+t*i},electricChars:"}"}}),e.defineMIME("text/x-nginx-conf","nginx")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("nsis",{start:[{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/`(?:[^\\`]|\\.)*`?/,token:"string"},{regex:/^\s*(?:\!(include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|pragma|finalize|getdllversion|gettlbversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace))\b/,token:"keyword"},{regex:/^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/,token:"keyword",indent:!0},{regex:/^\s*(?:\!(else|endif|macroend))\b/,token:"keyword",dedent:!0},{regex:/^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEDllCharacteristics|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/,token:"keyword"},{regex:/^\s*(?:Function|PageEx|Section(?:Group)?)\b/,token:"keyword",indent:!0},{regex:/^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/,token:"keyword",dedent:!0},{regex:/\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/,token:"atom"},{regex:/\b(?:admin|all|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|zlib)\b/,token:"builtin"},{regex:/\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/,token:"variable-2",indent:!0},{regex:/\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/,token:"variable",dedent:!0},{regex:/\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:RunningX64)\}/,token:"variable",dedent:!0},{regex:/\$\{(?:Disable|Enable)X64FSRedirection\}/,token:"variable-2",dedent:!0},{regex:/(#|;).*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/\$\w+/,token:"variable"},{regex:/\${[\w\.:-]+}/,token:"variable-2"},{regex:/\$\([\w\.:-]+\)/,token:"variable-3"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{electricInput:/^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:["#",";"]}}),e.defineMIME("text/x-nsis","nsis")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ntriples",function(){var i=0,a=1,o=2,u=3,f=4,l=5,s=6,c=7,p=8,d=9,h=10,v=11,b=12;function x(e,n){var t,r=e.location;t=r==i&&"<"==n?a:r==i&&"_"==n?o:r==u&&"<"==n?f:r==l&&"<"==n?s:r==l&&"_"==n?c:r==l&&'"'==n?p:r==a&&">"==n?u:r==o&&" "==n?u:r==f&&">"==n?l:r==s&&">"==n?v:r==c&&" "==n?v:r==p&&'"'==n?v:r==d&&" "==n?v:r==h&&">"==n?v:r==p&&"@"==n?d:r==p&&"^"==n?h:" "!=n||r!=i&&r!=u&&r!=l&&r!=v?r==v&&"."==n?i:b:r,e.location=t}return{startState:function(){return{location:i,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,n){var t=e.next();if("<"==t){x(n,t);var r="";return e.eatWhile(function(e){return"#"!=e&&">"!=e&&(r+=e,!0)}),n.uris.push(r),e.match("#",!1)?"variable":(e.next(),x(n,">"),"variable")}if("#"==t){var i="";return e.eatWhile(function(e){return">"!=e&&" "!=e&&(i+=e,!0)}),n.anchors.push(i),"variable-2"}if(">"==t)return x(n,">"),"variable";if("_"==t){x(n,t);var a="";return e.eatWhile(function(e){return" "!=e&&(a+=e,!0)}),n.bnodes.push(a),e.next(),x(n," "),"builtin"}if('"'==t)return x(n,t),e.eatWhile(function(e){return'"'!=e}),e.next(),"@"!=e.peek()&&"^"!=e.peek()&&x(n,'"'),"string";if("@"==t){x(n,"@");var o="";return e.eatWhile(function(e){return" "!=e&&(o+=e,!0)}),n.langs.push(o),e.next(),x(n," "),"string-2"}if("^"==t){e.next(),x(n,"^");var u="";return e.eatWhile(function(e){return">"!=e&&(u+=e,!0)}),n.types.push(u),e.next(),x(n,">"),"variable"}" "==t&&x(n,t),"."==t&&x(n,t)}}}),e.defineMIME("application/n-triples","ntriples"),e.defineMIME("application/n-quads","ntriples"),e.defineMIME("text/n-triples","ntriples")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("octave",function(){function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var i=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),o=new RegExp("^[\\(\\[\\{\\},:=;]"),a=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),c=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),m=new RegExp("^((>>=)|(<<=))"),f=new RegExp("^[\\]\\)]"),u=new RegExp("^[_A-Za-z¡-][_A-Za-z0-9¡-]*"),s=r(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),l=r(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);function d(e,n){return e.sol()||"'"!==e.peek()?(n.tokenize=h)(e,n):(e.next(),n.tokenize=h,"operator")}function p(e,n){return e.match(/^.*%}/)?n.tokenize=h:e.skipToEnd(),"comment"}function h(e,n){if(e.eatSpace())return null;if(e.match("%{"))return n.tokenize=p,e.skipToEnd(),"comment";if(e.match(/^[%#]/))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return e.tokenize=h,"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(e.match(r(["nan","NaN","inf","Inf"])))return"number";var t=e.match(/^"(?:[^"]|"")*("|$)/)||e.match(/^'(?:[^']|'')*('|$)/);return t?t[1]?"string":"string error":e.match(l)?"keyword":e.match(s)?"builtin":e.match(u)?"variable":e.match(i)||e.match(a)?"operator":e.match(o)||e.match(c)||e.match(m)?null:e.match(f)?(n.tokenize=d,null):(e.next(),"error")}return{startState:function(){return{tokenize:h}},token:function(e,n){var t=n.tokenize(e,n);return"number"!==t&&"variable"!==t||(n.tokenize=d),t},lineComment:"%",fold:"indent"}}),e.defineMIME("text/x-octave","octave")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("oz",function(r){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var t,o=/[\^@!\|<>#~\.\*\-\+\\/,=]/,i=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,c=/(:::)|(\.\.\.)|(=<:)|(>=:)/,n=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],a=["end"],u=e(["true","false","nil","unit"]),f=e(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),d=e(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),s=e(n),l=e(a);function m(e,t){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match(/(\[])/))return"keyword";if(e.match(c)||e.match(i))return"operator";if(e.match(u))return"atom";var n=e.match(d);if(n)return t.doInCurrentLine?t.doInCurrentLine=!1:t.currentIndent++,"proc"==n[0]||"fun"==n[0]?t.tokenize=p:"class"==n[0]?t.tokenize=h:"meth"==n[0]&&(t.tokenize=k),"keyword";if(e.match(s)||e.match(f))return"keyword";if(e.match(l))return t.currentIndent--,"keyword";var a,r=e.next();if('"'==r||"'"==r)return t.tokenize=(a=r,function(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if(n==a&&!r){o=!0;break}r=!r&&"\\"==n}return!o&&r||(t.tokenize=m),"string"}),t.tokenize(e,t);if(/[~\d]/.test(r)){if("~"==r){if(!/^[0-9]/.test(e.peek()))return null;if("0"==e.next()&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}return"0"==r&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return"%"==r?(e.skipToEnd(),"comment"):"/"==r&&e.eat("*")?(t.tokenize=z)(e,t):o.test(r)?"operator":(e.eatWhile(/\w/),"variable")}function h(e,t){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=m,"variable-3")}function k(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=m,"def")}function p(e,t){return e.eatSpace()?null:!t.hasPassedFirstStage&&e.eat("{")?(t.hasPassedFirstStage=!0,"bracket"):t.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),t.hasPassedFirstStage=!1,t.tokenize=m,"def"):(t.tokenize=m,null)}function z(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return"comment"}return{startState:function(){return{tokenize:m,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){return e.sol()&&(t.doInCurrentLine=0),t.tokenize(e,t)},indent:function(e,t){var n=t.replace(/^\s+|\s+$/g,"");return n.match(l)||n.match(s)||n.match(/(\[])/)?r.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.indentUnit},fold:"indent",electricInput:(t=n.concat(a),new RegExp("[\\[\\]]|("+t.join("|")+")$")),lineComment:"%",blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-oz","oz")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("pascal",function(){var i=function(e){for(var r={},t=e.split(" "),n=0;n<t.length;++n)r[t[n]]=!0;return r}("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),o={null:!0},l=/[+\-*&%=<>!?|\/]/;function c(e,r){for(var t,n=!1;t=e.next();){if(")"==t&&n){r.tokenize=null;break}n="*"==t}return"comment"}return{startState:function(){return{tokenize:null}},token:function(e,r){if(e.eatSpace())return null;var t=(r.tokenize||function(e,r){var a,t=e.next();if("#"==t&&r.startOfLine)return e.skipToEnd(),"meta";if('"'==t||"'"==t)return r.tokenize=(a=t,function(e,r){for(var t,n=!1,i=!1;null!=(t=e.next());){if(t==a&&!n){i=!0;break}n=!n&&"\\"==t}return!i&&n||(r.tokenize=null),"string"}),r.tokenize(e,r);if("("==t&&e.eat("*"))return(r.tokenize=c)(e,r);if(/[\[\]{}\(\),;\:\.]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if("/"==t&&e.eat("/"))return e.skipToEnd(),"comment";if(l.test(t))return e.eatWhile(l),"operator";e.eatWhile(/[\w\$_]/);var n=e.current();return i.propertyIsEnumerable(n)?"keyword":o.propertyIsEnumerable(n)?"atom":"variable"})(e,r);return t},electricChars:"{}"}}),e.defineMIME("text/x-pascal","pascal")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../javascript/javascript"],e):e(CodeMirror)}(function(o){"use strict";o.defineMode("pegjs",function(e){var a=o.getMode(e,"javascript");return{startState:function(){return{inString:!1,stringType:null,inComment:!1,inCharacterClass:!1,braced:0,lhs:!0,localState:null}},token:function(e,t){if(e&&(t.inString||t.inComment||'"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.inString=!0)),t.inString||t.inComment||!e.match(/^\/\*/)||(t.inComment=!0),t.inString){for(;t.inString&&!e.eol();)e.peek()===t.stringType?(e.next(),t.inString=!1):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property string":"string"}if(t.inComment){for(;t.inComment&&!e.eol();)e.match(/\*\//)?t.inComment=!1:e.match(/^.[^\*]*/);return"comment"}if(t.inCharacterClass)for(;t.inCharacterClass&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||(t.inCharacterClass=!1);else{if("["===e.peek())return e.next(),t.inCharacterClass=!0,"bracket";if(e.match(/^\/\//))return e.skipToEnd(),"comment";if(t.braced||"{"===e.peek()){null===t.localState&&(t.localState=o.startState(a));var r=a.token(e,t.localState),n=e.current();if(!r)for(var i=0;i<n.length;i++)"{"===n[i]?t.braced++:"}"===n[i]&&t.braced--;return r}if(e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/))return":"===e.peek()?"variable":"variable-2";if(-1!=["[","]","(",")"].indexOf(e.peek()))return e.next(),"bracket";e.eatSpace()||e.next()}return null}}},"javascript")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function R(e,t){return e.string.charAt(e.pos+(t||0))}function c(e,t){if(t){var r=e.pos-t;return e.string.substr(0<=r?r:0,t)}return e.string.substr(0,e.pos-1)}function p(e,t){var r=e.string.length,n=r-e.pos+1;return e.string.substr(e.pos,t&&t<r?t:n)}function T(e,t){var r,n=e.pos+t;n<=0?e.pos=0:n>=(r=e.string.length-1)?e.pos=r:e.pos=n}e.defineMode("perl",function(){var a={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},u="string-2",$=/[goseximacplud]/;function l(e,t,s,o,a){return t.chain=null,t.style=null,t.tail=null,t.tokenize=function(e,t){for(var r,n=!1,i=0;r=e.next();){if(r===s[i]&&!n)return void 0!==s[++i]?(t.chain=s[i],t.style=o,t.tail=a):a&&e.eatWhile(a),t.tokenize=E,o;n=!n&&"\\"==r}return o},t.tokenize(e,t)}function f(e,t,r){return t.tokenize=function(e,t){return e.string==r&&(t.tokenize=E),e.skipToEnd(),"string"},t.tokenize(e,t)}function E(e,t){if(e.eatSpace())return null;if(t.chain)return l(e,t,t.chain,t.style,t.tail);if(e.match(/^\-?[\d\.]/,!1)&&e.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(e.match(/^<<(?=\w)/))return e.eatWhile(/\w/),f(e,t,e.current().substr(2));if(e.sol()&&e.match(/^\=item(?!\w)/))return f(e,t,"=cut");var r=e.next();if('"'==r||"'"==r){if(c(e,3)=="<<"+r){var n=e.pos;e.eatWhile(/\w/);var i=e.current().substr(1);if(i&&e.eat(r))return f(e,t,i);e.pos=n}return l(e,t,[r],"string")}if("q"==r&&(!(s=R(e,-2))||!/\w/.test(s)))if("x"==(s=R(e,0))){if("("==(s=R(e,1)))return T(e,2),l(e,t,[")"],u,$);if("["==s)return T(e,2),l(e,t,["]"],u,$);if("{"==s)return T(e,2),l(e,t,["}"],u,$);if("<"==s)return T(e,2),l(e,t,[">"],u,$);if(/[\^'"!~\/]/.test(s))return T(e,1),l(e,t,[e.eat(s)],u,$)}else if("q"==s){if("("==(s=R(e,1)))return T(e,2),l(e,t,[")"],"string");if("["==s)return T(e,2),l(e,t,["]"],"string");if("{"==s)return T(e,2),l(e,t,["}"],"string");if("<"==s)return T(e,2),l(e,t,[">"],"string");if(/[\^'"!~\/]/.test(s))return T(e,1),l(e,t,[e.eat(s)],"string")}else if("w"==s){if("("==(s=R(e,1)))return T(e,2),l(e,t,[")"],"bracket");if("["==s)return T(e,2),l(e,t,["]"],"bracket");if("{"==s)return T(e,2),l(e,t,["}"],"bracket");if("<"==s)return T(e,2),l(e,t,[">"],"bracket");if(/[\^'"!~\/]/.test(s))return T(e,1),l(e,t,[e.eat(s)],"bracket")}else if("r"==s){if("("==(s=R(e,1)))return T(e,2),l(e,t,[")"],u,$);if("["==s)return T(e,2),l(e,t,["]"],u,$);if("{"==s)return T(e,2),l(e,t,["}"],u,$);if("<"==s)return T(e,2),l(e,t,[">"],u,$);if(/[\^'"!~\/]/.test(s))return T(e,1),l(e,t,[e.eat(s)],u,$)}else if(/[\^'"!~\/(\[{<]/.test(s)){if("("==s)return T(e,1),l(e,t,[")"],"string");if("["==s)return T(e,1),l(e,t,["]"],"string");if("{"==s)return T(e,1),l(e,t,["}"],"string");if("<"==s)return T(e,1),l(e,t,[">"],"string");if(/[\^'"!~\/]/.test(s))return l(e,t,[e.eat(s)],"string")}if("m"==r&&((!(s=R(e,-2))||!/\w/.test(s))&&(s=e.eat(/[(\[{<\^'"!~\/]/)))){if(/[\^'"!~\/]/.test(s))return l(e,t,[s],u,$);if("("==s)return l(e,t,[")"],u,$);if("["==s)return l(e,t,["]"],u,$);if("{"==s)return l(e,t,["}"],u,$);if("<"==s)return l(e,t,[">"],u,$)}if("s"==r&&(!(s=/[\/>\]})\w]/.test(R(e,-2)))&&(s=e.eat(/[(\[{<\^'"!~\/]/))))return l(e,t,"["==s?["]","]"]:"{"==s?["}","}"]:"<"==s?[">",">"]:"("==s?[")",")"]:[s,s],u,$);if("y"==r&&(!(s=/[\/>\]})\w]/.test(R(e,-2)))&&(s=e.eat(/[(\[{<\^'"!~\/]/))))return l(e,t,"["==s?["]","]"]:"{"==s?["}","}"]:"<"==s?[">",">"]:"("==s?[")",")"]:[s,s],u,$);if("t"==r&&(!(s=/[\/>\]})\w]/.test(R(e,-2)))&&(s=e.eat("r"))&&(s=e.eat(/[(\[{<\^'"!~\/]/))))return l(e,t,"["==s?["]","]"]:"{"==s?["}","}"]:"<"==s?[">",">"]:"("==s?[")",")"]:[s,s],u,$);if("`"==r)return l(e,t,[r],"variable-2");if("/"==r)return/~\s*$/.test(c(e))?l(e,t,[r],u,$):"operator";if("$"==r){n=e.pos;if(e.eatWhile(/\d/)||e.eat("{")&&e.eatWhile(/\d/)&&e.eat("}"))return"variable-2";e.pos=n}if(/[$@%]/.test(r)){n=e.pos;if(e.eat("^")&&e.eat(/[A-Z]/)||!/[@$%&]/.test(R(e,-2))&&e.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var s=e.current();if(a[s])return"variable-2"}e.pos=n}if(/[$@%&]/.test(r)&&(e.eatWhile(/[\w$\[\]]/)||e.eat("{")&&e.eatWhile(/[\w$\[\]]/)&&e.eat("}"))){s=e.current();return a[s]?"variable-2":"variable"}if("#"==r&&"$"!=R(e,-2))return e.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(r)){n=e.pos;if(e.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),a[e.current()])return"operator";e.pos=n}if("_"==r&&1==e.pos){if("_END__"==p(e,6))return l(e,t,["\0"],"comment");if("_DATA__"==p(e,7))return l(e,t,["\0"],"variable-2");if("_C__"==p(e,7))return l(e,t,["\0"],"string")}if(/\w/.test(r)){n=e.pos;if("{"==R(e,-2)&&("}"==R(e,0)||e.eatWhile(/\w/)&&"}"==R(e,0)))return"string";e.pos=n}if(/[A-Z]/.test(r)){var o=R(e,-2);n=e.pos;if(e.eatWhile(/[A-Z_]/),!/[\da-z]/.test(R(e,0)))return(s=a[e.current()])?(s[1]&&(s=s[0]),":"!=o?1==s?"keyword":2==s?"def":3==s?"atom":4==s?"operator":5==s?"variable-2":"meta":"meta"):"meta";e.pos=n}if(/[a-zA-Z_]/.test(r)){o=R(e,-2);return e.eatWhile(/\w/),(s=a[e.current()])?(s[1]&&(s=s[0]),":"!=o?1==s?"keyword":2==s?"def":3==s?"atom":4==s?"operator":5==s?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:E,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||E)(e,t)},lineComment:"#"}}),e.registerHelper("wordChars","perl",/[\w$]/),e.defineMIME("text/x-perl","perl")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(o){"use strict";function e(e){for(var t={},_=e.split(" "),r=0;r<_.length;++r)t[_[r]]=!0;return t}function n(s,i,l){return 0==s.length?a(i):function(e,t){for(var _=s[0],r=0;r<_.length;r++)if(e.match(_[r][0]))return t.tokenize=n(s.slice(1),i),_[r][1];return t.tokenize=a(i,l),"string"}}function a(_,r){return function(e,t){return function(e,t,_,r){if(!1!==r&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==r&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=n([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],_,r)),e.match(/\-\>\w/,!1)&&(t.tokenize=n([[["->",null]],[[/[\w]+/,"variable"]]],_,r)),"variable-2";var s=!1;for(;!e.eol()&&(s||!1===r||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!s&&e.match(_)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}s="\\"==e.next()&&!s}return"string"}(e,t,_,r)}}var t="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",_="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",r="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";o.registerHelper("hintWords","php",[t,_,r].join(" ").split(" ")),o.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:e(t),blockKeywords:e("catch do else elseif for foreach if switch try while finally"),defKeywords:e("class function interface namespace trait"),atoms:e(_),builtin:e(r),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var _;if(_=e.match(/<<\s*/)){var r=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var s=e.current().slice(_[0].length+(r?2:1));if(r&&e.eat(r),s)return(t.tokStack||(t.tokStack=[])).push(s,0),t.tokenize=a(s,"'"!=r),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=a('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&0<t.tokStack.length&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=a(t.tokStack[t.tokStack.length-2])),!1}}};o.defineMode("php",function(e,_){var n=o.getMode(e,_&&_.htmlMode||"text/html"),a=o.getMode(e,s);return{startState:function(){var e=o.startState(n),t=_.startOpen?o.startState(a):null;return{html:e,php:t,curMode:_.startOpen?a:n,curState:_.startOpen?t:e,pending:null}},copyState:function(e){var t,_=e.html,r=o.copyState(n,_),s=e.php,i=s&&o.copyState(a,s);return t=e.curMode==n?r:i,{html:r,php:i,curMode:e.curMode,curState:t,pending:e.pending}},token:function(e,t){var _=t.curMode==a;if(e.sol()&&t.pending&&'"'!=t.pending&&"'"!=t.pending&&(t.pending=null),_)return _&&null==t.php.tokenize&&e.match("?>")?(t.curMode=n,t.curState=t.html,t.php.context.prev||(t.php=null),"meta"):a.token(e,t.curState);if(e.match(/^<\?\w*/))return t.curMode=a,t.php||(t.php=o.startState(a,n.indent(t.html,"",""))),t.curState=t.php,"meta";if('"'==t.pending||"'"==t.pending){for(;!e.eol()&&e.next()!=t.pending;);var r="string"}else r=t.pending&&e.pos<t.pending.end?(e.pos=t.pending.end,t.pending.style):n.token(e,t.curState);t.pending&&(t.pending=null);var s,i=e.current(),l=i.search(/<\?/);return-1!=l&&("string"==r&&(s=i.match(/[\'\"]$/))&&!/\?>/.test(i)?t.pending=s[0]:t.pending={end:e.pos,style:r},e.backUp(i.length-l)),r},indent:function(e,t,_){return e.curMode!=a&&/^\s*<\//.test(t)||e.curMode==a&&/^\?>/.test(t)?n.indent(e.html,t,_):e.curMode.indent(e.curState,t,_)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),o.defineMIME("application/x-httpd-php","php"),o.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),o.defineMIME("text/x-php",s)});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(I){"use strict";I.defineMode("pig",function(e,O){var E=O.keywords,I=O.builtins,N=O.types,A=O.multiLineStrings,r=/[*+\-%<>=&?:\/!|]/;function R(e,O,T){return(O.tokenize=T)(e,O)}function S(e,O){for(var T,E=!1;T=e.next();){if("/"==T&&E){O.tokenize=n;break}E="*"==T}return"comment"}function n(e,O){var t,T=e.next();return'"'==T||"'"==T?R(e,O,(t=T,function(e,O){for(var T,E=!1,I=!1;null!=(T=e.next());){if(T==t&&!E){I=!0;break}E=!E&&"\\"==T}return(I||!E&&!A)&&(O.tokenize=n),"error"})):/[\[\]{}\(\),;\.]/.test(T)?null:/\d/.test(T)?(e.eatWhile(/[\w\.]/),"number"):"/"==T?e.eat("*")?R(e,O,S):(e.eatWhile(r),"operator"):"-"==T?e.eat("-")?(e.skipToEnd(),"comment"):(e.eatWhile(r),"operator"):r.test(T)?(e.eatWhile(r),"operator"):(e.eatWhile(/[\w\$_]/),E&&E.propertyIsEnumerable(e.current().toUpperCase())&&!e.eat(")")&&!e.eat(".")?"keyword":I&&I.propertyIsEnumerable(e.current().toUpperCase())?"variable-2":N&&N.propertyIsEnumerable(e.current().toUpperCase())?"variable-3":"variable")}return{startState:function(){return{tokenize:n,startOfLine:!0}},token:function(e,O){return e.eatSpace()?null:O.tokenize(e,O)}}}),function(){function e(e){for(var O={},T=e.split(" "),E=0;E<T.length;++E)O[T[E]]=!0;return O}var O="ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA  PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ",T="VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE DUMP",E="BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ";I.defineMIME("text/x-pig",{name:"pig",builtins:e(O),keywords:e(T),types:e(E)}),I.registerHelper("hintWords","pig",(O+E+T).split(" "))}()});;
  ;!function(e){"use strict";"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(window.CodeMirror)}(function(e){"use strict";e.defineMode("powershell",function(){function e(e,t){for(var r=void 0!==(t=t||{}).prefix?t.prefix:"^",n=void 0!==t.suffix?t.suffix:"\\b",o=0;o<e.length;o++)e[o]instanceof RegExp?e[o]=e[o].source:e[o]=e[o].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(r+"("+e.join("|")+")"+n,"i")}var t="(?=[^A-Za-z\\d\\-_]|$)",a=/[\w\-:]/,s={keyword:e([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:t}),number:/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,operator:e([e(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/],{suffix:""}),builtin:e([/[A-Z]:|%|\?/i,e([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),e([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""})],{suffix:t}),punctuation:/[\[\]{},;`\.]|@[({]/,identifier:/^[A-Za-z\_][A-Za-z\-\_\d]*\b/};function u(e,t){var r=t.returnStack[t.returnStack.length-1];if(r&&r.shouldReturnFrom(t))return t.tokenize=r.tokenize,t.returnStack.pop(),t.tokenize(e,t);if(e.eatSpace())return null;if(e.eat("("))return t.bracketNesting+=1,"punctuation";if(e.eat(")"))return t.bracketNesting-=1,"punctuation";for(var n in s)if(e.match(s[n]))return n;var o=e.next();if("'"===o)return function(e,t){var r;for(;null!=(r=e.peek());)if(e.next(),"'"===r&&!e.eat("'"))return t.tokenize=u,"string";return"error"}(e,t);if("$"===o)return p(e,t);if('"'===o)return c(e,t);if("<"===o&&e.eat("#"))return(t.tokenize=l)(e,t);if("#"===o)return e.skipToEnd(),"comment";if("@"===o){var i=e.eat(/["']/);if(i&&e.eol())return t.tokenize=f,t.startQuote=i[0],f(e,t);if(e.eol())return"error";if(e.peek().match(/[({]/))return"punctuation";if(e.peek().match(a))return p(e,t)}return"error"}function c(e,t){for(var r;null!=(r=e.peek());){if("$"===r)return t.tokenize=n,"string";if(e.next(),"`"!==r){if('"'===r&&!e.eat('"'))return t.tokenize=u,"string"}else e.next()}return"error"}function n(e,t){return i(e,t,c)}function r(e,t){return t.tokenize=f,t.startQuote='"',f(e,t)}function o(e,t){return i(e,t,r)}function i(e,t,r){if(e.match("$(")){var n=t.bracketNesting;return t.returnStack.push({shouldReturnFrom:function(e){return e.bracketNesting===n},tokenize:r}),t.tokenize=u,t.bracketNesting+=1,"punctuation"}return e.next(),t.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:r}),t.tokenize=p,t.tokenize(e,t)}function l(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&">"==r){t.tokenize=u;break}n="#"===r}return"comment"}function p(e,t){var r=e.peek();return e.eat("{")?(t.tokenize=m)(e,t):null!=r&&r.match(a)?(e.eatWhile(a),t.tokenize=u,"variable-2"):(t.tokenize=u,"error")}function m(e,t){for(var r;null!=(r=e.next());)if("}"===r){t.tokenize=u;break}return"variable-2"}function f(e,t){var r=t.startQuote;if(e.sol()&&e.match(new RegExp(r+"@")))t.tokenize=u;else if('"'===r)for(;!e.eol();){var n=e.peek();if("$"===n)return t.tokenize=o,"string";e.next(),"`"===n&&e.next()}else e.skipToEnd();return"string"}return{startState:function(){return{returnStack:[],bracketNesting:0,tokenize:u}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"}}),e.defineMIME("application/x-powershell","powershell")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("properties",function(){return{token:function(e,i){var t=e.sol()||i.afterSection,n=e.eol();if(i.afterSection=!1,t&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),n&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),t)for(;e.eatSpace(););var o=e.next();return!t||"#"!==o&&"!"!==o&&";"!==o?t&&"["===o?(i.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):"="===o||":"===o?(i.position="quote",null):("\\"===o&&"quote"===i.position&&e.eol()&&(i.nextMultiline=!0),i.position):(i.position="comment",e.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),e.defineMIME("text/x-properties","properties"),e.defineMIME("text/x-ini","properties")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],r=new RegExp("^(("+t.join(")|(")+"))\\b","i");e.registerHelper("hintWords","protobuf",t);var n=new RegExp("^[_A-Za-z¡-][_A-Za-z0-9¡-]*");function i(e){if(e.eatSpace())return null;if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)?"string":e.match(/^'([^']|(''))*'/)?"string":e.match(r)?"keyword":e.match(n)?"variable":(e.next(),null)}e.defineMode("protobuf",function(){return{token:i}}),e.defineMIME("text/x-protobuf","protobuf")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../javascript/javascript"),require("../css/css"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],t):t(CodeMirror)}(function(S){"use strict";S.defineMode("pug",function(n){var c="keyword",u="meta",o="builtin",p="qualifier",f={"{":"}","(":")","[":"]"},l=S.getMode(n,"javascript");function e(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=S.startState(l),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}function h(t,e){if(t.match("#{"))return e.isInterpolating=!0,e.interpolationNesting=0,"punctuation"}function d(t,e){var i;if(t.match(/^:([\w\-]+)/))return n&&n.innerModes&&(i=n.innerModes(t.current().substring(1))),i||(i=t.current().substring(1)),"string"==typeof i&&(i=S.getMode(n,i)),m(t,e,i),"atom"}function m(t,e,i){i=S.mimeModes[i]||i,i=n.innerModes&&n.innerModes(i)||i,i=S.mimeModes[i]||i,i=S.getMode(n,i),e.indentOf=t.indentation(),i&&"null"!==i.name?e.innerMode=i:e.indentToken="string"}function v(t,e,i){if(t.indentation()>e.indentOf||e.innerModeForLine&&!t.sol()||i)return e.innerMode?(e.innerState||(e.innerState=e.innerMode.startState?S.startState(e.innerMode,t.indentation()):{}),t.hideFirstChars(e.indentOf+2,function(){return e.innerMode.token(t,e.innerState)||!0})):(t.skipToEnd(),e.indentToken);t.sol()&&(e.indentOf=1/0,e.indentToken=null,e.innerMode=null,e.innerState=null)}return e.prototype.copy=function(){var t=new e;return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=S.copyState(l,this.jsState),t.innerMode=this.innerMode,this.innerMode&&this.innerState&&(t.innerState=S.copyState(this.innerMode,this.innerState)),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.scriptType=this.scriptType,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t.innerModeForLine=this.innerModeForLine,t},{startState:function(){return new e},copyState:function(t){return t.copy()},token:function(t,e){var i,n,r,a,s=v(t,e)||function(t,e){if(t.sol()&&(e.restOfLine=""),e.restOfLine){t.skipToEnd();var i=e.restOfLine;return e.restOfLine="",i}}(t,e)||function(t,e){if(e.isInterpolating){if("}"===t.peek()){if(e.interpolationNesting--,e.interpolationNesting<0)return t.next(),e.isInterpolating=!1,"punctuation"}else"{"===t.peek()&&e.interpolationNesting++;return l.token(t,e.jsState)||!0}}(t,e)||function(t,e){if(e.isIncludeFiltered){var i=d(t,e);return e.isIncludeFiltered=!1,e.restOfLine="string",i}}(t,e)||function(t,e){if(e.isEach){if(t.match(/^ in\b/))return e.javaScriptLine=!0,e.isEach=!1,c;if(t.sol()||t.eol())e.isEach=!1;else if(t.next()){for(;!t.match(/^ in\b/,!1)&&t.next(););return"variable"}}}(t,e)||function t(e,i){if(i.isAttrs){if(f[e.peek()]&&i.attrsNest.push(f[e.peek()]),i.attrsNest[i.attrsNest.length-1]===e.peek())i.attrsNest.pop();else if(e.eat(")"))return i.isAttrs=!1,"punctuation";if(i.inAttributeName&&e.match(/^[^=,\)!]+/))return"="!==e.peek()&&"!"!==e.peek()||(i.inAttributeName=!1,i.jsState=S.startState(l),"script"===i.lastTag&&"type"===e.current().trim().toLowerCase()?i.attributeIsType=!0:i.attributeIsType=!1),"attribute";var n=l.token(e,i.jsState);if(i.attributeIsType&&"string"===n&&(i.scriptType=e.current().toString()),0===i.attrsNest.length&&("string"===n||"variable"===n||"keyword"===n))try{return Function("","var x "+i.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),i.inAttributeName=!0,i.attrValue="",e.backUp(e.current().length),t(e,i)}catch(t){}return i.attrValue+=e.current(),n||!0}}(t,e)||function(t,e){if(t.sol()&&(e.javaScriptLine=!1,e.javaScriptLineExcludesColon=!1),e.javaScriptLine){if(e.javaScriptLineExcludesColon&&":"===t.peek())return e.javaScriptLine=!1,void(e.javaScriptLineExcludesColon=!1);var i=l.token(t,e.jsState);return t.eol()&&(e.javaScriptLine=!1),i||!0}}(t,e)||function(t,e){if(e.javaScriptArguments)return 0===e.javaScriptArgumentsDepth&&"("!==t.peek()?void(e.javaScriptArguments=!1):("("===t.peek()?e.javaScriptArgumentsDepth++:")"===t.peek()&&e.javaScriptArgumentsDepth--,0===e.javaScriptArgumentsDepth?void(e.javaScriptArguments=!1):l.token(t,e.jsState)||!0)}(t,e)||function(t,e){if(e.mixinCallAfter)return e.mixinCallAfter=!1,t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),!0}(t,e)||function(t){if(t.match(/^yield\b/))return"keyword"}(t)||function(t){if(t.match(/^(?:doctype) *([^\n]+)?/))return u}(t)||h(t,e)||function(t,e){if(t.match(/^case\b/))return e.javaScriptLine=!0,c}(t,e)||function(t,e){if(t.match(/^when\b/))return e.javaScriptLine=!0,e.javaScriptLineExcludesColon=!0,c}(t,e)||function(t){if(t.match(/^default\b/))return c}(t)||function(t,e){if(t.match(/^extends?\b/))return e.restOfLine="string",c}(t,e)||function(t,e){if(t.match(/^append\b/))return e.restOfLine="variable",c}(t,e)||function(t,e){if(t.match(/^prepend\b/))return e.restOfLine="variable",c}(t,e)||function(t,e){if(t.match(/^block\b *(?:(prepend|append)\b)?/))return e.restOfLine="variable",c}(t,e)||function(t,e){if(t.match(/^include\b/))return e.restOfLine="string",c}(t,e)||function(t,e){if(t.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&t.match("include"))return e.isIncludeFiltered=!0,c}(t,e)||function(t,e){if(t.match(/^mixin\b/))return e.javaScriptLine=!0,c}(t,e)||(a=e,(r=t).match(/^\+([-\w]+)/)?(r.match(/^\( *[-\w]+ *=/,!1)||(a.javaScriptArguments=!0,a.javaScriptArgumentsDepth=0),"variable"):r.match(/^\+#{/,!1)?(r.next(),a.mixinCallAfter=!0,h(r,a)):void 0)||function(t,e){if(t.match(/^(if|unless|else if|else)\b/))return e.javaScriptLine=!0,c}(t,e)||function(t,e){if(t.match(/^(- *)?(each|for)\b/))return e.isEach=!0,c}(t,e)||function(t,e){if(t.match(/^while\b/))return e.javaScriptLine=!0,c}(t,e)||function(t,e){var i;if(i=t.match(/^(\w(?:[-:\w]*\w)?)\/?/))return e.lastTag=i[1].toLowerCase(),"script"===e.lastTag&&(e.scriptType="application/javascript"),"tag"}(t,e)||d(t,e)||function(t,e){if(t.match(/^(!?=|-)/))return e.javaScriptLine=!0,"punctuation"}(t,e)||function(t){if(t.match(/^#([\w-]+)/))return o}(t)||function(t){if(t.match(/^\.([\w-]+)/))return p}(t)||function(t,e){if("("==t.peek())return t.next(),e.isAttrs=!0,e.attrsNest=[],e.inAttributeName=!0,e.attrValue="",e.attributeIsType=!1,"punctuation"}(t,e)||function(t,e){if(t.match(/^&attributes\b/))return e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0,"keyword"}(t,e)||function(t){if(t.sol()&&t.eatSpace())return"indent"}(t)||(n=e,(i=t).match(/^(?:\| ?| )([^\n]+)/)?"string":i.match(/^(<[^\n]*)/,!1)?(m(i,n,"htmlmixed"),n.innerModeForLine=!0,v(i,n,!0)):void 0)||function(t,e){if(t.match(/^ *\/\/(-)?([^\n]*)/))return e.indentOf=t.indentation(),e.indentToken="comment"}(t,e)||function(t){if(t.match(/^: */))return"colon"}(t)||function(t,e){if(t.eat(".")){var i=null;return"script"===e.lastTag&&-1!=e.scriptType.toLowerCase().indexOf("javascript")?i=e.scriptType.toLowerCase().replace(/"|'/g,""):"style"===e.lastTag&&(i="css"),m(t,e,i),"dot"}}(t,e)||(t.next(),null);return!0===s?null:s}}},"javascript","css","htmlmixed"),S.defineMIME("text/x-pug","pug"),S.defineMIME("text/x-jade","pug")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("puppet",function(){var s={},c=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function e(e,n){for(var t=n.split(" "),i=0;i<t.length;i++)s[t[i]]=e}function u(e,n){for(var t,i,o=!1;!e.eol()&&(t=e.next())!=n.pending;){if("$"===t&&"\\"!=i&&'"'==n.pending){o=!0;break}i=t}return o&&e.backUp(1),t==n.pending?n.continueString=!1:n.continueString=!0,"string"}return e("keyword","class define site node include import inherits"),e("keyword","case if else in and elsif default or"),e("atom","false true running present absent file directory undef"),e("builtin","action augeas burst chain computer cron destination dport exec file filebucket group host icmp iniface interface jump k5login limit log_level log_prefix macauthorization mailalias maillist mcx mount nagios_command nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod name notify outiface package proto reject resources router schedule scheduled_task selboolean selmodule service source sport ssh_authorized_key sshkey stage state table tidy todest toports tosource user vlan yumrepo zfs zone zpool"),{startState:function(){var e={inDefinition:!1,inInclude:!1,continueString:!1,pending:!1};return e},token:function(e,n){return e.eatSpace()?null:function(e,n){var t=e.match(/[\w]+/,!1),i=e.match(/(\s+)?\w+\s+=>.*/,!1),o=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),a=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),r=e.next();if("$"===r)return e.match(c)?n.continueString?"variable-2":"variable":"error";if(n.continueString)return e.backUp(1),u(e,n);if(n.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),n.inDefinition=!1}return n.inInclude?(e.match(/(\s+)?\S+(\s+)?/),n.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):i?(e.match(/(\s+)?\w+/),"tag"):t&&s.hasOwnProperty(t)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(n.inDefinition=!0),"include"==t&&(n.inInclude=!0),s[t]):/(^|\s+)[A-Z][\w:_]+/.test(t)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):o?(e.match(/(\s+)?[\w:_]+/),"def"):a?(e.match(/(\s+)?[@]{1,2}/),"special"):"#"==r?(e.skipToEnd(),"comment"):"'"==r||'"'==r?(n.pending=r,u(e,n)):"{"==r||"}"==r?"bracket":"/"==r?(e.match(/.*?\//),"variable-3"):r.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):"="==r?(">"==e.peek()&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}(e,n)}}}),e.defineMIME("text/x-puppet","puppet")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("q",function(e){var i,c=e.indentUnit,s=new RegExp("^("+["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"].join("|")+")$"),a=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function l(e,t){var n=e.sol(),o=e.next();if(i=null,n){if("/"==o)return(t.tokenize=d)(e,t);if("\\"==o)return e.eol()||/\s/.test(e.peek())?(e.skipToEnd(),/^\\\s*$/.test(e.current())?(t.tokenize=u)(e):t.tokenize=l,"comment"):(t.tokenize=l,"builtin")}if(/\s/.test(o))return"/"==e.peek()?(e.skipToEnd(),"comment"):"whitespace";if('"'==o)return(t.tokenize=m)(e,t);if("`"==o)return e.eatWhile(/[A-Za-z\d_:\/.]/),"symbol";if("."==o&&/\d/.test(e.peek())||/\d/.test(o)){var r=null;return e.backUp(1),e.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||e.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||e.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||e.match(/^\d+[ptuv]{1}/)?r="temporal":(e.match(/^0[NwW]{1}/)||e.match(/^0x[\da-fA-F]*/)||e.match(/^[01]+[b]{1}/)||e.match(/^\d+[chijn]{1}/)||e.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(r="number"),!r||(o=e.peek())&&!a.test(o)?(e.next(),"error"):r}return/[A-Za-z]|\./.test(o)?(e.eatWhile(/[A-Za-z._\d]/),s.test(e.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(o)?null:/[{}\(\[\]\)]/.test(o)?null:"error"}function d(e,t){return e.skipToEnd(),/\/\s*$/.test(e.current())?(t.tokenize=n)(e,t):t.tokenize=l,"comment"}function n(e,t){var n=e.sol()&&"\\"==e.peek();return e.skipToEnd(),n&&/^\\\s*$/.test(e.current())&&(t.tokenize=l),"comment"}function u(e){return e.skipToEnd(),"comment"}function m(e,t){for(var n,o=!1,r=!1;n=e.next();){if('"'==n&&!o){r=!0;break}o=!o&&"\\"==n}return r&&(t.tokenize=l),"string"}function o(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function r(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:l,context:null,indent:0,col:0}},token:function(e,t){e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation());var n=t.tokenize(e,t);if("comment"!=n&&t.context&&null==t.context.align&&"pattern"!=t.context.type&&(t.context.align=!0),"("==i)o(t,")",e.column());else if("["==i)o(t,"]",e.column());else if("{"==i)o(t,"}",e.column());else if(/[\]\}\)]/.test(i)){for(;t.context&&"pattern"==t.context.type;)r(t);t.context&&i==t.context.type&&r(t)}else"."==i&&t.context&&"pattern"==t.context.type?r(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?o(t,"pattern",e.column()):"pattern"!=t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),o=e.context;if(/[\]\}]/.test(n))for(;o&&"pattern"==o.type;)o=o.prev;var r=o&&n==o.type;return o?"pattern"==o.type?o.col:o.align?o.col+(r?0:1):o.indent+(r?0:c):0}}}),e.defineMIME("text/x-q","q")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(x){"use strict";x.registerHelper("wordChars","r",/[\w.]/),x.defineMode("r",function(a){function e(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}var t=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],r=["list","quote","bquote","eval","return","call","parse","deparse"],n=["if","else","repeat","while","function","for","in","next","break"];x.registerHelper("hintWords","r",t.concat(r,n));var o,c=e(t),f=e(r),l=e(n),u=e(["if","else","repeat","while","function","for"]),d=/[+\-*\/^<>=!&|~$:]/;function s(e,t){o=null;var i,r=e.next();if("#"==r)return e.skipToEnd(),"comment";if("0"==r&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==r&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==r||'"'==r)return t.tokenize=(i=r,function(e,t){if(e.eat("\\")){var r=e.next();return"x"==r?e.match(/^[a-f0-9]{2}/i):("u"==r||"U"==r)&&e.eat("{")&&e.skipTo("}")?e.next():"u"==r?e.match(/^[a-f0-9]{4}/i):"U"==r?e.match(/^[a-f0-9]{8}/i):/[0-7]/.test(r)&&e.match(/^[0-7]{1,2}/),"string-2"}for(var n;null!=(n=e.next());){if(n==i){t.tokenize=s;break}if("\\"==n){e.backUp(1);break}}return"string"}),"string";if("`"==r)return e.match(/[^`]+`/),"variable-3";if("."==r&&e.match(/.[.\d]+/))return"keyword";if(/[\w\.]/.test(r)&&"_"!=r){e.eatWhile(/[\w\.]/);var n=e.current();return c.propertyIsEnumerable(n)?"atom":l.propertyIsEnumerable(n)?(u.propertyIsEnumerable(n)&&!e.match(/\s*if(\s+|$)/,!1)&&(o="block"),"keyword"):f.propertyIsEnumerable(n)?"builtin":"variable"}return"%"==r?(e.skipTo("%")&&e.next(),"operator variable-2"):"<"==r&&e.eat("-")||"<"==r&&e.match("<-")||"-"==r&&e.match(/>>?/)?"operator arrow":"="==r&&t.ctx.argList?"arg-is":d.test(r)?"$"==r?"operator dollar":(e.eatWhile(d),"operator"):/[\(\){}\[\];]/.test(r)&&";"==(o=r)?"semi":null}function i(e,t,r){e.ctx={type:t,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function p(e,t){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|t,column:r.column,prev:r.prev}}function m(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}return{startState:function(){return{tokenize:s,ctx:{type:"top",indent:-a.indentUnit,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(0==(3&t.ctx.flags)&&(t.ctx.flags|=2),4&t.ctx.flags&&m(t),t.indent=e.indentation()),e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"!=r&&0==(2&t.ctx.flags)&&p(t,1),";"!=o&&"{"!=o&&"}"!=o||"block"!=t.ctx.type||m(t),"{"==o?i(t,"}",e):"("==o?(i(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==o?i(t,"]",e):"block"==o?i(t,"block",e):o==t.ctx.type?m(t):"block"==t.ctx.type&&"comment"!=r&&p(t,4),t.afterIdent="variable"==r||"keyword"==r,r},indent:function(e,t){if(e.tokenize!=s)return 0;var r=t&&t.charAt(0),n=e.ctx,i=r==n.type;return 4&n.flags&&(n=n.prev),"block"==n.type?n.indent+("{"==r?0:a.indentUnit):1&n.flags?n.column+(i?0:1):n.indent+(i?0:a.indentUnit)},lineComment:"#"}}),x.defineMIME("text/x-rsrc","r")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("rpm-changes",function(){var r=/^-+$/,t=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,n=/^[\w+.-]+@[\w.-]+/;return{token:function(e){if(e.sol()){if(e.match(r))return"tag";if(e.match(t))return"tag"}return e.match(n)?"string":(e.next(),null)}}}),e.defineMIME("text/x-rpm-changes","rpm-changes"),e.defineMode("rpm-spec",function(){var t=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,n=/^[a-zA-Z0-9()]+:/,o=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,a=/^%(ifnarch|ifarch|if)/,i=/^%(else|endif)/,c=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(e,r){if("#"==e.peek())return e.skipToEnd(),"comment";if(e.sol()){if(e.match(n))return"header";if(e.match(o))return"atom"}if(e.match(/^\$\w+/))return"def";if(e.match(/^\$\{\w+\}/))return"def";if(e.match(i))return"keyword";if(e.match(a))return r.controlFlow=!0,"keyword";if(r.controlFlow){if(e.match(c))return"operator";if(e.match(/^(\d+)/))return"number";e.eol()&&(r.controlFlow=!1)}if(e.match(t))return e.eol()&&(r.controlFlow=!1),"number";if(e.match(/^%[\w]+/))return e.match(/^\(/)&&(r.macroParameters=!0),"keyword";if(r.macroParameters){if(e.match(/^\d+/))return"number";if(e.match(/^\)/))return r.macroParameters=!1,"keyword"}return e.match(/^%\{\??[\w \-\:\!]+\}/)?(e.eol()&&(r.controlFlow=!1),"def"):(e.next(),null)}}}),e.defineMIME("text/x-rpm-spec","rpm-spec")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../python/python"),require("../stex/stex"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../python/python","../stex/stex","../../addon/mode/overlay"],e):e(CodeMirror)}(function(U){"use strict";U.defineMode("rst",function(e,t){var a=/^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/,c=/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/,n=/^``[^`\s](?:[^`]*[^`\s])``/,r=/^(?:[\d]+(?:[\.,]\d+)*)/,m=/^(?:\s\+[\d]+(?:[\.,]\d+)*)/,o=/^(?:\s\-[\d]+(?:[\.,]\d+)*)/,s=new RegExp("^[Hh][Tt][Tt][Pp][Ss]?://(?:[\\d\\w.-]+)\\.(?:\\w{2,6})(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"),h={token:function(e){if(e.match(a)&&e.match(/\W+|$/,!1))return"strong";if(e.match(c)&&e.match(/\W+|$/,!1))return"em";if(e.match(n)&&e.match(/\W+|$/,!1))return"string-2";if(e.match(r))return"number";if(e.match(m))return"positive";if(e.match(o))return"negative";if(e.match(s))return"link";for(;!(null==e.next()||e.match(a,!1)||e.match(c,!1)||e.match(n,!1)||e.match(r,!1)||e.match(m,!1)||e.match(o,!1)||e.match(s,!1)););return null}},l=U.getMode(e,t.backdrop||"rst-base");return U.overlayMode(l,h,!0)},"python","stex"),U.defineMode("rst-base",function(e){function t(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}var c=U.getMode(e,"python"),n=U.getMode(e,"stex"),a="\\s+",r="(?:\\s*|\\W|$)",m=new RegExp(t("^{0}",r)),o="(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)",s=new RegExp(t("^{0}",o)),h=t("(?:{0}|`{1}`)",o,"(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)"),l="(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)",i="(?:[^\\`]+)",p=new RegExp(t("^{0}",i)),d=new RegExp("^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"),u=new RegExp(t("^\\.\\.{0}",a)),x=new RegExp(t("^_{0}:{1}|^__:{1}",h,r)),f=new RegExp(t("^{0}::{1}",h,r)),k=new RegExp(t("^\\|{0}\\|{1}{2}::{3}",l,a,h,r)),w=new RegExp(t("^\\[(?:\\d+|#{0}?|\\*)]{1}",h,r)),b=new RegExp(t("^\\[{0}\\]{1}",h,r)),g=new RegExp(t("^\\|{0}\\|",l)),E=new RegExp(t("^\\[(?:\\d+|#{0}?|\\*)]_",h)),R=new RegExp(t("^\\[{0}\\]_",h)),y=new RegExp(t("^{0}__?",h)),_=new RegExp(t("^`{0}`_",i)),v=new RegExp(t("^:{0}:`{1}`{2}",o,i,r)),$=new RegExp(t("^`{1}`:{0}:{2}",o,i,r)),S=new RegExp(t("^:{0}:{1}",o,r)),M=new RegExp(t("^{0}",h)),W=new RegExp(t("^::{0}",r)),q=new RegExp(t("^\\|{0}\\|",l)),T=new RegExp(t("^{0}",a)),j=new RegExp(t("^{0}",h)),I=new RegExp(t("^::{0}",r)),A=new RegExp("^_"),C=new RegExp(t("^{0}|_",h)),H=new RegExp(t("^:{0}",r)),P=new RegExp("^::\\s*$"),z=new RegExp("^\\s+(?:>>>|In \\[\\d+\\]:)\\s");function B(e,t){var a=null;if(e.sol()&&e.match(z,!1))N(t,K,{mode:c,local:U.startState(c)});else if(e.sol()&&e.match(u))N(t,D),a="meta";else if(e.sol()&&e.match(d))N(t,B),a="header";else if(Q(t)==v||e.match(v,!1))switch(O(t)){case 0:N(t,B,L(v,1)),e.match(/^:/),a="meta";break;case 1:N(t,B,L(v,2)),e.match(s),a="keyword",e.current().match(/^(?:math|latex)/)&&(t.tmp_stex=!0);break;case 2:N(t,B,L(v,3)),e.match(/^:`/),a="meta";break;case 3:if(t.tmp_stex&&(t.tmp_stex=void 0,t.tmp={mode:n,local:U.startState(n)}),t.tmp){if("`"==e.peek()){N(t,B,L(v,4)),t.tmp=void 0;break}a=t.tmp.mode.token(e,t.tmp.local);break}N(t,B,L(v,4)),e.match(p),a="string";break;case 4:N(t,B,L(v,5)),e.match(/^`/),a="meta";break;case 5:N(t,B,L(v,6)),e.match(m);break;default:N(t,B)}else if(Q(t)==$||e.match($,!1))switch(O(t)){case 0:N(t,B,L($,1)),e.match(/^`/),a="meta";break;case 1:N(t,B,L($,2)),e.match(p),a="string";break;case 2:N(t,B,L($,3)),e.match(/^`:/),a="meta";break;case 3:N(t,B,L($,4)),e.match(s),a="keyword";break;case 4:N(t,B,L($,5)),e.match(/^:/),a="meta";break;case 5:N(t,B,L($,6)),e.match(m);break;default:N(t,B)}else if(Q(t)==S||e.match(S,!1))switch(O(t)){case 0:N(t,B,L(S,1)),e.match(/^:/),a="meta";break;case 1:N(t,B,L(S,2)),e.match(s),a="keyword";break;case 2:N(t,B,L(S,3)),e.match(/^:/),a="meta";break;case 3:N(t,B,L(S,4)),e.match(m);break;default:N(t,B)}else if(Q(t)==g||e.match(g,!1))switch(O(t)){case 0:N(t,B,L(g,1)),e.match(q),a="variable-2";break;case 1:N(t,B,L(g,2)),e.match(/^_?_?/)&&(a="link");break;default:N(t,B)}else if(e.match(E))N(t,B),a="quote";else if(e.match(R))N(t,B),a="quote";else if(e.match(y))N(t,B),e.peek()&&!e.peek().match(/^\W$/)||(a="link");else if(Q(t)==_||e.match(_,!1))switch(O(t)){case 0:!e.peek()||e.peek().match(/^\W$/)?N(t,B,L(_,1)):e.match(_);break;case 1:N(t,B,L(_,2)),e.match(/^`/),a="link";break;case 2:N(t,B,L(_,3)),e.match(p);break;case 3:N(t,B,L(_,4)),e.match(/^`_/),a="link";break;default:N(t,B)}else e.match(P)?N(t,G):e.next()&&N(t,B);return a}function D(e,t){var a=null;if(Q(t)==k||e.match(k,!1))switch(O(t)){case 0:N(t,D,L(k,1)),e.match(q),a="variable-2";break;case 1:N(t,D,L(k,2)),e.match(T);break;case 2:N(t,D,L(k,3)),e.match(j),a="keyword";break;case 3:N(t,D,L(k,4)),e.match(I),a="meta";break;default:N(t,B)}else if(Q(t)==f||e.match(f,!1))switch(O(t)){case 0:N(t,D,L(f,1)),e.match(M),a="keyword",e.current().match(/^(?:math|latex)/)?t.tmp_stex=!0:e.current().match(/^python/)&&(t.tmp_py=!0);break;case 1:N(t,D,L(f,2)),e.match(W),a="meta",(e.match(/^latex\s*$/)||t.tmp_stex)&&(t.tmp_stex=void 0,N(t,K,{mode:n,local:U.startState(n)}));break;case 2:N(t,D,L(f,3)),(e.match(/^python\s*$/)||t.tmp_py)&&(t.tmp_py=void 0,N(t,K,{mode:c,local:U.startState(c)}));break;default:N(t,B)}else if(Q(t)==x||e.match(x,!1))switch(O(t)){case 0:N(t,D,L(x,1)),e.match(A),e.match(C),a="link";break;case 1:N(t,D,L(x,2)),e.match(H),a="meta";break;default:N(t,B)}else e.match(w)?(N(t,B),a="quote"):e.match(b)?(N(t,B),a="quote"):(e.eatSpace(),e.eol()?N(t,B):(e.skipToEnd(),N(t,F),a="comment"));return a}function F(e,t){return J(e,t,"comment")}function G(e,t){return J(e,t,"meta")}function J(e,t,a){return e.eol()||e.eatSpace()?(e.skipToEnd(),a):(N(t,B),null)}function K(e,t){return t.ctx.mode&&t.ctx.local?e.sol()?(e.eatSpace()||N(t,B),null):t.ctx.mode.token(e,t.ctx.local):(N(t,B),null)}function L(e,t,a,c){return{phase:e,stage:t,mode:a,local:c}}function N(e,t,a){e.tok=t,e.ctx=a||{}}function O(e){return e.ctx.stage||0}function Q(e){return e.ctx.phase}return{startState:function(){return{tok:B,ctx:L(void 0,0)}},copyState:function(e){var t=e.ctx,a=e.tmp;return t.local&&(t={mode:t.mode,local:U.copyState(t.mode,t.local)}),a&&(a={mode:a.mode,local:U.copyState(a.mode,a.local)}),{tok:e.tok,ctx:t,tmp:a}},innerMode:function(e){return e.tmp?{state:e.tmp.local,mode:e.tmp.mode}:e.ctx.mode?{state:e.ctx.local,mode:e.ctx.mode}:null},token:function(e,t){return t.tok(e,t)}}},"python","stex"),U.defineMIME("text/x-rst","rst")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(x){"use strict";x.defineMode("ruby",function(o){function e(e){for(var t={},n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}var d,a=e(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]),u=e(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),f=e(["end","until"]),s={"[":"]","{":"}","(":")"};function c(e,t,n){return n.tokenize.push(e),e(t,n)}function l(e,t){if(e.sol()&&e.match("=begin")&&e.eol())return t.tokenize.push(h),"comment";if(e.eatSpace())return null;var n,r,i,o=e.next();if("`"==o||"'"==o||'"'==o)return c(m(o,"string",'"'==o||"`"==o),e,t);if("/"==o)return function(e){var t,n=e.pos,r=0,i=!1,o=!1;for(;null!=(t=e.next());)if(o)o=!1;else{if(-1<"[{(".indexOf(t))r++;else if(-1<"]})".indexOf(t)){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}(e)?c(m(o,"string-2",!0),e,t):"operator";if("%"==o){var a="string",u=!0;e.eat("s")?a="atom":e.eat(/[WQ]/)?a="string":e.eat(/[r]/)?a="string-2":e.eat(/[wxq]/)&&(u=!(a="string"));var f=e.eat(/[^\w\s=]/);return f?(s.propertyIsEnumerable(f)&&(f=s[f]),c(m(f,a,u,!0),e,t)):"operator"}if("#"==o)return e.skipToEnd(),"comment";if("<"==o&&(n=e.match(/^<(-)?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return c((r=n[2],i=n[1],function(e,t){return i&&e.eatSpace(),e.match(r)?t.tokenize.pop():e.skipToEnd(),"string"}),e,t);if("0"==o)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(o))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==o){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==o)return e.eat("'")?c(m("'","atom",!1),e,t):e.eat('"')?c(m('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==o&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==o)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(o))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=o||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(o))return d=o,null;if("-"==o&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(o)){var l=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=o||l||(d="."),"operator"}return null}return d="|",null}function p(n){return n||(n=1),function(e,t){if("}"==e.peek()){if(1==n)return t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t);t.tokenize[t.tokenize.length-1]=p(n-1)}else"{"==e.peek()&&(t.tokenize[t.tokenize.length-1]=p(n+1));return l(e,t)}}function k(){var n=!1;return function(e,t){return n?(t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t)):(n=!0,l(e,t))}}function m(i,o,a,u){return function(e,t){var n,r=!1;for("read-quoted-paused"===t.context.type&&(t.context=t.context.prev,e.eat("}"));null!=(n=e.next());){if(n==i&&(u||!r)){t.tokenize.pop();break}if(a&&"#"==n&&!r){if(e.eat("{")){"}"==i&&(t.context={prev:t.context,type:"read-quoted-paused"}),t.tokenize.push(p());break}if(/[@\$]/.test(e.peek())){t.tokenize.push(k());break}}r=!r&&"\\"==n}return o}}function h(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[l],indented:0,context:{type:"top",indented:-o.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){d=null,e.sol()&&(t.indented=e.indentation());var n,r=t.tokenize[t.tokenize.length-1](e,t),i=d;if("ident"==r){var o=e.current();"keyword"==(r="."==t.lastTok?"property":a.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(o)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable")&&(i=o,u.propertyIsEnumerable(o)?n="indent":f.propertyIsEnumerable(o)?n="dedent":"if"!=o&&"unless"!=o||e.column()!=e.indentation()?"do"==o&&t.context.indented<t.indented&&(n="indent"):n="indent")}return(d||r&&"comment"!=r)&&(t.lastTok=i),"|"==d&&(t.varList=!t.varList),"indent"==n||/[\(\[\{]/.test(d)?t.context={prev:t.context,type:d||r,indented:t.indented}:("dedent"==n||/[\)\]\}]/.test(d))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine="\\"==d||"operator"==r),r},indent:function(e,t){if(e.tokenize[e.tokenize.length-1]!=l)return x.Pass;var n=t&&t.charAt(0),r=e.context,i=r.type==s[n]||"keyword"==r.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(t);return r.indented+(i?0:o.indentUnit)+(e.continuedLine?o.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#",fold:"indent"}}),x.defineMIME("text/x-ruby","ruby")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|box|break|continue|const|crate|do|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),e.defineMIME("text/x-rustsrc","rust"),e.defineMIME("text/rust","rust")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sas",function(){var a={},i={eq:"operator",lt:"operator",le:"operator",gt:"operator",ge:"operator",in:"operator",ne:"operator",or:"operator"},l=/(<=|>=|!=|<>)/,c=/[=\(:\),{}.*<>+\-\/^\[\]]/;function e(e,t,n){if(n)for(var r=t.split(" "),s=0;s<r.length;s++)a[r[s]]={style:e,state:n}}return e("def","stack pgm view source debug nesting nolist",["inDataStep"]),e("def","if while until for do do; end end; then else cancel",["inDataStep"]),e("def","label format _n_ _error_",["inDataStep"]),e("def","ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME",["inDataStep"]),e("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),e("def","varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday",["inDataStep"]),e("def","zipfips zipname zipnamel zipstate",["inDataStep"]),e("def","put putc putn",["inDataStep"]),e("builtin","data run",["inDataStep"]),e("def","data",["inProc"]),e("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),e("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),e("def","footnote title libname ods",["ALL"]),e("def","%let %put %global %sysfunc %eval ",["ALL"]),e("variable","&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext",["ALL"]),e("def","source2 nosource2 page pageno pagesize",["ALL"]),e("def","_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref  fmterr fmtsearch fnonct fnote font fontalias  fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib  library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit  nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs  on open     order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2  paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps  pw pwreq qtr quote r ranbin rancau ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni read recfm register regr remote remove rename repeat replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex  spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv  tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var  weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq  min max",["inDataStep","inProc"]),e("operator","and not ",["inDataStep","inProc"]),{startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(e,t){return e.eatSpace()?null:function(e,t){var n=e.next();if("/"===n&&e.eat("*"))return t.continueComment=!0,"comment";if(!0===t.continueComment)return"*"===n&&"/"===e.peek()?(e.next(),t.continueComment=!1):e.skipTo("*")?(e.skipTo("*"),e.next(),e.eat("/")&&(t.continueComment=!1)):e.skipToEnd(),"comment";if("*"==n&&e.column()==e.indentation())return e.skipToEnd(),"comment";var r,s=n+e.peek();if(!('"'!==n&&"'"!==n||t.continueString))return t.continueString=n,"string";if(t.continueString)return t.continueString==n?t.continueString=null:e.skipTo(t.continueString)?(e.next(),t.continueString=null):e.skipToEnd(),"string";if(null!==t.continueString&&e.eol())return e.skipTo(t.continueString)||e.skipToEnd(),"string";if(/[\d\.]/.test(n))return"."===n?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"===n?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(l.test(n+e.peek()))return e.next(),"operator";if(i.hasOwnProperty(s)){if(e.next()," "===e.peek())return i[s.toLowerCase()]}else if(c.test(n))return"operator";if(null!=e.match(/[%&;\w]+/,!1)){if(r=n+e.match(/[%&;\w]+/,!0),/&/.test(r))return"variable"}else r=n;if(t.nextword)return e.match(/[\w]+/),"."===e.peek()&&e.skipTo(" "),t.nextword=!1,"variable-2";if(r=r.toLowerCase(),t.inDataStep){if("run;"===r||e.match(/run\s;/))return t.inDataStep=!1,"builtin";if(r&&"."===e.next())return/\w/.test(e.peek())?"variable-2":"variable";if(r&&a.hasOwnProperty(r)&&(-1!==a[r].state.indexOf("inDataStep")||-1!==a[r].state.indexOf("ALL"))){e.start<e.pos&&e.backUp(e.pos-e.start);for(var o=0;o<r.length;++o)e.next();return a[r].style}}if(t.inProc){if("run;"===r||"quit;"===r)return t.inProc=!1,"builtin";if(r&&a.hasOwnProperty(r)&&(-1!==a[r].state.indexOf("inProc")||-1!==a[r].state.indexOf("ALL")))return e.match(/[\w]+/),a[r].style}return t.inMacro?"%mend"===r?(";"===e.peek()&&e.next(),t.inMacro=!1,"builtin"):r&&a.hasOwnProperty(r)&&(-1!==a[r].state.indexOf("inMacro")||-1!==a[r].state.indexOf("ALL"))?(e.match(/[\w]+/),a[r].style):"atom":r&&a.hasOwnProperty(r)?(e.backUp(1),e.match(/[\w]+/),"data"===r&&!1===/=/.test(e.peek())?(t.inDataStep=!0,t.nextword=!0,"builtin"):"proc"===r?(t.inProc=!0,t.nextword=!0,"builtin"):"%macro"===r?(t.inMacro=!0,t.nextword=!0,"builtin"):/title[1-9]/.test(r)?"def":"footnote"===r?(e.eat(/[1-9]/),"def"):!0===t.inDataStep&&-1!==a[r].state.indexOf("inDataStep")?a[r].style:!0===t.inProc&&-1!==a[r].state.indexOf("inProc")?a[r].style:!0===t.inMacro&&-1!==a[r].state.indexOf("inMacro")?a[r].style:-1!==a[r].state.indexOf("ALL")?a[r].style:null):null}(e,t)},blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-sas","sas")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../css/css"],e):e(CodeMirror)}(function(r){"use strict";r.defineMode("sass",function(s){var e=r.mimeModes["text/css"],o=e.propertyKeywords||{},i=e.colorKeywords||{},a=e.valueKeywords||{},u=e.fontProperties||{};var f,c=new RegExp("^"+["true","false","null","auto"].join("|")),p=new RegExp("^"+["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"].join("|")),l=/^::?[a-zA-Z_][\w\-]*/;function h(e){return!e.peek()||e.match(/\s+$/,!1)}function m(e,r){var t=e.peek();return")"===t?(e.next(),r.tokenizer=v,"operator"):"("===t?(e.next(),e.eatSpace(),"operator"):(r.tokenizer="'"===t||'"'===t?k(e.next()):k(")",!1),"string")}function d(t,n){return function(e,r){return e.sol()&&e.indentation()<=t?(r.tokenizer=v)(e,r):(n&&e.skipTo("*/")?(e.next(),e.next(),r.tokenizer=v):e.skipToEnd(),"comment")}}function k(a,u){return null==u&&(u=!0),function e(r,t){var n=r.next(),o=r.peek(),i=r.string.charAt(r.pos-2);return"\\"!==n&&o===a||n===a&&"\\"!==i?(n!==a&&u&&r.next(),h(r)&&(t.cursorHalf=0),t.tokenizer=v,"string"):"#"===n&&"{"===o?(t.tokenizer=w(e),r.next(),"operator"):"string"}}function w(t){return function(e,r){return"}"===e.peek()?(e.next(),r.tokenizer=t,"operator"):v(e,r)}}function x(e){if(0==e.indentCount){e.indentCount++;var r=e.scopes[0].offset+s.indentUnit;e.scopes.unshift({offset:r})}}function y(e){1!=e.scopes.length&&e.scopes.shift()}function v(e,r){var t=e.peek();if(e.match("/*"))return r.tokenizer=d(e.indentation(),!0),r.tokenizer(e,r);if(e.match("//"))return r.tokenizer=d(e.indentation(),!1),r.tokenizer(e,r);if(e.match("#{"))return r.tokenizer=w(v),"operator";if('"'===t||"'"===t)return e.next(),r.tokenizer=k(t),"string";if(r.cursorHalf){if("#"===t&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return h(e)&&(r.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return h(e)&&(r.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return h(e)&&(r.cursorHalf=0),"unit";if(e.match(c))return h(e)&&(r.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=m,h(e)&&(r.cursorHalf=0),"atom";if("$"===t)return e.next(),e.eatWhile(/[\w-]/),h(e)&&(r.cursorHalf=0),"variable-2";if("!"===t)return e.next(),r.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(p))return h(e)&&(r.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return h(e)&&(r.cursorHalf=0),f=e.current().toLowerCase(),a.hasOwnProperty(f)?"atom":i.hasOwnProperty(f)?"keyword":o.hasOwnProperty(f)?(r.prevProp=e.current().toLowerCase(),"property"):"tag";if(h(e))return r.cursorHalf=0,null}else{if("-"===t&&e.match(/^-\w+-/))return"meta";if("."===t){if(e.next(),e.match(/^[\w-]+/))return x(r),"qualifier";if("#"===e.peek())return x(r),"tag"}if("#"===t){if(e.next(),e.match(/^[\w-]+/))return x(r),"builtin";if("#"===e.peek())return x(r),"tag"}if("$"===t)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(c))return"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=m,"atom";if("="===t&&e.match(/^=[\w-]+/))return x(r),"meta";if("+"===t&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===t&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||y(r)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return x(r),"def";if("@"===t)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){f=e.current().toLowerCase();var n=r.prevProp+"-"+f;return o.hasOwnProperty(n)?"property":o.hasOwnProperty(f)?(r.prevProp=f,"property"):u.hasOwnProperty(f)?"property":"tag"}return e.match(/ *:/,!1)?(x(r),r.cursorHalf=1,r.prevProp=e.current().toLowerCase(),"property"):(e.match(/ *,/,!1)||x(r),"tag")}if(":"===t)return e.match(l)?"variable-3":(e.next(),r.cursorHalf=1,"operator")}return e.match(p)?"operator":(e.next(),null)}return{startState:function(){return{tokenizer:v,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,r){var t=function(e,r){e.sol()&&(r.indentCount=0);var t=r.tokenizer(e,r),n=e.current();if("@return"!==n&&"}"!==n||y(r),null!==t){for(var o=e.pos-n.length+s.indentUnit*r.indentCount,i=[],a=0;a<r.scopes.length;a++){var u=r.scopes[a];u.offset<=o&&i.push(u)}r.scopes=i}return t}(e,r);return r.lastToken={style:t,content:e.current()},t},indent:function(e){return e.scopes[0].offset}}},"css"),r.defineMIME("text/x-sass","sass")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";i.defineMode("shell",function(){var o={};function e(e,t){for(var n=0;n<t.length;n++)o[t[n]]=e}var t=["true","false"],n=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],r=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function u(i,o){var s="("==i?")":"{"==i?"}":i;return function(e,t){for(var n,r=!1;null!=(n=e.next());){if(n===s&&!r){t.tokens.shift();break}if("$"===n&&!r&&"'"!==i&&e.peek()!=s){r=!0,e.backUp(1),t.tokens.unshift(l);break}if(!r&&i!==s&&n===i)return t.tokens.unshift(u(i,o)),c(e,t);if(!r&&/['"]/.test(n)&&!/['"]/.test(i)){t.tokens.unshift(f(n,"string")),e.backUp(1);break}r=!r&&"\\"===n}return o}}function f(n,r){return function(e,t){return t.tokens[0]=u(n,r),e.next(),c(e,t)}}i.registerHelper("hintWords","shell",t.concat(n,r)),e("atom",t),e("keyword",n),e("builtin",r);var l=function(e,t){1<t.tokens.length&&e.eat("$");var n=e.next();return/['"({]/.test(n)?(t.tokens[0]=u(n,"("==n?"quote":"{"==n?"def":"string"),c(e,t)):(/\d/.test(n)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function c(e,t){return(t.tokens[0]||function(e,t){if(e.eatSpace())return null;var n=e.sol(),r=e.next();if("\\"===r)return e.next(),null;if("'"===r||'"'===r||"`"===r)return t.tokens.unshift(u(r,"`"===r?"quote":"string")),c(e,t);if("#"===r)return n&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===r)return t.tokens.unshift(l),c(e,t);if("+"===r||"="===r)return"operator";if("-"===r)return e.eat("-"),e.eatWhile(/\w/),"attribute";if(/\d/.test(r)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var i=e.current();return"="===e.peek()&&/\w+/.test(i)?"def":o.hasOwnProperty(i)?o[i]:null})(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return c(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),i.defineMIME("text/x-sh","shell"),i.defineMIME("application/x-sh","shell")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sieve",function(e){function n(e){for(var n={},t=e.split(" "),r=0;r<t.length;++r)n[t[r]]=!0;return n}var o=n("if elsif else stop require"),u=n("true false not"),r=e.indentUnit;function l(e,n){var i,t=e.next();if("/"==t&&e.eat("*"))return(n.tokenize=a)(e,n);if("#"===t)return e.skipToEnd(),"comment";if('"'==t)return n.tokenize=(i=t,function(e,n){for(var t,r=!1;null!=(t=e.next())&&(t!=i||r);)r=!r&&"\\"==t;return r||(n.tokenize=l),"string"}),n.tokenize(e,n);if("("==t)return n._indent.push("("),n._indent.push("{"),null;if("{"===t)return n._indent.push("{"),null;if(")"==t&&(n._indent.pop(),n._indent.pop()),"}"===t)return n._indent.pop(),null;if(","==t)return null;if(";"==t)return null;if(/[{}\(\),;]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\d]/),e.eat(/[KkMmGg]/),"number";if(":"==t)return e.eatWhile(/[a-zA-Z_]/),e.eatWhile(/[a-zA-Z0-9_]/),"operator";e.eatWhile(/\w/);var r=e.current();return"text"==r&&e.eat(":")?(n.tokenize=f,"string"):o.propertyIsEnumerable(r)?"keyword":u.propertyIsEnumerable(r)?"atom":null}function f(e,n){return n._multiLineString=!0,e.sol()?("."==e.next()&&e.eol()&&(n._multiLineString=!1,n.tokenize=l),"string"):(e.eatSpace(),"#"==e.peek()?(e.skipToEnd(),"comment"):(e.skipToEnd(),"string"))}function a(e,n){for(var t,r=!1;null!=(t=e.next());){if(r&&"/"==t){n.tokenize=l;break}r="*"==t}return"comment"}return{startState:function(e){return{tokenize:l,baseIndent:e||0,_indent:[]}},token:function(e,n){return e.eatSpace()?null:(n.tokenize||l)(e,n)},indent:function(e,n){var t=e._indent.length;return n&&"}"==n[0]&&t--,t<0&&(t=0),t*r},electricChars:"}"}}),e.defineMIME("application/sieve","sieve")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],t):t(CodeMirror)}(function(V){"use strict";V.defineMode("slim",function(r){var m=V.getMode(r,{name:"htmlmixed"}),o=V.getMode(r,"ruby"),e={html:m,ruby:o},a={ruby:"ruby",javascript:"javascript",css:"text/css",sass:"text/x-sass",scss:"text/x-scss",less:"text/x-less",styl:"text/x-styl",coffee:"coffeescript",asciidoc:"text/x-asciidoc",markdown:"text/x-markdown",textile:"text/x-textile",creole:"text/x-creole",wiki:"text/x-wiki",mediawiki:"text/x-mediawiki",rdoc:"text/x-rdoc",builder:"text/x-builder",nokogiri:"text/x-nokogiri",erb:"application/x-erb"},f=function(t){var e=[];for(var n in t)e.push(n);return new RegExp("^("+e.join("|")+"):")}(a),i={commentLine:"comment",slimSwitch:"operator special",slimTag:"tag",slimId:"attribute def",slimClass:"attribute qualifier",slimAttribute:"attribute",slimSubmode:"keyword special",closeAttributeTag:null,slimDoctype:null,lineContinuation:null},u={"{":"}","[":"]","(":")"},t="_a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",n=t+"\\-0-9·̀-ͯ‿-⁀",l=new RegExp("^[:"+t+"](?::["+n+"]|["+n+"]*)"),c=new RegExp("^[:"+t+"][:\\."+n+"]*(?=\\s*=)"),s=new RegExp("^[:"+t+"][:\\."+n+"]*"),k=/^\.-?[_a-zA-Z]+[\w\-]*/,d=/^#[_a-zA-Z]+[\w\-]*/;function b(t,e){t.stack={parent:t.stack,style:"continuation",indented:e,tokenize:t.line},t.line=t.tokenize}function z(t){t.line==t.tokenize&&(t.line=t.stack.tokenize,t.stack=t.stack.parent)}function p(n,i){return function(t,e){return t.peek()==n&&1==e.rubyState.tokenize.length?(t.next(),e.tokenize=i,"closeAttributeTag"):h(t,e)}}function x(n){var i,r=function(t,e){if(1==e.rubyState.tokenize.length&&!e.rubyState.context.prev){if(t.backUp(1),t.eatSpace())return e.rubyState=i,(e.tokenize=n)(t,e);t.next()}return h(t,e)};return function(t,e){return i=e.rubyState,e.rubyState=V.startState(o),e.tokenize=r,h(t,e)}}function h(t,e){return o.token(t,e.rubyState)}function y(t,e){return t.match(/^#\{/)?(e.tokenize=p("}",e.tokenize),null):(n=t,i=e,r=/[^\\]#\{/,o=1,a=m.token(t,e.htmlState),k=n.current(),-1<(d=k.search(r))&&(i.tokenize=(u=n.pos,l=i.tokenize,c=a,s=function(t,e){return e.tokenize=l,t.pos<u?(t.pos=u,c):e.tokenize(t,e)},function(t,e){return e.tokenize=s,l(t,e)}),n.backUp(k.length-d-o)),a);var n,i,r,o,a,u,l,c,s,k,d}function S(o){return function(t,e){var n,i,r=(i=e,(n=t).match(/^\\$/)?"lineContinuation":y(n,i));return t.eol()&&(e.tokenize=o),r}}function w(t,e,n){return e.stack={parent:e.stack,style:"html",indented:t.column()+n,tokenize:e.line},e.line=e.tokenize=y,null}function g(t,e){return t.skipToEnd(),e.stack.style}function v(t,e){return t.eat(e.stack.endQuote)?(e.line=e.stack.line,e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,null):t.match(s)?(e.tokenize=M,"slimAttribute"):(t.next(),null)}function M(t,e){return t.match(/^==?/)?(e.tokenize=C,null):v(t,e)}function C(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=_(n,"string",!0,!1,v),t.next(),e.tokenize(t,e)):"["==n?x(v)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=v,"keyword"):x(v)(t,e)}function E(t,e){if(t.match(/^#\{/))return e.tokenize=p("}",e.tokenize),null;var n=new V.StringStream(t.string.slice(e.stack.indented),t.tabSize);n.pos=t.pos-e.stack.indented,n.start=t.start-e.stack.indented,n.lastColumnPos=t.lastColumnPos-e.stack.indented,n.lastColumnValue=t.lastColumnValue-e.stack.indented;var i=e.subMode.token(n,e.subState);return t.pos=n.pos+e.stack.indented,i}function A(t,e){return e.stack.indented=t.column(),e.line=e.tokenize=E,e.tokenize(t,e)}function L(t){return e.hasOwnProperty(t)?e[t]:e[t]=function(t){var e=a[t],n=V.mimeModes[e];if(n)return V.getMode(r,n);var i=V.modes[e];return i?i(r,{name:e}):V.getMode(r,"null")}(t)}function $(t,e){return t.skipToEnd(),"slimDoctype"}function T(t,e){var n,i,r,o,a,u;if("<"==t.peek())return(e.tokenize=S(e.tokenize))(t,e);if(t.match(/^[|']/))return w(t,e,1);if(t.match(/^\/(!|\[\w+])?/))return n=t,(i=e).stack={parent:i.stack,style:"comment",indented:i.indented+1,tokenize:i.line},(i.line=g)(n,i);if(t.match(/^(-|==?[<>]?)/))return e.tokenize=(r=t.column(),a=t.column(),u=h,o=function(t,e){z(e);var n=u(t,e);return t.eol()&&t.current().match(/,$/)&&b(e,a),n},function(t,e){if(z(e),t.match(/^\\$/))return b(e,r),"lineContinuation";var n=o(t,e);return t.eol()&&t.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&t.backUp(1),n}),"slimSwitch";if(t.match(/^doctype\b/))return e.tokenize=$,"keyword";var l,c,s,k,d=t.match(f);return d?(l=d[1],c=e,s=L(l),k=V.startState(s),c.subMode=s,c.subState=k,c.stack={parent:c.stack,style:"sub",indented:c.indented+1,tokenize:c.line},c.line=c.tokenize=A,"slimSubmode"):j(t,e)}function U(t,e){return e.startOfLine?T(t,e):j(t,e)}function j(t,e){return t.eat("*")?(e.tokenize=x(O),null):t.match(l)?(e.tokenize=O,"slimTag"):R(t,e)}function O(t,e){return t.match(/^(<>?|><?)/)?(e.tokenize=R,null):R(t,e)}function R(t,e){return t.match(d)?(e.tokenize=R,"slimId"):t.match(k)?(e.tokenize=R,"slimClass"):q(t,e)}function q(t,e){return t.match(/^([\[\{\(])/)?(n=e,i=u[RegExp.$1],r=q,n.stack={parent:n.stack,style:"wrapper",indented:n.indented+1,tokenize:r,line:n.line,endQuote:i},n.line=n.tokenize=v,null):t.match(c)?(e.tokenize=I,"slimAttribute"):"*"==t.peek()?(t.next(),e.tokenize=x(D),null):D(t,e);var n,i,r}function I(t,e){return t.match(/^==?/)?(e.tokenize=P,null):q(t,e)}function P(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=_(n,"string",!0,!1,q),t.next(),e.tokenize(t,e)):"["==n?x(q)(t,e):":"==n?x(Z)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=q,"keyword"):x(q)(t,e)}function Z(t,e){return t.backUp(1),t.match(/^[^\s],(?=:)/)?(e.tokenize=x(Z),null):(t.next(),q(t,e))}function _(o,a,u,l,c){return function(t,e){z(e);var n=0==t.current().length;if(t.match(/^\\$/,n))return n?(b(e,e.indented),"lineContinuation"):a;if(t.match(/^#\{/,n))return n?(e.tokenize=p("}",e.tokenize),null):a;for(var i,r=!1;null!=(i=t.next());){if(i==o&&(l||!r)){e.tokenize=c;break}if(u&&"#"==i&&!r&&t.eat("{")){t.backUp(2);break}r=!r&&"\\"==i}return t.eol()&&r&&t.backUp(1),a}}function D(t,e){return t.match(/^==?/)?(e.tokenize=h,"slimSwitch"):t.match(/^\/$/)?(e.tokenize=U,null):t.match(/^:/)?(e.tokenize=j,"slimSwitch"):(w(t,e,0),e.tokenize(t,e))}var Q={startState:function(){return{htmlState:V.startState(m),rubyState:V.startState(o),stack:null,last:null,tokenize:U,line:U,indented:0}},copyState:function(t){return{htmlState:V.copyState(m,t.htmlState),rubyState:V.copyState(o,t.rubyState),subMode:t.subMode,subState:t.subMode&&V.copyState(t.subMode,t.subState),stack:t.stack,last:t.last,tokenize:t.tokenize,line:t.line}},token:function(t,e){if(t.sol())for(e.indented=t.indentation(),e.startOfLine=!0,e.tokenize=e.line;e.stack&&e.stack.indented>e.indented&&"slimSubmode"!=e.last;)e.line=e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,e.subMode=null,e.subState=null;if(t.eatSpace())return null;var n=e.tokenize(t,e);return e.startOfLine=!1,n&&(e.last=n),i.hasOwnProperty(n)?i[n]:n},blankLine:function(t){if(t.subMode&&t.subMode.blankLine)return t.subMode.blankLine(t.subState)},innerMode:function(t){return t.subMode?{state:t.subState,mode:t.subMode}:{state:t,mode:Q}}};return Q},"htmlmixed","ruby"),V.defineMIME("text/x-slim","slim"),V.defineMIME("application/x-slim","slim")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("smalltalk",function(i){var r=/[+\-\/\\*~<>=@%|&?!.,:;^]/,o=/true|false|nil|self|super|thisContext/,s=function(e,t){this.next=e,this.parent=t},u=function(e,t,n){this.name=e,this.context=t,this.eos=n},e=function(){this.context=new s(a,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};e.prototype.userIndent=function(e){this.userIndentationDelta=0<e?e/i.indentUnit-this.indentation:0};var a=function(e,t,n){var i=new u(null,t,!1),a=e.next();return'"'===a?i=c(e,new s(c,t)):"'"===a?i=l(e,new s(l,t)):"#"===a?"'"===e.peek()?(e.next(),i=d(e,new s(d,t))):e.eatWhile(/[^\s.{}\[\]()]/)?i.name="string-2":i.name="meta":"$"===a?("<"===e.next()&&(e.eatWhile(/[^\s>]/),e.next()),i.name="string-2"):"|"===a&&n.expectVariable?i.context=new s(f,t):/[\[\]{}()]/.test(a)?(i.name="bracket",i.eos=/[\[{(]/.test(a),"["===a?n.indentation++:"]"===a&&(n.indentation=Math.max(0,n.indentation-1))):r.test(a)?(e.eatWhile(r),i.name="operator",i.eos=";"!==a):/\d/.test(a)?(e.eatWhile(/[\w\d]/),i.name="number"):/[\w_]/.test(a)?(e.eatWhile(/[\w\d_]/),i.name=n.expectVariable?o.test(e.current())?"keyword":"variable":null):i.eos=n.expectVariable,i},c=function(e,t){return e.eatWhile(/[^"]/),new u("comment",e.eat('"')?t.parent:t,!0)},l=function(e,t){return e.eatWhile(/[^']/),new u("string",e.eat("'")?t.parent:t,!1)},d=function(e,t){return e.eatWhile(/[^']/),new u("string-2",e.eat("'")?t.parent:t,!1)},f=function(e,t){var n=new u(null,t,!1);return"|"===e.next()?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name="variable"),n};return{startState:function(){return new e},token:function(e,t){if(t.userIndent(e.indentation()),e.eatSpace())return null;var n=t.context.next(e,t.context,t);return t.context=n.context,t.expectVariable=n.eos,n.name},blankLine:function(e){e.userIndent(0)},indent:function(e,t){var n=e.context.next===a&&t&&"]"===t.charAt(0)?-1:e.userIndentationDelta;return(e.indentation+n)*i.indentUnit},electricChars:"]"}}),e.defineMIME("text/x-stsrc",{name:"smalltalk"})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";i.defineMode("smarty",function(e,t){var c,h=t.rightDelimiter||"}",b=t.leftDelimiter||"{",k=t.version||2,m=i.getMode(e,t.baseMode||"null"),f=["debug","extends","function","include","literal"],u={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};function s(e,t){return c=t,e}function g(e,t){for(var r,i,n,a,o,l,f,u=e.string,s=e.pos;;){var d=u.indexOf(b,s);if(s=d+b.length,-1==d||(r=e,null==(i=d+b.length)&&(i=r.pos),3!==k||"{"!=b||i!=r.string.length&&!/\s/.test(r.string.charAt(i))))break}if(d==e.pos)return e.match(b),e.eat("*")?(n=e,l="comment",f="*"+h,o=function(e,t){for(;!e.eol();){if(e.match(f)){t.tokenize=g;break}e.next()}return l},((a=t).tokenize=o)(n,a)):(t.depth++,t.tokenize=v,c="startTag","tag");-1<d&&(e.string=u.slice(0,d));var p=m.token(e,t.base);return-1<d&&(e.string=u),p}function v(e,t){if(e.match(h,!0))return 3===k?(t.depth--,t.depth<=0&&(t.tokenize=g)):t.tokenize=g,s("tag",null);if(e.match(b,!0))return t.depth++,s("tag","startTag");var r=e.next();if("$"==r)return e.eatWhile(u.validIdentifier),s("variable-2","variable");if("|"==r)return s("operator","pipe");if("."==r)return s("operator","property");if(u.stringChar.test(r))return t.tokenize=(n=r,function(e,t){for(var r=null,i=null;!e.eol();){if(i=e.peek(),e.next()==n&&"\\"!==r){t.tokenize=v;break}r=i}return"string"}),s("string","string");if(u.operatorChars.test(r))return e.eatWhile(u.operatorChars),s("operator","operator");if("["==r||"]"==r)return s("bracket","bracket");if("("==r||")"==r)return s("bracket","operator");if(/\d/.test(r))return e.eatWhile(/\d/),s("number","number");if("variable"==t.last){if("@"==r)return e.eatWhile(u.validIdentifier),s("property","property");if("|"==r)return e.eatWhile(u.validIdentifier),s("qualifier","modifier")}else{if("pipe"==t.last)return e.eatWhile(u.validIdentifier),s("qualifier","modifier");if("whitespace"==t.last)return e.eatWhile(u.validIdentifier),s("attribute","modifier")}if("property"==t.last)return e.eatWhile(u.validIdentifier),s("property",null);if(/\s/.test(r))return c="whitespace",null;var n,i="";"/"!=r&&(i+=r);for(var a=null;a=e.eat(u.validIdentifier);)i+=a;for(var o=0,l=f.length;o<l;o++)if(f[o]==i)return s("keyword","keyword");return/\s/.test(r)?null:s("tag","tag")}return{startState:function(){return{base:i.startState(m),tokenize:g,last:null,depth:0}},copyState:function(e){return{base:i.copyState(m,e.base),tokenize:e.tokenize,last:e.last,depth:e.depth}},innerMode:function(e){if(e.tokenize==g)return{mode:m,state:e.base}},token:function(e,t){var r=t.tokenize(e,t);return t.last=c,r},indent:function(e,t,r){return e.tokenize==g&&m.indent?m.indent(e.base,t,r):i.Pass},blockCommentStart:b+"*",blockCommentEnd:"*"+h}}),i.defineMIME("text/x-smarty","smarty")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("solr",function(){var i=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/,u=/[\|\!\+\-\*\?\~\^\&]/,f=/^(OR|AND|NOT|TO)$/i;function a(r){return function(e,t){for(var n,o=r;(r=e.peek())&&null!=r.match(i);)o+=e.next();return t.tokenize=c,f.test(o)?"operator":(n=o,parseFloat(n).toString()===n?"number":":"==e.peek()?"field":"string")}}function c(e,t){var o,r,n=e.next();return'"'==n?t.tokenize=(r=n,function(e,t){for(var n,o=!1;null!=(n=e.next())&&(n!=r||o);)o=!o&&"\\"==n;return o||(t.tokenize=c),"string"}):u.test(n)?t.tokenize=(o=n,function(e,t){var n="operator";return"+"==o?n+=" positive":"-"==o?n+=" negative":"|"==o?e.eat(/\|/):"&"==o?e.eat(/\&/):"^"==o&&(n+=" boost"),t.tokenize=c,n}):i.test(n)&&(t.tokenize=a(n)),t.tokenize!=c?t.tokenize(e,t):null}return{startState:function(){return{tokenize:c}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-solr","solr")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed"],t):t(CodeMirror)}(function(y){"use strict";var S=["template","literal","msg","fallbackmsg","let","if","elseif","else","switch","case","default","foreach","ifempty","for","call","param","deltemplate","delcall","log","element"];y.defineMode("soy",function(d){var t=y.getMode(d,"text/plain"),p={html:y.getMode(d,{name:"text/html",multilineTagIndentFactor:2,multilineTagIndentPastTag:!1}),attributes:t,text:t,uri:t,trusted_resource_uri:t,css:y.getMode(d,"text/css"),js:y.getMode(d,{name:"text/javascript",statementIndent:2*d.indentUnit})};function u(t){return t[t.length-1]}function f(e,a,t){if(e.sol()){for(var n=0;n<a.indent&&e.eat(/\s/);n++);if(n)return null}var s=e.string,r=t.exec(s.substr(e.pos));r&&(e.string=s.substr(0,e.pos+r.index));var l=e.hideFirstChars(a.indent,function(){var t=u(a.localStates);return t.mode.token(e,t.state)});return e.string=s,l}function h(t,e){return{element:e,next:t}}function g(t){t.scopes&&(t.variables=t.scopes.element,t.scopes=t.scopes.next)}return{startState:function(){return{kind:[],kindTag:[],soyState:[],templates:null,variables:h(null,"ij"),scopes:null,indent:0,quoteKind:null,localStates:[{mode:p.html,state:y.startState(p.html)}]}},copyState:function(t){return{tag:t.tag,kind:t.kind.concat([]),kindTag:t.kindTag.concat([]),soyState:t.soyState.concat([]),templates:t.templates,variables:t.variables,scopes:t.scopes,indent:t.indent,quoteKind:t.quoteKind,localStates:t.localStates.map(function(t){return{mode:t.mode,state:y.copyState(t.mode,t.state)}})}},token:function(t,e){var a,n,s;switch(u(e.soyState)){case"comment":if(t.match(/^.*?\*\//)?e.soyState.pop():t.skipToEnd(),!e.scopes)for(var r=/@param\??\s+(\S+)/g,l=t.current();i=r.exec(l);)e.variables=h(e.variables,i[1]);return"comment";case"string":var i;return(i=t.match(/^.*?(["']|\\[\s\S])/))?i[1]==e.quoteKind&&(e.quoteKind=null,e.soyState.pop()):t.skipToEnd(),"string"}if(!e.soyState.length||"literal"!=u(e.soyState)){if(t.match(/^\/\*/))return e.soyState.push("comment"),"comment";if(t.match(t.sol()?/^\s*\/\/.*/:/^\s+\/\/.*/))return"comment"}switch(u(e.soyState)){case"templ-def":return(i=t.match(/^\.?([\w]+(?!\.[\w]+)*)/))?(e.templates=h(e.templates,i[1]),e.scopes=h(e.scopes,e.variables),e.soyState.pop(),"def"):(t.next(),null);case"templ-ref":return(i=t.match(/(\.?[a-zA-Z_][a-zA-Z_0-9]+)+/))?(e.soyState.pop(),"."==i[0][0]?"variable-2":"variable"):(t.next(),null);case"namespace-def":return(i=t.match(/^\.?([\w\.]+)/))?(e.soyState.pop(),"variable"):(t.next(),null);case"param-def":return(i=t.match(/^\w+/))?(e.variables=h(e.variables,i[0]),e.soyState.pop(),e.soyState.push("param-type"),"def"):(t.next(),null);case"param-ref":return(i=t.match(/^\w+/))?(e.soyState.pop(),"property"):(t.next(),null);case"param-type":return"}"==t.peek()?(e.soyState.pop(),null):t.eatWhile(/^([\w]+|[?])/)?"type":(t.next(),null);case"var-def":return(i=t.match(/^\$([\w]+)/))?(e.variables=h(e.variables,i[1]),e.soyState.pop(),"def"):(t.next(),null);case"tag":if(t.match(/^\/?}/))return"/template"==e.tag||"/deltemplate"==e.tag?(g(e),e.variables=h(null,"ij"),e.indent=0):("/for"!=e.tag&&"/foreach"!=e.tag||g(e),e.indent-=d.indentUnit*("/}"==t.current()||-1==S.indexOf(e.tag)?2:1)),e.soyState.pop(),"keyword";if(t.match(/^([\w?]+)(?==)/)){if("kind"==t.current()&&(i=t.match(/^="([^"]+)/,!1))){var o=i[1];e.kind.push(o),e.kindTag.push(e.tag);var c=p[o]||p.html;(m=u(e.localStates)).mode.indent&&(e.indent+=m.mode.indent(m.state,"","")),e.localStates.push({mode:c,state:y.startState(c)})}return"attribute"}return(i=t.match(/([\w]+)(?=\()/))?"variable callee":(i=t.match(/^["']/))?(e.soyState.push("string"),e.quoteKind=i,"string"):t.match(/(null|true|false)(?!\w)/)||t.match(/0x([0-9a-fA-F]{2,})/)||t.match(/-?([0-9]*[.])?[0-9]+(e[0-9]*)?/)?"atom":t.match(/(\||[+\-*\/%]|[=!]=|\?:|[<>]=?)/)?"operator":(i=t.match(/^\$([\w]+)/))?(a=e.variables,n=i[1],function(t,e){for(;t;){if(t.element===e)return!0;t=t.next}return!1}(a,n)?"variable-2":s?"variable":"variable-2 error"):(i=t.match(/^\w+/))?/^(?:as|and|or|not|in)$/.test(i[0])?"keyword":null:(t.next(),null);case"literal":return t.match(/^(?=\{\/literal})/)?(e.indent-=d.indentUnit,e.soyState.pop(),this.token(t,e)):f(t,e,/\{\/literal}/)}if(t.match(/^\{literal}/))return e.indent+=d.indentUnit,e.soyState.push("literal"),"keyword";if(i=t.match(/^\{([/@\\]?\w+\??)(?=$|[\s}]|\/[/*])/)){var m;if("/switch"!=i[1]&&(e.indent+=(/^(\/|(else|elseif|ifempty|case|fallbackmsg|default)$)/.test(i[1])&&"switch"!=e.tag?1:2)*d.indentUnit),e.tag=i[1],e.tag=="/"+u(e.kindTag))e.kind.pop(),e.kindTag.pop(),e.localStates.pop(),(m=u(e.localStates)).mode.indent&&(e.indent-=m.mode.indent(m.state,"",""));return e.soyState.push("tag"),"template"==e.tag||"deltemplate"==e.tag?e.soyState.push("templ-def"):"call"==e.tag||"delcall"==e.tag?e.soyState.push("templ-ref"):"let"==e.tag?e.soyState.push("var-def"):"for"==e.tag||"foreach"==e.tag?(e.scopes=h(e.scopes,e.variables),e.soyState.push("var-def")):"namespace"==e.tag?(e.soyState.push("namespace-def"),e.scopes||(e.variables=h(null,"ij"))):e.tag.match(/^@(?:param\??|inject|state)/)?e.soyState.push("param-def"):e.tag.match(/^(?:param)/)&&e.soyState.push("param-ref"),"keyword"}return t.eat("{")?(e.tag="print",e.indent+=2*d.indentUnit,e.soyState.push("tag"),"keyword"):f(t,e,/\{|\s+\/\/|\/\*/)},indent:function(t,e,a){var n=t.indent,s=u(t.soyState);if("comment"==s)return y.Pass;if("literal"==s)/^\{\/literal}/.test(e)&&(n-=d.indentUnit);else{if(/^\s*\{\/(template|deltemplate)\b/.test(e))return 0;/^\{(\/|(fallbackmsg|elseif|else|ifempty)\b)/.test(e)&&(n-=d.indentUnit),"switch"!=t.tag&&/^\{(case|default)\b/.test(e)&&(n-=d.indentUnit),/^\{\/switch\b/.test(e)&&(n-=d.indentUnit)}var r=u(t.localStates);return n&&r.mode.indent&&(n+=r.mode.indent(r.state,e,a)),n},innerMode:function(t){return t.soyState.length&&"literal"!=u(t.soyState)?null:u(t.localStates)},electricInput:/^\s*\{(\/|\/template|\/deltemplate|\/switch|fallbackmsg|elseif|else|case|default|ifempty|\/literal\})$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",useInnerComments:!1,fold:"indent"}},"htmlmixed"),y.registerHelper("wordChars","soy",/[\w$]/),y.registerHelper("hintWords","soy",S.concat(["delpackage","namespace","alias","print","css","debugger"])),y.defineMIME("text/x-soy","soy")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("sparql",function(t){var o,a=t.indentUnit;function e(t){return new RegExp("^(?:"+t.join("|")+")$","i")}var c=e(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","iri","uri","bnode","count","sum","min","max","avg","sample","group_concat","rand","abs","ceil","floor","round","concat","substr","strlen","replace","ucase","lcase","encode_for_uri","contains","strstarts","strends","strbefore","strafter","year","month","day","hours","minutes","seconds","timezone","tz","now","uuid","struuid","md5","sha1","sha256","sha384","sha512","coalesce","if","strlang","strdt","isnumeric","regex","exists","isblank","isliteral","a","bind"]),s=e(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc","as","having","undef","values","group","minus","in","not","service","silent","using","insert","delete","union","true","false","with","data","copy","to","move","add","create","drop","clear","load"]),l=/[*+\-<>=&|\^\/!\?]/;function u(t,e){var i,n=t.next();if(o=null,"$"==n||"?"==n)return"?"==n&&t.match(/\s/,!1)?"operator":(t.match(/^[\w\d]*/),"variable-2");if("<"!=n||t.match(/^[\s\u00a0=]/,!1)){if('"'==n||"'"==n)return e.tokenize=(i=n,function(t,e){for(var n,r=!1;null!=(n=t.next());){if(n==i&&!r){e.tokenize=u;break}r=!r&&"\\"==n}return"string"}),e.tokenize(t,e);if(/[{}\(\),\.;\[\]]/.test(n))return o=n,"bracket";if("#"==n)return t.skipToEnd(),"comment";if(l.test(n))return t.eatWhile(l),"operator";if(":"==n)return t.eatWhile(/[\w\d\._\-]/),"atom";if("@"==n)return t.eatWhile(/[a-z\d\-]/i),"meta";if(t.eatWhile(/[_\w\d]/),t.eat(":"))return t.eatWhile(/[\w\d_\-]/),"atom";var r=t.current();return c.test(r)?"builtin":s.test(r)?"keyword":"variable"}return t.match(/^[^\s\u00a0>]*>?/),"atom"}function r(t,e,n){t.context={prev:t.context,indent:t.indent,col:n,type:e}}function i(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:u,context:null,indent:0,col:0}},token:function(t,e){if(t.sol()&&(e.context&&null==e.context.align&&(e.context.align=!1),e.indent=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);if("comment"!=n&&e.context&&null==e.context.align&&"pattern"!=e.context.type&&(e.context.align=!0),"("==o)r(e,")",t.column());else if("["==o)r(e,"]",t.column());else if("{"==o)r(e,"}",t.column());else if(/[\]\}\)]/.test(o)){for(;e.context&&"pattern"==e.context.type;)i(e);e.context&&o==e.context.type&&(i(e),"}"==o&&e.context&&"pattern"==e.context.type&&i(e))}else"."==o&&e.context&&"pattern"==e.context.type?i(e):/atom|string|variable/.test(n)&&e.context&&(/[\}\]]/.test(e.context.type)?r(e,"pattern",t.column()):"pattern"!=e.context.type||e.context.align||(e.context.align=!0,e.context.col=t.column()));return n},indent:function(t,e){var n=e&&e.charAt(0),r=t.context;if(/[\]\}]/.test(n))for(;r&&"pattern"==r.type;)r=r.prev;var i=r&&n==r.type;return r?"pattern"==r.type?r.col:r.align?r.col+(i?0:1):r.indent+(i?0:a):0},lineComment:"#"}}),t.defineMIME("application/sparql-query","sparql")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("spreadsheet",function(){return{startState:function(){return{stringType:null,stack:[]}},token:function(e,t){if(e){switch(0===t.stack.length&&('"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.stack.unshift("string"))),t.stack[0]){case"string":for(;"string"===t.stack[0]&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;"characterClass"===t.stack[0]&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||t.stack.shift();return"operator"}var r=e.peek();switch(r){case"[":return e.next(),t.stack.unshift("characterClass"),"bracket";case":":return e.next(),"operator";case"\\":return e.match(/\\[a-z]+/)?"string-2":(e.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return e.next(),"atom";case"$":return e.next(),"builtin"}return e.match(/\d+/)?e.match(/^\w+/)?"error":"number":e.match(/^[a-zA-Z_]\w*/)?e.match(/(?=[\(.])/,!1)?"keyword":"variable-2":-1!=["[","]","(",")","{","}"].indexOf(r)?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}}}),e.defineMIME("text/x-spreadsheet","spreadsheet")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(_){"use strict";function e(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function t(e){return e.eat("@")&&(e.match(/^session\./),e.match(/^local\./),e.match(/^global\./)),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function r(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}_.defineMode("sql",function(i,e){var o=e.client||{},s=e.atoms||{false:!0,true:!0,null:!0},l=e.builtin||y(v),c=e.keywords||y(a),u=e.operatorChars||/^[*+\-%<>!=&|~^\/]/,d=e.support||{},m=e.hooks||{},p=e.dateSQL||{date:!0,time:!0,timestamp:!0},g=!1!==e.backslashStringEscapes,b=e.brackets||/^[\{}\(\)\[\]]/,h=e.punctuation||/^[;.,:]/;function f(e,t){var i,r=e.next();if(m[r]){var a=m[r](e,t);if(!1!==a)return a}if(d.hexNumber&&("0"==r&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==r||"X"==r)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(d.binaryNumber&&(("b"==r||"B"==r)&&e.match(/^'[01]+'/)||"0"==r&&e.match(/^b[01]+/)))return"number";if(47<r.charCodeAt(0)&&r.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),d.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==r&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==r||'"'==r&&d.doubleQuote)return t.tokenize=(i=r,function(e,t){for(var r,a=!1;null!=(r=e.next());){if(r==i&&!a){t.tokenize=f;break}a=g&&!a&&"\\"==r}return"string"}),t.tokenize(e,t);if((d.nCharCast&&("n"==r||"N"==r)||d.charsetCast&&"_"==r&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(d.commentSlashSlash&&"/"==r&&e.eat("/"))return e.skipToEnd(),"comment";if(d.commentHash&&"#"==r||"-"==r&&e.eat("-")&&(!d.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==r&&e.eat("*"))return t.tokenize=function a(i){return function(e,t){var r=e.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?t.tokenize=a(i+1):t.tokenize=1<i?a(i-1):f:e.skipToEnd(),"comment"}}(1),t.tokenize(e,t);if("."==r)return d.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:d.ODBCdotTable&&e.match(/^[\w\d_]+/)?"variable-2":void 0;if(u.test(r))return e.eatWhile(u),"operator";if(b.test(r))return"bracket";if(h.test(r))return e.eatWhile(h),"punctuation";if("{"==r&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var n=e.current().toLowerCase();return p.hasOwnProperty(n)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":s.hasOwnProperty(n)?"atom":l.hasOwnProperty(n)?"builtin":c.hasOwnProperty(n)?"keyword":o.hasOwnProperty(n)?"string-2":null}function n(e,t,r){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:r}}return{startState:function(){return{tokenize:f,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==f&&e.eatSpace())return null;var r=t.tokenize(e,t);if("comment"==r)return r;t.context&&null==t.context.align&&(t.context.align=!0);var a,i=e.current();return"("==i?n(e,t,")"):"["==i?n(e,t,"]"):t.context&&t.context.type==i&&((a=t).indent=a.context.indent,a.context=a.context.prev),r},indent:function(e,t){var r=e.context;if(!r)return _.Pass;var a=t.charAt(0)==r.type;return r.align?r.col+(a?0:1):r.indent+(a?0:i.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:d.commentSlashSlash?"//":d.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});var a="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function y(e){for(var t={},r=e.split(" "),a=0;a<r.length;++a)t[r[a]]=!0;return t}var v="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";_.defineMIME("text/x-sql",{name:"sql",keywords:y(a+"begin"),builtin:y(v),atoms:y("false true null unknown"),dateSQL:y("date time timestamp"),support:y("ODBCdotTable doubleQuote binaryNumber hexNumber")}),_.defineMIME("text/x-mssql",{name:"sql",client:y("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:y(a+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:y("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:y("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:y("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":t}}),_.defineMIME("text/x-mysql",{name:"sql",client:y("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:y(a+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:y("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:y("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:y("date time timestamp"),support:y("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":t,"`":e,"\\":r}}),_.defineMIME("text/x-mariadb",{name:"sql",client:y("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:y(a+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:y("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:y("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:y("date time timestamp"),support:y("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":t,"`":e,"\\":r}}),_.defineMIME("text/x-sqlite",{name:"sql",client:y("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:y(a+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:y("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:y("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:y("date time timestamp datetime"),support:y("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":t,":":t,"?":t,$:t,'"':function(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null},"`":e}}),_.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:y("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:y("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:y("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:y("commentSlashSlash decimallessFloat"),hooks:{}}),_.defineMIME("text/x-plsql",{name:"sql",client:y("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:y("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:y("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:y("date time timestamp"),support:y("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),_.defineMIME("text/x-hive",{name:"sql",keywords:y("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:y("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:y("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:y("date timestamp"),support:y("ODBCdotTable doubleQuote binaryNumber hexNumber")}),_.defineMIME("text/x-pgsql",{name:"sql",client:y("source"),keywords:y(a+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:y("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:y("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,dateSQL:y("date time timestamp"),support:y("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),_.defineMIME("text/x-gql",{name:"sql",keywords:y("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:y("false true"),builtin:y("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),_.defineMIME("text/x-gpsql",{name:"sql",client:y("source"),keywords:y("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:y("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:y("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:y("date time timestamp"),support:y("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),_.defineMIME("text/x-sparksql",{name:"sql",keywords:y("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:y("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:y("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:y("date time timestamp"),support:y("ODBCdotTable doubleQuote zerolessFloat")}),_.defineMIME("text/x-esper",{name:"sql",client:y("source"),keywords:y("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:y("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:y("time"),support:y("decimallessFloat zerolessFloat binaryNumber hexNumber")})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("stex",function(t,e){function a(t,e){t.cmdState.push(e)}function c(t){return 0<t.cmdState.length?t.cmdState[t.cmdState.length-1]:null}function n(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};function u(t,e){t.f=e}function i(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var r=t.current().slice(1);return a(e,n=new(n=o[r]||o.DEFAULT)),u(e,m),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return u(e,function(t,e){return f(t,e,"\\]")}),"keyword";if(t.match("\\("))return u(e,function(t,e){return f(t,e,"\\)")}),"keyword";if(t.match("$$"))return u(e,function(t,e){return f(t,e,"$$")}),"keyword";if(t.match("$"))return u(e,function(t,e){return f(t,e,"$")}),"keyword";var i=t.next();return"%"==i?(t.skipToEnd(),"comment"):"}"==i||"]"==i?(n=c(e))?(n.closeBracket(i),u(e,m),"bracket"):"error":"{"==i||"["==i?(a(e,n=new(n=o.DEFAULT)),"bracket"):/\d/.test(i)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(n=function(t){for(var e=t.cmdState,n=e.length-1;0<=n;n--){var r=e[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e)).name&&(n.argument=t.current()),n.styleIdentifier())}function f(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return u(e,i),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function m(t,e){var n,r=t.peek();return"{"==r||"["==r?(c(e).openBracket(r),t.eat(r),u(e,i),"bracket"):/[ \t\r]/.test(r)?(t.eat(r),null):(u(e,i),(n=e.cmdState.pop())&&n.closeBracket(),i(t,e))}return o.importmodule=n("importmodule","tag",["string","builtin"]),o.documentclass=n("documentclass","tag",["","atom"]),o.usepackage=n("usepackage","tag",["atom"]),o.begin=n("begin","tag",["atom"]),o.end=n("end","tag",["atom"]),o.label=n("label","tag",["atom"]),o.ref=n("ref","tag",["atom"]),o.eqref=n("eqref","tag",["atom"]),o.cite=n("cite","tag",["atom"]),o.bibitem=n("bibitem","tag",["atom"]),o.Bibitem=n("Bibitem","tag",["atom"]),o.RBibitem=n("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return f(t,e)}:i}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=i,t.cmdState.length=0},lineComment:"%"}}),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("stylus",function(e){for(var r,i,a,o,d=e.indentUnit,u="",t=re(Z),n=/^(a|b|i|s|col|em)$/i,l=re(T),s=re(D),c=re(K),m=re(J),p=re(F),h=te(F),b=re(I),g=re(H),f=re(G),k=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,w=te(Q),y=re(V),v=new RegExp(/^\-(moz|ms|o|webkit)-/i),x=re(ee),z="",q={};u.length<d;)u+=" ";function j(e,t){for(var r,i=!1;null!=(r=e.next());){if(i&&"/"==r){t.tokenize=null;break}i="*"==r}return["comment","comment"]}function $(a){return function(e,t){for(var r,i=!1;null!=(r=e.next());){if(r==a&&!i){")"==a&&e.backUp(1);break}i=!i&&"\\"==r}return(r==a||!i&&")"!=a)&&(t.tokenize=null),["string","string"]}}function C(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=$(")"),[null,"("]}function B(e,t,r,i){this.type=e,this.indent=t,this.prev=r,this.line=i||{firstWord:"",indent:0}}function L(e,t,r,i){return i=0<=i?i:d,e.context=new B(r,t.indentation()+i,e.context),r}function P(e,t){var r=e.context.indent-d;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=r),e.context.type}function _(e,t,r,i){for(var a=i||1;0<a;a--)r.context=r.context.prev;return o=e,n=t,q[(l=r).context.type](o,n,l);var o,n,l}function E(e){return e.toLowerCase()in t}function N(e){return(e=e.toLowerCase())in l||e in f}function W(e){return e.toLowerCase()in y}function U(e){return e.toLowerCase().match(v)}function A(e){var t=e.toLowerCase(),r="variable-2";return E(e)?r="tag":W(e)?r="block-keyword":N(e)?r="property":t in c||t in x?r="atom":"return"==t||t in m?r="keyword":e.match(/^[A-Z]/)&&(r="string"),r}function M(e,t){return X(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function O(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function R(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function S(e){return e.sol()||e.string.match(new RegExp("^\\s*"+e.current().replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")))}function X(e){return e.eol()||e.match(/^\s*$/,!1)}function Y(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r="string"==typeof e?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,""):""}return q.block=function(e,t,r){if("comment"==e&&S(t)||","==e&&X(t)||"mixin"==e)return L(r,t,"block",0);if(O(e,t))return L(r,t,"interpolation");if(X(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!E(Y(t)))return L(r,t,"block",0);if(M(e,t))return L(r,t,"block");if("}"==e&&X(t))return L(r,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||W(Y(t))?L(r,t,"variableName"):L(r,t,"variableName",0);if("="==e)return X(t)||W(Y(t))?L(r,t,"block"):L(r,t,"block",0);if("*"==e&&(X(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return o="tag",L(r,t,"block");if(R(e,t))return L(r,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return L(r,t,X(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return L(r,t,"keyframes");if(/@extends?/.test(e))return L(r,t,"extend",0);if(e&&"@"==e.charAt(0))return 0<t.indentation()&&N(t.current().slice(1))?(o="variable-2","block"):/(@import|@require|@charset)/.test(e)?L(r,t,"block",0):L(r,t,"block");if("reference"==e&&X(t))return L(r,t,"block");if("("==e)return L(r,t,"parens");if("vendor-prefixes"==e)return L(r,t,"vendorPrefixes");if("word"==e){var i=t.current();if("property"==(o=A(i)))return S(t)?L(r,t,"block",0):(o="atom","block");if("tag"==o){if(/embed|menu|pre|progress|sub|table/.test(i)&&N(Y(t)))return o="atom","block";if(t.string.match(new RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return o="atom","block";if(n.test(i)&&(S(t)&&t.string.match(/=/)||!S(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!E(Y(t))))return o="variable-2",W(Y(t))?"block":L(r,t,"block",0);if(X(t))return L(r,t,"block")}if("block-keyword"==o)return o="keyword",t.current(/(if|unless)/)&&!S(t)?"block":L(r,t,"block");if("return"==i)return L(r,t,"block",0);if("variable-2"==o&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return L(r,t,"block")}return r.context.type},q.parens=function(e,t,r){if("("==e)return L(r,t,"parens");if(")"==e)return"parens"==r.context.prev.type?P(r):t.string.match(/^[a-z][\w-]*\(/i)&&X(t)||W(Y(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Y(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&E(Y(t))?L(r,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?L(r,t,"block",0):X(t)?L(r,t,"block"):L(r,t,"block",0);if(e&&"@"==e.charAt(0)&&N(t.current().slice(1))&&(o="variable-2"),"word"==e){var i=t.current();"tag"==(o=A(i))&&n.test(i)&&(o="variable-2"),"property"!=o&&"to"!=i||(o="atom")}return"variable-name"==e?L(r,t,"variableName"):R(e,t)?L(r,t,"pseudo"):r.context.type},q.vendorPrefixes=function(e,t,r){return"word"==e?(o="property",L(r,t,"block",0)):P(r)},q.pseudo=function(e,t,r){return N(Y(t.string))?_(e,t,r):(t.match(/^[a-z-]+/),o="variable-3",X(t)?L(r,t,"block"):P(r))},q.atBlock=function(e,t,r){if("("==e)return L(r,t,"atBlock_parens");if(M(e,t))return L(r,t,"block");if(O(e,t))return L(r,t,"interpolation");if("word"==e){var i=t.current().toLowerCase();if("tag"==(o=/^(only|not|and|or)$/.test(i)?"keyword":p.hasOwnProperty(i)?"tag":g.hasOwnProperty(i)?"attribute":b.hasOwnProperty(i)?"property":s.hasOwnProperty(i)?"string-2":A(t.current()))&&X(t))return L(r,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(o="keyword"),r.context.type},q.atBlock_parens=function(e,t,r){if("{"==e||"}"==e)return r.context.type;if(")"==e)return X(t)?L(r,t,"block"):L(r,t,"atBlock");if("word"!=e)return q.atBlock(e,t,r);var i=t.current().toLowerCase();return o=A(i),/^(max|min)/.test(i)&&(o="property"),"tag"==o&&(o=n.test(i)?"variable-2":"atom"),r.context.type},q.keyframes=function(e,t,r){return"0"==t.indentation()&&("}"==e&&S(t)||"]"==e||"hash"==e||"qualifier"==e||E(t.current()))?_(e,t,r):"{"==e?L(r,t,"keyframes"):"}"==e?S(t)?P(r,!0):L(r,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?L(r,t,"keyframes"):"word"==e&&"block-keyword"==(o=A(t.current()))?(o="keyword",L(r,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?L(r,t,X(t)?"block":"atBlock"):"mixin"==e?L(r,t,"block",0):r.context.type},q.interpolation=function(e,t,r){return"{"==e&&P(r)&&L(r,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&E(Y(t))?L(r,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?L(r,t,"block",0):L(r,t,"block"):"variable-name"==e?L(r,t,"variableName",0):("word"==e&&"tag"==(o=A(t.current()))&&(o="atom"),r.context.type)},q.extend=function(e,t,r){return"["==e||"="==e?"extend":"]"==e?P(r):"word"==e?(o=A(t.current()),"extend"):P(r)},q.variableName=function(e,t,r){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(o="variable-2"),"variableName"):_(e,t,r)},{startState:function(e){return{tokenize:null,state:"block",context:new B("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:((i=(t.tokenize||function(e,t){if(z=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=z?z[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),r=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return(t.tokenize=j)(e,t);if('"'==r||"'"==r)return e.next(),t.tokenize=$(r),t.tokenize(e,t);if("@"==r)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==r){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(v)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==r?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==r&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(h)?("("==e.peek()&&(t.tokenize=C),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variable-3","reference"]):e.match(/^&{1}\s*$/)?["variable-3","reference"]:e.match(w)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!E(e.current())?(e.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:e.match(k)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(r)?(e.next(),[null,r]):(e.next(),[null,null])})(e,t))&&"object"==typeof i&&(a=i[1],i=i[0]),o=i,t.state=q[t.state](a,e,t),o)},indent:function(e,t,r){var i=e.context,a=t&&t.charAt(0),o=i.indent,n=Y(t),l=r.match(/^\s*/)[0].replace(/\t/g,u).length,s=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:l;return i.prev&&("}"==a&&("block"==i.type||"atBlock"==i.type||"keyframes"==i.type)||")"==a&&("parens"==i.type||"atBlock_parens"==i.type)||"{"==a&&"at"==i.type)?o=i.indent-d:/(\})/.test(a)||(/@|\$|\d/.test(a)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(s)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||W(n)?o=l:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(a)||E(n)?o=/\,\s*$/.test(s)?c:/^\s+/.test(r)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(s)||E(s))?l<=c?c:c+d:l:/,\s*$/.test(r)||!U(n)&&!N(n)||(o=W(s)?l<=c?c:c+d:/^\{/.test(s)?l<=c?l:c+d:U(s)||N(s)?c<=l?c:l:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(s)||/=\s*$/.test(s)||E(s)||/^\$[\w-\.\[\]\'\"]/.test(s)?c+d:l)),o},electricChars:"}",lineComment:"//",fold:"indent"}});var Z=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],F=["domain","regexp","url","url-prefix"],H=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],I=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],T=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],D=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],G=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],J=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],K=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],Q=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],V=["for","if","else","unless","from","to"],ee=["null","true","false","href","title","type","not-allowed","readonly","disabled"],t=Z.concat(F,H,I,T,D,J,K,G,Q,V,ee,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function te(e){return e=e.sort(function(e,t){return e<t}),new RegExp("^(("+e.join(")|(")+"))\\b")}function re(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}e.registerHelper("hintWords","stylus",t),e.defineMIME("text/x-styl","stylus")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var u=t(["_","var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super","convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is","break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while","defer","return","inout","mutating","nonmutating","catch","do","rethrows","throw","throws","try","didSet","get","set","willSet","assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right","Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]),c=t(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),f=t(["true","false","nil","self","super","_"]),d=t(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),l="+-/*%=|&<>~^?!",p=":;,.(){}[]",s=/^\-?0b[01][01_]*/,m=/^\-?0o[0-7][0-7_]*/,h=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,v=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,_=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,x=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,k=/^\#[A-Za-z]+/,y=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function o(e,t,n){if(e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;var r,i=e.peek();if("/"==i){if(e.match("//"))return e.skipToEnd(),"comment";if(e.match("/*"))return t.tokenize.push(w),w(e,t)}if(e.match(k))return"builtin";if(e.match(y))return"attribute";if(e.match(s))return"number";if(e.match(m))return"number";if(e.match(h))return"number";if(e.match(v))return"number";if(e.match(x))return"property";if(-1<l.indexOf(i))return e.next(),"operator";if(-1<p.indexOf(i))return e.next(),e.match(".."),"punctuation";if(r=e.match(/("""|"|')/)){var o=function(e,t,n){var r,i=1==e.length,o=!1;for(;r=t.peek();)if(o){if(t.next(),"("==r)return n.tokenize.push(b()),"string";o=!1}else{if(t.match(e))return n.tokenize.pop(),"string";t.next(),o="\\"==r}i&&n.tokenize.pop();return"string"}.bind(null,r[0]);return t.tokenize.push(o),o(e,t)}if(e.match(_)){var a=e.current();return d.hasOwnProperty(a)?"variable-2":f.hasOwnProperty(a)?"atom":u.hasOwnProperty(a)?(c.hasOwnProperty(a)&&(t.prev="define"),"keyword"):"define"==n?"def":"variable"}return e.next(),null}function b(){var i=0;return function(e,t,n){var r=o(e,t,n);if("punctuation"==r)if("("==e.current())++i;else if(")"==e.current()){if(0==i)return e.backUp(1),t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t);--i}return r}}function w(e,t){for(var n;e.match(/^[^/*]+/,!0),n=e.next();)"/"===n&&e.eat("*")?t.tokenize.push(w):"*"===n&&e.eat("/")&&t.tokenize.pop();return"comment"}function a(e,t,n){this.prev=e,this.align=t,this.indented=n}e.defineMode("swift",function(i){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(e,t){var n=t.prev;t.prev=null;var r=(t.tokenize[t.tokenize.length-1]||o)(e,t,n);if(r&&"comment"!=r?t.prev||(t.prev=r):t.prev=n,"punctuation"==r){var i=/[\(\[\{]|([\]\)\}])/.exec(e.current());i&&(i[1]?function(e){e.context&&(e.indented=e.context.indented,e.context=e.context.prev)}:function(e,t){var n=t.match(/^\s*($|\/[\/\*])/,!1)?null:t.column()+1;e.context=new a(e.context,n,e.indented)})(t,e)}return r},indent:function(e,t){var n=e.context;if(!n)return 0;var r=/^[\]\}\)]/.test(t);return null!=n.align?n.align-(r?1:0):n.indented+(r?0:i.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}}),e.defineMIME("text/x-swift","swift")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tcl",function(){function e(e){for(var r={},t=e.split(" "),n=0;n<t.length;++n)r[t[n]]=!0;return r}var i=e("Tcl safe after append array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd close concat continue dde eof encoding error eval exec exit expr fblocked fconfigure fcopy file fileevent filename filename flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lset lsort memory msgcat namespace open package parray pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp registry regsub rename resource return scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest tclvars tell time trace unknown unset update uplevel upvar variable vwait"),f=e("if elseif else and not or eq ne in ni for foreach while switch"),l=/[+\-*&%=<>!?^\/\|]/;function c(e,r,t){return(r.tokenize=t)(e,r)}function u(e,r){var t=r.beforeParams;r.beforeParams=!1;var a,n=e.next();if('"'!=n&&"'"!=n||!r.inParams){if(/[\[\]{}\(\),;\.]/.test(n))return"("==n&&t?r.inParams=!0:")"==n&&(r.inParams=!1),null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if("#"==n)return e.eat("*")?c(e,r,s):"#"==n&&e.match(/ *\[ *\[/)?c(e,r,d):(e.skipToEnd(),"comment");if('"'==n)return e.skipTo(/"/),"comment";if("$"==n)return e.eatWhile(/[$_a-z0-9A-Z\.{:]/),e.eatWhile(/}/),r.beforeParams=!0,"builtin";if(l.test(n))return e.eatWhile(l),"comment";e.eatWhile(/[\w\$_{}\xa1-\uffff]/);var o=e.current().toLowerCase();return i&&i.propertyIsEnumerable(o)?"keyword":f&&f.propertyIsEnumerable(o)?(r.beforeParams=!0,"keyword"):null}return c(e,r,(a=n,function(e,r){for(var t,n=!1,o=!1;null!=(t=e.next());){if(t==a&&!n){o=!0;break}n=!n&&"\\"==t}return o&&(r.tokenize=u),"string"}))}function s(e,r){for(var t,n=!1;t=e.next();){if("#"==t&&n){r.tokenize=u;break}n="*"==t}return"comment"}function d(e,r){for(var t,n=0;t=e.next();){if("#"==t&&2==n){r.tokenize=u;break}"]"==t?n++:" "!=t&&(n=0)}return"meta"}return{startState:function(){return{tokenize:u,beforeParams:!1,inParams:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)}}}),e.defineMIME("text/x-tcl","tcl")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var a={addition:"positive",attributes:"attribute",bold:"strong",cite:"keyword",code:"atom",definitionList:"number",deletion:"negative",div:"punctuation",em:"em",footnote:"variable",footCite:"qualifier",header:"header",html:"comment",image:"string",italic:"em",link:"link",linkDefinition:"link",list1:"variable-2",list2:"variable-3",list3:"keyword",notextile:"string-2",pre:"operator",p:"property",quote:"bracket",span:"quote",specialChar:"tag",strong:"strong",sub:"builtin",sup:"builtin",table:"variable-3",tableHeading:"operator"};function i(t,e,n){if("_"===n)return t.eat("_")?r(t,e,"italic",/__/,2):r(t,e,"em",/_/,1);if("*"===n)return t.eat("*")?r(t,e,"bold",/\*\*/,2):r(t,e,"strong",/\*/,1);if("["===n)return t.match(/\d+\]/)&&(e.footCite=!0),u(e);if("("===n&&t.match(/^(r|tm|c)\)/))return o(e,a.specialChar);if("<"===n&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return o(e,a.html);if("?"===n&&t.eat("?"))return r(t,e,"cite",/\?\?/,2);if("="===n&&t.eat("="))return r(t,e,"notextile",/==/,2);if("-"===n&&!t.eat("-"))return r(t,e,"deletion",/-/,1);if("+"===n)return r(t,e,"addition",/\+/,1);if("~"===n)return r(t,e,"sub",/~/,1);if("^"===n)return r(t,e,"sup",/\^/,1);if("%"===n)return r(t,e,"span",/%/,1);if("@"===n)return r(t,e,"code",/@/,1);if("!"!==n)return u(e);var i=r(t,e,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),i}function r(t,e,n,i,a){var r=t.pos>a?t.string.charAt(t.pos-a-1):null,l=t.peek();if(e[n]){if((!l||/\W/.test(l))&&r&&/\S/.test(r)){var o=u(e);return e[n]=!1,o}}else(!r||/\W/.test(r))&&l&&/\S/.test(l)&&t.match(new RegExp("^.*\\S"+i.source+"(?:\\W|$)"),!1)&&(e[n]=!0,e.mode=c.attributes);return u(e)}function u(t){var e=l(t);if(e)return e;var n=[];return t.layoutType&&n.push(a[t.layoutType]),n=n.concat(function(t){for(var e=[],n=1;n<arguments.length;++n)t[arguments[n]]&&e.push(a[arguments[n]]);return e}(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),"header"===t.layoutType&&n.push(a.header+"-"+t.header),n.length?n.join(" "):null}function l(t){var e=t.layoutType;switch(e){case"notextile":case"code":case"pre":return a[e];default:return t.notextile?a.notextile+(e?" "+a[e]:""):null}}function o(t,e){var n=l(t);if(n)return n;var i=u(t);return e?i?i+" "+e:e:i}function e(t){var e=t.spanningLayout,n=t.layoutType;for(var i in t)t.hasOwnProperty(i)&&delete t[i];t.mode=c.newLayout,e&&(t.layoutType=n,t.spanningLayout=!0)}var n={cache:{},single:{bc:"bc",bq:"bq",definitionList:/- .*?:=+/,definitionListEnd:/.*=:\s*$/,div:"div",drawTable:/\|.*\|/,foot:/fn\d+/,header:/h[1-6]/,html:/\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return n.makeRe("^",n.single.drawTable,"$");case"html":return n.makeRe("^",n.single.html,"(?:",n.single.html,")*","$");case"linkDefinition":return n.makeRe("^",n.single.linkDefinition,"$");case"listLayout":return n.makeRe("^",n.single.list,s("allAttributes"),"*\\s+");case"tableCellAttributes":return n.makeRe("^",n.choiceRe(n.single.tableCellAttributes,s("allAttributes")),"+\\.");case"type":return n.makeRe("^",s("allTypes"));case"typeLayout":return n.makeRe("^",s("allTypes"),s("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return n.makeRe("^",s("allAttributes"),"+");case"allTypes":return n.choiceRe(n.single.div,n.single.foot,n.single.header,n.single.bc,n.single.bq,n.single.notextile,n.single.pre,n.single.table,n.single.para);case"allAttributes":return n.choiceRe(n.attributes.selector,n.attributes.css,n.attributes.lang,n.attributes.align,n.attributes.pad);default:return n.makeRe("^",n.single[t])}},makeRe:function(){for(var t="",e=0;e<arguments.length;++e){var n=arguments[e];t+="string"==typeof n?n:n.source}return new RegExp(t)},choiceRe:function(){for(var t=[arguments[0]],e=1;e<arguments.length;++e)t[2*e-1]="|",t[2*e]=arguments[e];return t.unshift("(?:"),t.push(")"),n.makeRe.apply(null,t)}};function s(t){return n.cache[t]||(n.cache[t]=n.createRe(t))}var c={newLayout:function(t,e){return t.match(s("typeLayout"),!1)?(e.spanningLayout=!1,(e.mode=c.blockType)(t,e)):(l(e)||(t.match(s("listLayout"),!1)?n=c.list:t.match(s("drawTable"),!1)?n=c.table:t.match(s("linkDefinition"),!1)?n=c.linkDefinition:t.match(s("definitionList"))?n=c.definitionList:t.match(s("html"),!1)&&(n=c.html)),(e.mode=n||c.text)(t,e));var n},blockType:function(t,e){var n,i;return e.layoutType=null,(n=t.match(s("type")))?((n=(i=n[0]).match(s("header")))?(e.layoutType="header",e.header=parseInt(n[0][1])):i.match(s("bq"))?e.layoutType="quote":i.match(s("bc"))?e.layoutType="code":i.match(s("foot"))?e.layoutType="footnote":i.match(s("notextile"))?e.layoutType="notextile":i.match(s("pre"))?e.layoutType="pre":i.match(s("div"))?e.layoutType="div":i.match(s("table"))&&(e.layoutType="table"),e.mode=c.attributes,u(e)):(e.mode=c.text)(t,e)},text:function(t,e){if(t.match(s("text")))return u(e);var n=t.next();return'"'===n?(e.mode=c.link)(t,e):i(t,e,n)},attributes:function(t,e){return e.mode=c.layoutLength,t.match(s("attributes"))?o(e,a.attributes):u(e)},layoutLength:function(t,e){return t.eat(".")&&t.eat(".")&&(e.spanningLayout=!0),e.mode=c.text,u(e)},list:function(t,e){var n=t.match(s("list"));e.listDepth=n[0].length;var i=(e.listDepth-1)%3;return e.layoutType=i?1===i?"list2":"list3":"list1",e.mode=c.attributes,u(e)},link:function(t,e){return e.mode=c.text,t.match(s("link"))?(t.match(/\S+/),o(e,a.link)):u(e)},linkDefinition:function(t,e){return t.skipToEnd(),o(e,a.linkDefinition)},definitionList:function(t,e){return t.match(s("definitionList")),e.layoutType="definitionList",t.match(/\s*$/)?e.spanningLayout=!0:e.mode=c.attributes,u(e)},html:function(t,e){return t.skipToEnd(),o(e,a.html)},table:function(t,e){return e.layoutType="table",(e.mode=c.tableCell)(t,e)},tableCell:function(t,e){return t.match(s("tableHeading"))?e.tableHeading=!0:t.eat("|"),e.mode=c.tableCellAttributes,u(e)},tableCellAttributes:function(t,e){return e.mode=c.tableText,t.match(s("tableCellAttributes"))?o(e,a.attributes):u(e)},tableText:function(t,e){return t.match(s("tableText"))?u(e):"|"===t.peek()?(e.mode=c.tableCell,u(e)):i(t,e,t.next())}};t.defineMode("textile",function(){return{startState:function(){return{mode:c.newLayout}},token:function(t,e){var n,i;return t.sol()&&(n=t,(i=e).mode=c.newLayout,i.tableHeading=!1,"definitionList"===i.layoutType&&i.spanningLayout&&n.match(s("definitionListEnd"),!1)&&(i.spanningLayout=!1)),e.mode(t,e)},blankLine:e}}),t.defineMIME("text/x-textile","textile")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tiddlywiki",function(){var i={},n={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},o=/[\w_\-]/i,u=/^\-\-\-\-+$/,a=/^\/\*\*\*$/,f=/^\*\*\*\/$/,c=/^<<<$/,l=/^\/\/\{\{\{$/,m=/^\/\/\}\}\}$/,k=/^<!--\{\{\{-->$/,d=/^<!--\}\}\}-->$/,h=/^\{\{\{$/,s=/^\}\}\}$/,b=/.*?\}\}\}/;function p(e,t,r){return(t.tokenize=r)(e,t)}function $(e,t){var r=e.sol(),n=e.peek();if(t.block=!1,r&&/[<\/\*{}\-]/.test(n)){if(e.match(h))return t.block=!0,p(e,t,x);if(e.match(c))return"quote";if(e.match(a)||e.match(f))return"comment";if(e.match(l)||e.match(m)||e.match(k)||e.match(d))return"comment";if(e.match(u))return"hr"}if(e.next(),r&&/[\/\*!#;:>|]/.test(n)){if("!"==n)return e.skipToEnd(),"header";if("*"==n)return e.eatWhile("*"),"comment";if("#"==n)return e.eatWhile("#"),"comment";if(";"==n)return e.eatWhile(";"),"comment";if(":"==n)return e.eatWhile(":"),"comment";if(">"==n)return e.eatWhile(">"),"quote";if("|"==n)return"header"}if("{"==n&&e.match(/\{\{/))return p(e,t,x);if(/[hf]/i.test(n)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if('"'==n)return"string";if("~"==n)return"brace";if(/[\[\]]/.test(n)&&e.match(n))return"brace";if("@"==n)return e.eatWhile(o),"link";if(/\d/.test(n))return e.eatWhile(/\d/),"number";if("/"==n){if(e.eat("%"))return p(e,t,v);if(e.eat("/"))return p(e,t,z)}if("_"==n&&e.eat("_"))return p(e,t,y);if("-"==n&&e.eat("-")){if(" "!=e.peek())return p(e,t,g);if(" "==e.peek())return"brace"}return"'"==n&&e.eat("'")?p(e,t,w):"<"==n&&e.eat("<")?p(e,t,W):(e.eatWhile(/[\w\$_]/),i.propertyIsEnumerable(e.current())?"keyword":null)}function v(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=$;break}n="%"==r}return"comment"}function w(e,t){for(var r,n=!1;r=e.next();){if("'"==r&&n){t.tokenize=$;break}n="'"==r}return"strong"}function x(e,t){var r=t.block;return r&&e.current()||(!r&&e.match(b)?t.tokenize=$:r&&e.sol()&&e.match(s)?t.tokenize=$:e.next()),"comment"}function z(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=$;break}n="/"==r}return"em"}function y(e,t){for(var r,n=!1;r=e.next();){if("_"==r&&n){t.tokenize=$;break}n="_"==r}return"underlined"}function g(e,t){for(var r,n=!1;r=e.next();){if("-"==r&&n){t.tokenize=$;break}n="-"==r}return"strikethrough"}function W(e,t){if("<<"==e.current())return"macro";var r=e.next();return r?">"==r&&">"==e.peek()?(e.next(),t.tokenize=$,"macro"):(e.eatWhile(/[\w\$_]/),n.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=$,null)}return{startState:function(){return{tokenize:$}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-tiddlywiki","tiddlywiki")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tiki",function(e){function o(n,r,i){return function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=u;break}e.next()}return i&&(t.tokenize=i),n}}function a(n){return function(e,t){for(;!e.eol();)e.next();return t.tokenize=u,n}}function u(t,n){function e(e){return(n.tokenize=e)(t,n)}var r=t.sol(),i=t.next();switch(i){case"{":return t.eat("/"),t.eatSpace(),t.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),n.tokenize=l,"tag";case"_":if(t.eat("_"))return e(o("strong","__",u));break;case"'":if(t.eat("'"))return e(o("em","''",u));break;case"(":if(t.eat("("))return e(o("variable-2","))",u));break;case"[":return e(o("variable-3","]",u));case"|":if(t.eat("|"))return e(o("comment","||"));break;case"-":if(t.eat("="))return e(o("header string","=-",u));if(t.eat("-"))return e(o("error tw-deleted","--",u));break;case"=":if(t.match("=="))return e(o("tw-underline","===",u));break;case":":if(t.eat(":"))return e(o("comment","::"));break;case"^":return e(o("tw-box","^"));case"~":if(t.match("np~"))return e(o("meta","~/np~"))}if(r)switch(i){case"!":return t.match("!!!!!")||t.match("!!!!")||t.match("!!!")||t.match("!!"),e(a("header string"));case"*":case"#":case"+":return e(a("tw-listitem bracket"))}return null}var i,c,f,s,r=e.indentUnit;function l(e,t){var n,r=e.next(),i=e.peek();return"}"==r?(t.tokenize=u,"tag"):"("==r||")"==r?"bracket":"="==r?(c="equals",">"==i&&(e.next(),i=e.peek()),/[\'\"]/.test(i)||(t.tokenize=function(e,t){for(;!e.eol();){var n=e.next(),r=e.peek();if(" "==n||","==n||/[ )}]/.test(r)){t.tokenize=l;break}}return"string"}),"operator"):/[\'\"]/.test(r)?(t.tokenize=(n=r,function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=l;break}return"string"}),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function d(){for(var e=arguments.length-1;0<=e;e--)f.cc.push(arguments[e])}function k(){return d.apply(null,arguments),!0}function p(e,t){var n=f.context&&f.context.noIndent;f.context={prev:f.context,pluginName:e,indent:f.indented,startOfLine:t,noIndent:n}}function m(){f.context&&(f.context=f.context.prev)}function g(e){if("openPlugin"==e)return f.pluginName=i,k(x,(n=f.startOfLine,function(e){return"selfclosePlugin"==e||"endPlugin"==e||"endPlugin"==e&&p(f.pluginName,n),k()}));if("closePlugin"!=e)return"string"==e&&(f.context&&"!cdata"==f.context.name||p("!cdata"),f.tokenize==u&&m()),k();var t,n,r=!1;return f.context?(r=f.context.pluginName!=i,m()):r=!0,r&&(s="error"),k((t=r,function(e){return t&&(s="error"),"endPlugin"==e?k():d()}))}function x(e){return"keyword"==e?(s="attribute",k(x)):"equals"==e?k(t,x):d()}function t(e){return"keyword"==e?(s="string",k()):"string"==e?k(n):d()}function n(e){return"string"==e?k(n):d()}return{startState:function(){return{tokenize:u,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;s=c=i=null;var n=t.tokenize(e,t);if((n||c)&&"comment"!=n)for(f=t;;){if((t.cc.pop()||g)(c||n))break}return t.startOfLine=!1,s||n},indent:function(e,t){var n=e.context;if(n&&n.noIndent)return 0;for(n&&/^{\//.test(t)&&(n=n.prev);n&&!n.startOfLine;)n=n.prev;return n?n.indent+r:0},electricChars:"/"}}),e.defineMIME("text/tiki","tiki")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(e,t){if(t.inString||'"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.inString=!0),e.sol()&&0===t.inArray&&(t.lhs=!0),t.inString){for(;t.inString&&!e.eol();)e.peek()===t.stringType?(e.next(),t.inString=!1):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property string":"string"}return t.inArray&&"]"===e.peek()?(e.next(),t.inArray--,"bracket"):t.lhs&&"["===e.peek()&&e.skipTo("]")?(e.next(),"]"===e.peek()&&e.next(),"atom"):"#"===e.peek()?(e.skipToEnd(),"comment"):e.eatSpace()?null:t.lhs&&e.eatWhile(function(e){return"="!=e&&" "!=e})?"property":t.lhs&&"="===e.peek()?(e.next(),t.lhs=!1,null):!t.lhs&&e.match(/^\d\d\d\d[\d\-\:\.T]*Z/)?"atom":t.lhs||!e.match("true")&&!e.match("false")?t.lhs||"["!==e.peek()?!t.lhs&&e.match(/^\-?\d+(?:\.\d+)?/)?"number":(e.eatSpace()||e.next(),null):(t.inArray++,e.next(),"bracket"):"atom"}}}),e.defineMIME("text/x-toml","toml")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}(function(o){"use strict";o.defineMode("tornado:inner",function(){var r=["and","as","assert","autoescape","block","break","class","comment","context","continue","datetime","def","del","elif","else","end","escape","except","exec","extends","false","finally","for","from","global","if","import","in","include","is","json_encode","lambda","length","linkify","load","module","none","not","or","pass","print","put","raise","raw","return","self","set","squeeze","super","true","try","url_escape","while","with","without","xhtml_escape","yield"];function i(e,t){e.eatWhile(/[^\{]/);var n=e.next();if("{"==n&&(n=e.eat(/\{|%|#/)))return t.tokenize=function(o){"{"==o&&(o="}");return function(e,t){var n=e.next();return n==o&&e.eat("}")?(t.tokenize=i,"tag"):e.match(r)?"keyword":"#"==o?"comment":"string"}}(n),"tag"}return r=new RegExp("^(("+r.join(")|(")+"))\\b"),{startState:function(){return{tokenize:i}},token:function(e,t){return t.tokenize(e,t)}}}),o.defineMode("tornado",function(e){var t=o.getMode(e,"text/html"),n=o.getMode(e,"tornado:inner");return o.overlayMode(t,n)}),o.defineMIME("text/x-tornado","tornado")});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("troff",function(){var a={};function r(t,e){return(e.tokens[0]||function(t){if(t.eatSpace())return null;var e=t.sol(),r=t.next();if("\\"===r)return t.match("fB")||t.match("fR")||t.match("fI")||t.match("u")||t.match("d")||t.match("%")||t.match("&")||(t.match("m[")?(t.skipTo("]"),t.next()):t.match("s+")||t.match("s-")?t.eatWhile(/[\d-]/):(t.match("(")||t.match("*("))&&t.eatWhile(/[\w-]/)),"string";if(e&&("."===r||"'"===r)&&t.eat("\\")&&t.eat('"'))return t.skipToEnd(),"comment";if(e&&"."===r){if(t.match("B ")||t.match("I ")||t.match("R "))return"attribute";if(t.match("TH ")||t.match("SH ")||t.match("SS ")||t.match("HP "))return t.skipToEnd(),"quote";if(t.match(/[A-Z]/)&&t.match(/[A-Z]/)||t.match(/[a-z]/)&&t.match(/[a-z]/))return"attribute"}t.eatWhile(/[\w-]/);var n=t.current();return a.hasOwnProperty(n)?a[n]:null})(t,e)}return{startState:function(){return{tokens:[]}},token:function(t,e){return r(t,e)}}}),t.defineMIME("text/troff","troff"),t.defineMIME("text/x-troff","troff"),t.defineMIME("application/x-troff","troff")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},T=e.split(" "),n=0;n<T.length;++n)t[T[n]]=!0;return t}e.defineMode("ttcn-cfg",function(e,t){var E,T=e.indentUnit,i=t.keywords||{},r=t.fileNCtrlMaskOptions||{},o=t.externalCommands||{},N=t.multiLineStrings,C=!1!==t.indentStatements,I=/[\|]/;function _(e,t){var C,T=e.next();if('"'==T||"'"==T)return t.tokenize=(C=T,function(e,t){for(var T,n=!1,E=!1;null!=(T=e.next());){if(T==C&&!n){var i=e.peek();i&&("b"!=(i=i.toLowerCase())&&"h"!=i&&"o"!=i||e.next()),E=!0;break}n=!n&&"\\"==T}return(E||!n&&!N)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[:=]/.test(T))return E=T,"punctuation";if("#"==T)return e.skipToEnd(),"comment";if(/\d/.test(T))return e.eatWhile(/[\w\.]/),"number";if(I.test(T))return e.eatWhile(I),"operator";if("["==T)return e.eatWhile(/[\w_\]]/),"number sectionTitle";e.eatWhile(/[\w\$_]/);var n=e.current();return i.propertyIsEnumerable(n)?"keyword":r.propertyIsEnumerable(n)?"negative fileNCtrlMaskOptions":o.propertyIsEnumerable(n)?"negative externalCommands":"variable"}function A(e,t,T,n,E){this.indented=e,this.column=t,this.type=T,this.align=n,this.prev=E}function U(e,t,T){var n=e.indented;return e.context&&"statement"==e.context.type&&(n=e.context.indented),e.context=new A(n,t,T,null,e.context)}function O(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new A((e||0)-T,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var T=t.context;if(e.sol()&&(null==T.align&&(T.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;E=null;var n=(t.tokenize||_)(e,t);if("comment"==n)return n;if(null==T.align&&(T.align=!0),";"!=E&&":"!=E&&","!=E||"statement"!=T.type)if("{"==E)U(t,e.column(),"}");else if("["==E)U(t,e.column(),"]");else if("("==E)U(t,e.column(),")");else if("}"==E){for(;"statement"==T.type;)T=O(t);for("}"==T.type&&(T=O(t));"statement"==T.type;)T=O(t)}else E==T.type?O(t):C&&(("}"==T.type||"top"==T.type)&&";"!=E||"statement"==T.type&&"newstatement"==E)&&U(t,e.column(),"statement");else O(t);return t.startOfLine=!1,n},electricChars:"{}",lineComment:"#",fold:"brace"}}),e.defineMIME("text/x-ttcn-cfg",{name:"ttcn-cfg",keywords:t("Yes No LogFile FileMask ConsoleMask AppendFile TimeStampFormat LogEventTypes SourceInfoFormat LogEntityName LogSourceInfo DiskFullAction LogFileNumber LogFileSize MatchingHints Detailed Compact SubCategories Stack Single None Seconds DateTime Time Stop Error Retry Delete TCPPort KillTimer NumHCs UnixSocketsEnabled LocalAddress"),fileNCtrlMaskOptions:t("TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION TTCN_USER TTCN_FUNCTION TTCN_STATISTICS TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG EXECUTOR ERROR WARNING PORTEVENT TIMEROP VERDICTOP DEFAULTOP TESTCASE ACTION USER FUNCTION STATISTICS PARALLEL MATCHING DEBUG LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED DEBUG_ENCDEC DEBUG_TESTPORT DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED FUNCTION_RND FUNCTION_UNQUALIFIED MATCHING_DONE MATCHING_MCSUCCESS MATCHING_MCUNSUCC MATCHING_MMSUCCESS MATCHING_MMUNSUCC MATCHING_PCSUCCESS MATCHING_PCUNSUCC MATCHING_PMSUCCESS MATCHING_PMUNSUCC MATCHING_PROBLEM MATCHING_TIMEOUT MATCHING_UNQUALIFIED PARALLEL_PORTCONN PARALLEL_PORTMAP PARALLEL_PTC PARALLEL_UNQUALIFIED PORTEVENT_DUALRECV PORTEVENT_DUALSEND PORTEVENT_MCRECV PORTEVENT_MCSEND PORTEVENT_MMRECV PORTEVENT_MMSEND PORTEVENT_MQUEUE PORTEVENT_PCIN PORTEVENT_PCOUT PORTEVENT_PMIN PORTEVENT_PMOUT PORTEVENT_PQUEUE PORTEVENT_STATE PORTEVENT_UNQUALIFIED STATISTICS_UNQUALIFIED STATISTICS_VERDICT TESTCASE_FINISH TESTCASE_START TESTCASE_UNQUALIFIED TIMEROP_GUARD TIMEROP_READ TIMEROP_START TIMEROP_STOP TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED USER_UNQUALIFIED VERDICTOP_FINAL VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED"),externalCommands:t("BeginControlPart EndControlPart BeginTestCase EndTestCase"),multiLineStrings:!0})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){"use strict";function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}o.defineMode("ttcn",function(e,t){var i,n=e.indentUnit,o=t.keywords||{},a=t.builtin||{},l=t.timerOps||{},c=t.portOps||{},p=t.configOps||{},u=t.verdictOps||{},f=t.sutOps||{},d=t.functionOps||{},m=t.verdictConsts||{},b=t.booleanConsts||{},h=t.otherConsts||{},y=t.types||{},v=t.visibilityModifiers||{},x=t.templateMatch||{},g=t.multiLineStrings,s=!1!==t.indentStatements,k=/[+\-*&@=<>!\/]/;function O(e,t){var s,n=e.next();if('"'==n||"'"==n)return t.tokenize=(s=n,function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==s&&!r){var o=e.peek();o&&("b"!=(o=o.toLowerCase())&&"h"!=o&&"o"!=o||e.next()),i=!0;break}r=!r&&"\\"==n}return(i||!r&&!g)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\\:\?\.]/.test(n))return i=n,"punctuation";if("#"==n)return e.skipToEnd(),"atom preprocessor";if("%"==n)return e.eatWhile(/\b/),"atom ttcn3Macros";if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if("/"==n){if(e.eat("*"))return(t.tokenize=E)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(k.test(n))return"@"==n&&(e.match("try")||e.match("catch")||e.match("lazy"))?"keyword":(e.eatWhile(k),"operator");e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();return o.propertyIsEnumerable(r)?"keyword":a.propertyIsEnumerable(r)?"builtin":l.propertyIsEnumerable(r)?"def timerOps":p.propertyIsEnumerable(r)?"def configOps":u.propertyIsEnumerable(r)?"def verdictOps":c.propertyIsEnumerable(r)?"def portOps":f.propertyIsEnumerable(r)?"def sutOps":d.propertyIsEnumerable(r)?"def functionOps":m.propertyIsEnumerable(r)?"string verdictConsts":b.propertyIsEnumerable(r)?"string booleanConsts":h.propertyIsEnumerable(r)?"string otherConsts":y.propertyIsEnumerable(r)?"builtin types":v.propertyIsEnumerable(r)?"builtin visibilityModifiers":x.propertyIsEnumerable(r)?"atom templateMatch":"variable"}function E(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function w(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function C(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new w(r,t,n,null,e.context)}function I(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new w((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;i=null;var r=(t.tokenize||O)(e,t);if("comment"==r)return r;if(null==n.align&&(n.align=!0),";"!=i&&":"!=i&&","!=i||"statement"!=n.type)if("{"==i)C(t,e.column(),"}");else if("["==i)C(t,e.column(),"]");else if("("==i)C(t,e.column(),")");else if("}"==i){for(;"statement"==n.type;)n=I(t);for("}"==n.type&&(n=I(t));"statement"==n.type;)n=I(t)}else i==n.type?I(t):s&&(("}"==n.type||"top"==n.type)&&";"!=i||"statement"==n.type&&"newstatement"==i)&&C(t,e.column(),"statement");else I(t);return t.startOfLine=!1,r},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),function(e,t){"string"==typeof e&&(e=[e]);var n=[];function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&n.push(t)}r(t.keywords),r(t.builtin),r(t.timerOps),r(t.portOps),n.length&&(t.helperType=e[0],o.registerHelper("hintWords",e[0],n));for(var i=0;i<e.length;++i)o.defineMIME(e[i],t)}(["text/x-ttcn","text/x-ttcn3","text/x-ttcnpp"],{name:"ttcn",keywords:e("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),builtin:e("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),types:e("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),timerOps:e("read running start stop timeout"),portOps:e("call catch check clear getcall getreply halt raise receive reply send trigger"),configOps:e("create connect disconnect done kill killed map unmap"),verdictOps:e("getverdict setverdict"),sutOps:e("action"),functionOps:e("apply derefers refers"),verdictConsts:e("error fail inconc none pass"),booleanConsts:e("true false"),otherConsts:e("null NULL omit"),visibilityModifiers:e("private public friend"),templateMatch:e("complement ifpresent subset superset permutation"),multiLineStrings:!0})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("turtle",function(t){var i,c=t.indentUnit;function e(t){return new RegExp("^(?:"+t.join("|")+")$","i")}e([]);var l=e(["@prefix","@base","a"]),u=/[*+\-<>=&|]/;function a(t,e){var r,n=t.next();if(i=null,"<"!=n||t.match(/^[\s\u00a0=]/,!1)){if('"'==n||"'"==n)return e.tokenize=(r=n,function(t,e){for(var n,o=!1;null!=(n=t.next());){if(n==r&&!o){e.tokenize=a;break}o=!o&&"\\"==n}return"string"}),e.tokenize(t,e);if(/[{}\(\),\.;\[\]]/.test(n))return i=n,null;if("#"==n)return t.skipToEnd(),"comment";if(u.test(n))return t.eatWhile(u),null;if(":"==n)return"operator";if(t.eatWhile(/[_\w\d]/),":"==t.peek())return"variable-3";var o=t.current();return l.test(o)?"meta":"A"<=n&&n<="Z"?"comment":"keyword"}return t.match(/^[^\s\u00a0>]*>?/),"atom"}function o(t,e,n){t.context={prev:t.context,indent:t.indent,col:n,type:e}}function r(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:a,context:null,indent:0,col:0}},token:function(t,e){if(t.sol()&&(e.context&&null==e.context.align&&(e.context.align=!1),e.indent=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);if("comment"!=n&&e.context&&null==e.context.align&&"pattern"!=e.context.type&&(e.context.align=!0),"("==i)o(e,")",t.column());else if("["==i)o(e,"]",t.column());else if("{"==i)o(e,"}",t.column());else if(/[\]\}\)]/.test(i)){for(;e.context&&"pattern"==e.context.type;)r(e);e.context&&i==e.context.type&&r(e)}else"."==i&&e.context&&"pattern"==e.context.type?r(e):/atom|string|variable/.test(n)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",t.column()):"pattern"!=e.context.type||e.context.align||(e.context.align=!0,e.context.col=t.column()));return n},indent:function(t,e){var n=e&&e.charAt(0),o=t.context;if(/[\]\}]/.test(n))for(;o&&"pattern"==o.type;)o=o.prev;var r=o&&n==o.type;return o?"pattern"==o.type?o.col:o.align?o.col+(r?0:1):o.indent+(r?0:c):0},lineComment:"#"}}),t.defineMIME("text/turtle","turtle")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(i){"use strict";i.defineMode("twig:inner",function(){var i=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],r=/^[+\-*&%=<>!?|~^]/,o=/^[:\[\(\{]/,a=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],d=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return i=new RegExp("(("+i.join(")|(")+"))\\b"),a=new RegExp("(("+a.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(e,t){return function(e,t){var n=e.peek();if(t.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),t.incomment=!1):e.skipToEnd(),"comment";if(t.intag){if(t.operator){if(t.operator=!1,e.match(a))return"atom";if(e.match(d))return"number"}if(t.sign){if(t.sign=!1,e.match(a))return"atom";if(e.match(d))return"number"}if(t.instring)return n==t.instring&&(t.instring=!1),e.next(),"string";if("'"==n||'"'==n)return t.instring=n,e.next(),"string";if(e.match(t.intag+"}")||e.eat("-")&&e.match(t.intag+"}"))return t.intag=!1,"tag";if(e.match(r))return t.operator=!0,"operator";if(e.match(o))t.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(i))return"keyword";if(e.match(a))return"atom";if(e.match(d))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return t.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),t.incomment=!1):e.skipToEnd(),"comment";if(n=e.eat(/\{|%/))return"{"==(t.intag=n)&&(t.intag="}"),e.eat("-"),"tag"}e.next()}(e,t)}}}),i.defineMode("twig",function(e,t){var n=i.getMode(e,"twig:inner");return t&&t.base?i.multiplexingMode(i.getMode(e,t.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:n,parseDelimiters:!0}):n}),i.defineMIME("text/x-twig","twig")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(R){"use strict";R.defineMode("vb",function(r,c){var d="error";function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var u=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),s=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),l=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),m=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),f=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),h=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),t=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],n=["else","elseif","case","catch","finally"],i=["next","loop"],o=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],p=e(o),a=["#const","#else","#elseif","#end","#if","#region","addhandler","addressof","alias","as","byref","byval","cbool","cbyte","cchar","cdate","cdbl","cdec","cint","clng","cobj","compare","const","continue","csbyte","cshort","csng","cstr","cuint","culng","cushort","declare","default","delegate","dim","directcast","each","erase","error","event","exit","explicit","false","for","friend","gettype","goto","handles","implements","imports","infer","inherits","interface","isfalse","istrue","lib","me","mod","mustinherit","mustoverride","my","mybase","myclass","namespace","narrowing","new","nothing","notinheritable","notoverridable","of","off","on","operator","option","optional","out","overloads","overridable","overrides","paramarray","partial","private","protected","public","raiseevent","readonly","redim","removehandler","resume","return","shadows","shared","static","step","stop","strict","then","throw","to","true","trycast","typeof","until","until","when","widening","withevents","writeonly"],b=["object","boolean","char","string","byte","sbyte","short","ushort","int16","uint16","integer","uinteger","int32","uint32","long","ulong","int64","uint64","decimal","single","double","float","date","datetime","intptr","uintptr"],g=e(a),y=e(b),v='"',w=e(t),k=e(n),x=e(i),I=e(["end"]),E=e(["do"]);function L(e,t){t.currentIndent++}function z(e,t){t.currentIndent--}function C(e,t){if(e.eatSpace())return null;var n,r,i;if("'"===e.peek())return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var o=!1;if(e.match(/^\d*\.\d+F?/i)?o=!0:e.match(/^\d+\.\d*F?/)?o=!0:e.match(/^\.\d+F?/)&&(o=!0),o)return e.eat(/J/i),"number";var a=!1;if(e.match(/^&H[0-9a-f]+/i)?a=!0:e.match(/^&O[0-7]+/i)?a=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),a=!0):e.match(/^0(?![\dx])/i)&&(a=!0),a)return e.eat(/L/i),"number"}return e.match(v)?(t.tokenize=(n=e.current(),r=1==n.length,i="string",function(e,t){for(;!e.eol();){if(e.eatWhile(/[^'"]/),e.match(n))return t.tokenize=C,i;e.eat(/['"]/)}if(r){if(c.singleLineStringErrors)return d;t.tokenize=C}return i}),t.tokenize(e,t)):e.match(f)||e.match(m)?null:e.match(l)||e.match(u)||e.match(p)?"operator":e.match(s)?null:e.match(E)?(L(0,t),t.doInCurrentLine=!0,"keyword"):e.match(w)?(t.doInCurrentLine?t.doInCurrentLine=!1:L(0,t),"keyword"):e.match(k)?"keyword":e.match(I)?(z(0,t),z(0,t),"keyword"):e.match(x)?(z(0,t),"keyword"):e.match(y)?"keyword":e.match(g)?"keyword":e.match(h)?"variable":(e.next(),d)}return R.registerHelper("hintWords","vb",t.concat(n).concat(i).concat(o).concat(a).concat(b)),{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:C,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=function(e,t){var n=t.tokenize(e,t),r=e.current();if("."===r)return"variable"===(n=t.tokenize(e,t))?"variable":d;var i="[({".indexOf(r);return-1!==i&&L(0,t),-1!==(i="])}".indexOf(r))&&z(0,t)?d:n}(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e,t){var n=t.replace(/^\s+|\s+$/g,"");return n.match(x)||n.match(I)||n.match(k)?r.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.indentUnit},lineComment:"'"}}),R.defineMIME("text/x-vb","vb")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("vbscript",function(n,o){var c="error";function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var b=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),s=new RegExp("^((<>)|(<=)|(>=))"),l=new RegExp("^[\\.,]"),u=new RegExp("^[\\(\\)]"),d=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),v=e(["and","or","not","xor","is","mod","eqv","imp"]),t=["WScript","err","debug","RegExp"],m=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"].concat(["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"]);t=t.concat(["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"]),n.isASP&&(t=t.concat(["server","response","request","session","application"]),m=m.concat(["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"]));var p=e(["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"]),f=e(["true","false","nothing","empty","null"]),h=e(["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"]),y=e(t),g=e(m),x='"',k=e(["class","sub","select","while","if","function","property","with","for"]),w=e(["else","elseif","case"]),I=e(["next","loop","wend"]),C=e(["end"]),L=e(["do"]),E=e(["on error resume next","exit"]),D=e(["rem"]);function S(e,t){t.currentIndent++}function T(e,t){t.currentIndent--}function j(e,t){if(e.eatSpace())return"space";var r,n;if("'"===e.peek())return e.skipToEnd(),"comment";if(e.match(D))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var a=!1;if(e.match(/^\d*\.\d+/i)?a=!0:e.match(/^\d+\.\d*/)?a=!0:e.match(/^\.\d+/)&&(a=!0),a)return e.eat(/J/i),"number";var i=!1;if(e.match(/^&H[0-9a-f]+/i)?i=!0:e.match(/^&O[0-7]+/i)?i=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),i=!0):e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}return e.match(x)?(t.tokenize=(r=e.current(),n=1==r.length,function(e,t){for(;!e.eol();){if(e.eatWhile(/[^'"]/),e.match(r))return t.tokenize=j,"string";e.eat(/['"]/)}if(n){if(o.singleLineStringErrors)return c;t.tokenize=j}return"string"}),t.tokenize(e,t)):e.match(s)||e.match(b)||e.match(v)?"operator":e.match(l)?null:e.match(u)?"bracket":e.match(E)?(t.doInCurrentLine=!0,"keyword"):e.match(L)?(S(0,t),t.doInCurrentLine=!0,"keyword"):e.match(k)?(t.doInCurrentLine?t.doInCurrentLine=!1:S(0,t),"keyword"):e.match(w)?"keyword":e.match(C)?(T(0,t),T(0,t),"keyword"):e.match(I)?(t.doInCurrentLine?t.doInCurrentLine=!1:T(0,t),"keyword"):e.match(p)?"keyword":e.match(f)?"atom":e.match(g)?"variable-2":e.match(h)?"builtin":e.match(y)?"variable-2":e.match(d)?"variable":(e.next(),c)}return{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:j,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var r,n,a,i,o=(r=e,a=(n=t).tokenize(r,n),"."===(i=r.current())?(a=n.tokenize(r,n),i=r.current(),!a||"variable"!==a.substr(0,8)&&"builtin"!==a&&"keyword"!==a?c:("builtin"!==a&&"keyword"!==a||(a="variable"),-1<m.indexOf(i.substr(1))&&(a="variable-2"),a)):a);return t.lastToken={style:o,content:e.current()},"space"===o&&(o=null),o},indent:function(e,t){var r=t.replace(/^\s+|\s+$/g,"");return r.match(I)||r.match(C)||r.match(w)?n.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*n.indentUnit}}}),e.defineMIME("text/vbscript","vbscript")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("velocity",function(){function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var a=e("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),o=e("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),s=e("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),l=/[+\-*&%=<>!?:\/|]/;function u(e,t,n){return(t.tokenize=n)(e,t)}function f(e,t){var n=t.beforeParams;t.beforeParams=!1;var r=e.next();if("'"==r&&!t.inString&&t.inParams)return t.lastTokenWasBuiltin=!1,u(e,t,c(r));if('"'==r)return t.lastTokenWasBuiltin=!1,t.inString?(t.inString=!1,"string"):t.inParams?u(e,t,c(r)):void 0;if(/[\[\]{}\(\),;\.]/.test(r))return"("==r&&n?t.inParams=!0:")"==r&&(t.inParams=!1,t.lastTokenWasBuiltin=!0),null;if(/\d/.test(r))return t.lastTokenWasBuiltin=!1,e.eatWhile(/[\w\.]/),"number";if("#"==r&&e.eat("*"))return t.lastTokenWasBuiltin=!1,u(e,t,k);if("#"==r&&e.match(/ *\[ *\[/))return t.lastTokenWasBuiltin=!1,u(e,t,m);if("#"==r&&e.eat("#"))return t.lastTokenWasBuiltin=!1,e.skipToEnd(),"comment";if("$"==r)return e.eatWhile(/[\w\d\$_\.{}-]/),s&&s.propertyIsEnumerable(e.current())?"keyword":(t.lastTokenWasBuiltin=!0,t.beforeParams=!0,"builtin");if(l.test(r))return t.lastTokenWasBuiltin=!1,e.eatWhile(l),"operator";e.eatWhile(/[\w\$_{}@]/);var i=e.current();return a&&a.propertyIsEnumerable(i)?"keyword":o&&o.propertyIsEnumerable(i)||e.current().match(/^#@?[a-z0-9_]+ *$/i)&&"("==e.peek()&&(!o||!o.propertyIsEnumerable(i.toLowerCase()))?(t.beforeParams=!0,t.lastTokenWasBuiltin=!1,"keyword"):t.inString?(t.lastTokenWasBuiltin=!1,"string"):e.pos>i.length&&"."==e.string.charAt(e.pos-i.length-1)&&t.lastTokenWasBuiltin?"builtin":(t.lastTokenWasBuiltin=!1,null)}function c(a){return function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==a&&!r){i=!0;break}if('"'==a&&"$"==e.peek()&&!r){i=t.inString=!0;break}r=!r&&"\\"==n}return i&&(t.tokenize=f),"string"}}function k(e,t){for(var n,r=!1;n=e.next();){if("#"==n&&r){t.tokenize=f;break}r="*"==n}return"comment"}function m(e,t){for(var n,r=0;n=e.next();){if("#"==n&&2==r){t.tokenize=f;break}"]"==n?r++:" "!=n&&(r=0)}return"meta"}return{startState:function(){return{tokenize:f,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}}),e.defineMIME("text/velocity","velocity")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(A){"use strict";A.defineMode("verilog",function(e,t){var l=e.indentUnit,s=t.statementIndentUnit||l,c=t.dontAlignCalls,n=t.noIndentKeywords||[],o=t.multiLineStrings,d=t.hooks||{};function i(e){for(var t={},n=e.split(" "),i=0;i<n.length;++i)t[n[i]]=!0;return t}var u,f,m=i("accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor"),p=/[\+\-\*\/!~&|^%=?:]/,v=/[\[\]{}()]/,g=/\d[0-9_]*/,h=/\d*\s*'s?d\s*\d[0-9_]*/i,y=/\d*\s*'s?b\s*[xz01][xz01_]*/i,k=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,b=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,w=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,x=/^((\w+)|[)}\]])/,_=/[)}\]]/,r=i("case checker class clocking config function generate interface module package primitive program property specify sequence table task"),I={};for(var a in r)I[a]="end"+a;for(var z in I.begin="end",I.casex="endcase",I.casez="endcase",I.do="while",I.fork="join;join_any;join_none",I.covergroup="endgroup",n){a=n[z];I[a]&&(I[a]=void 0)}var C=i("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while");function S(e,t){var n,a,i=e.peek();if(d[i]&&0!=(n=d[i](e,t)))return n;if(d.tokenBase&&0!=(n=d.tokenBase(e,t)))return n;if(/[,;:\.]/.test(i))return u=e.next(),null;if(v.test(i))return u=e.next(),"bracket";if("`"==i)return e.next(),e.eatWhile(/[\w\$_]/)?"def":null;if("$"==i)return e.next(),e.eatWhile(/[\w\$_]/)?"meta":null;if("#"==i)return e.next(),e.eatWhile(/[\d_.]/),"def";if('"'==i)return e.next(),t.tokenize=(a=i,function(e,t){for(var n,i=!1,r=!1;null!=(n=e.next());){if(n==a&&!i){r=!0;break}i=!i&&"\\"==n}return(r||!i&&!o)&&(t.tokenize=S),"string"}),t.tokenize(e,t);if("/"==i){if(e.next(),e.eat("*"))return(t.tokenize=j)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}if(e.match(w)||e.match(h)||e.match(y)||e.match(k)||e.match(b)||e.match(g)||e.match(w))return"number";if(e.eatWhile(p))return"meta";if(e.eatWhile(/[\w\$_]/)){var r=e.current();return m[r]?(I[r]&&(u="newblock"),C[r]&&(u="newstatement"),f=r,"keyword"):"variable"}return e.next(),null}function j(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=S;break}i="*"==n}return"comment"}function E(e,t,n,i,r){this.indented=e,this.column=t,this.type=n,this.align=i,this.prev=r}function M(e,t,n){var i=new E(e.indented,t,n,null,e.context);return e.context=i}function $(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function q(e,t){if(e==t)return!0;var n=t.split(";");for(var i in n)if(e==n[i])return!0;return!1}return{electricInput:function(){var e=[];for(var t in I)if(I[t]){var n=I[t].split(";");for(var i in n)e.push(n[i])}return new RegExp("[{}()\\[\\]]|("+e.join("|")+")$")}(),startState:function(e){var t={tokenize:null,context:new E((e||0)-l,0,"top",!1),indented:0,startOfLine:!0};return d.startState&&d.startState(t),t},token:function(e,t){var n,i=t.context;if((e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),d.token)&&void 0!==(n=d.token(e,t)))return n;if(e.eatSpace())return null;if(f=u=null,"comment"==(n=(t.tokenize||S)(e,t))||"meta"==n||"variable"==n)return n;if(null==i.align&&(i.align=!0),u==i.type)$(t);else if(";"==u&&"statement"==i.type||i.type&&q(f,i.type))for(i=$(t);i&&"statement"==i.type;)i=$(t);else if("{"==u)M(t,e.column(),"}");else if("["==u)M(t,e.column(),"]");else if("("==u)M(t,e.column(),")");else if(i&&"endcase"==i.type&&":"==u)M(t,e.column(),"statement");else if("newstatement"==u)M(t,e.column(),"statement");else if("newblock"==u)if("function"!=f||!i||"statement"!=i.type&&"endgroup"!=i.type)if("task"==f&&i&&"statement"==i.type);else{var r=I[f];M(t,e.column(),r)}else;return t.startOfLine=!1,n},indent:function(e,t){if(e.tokenize!=S&&null!=e.tokenize)return A.Pass;if(d.indent){var n=d.indent(e);if(0<=n)return n}var i=e.context,r=t&&t.charAt(0);"statement"==i.type&&"}"==r&&(i=i.prev);var a=!1,o=t.match(x);return o&&(a=q(o[0],i.type)),"statement"==i.type?i.indented+("{"==r?0:s):_.test(i.type)&&i.align&&!c?i.column+(a?0:1):")"!=i.type||a?i.indented+(a?0:l):i.indented+s},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),A.defineMIME("text/x-verilog",{name:"verilog"}),A.defineMIME("text/x-systemverilog",{name:"verilog"});var p={"|":"link",">":"property",$:"variable",$$:"variable","?$":"qualifier","?*":"qualifier","-":"hr","/":"property","/-":"property","@":"variable-3","@-":"variable-3","@++":"variable-3","@+=":"variable-3","@+=-":"variable-3","@--":"variable-3","@-=":"variable-3","%+":"tag","%-":"tag","%":"tag",">>":"tag","<<":"tag","<>":"tag","#":"tag","^":"attribute","^^":"attribute","^!":"attribute","*":"variable-2","**":"variable-2","\\":"keyword",'"':"comment"},v={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},g=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,h=/^[! ]  /,y=/^[! ] */,k=/^\/[\/\*]/;function b(e,t,n){var i=t/3;return"tlv-"+e.tlvIndentationStyle[i]+"-"+n}A.defineMIME("text/x-tlv",{name:"verilog",hooks:{electricInput:!1,token:function(e,t){var n,i=void 0;if(e.sol()&&!t.tlvInBlockComment){"\\"==e.peek()&&(i="def",e.skipToEnd(),e.string.match(/\\SV/)?t.tlvCodeActive=!1:e.string.match(/\\TLV/)&&(t.tlvCodeActive=!0)),t.tlvCodeActive&&0==e.pos&&0==t.indented&&(d=e.match(y,!1))&&(t.indented=d[0].length);var r=t.indented,a=r/3;if(a<=t.tlvIndentationStyle.length){var o=e.string.length==r,l=3*a;if(l<e.string.length){var s=e.string.slice(l),c=s[0];v[c]&&(d=s.match(g))&&p[d[1]]&&(r+=3,"\\"==c&&0<l||(t.tlvIndentationStyle[a]=v[c],a++))}if(!o)for(;t.tlvIndentationStyle.length>a;)t.tlvIndentationStyle.pop()}t.tlvNextIndent=r}if(t.tlvCodeActive){var d,u=!1;if(void 0!==i)i+=" "+b(t,0,"scope-ident");else if(e.pos/3<t.tlvIndentationStyle.length&&(d=e.match(e.sol()?h:/^   /)))i="tlv-indent-"+(e.pos%2==0?"even":"odd")+" "+b(t,e.pos-3,"indent"),"!"==d[0].charAt(0)&&(i+=" tlv-alert-line-prefix"),(n=e.match(g,!1))&&0<n[2].length&&(i+=" "+b(t,e.pos,"before-scope-ident"));else if(t.tlvInBlockComment)e.match(/^.*?\*\//)?t.tlvInBlockComment=!1:e.skipToEnd(),i="comment";else if((d=e.match(k))&&!t.tlvInBlockComment)"//"==d[0]?e.skipToEnd():t.tlvInBlockComment=!0,i="comment";else if(d=e.match(g)){var f=d[1],m=d[2];p.hasOwnProperty(f)&&(0<m.length||e.eol())?(i=p[f],e.column()==t.indented&&(i+=" "+b(t,e.column(),"scope-ident"))):(e.backUp(e.current().length-1),i="tlv-default")}else i=e.match(/^\t+/)?"tlv-tab":e.match(/^[\[\]{}\(\);\:]+/)?"meta":(d=e.match(/^[mM]4([\+_])?[\w\d_]*/))?"+"==d[1]?"tlv-m4-plus":"tlv-m4":e.match(/^ +/)?e.eol()?"error":"tlv-default":e.match(/^[\w\d_]+/)?"number":(e.next(),"tlv-default");u&&(i+=" tlv-statement")}else e.match(/^[mM]4([\w\d_]*)/)&&(i="tlv-m4");return i},indent:function(e){return 1==e.tlvCodeActive?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[],e.tlvCodeActive=!0,e.tlvNextIndent=-1,e.tlvInBlockComment=!1}}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){for(var t={},n=e.split(","),r=0;r<n.length;++r){var i=n[r].toUpperCase(),o=n[r].charAt(0).toUpperCase()+n[r].slice(1);t[n[r]]=!0,t[i]=!0,t[o]=!0}return t}function y(e){return e.eatWhile(/[\w\$_]/),"meta"}e.defineMode("vhdl",function(e,t){var l,o=e.indentUnit,u=t.atoms||n("null"),s=t.hooks||{"`":y,$:y},c=t.multiLineStrings,f=n("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"),d=n("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),p=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/;function m(e,t){var o,a,n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}if('"'==n)return t.tokenize=(o=n,function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==o&&!r){i=!0;break}r=!r&&"--"==n}return(i||!r&&!c)&&(t.tokenize=m),"string-2"}),t.tokenize(e,t);if("'"==n)return t.tokenize=(a=n,function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==a&&!r){i=!0;break}r=!r&&"--"==n}return(i||!r&&!c)&&(t.tokenize=m),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return l=n,null;if(/[\d']/.test(n))return e.eatWhile(/[\w\.']/),"number";if("-"==n&&e.eat("-"))return e.skipToEnd(),"comment";if(p.test(n))return e.eatWhile(p),"operator";e.eatWhile(/[\w\$_]/);var i=e.current();return f.propertyIsEnumerable(i.toLowerCase())?(d.propertyIsEnumerable(i)&&(l="newstatement"),"keyword"):u.propertyIsEnumerable(i)?"atom":"variable"}function r(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function i(e,t,n){return e.context=new r(e.indented,t,n,null,e.context)}function a(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new r((e||0)-o,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;l=null;var r=(t.tokenize||m)(e,t);if("comment"==r||"meta"==r)return r;if(null==n.align&&(n.align=!0),";"!=l&&":"!=l||"statement"!=n.type)if("{"==l)i(t,e.column(),"}");else if("["==l)i(t,e.column(),"]");else if("("==l)i(t,e.column(),")");else if("}"==l){for(;"statement"==n.type;)n=a(t);for("}"==n.type&&(n=a(t));"statement"==n.type;)n=a(t)}else l==n.type?a(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==l)&&i(t,e.column(),"statement");else a(t);return t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=m&&null!=e.tokenize)return 0;var n=t&&t.charAt(0),r=e.context,i=n==r.type;return"statement"==r.type?r.indented+("{"==n?0:o):r.align?r.column+(i?0:1):r.indented+(i?0:o)},electricChars:"{}"}}),e.defineMIME("text/x-vhdl","vhdl")});;
  ;!function(e){"use strict";"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/overlay"),require("../xml/xml"),require("../javascript/javascript"),require("../coffeescript/coffeescript"),require("../css/css"),require("../sass/sass"),require("../stylus/stylus"),require("../pug/pug"),require("../handlebars/handlebars")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],e):e(CodeMirror)}(function(t){var s={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};t.defineMode("vue-template",function(e,s){return t.overlayMode(t.getMode(e,s.backdrop||"text/html"),{token:function(e){if(e.match(/^\{\{.*?\}\}/))return"meta mustache";for(;e.next()&&!e.match("{{",!1););return null}})}),t.defineMode("vue",function(e){return t.getMode(e,{name:"htmlmixed",tags:s})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),t.defineMIME("script/x-vue","vue"),t.defineMIME("text/x-vue","vue")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var r=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],a=t(r),n=["unsigned","short","long","unrestricted","float","double","boolean","byte","octet","Promise","ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","ByteString","DOMString","USVString","sequence","object","RegExp","Error","DOMException","FrozenArray","any","void"],i=t(n),o=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],c=t(o),l=["true","false","Infinity","NaN","null"],m=t(l);e.registerHelper("hintWords","webidl",r.concat(n).concat(o).concat(l));var f=t(["callback","dictionary","enum","interface"]),u=t(["typedef"]),s=/^[:<=>?]/,d=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,b=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,y=/^_?[A-Za-z][0-9A-Z_a-z-]*/,p=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,h=/^"[^"]*"/,A=/^\/\*.*?\*\//,g=/^\/\*.*/,k=/^.*?\*\//;e.defineMode("webidl",function(){return{startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(e,t){var r=function(e,t){if(e.eatSpace())return null;if(t.inComment)return e.match(k)?t.inComment=!1:e.skipToEnd(),"comment";if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(A))return"comment";if(e.match(g))return t.inComment=!0,"comment";if(e.match(/^-?[0-9\.]/,!1)&&(e.match(d)||e.match(b)))return"number";if(e.match(h))return"string";if(t.startDef&&e.match(y))return"def";if(t.endDef&&e.match(p))return t.endDef=!1,"def";if(e.match(c))return"keyword";if(e.match(i)){var r=t.lastToken,n=(e.match(/^\s*(.+?)\b/,!1)||[])[1];return":"===r||"implements"===r||"implements"===n||"="===n?"builtin":"variable-3"}return e.match(a)?"builtin":e.match(m)?"atom":e.match(y)?"variable":e.match(s)?"operator":(e.next(),null)}(e,t);if(r){var n=e.current();t.lastToken=n,"keyword"===r?(t.startDef=f.test(n),t.endDef=t.endDef||u.test(n)):t.startDef=!1}return r}}}),e.defineMIME("text/x-webidl","webidl")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("xquery",function(){var p=function(){function e(e){return{type:e,style:"keyword"}}for(var t=e("operator"),n={type:"atom",style:"atom"},r={type:"axis_specifier",style:"qualifier"},i={",":{type:"punctuation",style:null}},a=["after","all","allowing","ancestor","ancestor-or-self","any","array","as","ascending","at","attribute","base-uri","before","boundary-space","by","case","cast","castable","catch","child","collation","comment","construction","contains","content","context","copy","copy-namespaces","count","decimal-format","declare","default","delete","descendant","descendant-or-self","descending","diacritics","different","distance","document","document-node","element","else","empty","empty-sequence","encoding","end","entire","every","exactly","except","external","first","following","following-sibling","for","from","ftand","ftnot","ft-option","ftor","function","fuzzy","greatest","group","if","import","in","inherit","insensitive","insert","instance","intersect","into","invoke","is","item","language","last","lax","least","let","levels","lowercase","map","modify","module","most","namespace","next","no","node","nodes","no-inherit","no-preserve","not","occurs","of","only","option","order","ordered","ordering","paragraph","paragraphs","parent","phrase","preceding","preceding-sibling","preserve","previous","processing-instruction","relationship","rename","replace","return","revalidation","same","satisfies","schema","schema-attribute","schema-element","score","self","sensitive","sentence","sentences","sequence","skip","sliding","some","stable","start","stemming","stop","strict","strip","switch","text","then","thesaurus","times","to","transform","treat","try","tumbling","type","typeswitch","union","unordered","update","updating","uppercase","using","validate","value","variable","version","weight","when","where","wildcards","window","with","without","word","words","xquery"],o=0,s=a.length;o<s;o++)i[a[o]]=e(a[o]);var c=["xs:anyAtomicType","xs:anySimpleType","xs:anyType","xs:anyURI","xs:base64Binary","xs:boolean","xs:byte","xs:date","xs:dateTime","xs:dateTimeStamp","xs:dayTimeDuration","xs:decimal","xs:double","xs:duration","xs:ENTITIES","xs:ENTITY","xs:float","xs:gDay","xs:gMonth","xs:gMonthDay","xs:gYear","xs:gYearMonth","xs:hexBinary","xs:ID","xs:IDREF","xs:IDREFS","xs:int","xs:integer","xs:item","xs:java","xs:language","xs:long","xs:Name","xs:NCName","xs:negativeInteger","xs:NMTOKEN","xs:NMTOKENS","xs:nonNegativeInteger","xs:nonPositiveInteger","xs:normalizedString","xs:NOTATION","xs:numeric","xs:positiveInteger","xs:precisionDecimal","xs:QName","xs:short","xs:string","xs:time","xs:token","xs:unsignedByte","xs:unsignedInt","xs:unsignedLong","xs:unsignedShort","xs:untyped","xs:untypedAtomic","xs:yearMonthDuration"];for(o=0,s=c.length;o<s;o++)i[c[o]]=n;var u=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(o=0,s=u.length;o<s;o++)i[u[o]]=t;var l=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"];for(o=0,s=l.length;o<s;o++)i[l[o]]=r;return i}();function x(e,t,n){return(t.tokenize=n)(e,t)}function g(e,t){var n,r,i,a=e.next(),o=!1,s='"'===(n=e).current()?n.match(/^[^\"]+\"\:/,!1):"'"===n.current()&&n.match(/^[^\"]+\'\:/,!1);if("<"==a){if(e.match("!--",!0))return x(e,t,b);if(e.match("![CDATA",!1))return t.tokenize=z,"tag";if(e.match("?",!1))return x(e,t,w);var c=e.eat("/");e.eatSpace();for(var u,l="";u=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)l+=u;return x(e,t,(r=l,i=c,function(e,t){return e.eatSpace(),i&&e.eat(">")?(S(t),t.tokenize=g):(e.eat("/")||N(t,{type:"tag",name:r,tokenize:g}),e.eat(">")?t.tokenize=g:t.tokenize=k),"tag"}))}if("{"==a)return N(t,{type:"codeblock"}),null;if("}"==a)return S(t),null;if(I(t))return">"==a?"tag":"/"==a&&e.eat(">")?(S(t),"tag"):"variable";if(/\d/.test(a))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if("("===a&&e.eat(":"))return N(t,{type:"comment"}),x(e,t,y);if(s||'"'!==a&&"'"!==a){if("$"===a)return x(e,t,v);if(":"===a&&e.eat("="))return"keyword";if("("===a)return N(t,{type:"paren"}),null;if(")"===a)return S(t),null;if("["===a)return N(t,{type:"bracket"}),null;if("]"===a)return S(t),null;var f=p.propertyIsEnumerable(a)&&p[a];if(s&&'"'===a)for(;'"'!==e.next(););if(s&&"'"===a)for(;"'"!==e.next(););f||e.eatWhile(/[\w\$_-]/);var m=e.eat(":");!e.eat(":")&&m&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(o=!0);var d=e.current();return f=p.propertyIsEnumerable(d)&&p[d],o&&!f&&(f={type:"function_call",style:"variable def"}),T(t,"xmlconstructor")?(S(t),"variable"):("element"!=d&&"attribute"!=d&&"axis_specifier"!=f.type||N(t,{type:"xmlconstructor"}),f?f.style:"variable")}return x(e,t,h(a))}function y(e,t){for(var n,r=!1,i=!1,a=0;n=e.next();){if(")"==n&&r){if(!(0<a)){S(t);break}a--}else":"==n&&i&&a++;r=":"==n,i="("==n}return"comment"}function h(r,i){return function(e,t){var n;if(T(t,"string")&&e.current()==r)return S(t),i&&(t.tokenize=i),"string";if(N(t,{type:"string",name:r,tokenize:h(r,i)}),e.match("{",!1)&&a(t))return t.tokenize=g,"string";for(;n=e.next();){if(n==r){S(t),i&&(t.tokenize=i);break}if(e.match("{",!1)&&a(t))return t.tokenize=g,"string"}return"string"}}function v(e,t){var n=/[\w\$_-]/;if(e.eat('"')){for(;'"'!==e.next(););e.eat(":")}else e.eatWhile(n),e.match(":=",!1)||e.eat(":");return e.eatWhile(n),t.tokenize=g,"variable"}function k(e,t){var n=e.next();return"/"==n&&e.eat(">")?(a(t)&&S(t),I(t)&&S(t),"tag"):">"==n?(a(t)&&S(t),"tag"):"="==n?null:'"'==n||"'"==n?x(e,t,h(n,k)):(a(t)||N(t,{type:"attribute",tokenize:k}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(S(t),t.tokenize=g),"attribute")}function b(e,t){for(var n;n=e.next();)if("-"==n&&e.match("->",!0))return t.tokenize=g,"comment"}function z(e,t){for(var n;n=e.next();)if("]"==n&&e.match("]",!0))return t.tokenize=g,"comment"}function w(e,t){for(var n;n=e.next();)if("?"==n&&e.match(">",!0))return t.tokenize=g,"comment meta"}function I(e){return T(e,"tag")}function a(e){return T(e,"attribute")}function T(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function N(e,t){e.stack.push(t)}function S(e){e.stack.pop();var t=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=t||g}return{startState:function(){return{tokenize:g,cc:[],stack:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(:",blockCommentEnd:":)"}}),e.defineMIME("application/xquery","xquery")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){"use strict";o.defineMode("yacas",function(r,e){var i=function(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),t="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",a=new RegExp("(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)"),c=new RegExp(t),u=new RegExp(t+"?_"+t),l=new RegExp(t+"\\s*\\(");function s(e,t){var n;if('"'===(n=e.next()))return t.tokenize=f,t.tokenize(e,t);if("/"===n){if(e.eat("*"))return t.tokenize=p,t.tokenize(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}e.backUp(1);var r=e.match(/^(\w+)\s*\(/,!1);null!==r&&i.hasOwnProperty(r[1])&&t.scopes.push("bodied");var o=m(t);if("bodied"===o&&"["===n&&t.scopes.pop(),"["!==n&&"{"!==n&&"("!==n||t.scopes.push(n),("["===(o=m(t))&&"]"===n||"{"===o&&"}"===n||"("===o&&")"===n)&&t.scopes.pop(),";"===n)for(;"bodied"===o;)t.scopes.pop(),o=m(t);return e.match(/\d+ *#/,!0,!1)?"qualifier":e.match(a,!0,!1)?"number":e.match(u,!0,!1)?"variable-3":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(l,!0,!1)?(e.backUp(1),"variable"):e.match(c,!0,!1)?"variable-2":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function f(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if('"'===n&&!o){r=!0;break}o=!o&&"\\"===n}return r&&!o&&(t.tokenize=s),"string"}function p(e,t){for(var n,r;null!=(r=e.next());){if("*"===n&&"/"===r){t.tokenize=s;break}n=r}return"comment"}function m(e){var t=null;return 0<e.scopes.length&&(t=e.scopes[e.scopes.length-1]),t}return{startState:function(){return{tokenize:s,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(e,t){if(e.tokenize!==s&&null!==e.tokenize)return o.Pass;var n=0;return"]"!==t&&"];"!==t&&"}"!==t&&"};"!==t&&");"!==t||(n=-1),(e.scopes.length+n)*r.indentUnit},electricChars:"{}[]();",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),o.defineMIME("text/x-yacas",{name:"yacas"})});;
  ;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../yaml/yaml")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../yaml/yaml"],t):t(CodeMirror)}(function(o){o.defineMode("yaml-frontmatter",function(t,e){var i=o.getMode(t,"yaml"),a=o.getMode(t,e&&e.base||"gfm");function n(t){return 2==t.state?a:i}return{startState:function(){return{state:0,inner:o.startState(i)}},copyState:function(t){return{state:t.state,inner:o.copyState(n(t),t.inner)}},token:function(t,e){if(0==e.state)return t.match(/---/,!1)?(e.state=1,i.token(t,e.inner)):(e.state=2,e.inner=o.startState(a),a.token(t,e.inner));if(1!=e.state)return a.token(t,e.inner);var n=t.sol()&&t.match(/---/,!1),r=i.token(t,e.inner);return n&&(e.state=2,e.inner=o.startState(a)),r},innerMode:function(t){return{mode:n(t),state:t.inner}},blankLine:function(t){var e=n(t);if(e.blankLine)return e.blankLine(t.inner)}}})});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("yaml",function(){var n=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(e,i){var t=e.peek(),r=i.escaped;if(i.escaped=!1,"#"==t&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(i.literal&&e.indentation()>i.keyCol)return e.skipToEnd(),"string";if(i.literal&&(i.literal=!1),e.sol()){if(i.keyCol=0,i.pair=!1,i.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==t?i.inlinePairs++:"}"==t?i.inlinePairs--:"["==t?i.inlineList++:i.inlineList--,"meta";if(0<i.inlineList&&!r&&","==t)return e.next(),"meta";if(0<i.inlinePairs&&!r&&","==t)return i.keyCol=0,i.pair=!1,i.pairStart=!1,e.next(),"meta";if(i.pairStart){if(e.match(/^\s*(\||\>)\s*/))return i.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==i.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(0<i.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(n))return"keyword"}return!i.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(i.pair=!0,i.keyCol=e.indentation(),"atom"):i.pair&&e.match(/^:\s*/)?(i.pairStart=!0,"meta"):(i.pairStart=!1,i.escaped="\\"==t,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")});;
  ;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("z80",function(e,t){var i,n,l=t.ez80;n=l?(i=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(i=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var o=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,c=/^(n?[zc]|p[oe]?|m)\b/i,a=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,d=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{startState:function(){return{context:0}},token:function(e,t){if(e.column()||(t.context=0),e.eatSpace())return null;var r;if(e.eatWhile(/\w/)){if(l&&e.eat(".")&&e.eatWhile(/\w/),r=e.current(),!e.indentation())return e.match(d)?"number":null;if((1==t.context||4==t.context)&&o.test(r))return t.context=4,"var2";if(2==t.context&&c.test(r))return t.context=4,"var3";if(i.test(r))return t.context=1,"keyword";if(n.test(r))return t.context=2,"keyword";if(4==t.context&&d.test(r))return"number";if(a.test(r))return"error"}else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(r=e.next())&&'"'!=r;)"\\"==r&&e.next();return"string"}if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(t.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}),e.defineMIME("text/x-z80","z80"),e.defineMIME("text/x-ez80",{name:"z80",ez80:!0})});