var CodeMirror=function(){function a(d,e){function Xb(a){return a>=0&&a=c.to||b.linee-400&&_(zb.pos,d))return C(a),setTimeout(Fc,20),ad(d.line);if(yb&&yb.time>e-400&&_(yb.pos,d))return zb={time:e,pos:d},C(a),_c(d);yb={time:e,pos:d};var g=d,h;if(f.dragDrop&&T&&!f.readOnly&&!_(wb.from,wb.to)&&!ab(d,wb.from)&&!ab(wb.to,d)){P&&(db.draggable=!0);function i(b){P&&(db.draggable=!1),Bb=!1,j(),k(),Math.abs(a.clientX-b.clientX)+Math.abs(a.clientY-b.clientY)<10&&(C(b),Tc(d.line,d.ch,!0),Fc())}var j=I(document,"mouseup",Vd(i),!0),k=I(R,"drop",Vd(i),!0);Bb=!0,db.dragDrop&&db.dragDrop();return}C(a),Tc(d.line,d.ch,!0);var n=I(document,"mousemove",Vd(function(a){clearTimeout(h),C(a),!M&&!G(a)?m(a):l(a)}),!0),j=I(document,"mouseup",Vd(m),!0)}function cc(a){for(var b=F(a);b!=s;b=b.parentNode)if(b.parentNode==cb)return C(a);var c=Id(a);if(!c)return;zb={time:+(new Date),pos:c},C(a),_c(c)}function dc(a){if(f.onDragEvent&&f.onDragEvent(Yb,B(a)))return;a.preventDefault();var b=Id(a,!0),c=a.dataTransfer.files;if(!b||f.readOnly)return;if(c&&c.length&&window.FileReader&&window.File){function d(a,c){var d=new FileReader;d.onload=function(){g[c]=d.result,++h==e&&(b=Vc(b),Vd(function(){var a=uc(g.join(""),b,b);Qc(b,a)})())},d.readAsText(a)}var e=c.length,g=Array(e),h=0;for(var i=0;i-1&&setTimeout(Vd(function(){cd(wb.to.line,"smart")}),75);if(hc(a,d))return;Bc()}function mc(a){if(f.onKeyEvent&&f.onKeyEvent(Yb,B(a)))return;H(a,"keyCode")==16&&(xb=null)}function nc(){if(f.readOnly=="nocursor")return;vb||(f.onFocus&&f.onFocus(Yb),vb=!0,s.className.search(/\bCodeMirror-focused\b/)==-1&&(s.className+=" CodeMirror-focused"),Jb||Ec(!0)),Ac(),Kd()}function oc(){vb&&(f.onBlur&&f.onBlur(Yb),vb=!1,Qb&&Vd(function(){Qb&&(Qb(),Qb=null)})(),s.className=s.className.replace(" CodeMirror-focused","")),clearInterval(rb),setTimeout(function(){vb||(xb=null)},150)}function pc(a,b,c,d,e){if(Db)return;if(Ub){var g=[];tb.iter(a.line,b.line+1,function(a){g.push(a.text)}),Ub.addChange(a.line,c.length,g);while(Ub.done.length>f.undoDepth)Ub.done.shift()}tc(a,b,c,d,e)}function qc(a,b){if(!a.length)return;var c=a.pop(),d=[];for(var e=c.length-1;e>=0;e-=1){var f=c[e],g=[],h=f.start+f.added;tb.iter(f.start,h,function(a){g.push(a.text)}),d.push({start:f.start,added:f.old.length,old:g});var i=Vc({line:f.start+f.old.length-1,ch:eb(g[g.length-1],f.old[f.old.length-1])});tc({line:f.start,ch:0},{line:h-1,ch:Zb(h-1).text.length},f.old,i,i)}Eb=!0,b.push(d)}function rc(){qc(Ub.done,Ub.undone)}function sc(){qc(Ub.undone,Ub.done)}function tc(a,b,c,d,e){function y(a){return a<=Math.min(b.line,b.line+s)?a:a+s}if(Db)return;var g=!1,h=Rb.length;f.lineWrapping||tb.iter(a.line,b.line+1,function(a){if(a.text.length==h)return g=!0,!0});if(a.line!=b.line||c.length>1)Kb=!0;var i=b.line-a.line,j=Zb(a.line),k=Zb(b.line);if(a.ch==0&&b.ch==0&&c[c.length-1]==""){var l=[],m=null;a.line?(m=Zb(a.line-1),m.fixMarkEnds(k)):k.fixMarkStarts();for(var n=0,o=c.length-1;n1&&tb.remove(a.line+1,i-1,Lb),tb.insert(a.line+1,l)}if(f.lineWrapping){var p=Math.max(5,R.clientWidth/Fd()-3);tb.iter(a.line,a.line+c.length,function(a){if(a.hidden)return;var b=Math.ceil(a.text.length/p)||1;b!=a.height&&$b(a,b)})}else tb.iter(a.line,a.line+c.length,function(a){var b=a.text;b.length>h&&(Rb=b,h=b.length,Sb=null,g=!1)}),g&&(h=0,Rb="",Sb=null,tb.iter(0,tb.size,function(a){var b=a.text;b.length>h&&(h=b.length,Rb=b)}));var q=[],s=c.length-i-1;for(var n=0,t=ub.length;nb.line&&q.push(u+s)}var v=a.line+Math.min(c.length,500);Pd(a.line,v),q.push(v),ub=q,Rd(100),Gb.push({from:a.line,to:b.line+1,diff:s});var w={from:a,to:b,text:c};if(Hb){for(var x=Hb;x.next;x=x.next);x.next=w}else Hb=w;Rc(d,e,y(wb.from.line),y(wb.to.line)),R.clientHeight&&(U.style.height=tb.height*Cd()+2*Gd()+"px")}function uc(a,b,c){function d(d){if(ab(d,b))return d;if(!ab(c,d))return e;var f=d.line+a.length-(c.line-b.line)-1,g=d.ch;return d.line==c.line&&(g+=a[a.length-1].length-(c.ch-(c.line==b.line?b.ch:0))),{line:f,ch:g}}b=Vc(b),c?c=Vc(c):c=b,a=hb(a);var e;return wc(a,b,c,function(a){return e=a,{from:d(wb.from),to:d(wb.to)}}),e}function vc(a,b){wc(hb(a),wb.from,wb.to,function(a){return b=="end"?{from:a,to:a}:b=="start"?{from:wb.from,to:wb.from}:{from:wb.from,to:a}})}function wc(a,b,c,d){var e=a.length==1?a[0].length+b.ch:a[a.length-1].length,f=d({line:b.line+a.length-1,ch:e});pc(b,c,a,f.from,f.to)}function xc(a,b){var c=a.line,d=b.line;if(c==d)return Zb(c).text.slice(a.ch,b.ch);var e=[Zb(c).text.slice(a.ch)];return tb.iter(c+1,d,function(a){e.push(a.text)}),e.push(Zb(d).text.slice(0,b.ch)),e.join("\n")}function yc(){return xc(wb.from,wb.to)}function Ac(){if(zc)return;pb.set(f.pollInterval,function(){Sd(),Dc(),vb&&Ac(),Td()})}function Bc(){function b(){Sd();var c=Dc();!c&&!a?(a=!0,pb.set(60,b)):(zc=!1,Ac()),Td()}var a=!1;zc=!0,pb.set(20,b)}function Dc(){if(Jb||!vb||ib(D)||f.readOnly)return!1;var a=D.value;if(a==Cc)return!1;xb=null;var b=0,c=Math.min(Cc.length,a.length);while(bb)&&lb.scrollIntoView()}function Hc(){var a=wd(wb.inverted?wb.from:wb.to),b=f.lineWrapping?Math.min(a.x,db.offsetWidth):a.x;return Ic(b,a.y,b,a.yBot)}function Ic(a,b,c,d){var e=Hd(),g=Gd();b+=g,d+=g,a+=e,c+=e;var h=R.clientHeight,i=R.scrollTop,j=!1,k=!0;bi+h&&(R.scrollTop=d-h,j=!0);var l=R.clientWidth,m=R.scrollLeft,n=f.fixedGutter?X.clientWidth:0,o=al+m-3&&(R.scrollLeft=c+10-l,j=!0,c>U.clientWidth&&(k=!1)),j&&f.onScroll&&f.onScroll(Yb),k}function Jc(){var a=Cd(),b=R.scrollTop-Gd(),c=Math.max(0,Math.floor(b/a)),d=Math.ceil((b+R.clientHeight)/a);return{from:x(tb,c),to:x(tb,d)}}function Kc(a,b){function n(){Sb=R.clientWidth;var a=nb.firstChild,b=!1;return tb.iter(Nb,Ob,function(c){if(!c.hidden){var d=Math.round(a.offsetHeight/k)||1;c.height!=d&&($b(c,d),Kb=b=!0)}a=a.nextSibling}),b&&(U.style.height=tb.height*k+2*Gd()+"px"),b}if(!R.clientWidth){Nb=Ob=Mb=0;return}var c=Jc();if(a!==!0&&a.length==0&&c.from>Nb&&c.toe&&Ob-e<20&&(e=Math.min(tb.size,Ob));var g=a===!0?[]:Lc([{from:Nb,to:Ob,domStart:0}],a),h=0;for(var i=0;ie&&(j.to=e),j.from>=j.to?g.splice(i--,1):h+=j.to-j.from}if(h==e-d&&d==Nb&&e==Ob)return;g.sort(function(a,b){return a.domStart-b.domStart});var k=Cd(),l=X.style.display;nb.style.display="none",Mc(d,e,g),nb.style.display=X.style.display="";var m=d!=Nb||e!=Ob||Pb!=R.clientHeight+k;m&&(Pb=R.clientHeight+k),Nb=d,Ob=e,Mb=y(tb,d),W.style.top=Mb*k+"px",R.clientHeight&&(U.style.height=tb.height*k+2*Gd()+"px");if(nb.childNodes.length!=Ob-Nb)throw new Error("BAD PATCH! "+JSON.stringify(g)+" size="+(Ob-Nb)+" nodes="+nb.childNodes.length);return f.lineWrapping?n():(Sb==null&&(Sb=sd(Rb)),Sb>R.clientWidth?(db.style.width=Sb+"px",U.style.width="",U.style.width=R.scrollWidth+"px"):db.style.width=U.style.width=""),X.style.display=l,(m||Kb)&&Nc()&&f.lineWrapping&&n()&&Nc(),Oc(),!b&&f.onUpdate&&f.onUpdate(Yb),!0}function Lc(a,b){for(var c=0,d=b.length||0;c=j.to?f.push(j):(e.from>j.from&&f.push({from:j.from,to:e.from,domStart:j.domStart}),e.toe)f=d(f),e++;for(var j=0,k=i.to-i.from;jj){if(a.hidden)var b=m.innerHTML="
";else{var b=""+a.getHTML(gd)+"";a.bgClassName&&(b='
 
'+b+"
")}m.innerHTML=b,nb.insertBefore(m.firstChild,f)}else f=f.nextSibling;++j})}function Nc(){if(!f.gutter&&!f.lineNumbers)return;var a=W.offsetHeight,b=R.clientHeight;X.style.height=(a-b<2?b:a)+"px";var c=[],d=Nb,e;tb.iter(Nb,Math.max(Ob,Nb+1),function(a){if(a.hidden)c.push("
");else{var b=a.gutterMarker,g=f.lineNumbers?d+f.firstLineNumber:null;b&&b.text?g=b.text.replace("%N%",g!=null?g:""):g==null&&(g="\u00a0"),c.push(b&&b.style?'
':"
",g);for(var h=1;h ");c.push("
"),b||(e=d)}++d}),X.style.display="none",cb.innerHTML=c.join("");if(e!=null){var g=cb.childNodes[e-Nb],h=String(tb.size).length,i=Z(g),j="";while(i.length+j.length2;return db.style.marginLeft=X.offsetWidth+"px",Kb=!1,k}function Oc(){var a=_(wb.from,wb.to),b=wd(wb.from,!0),c=a?b:wd(wb.to,!0),d=wb.inverted?b:c,e=Cd(),g=Y(s),h=Y(nb);A.style.top=Math.max(0,Math.min(R.offsetHeight,d.y+h.top-g.top))+"px",A.style.left=Math.max(0,Math.min(R.offsetWidth,d.x+h.left-g.left))+"px";if(a)lb.style.top=d.y+"px",lb.style.left=(f.lineWrapping?Math.min(d.x,db.offsetWidth):d.x)+"px",lb.style.display="",mb.style.display="none";else{var i=b.y==c.y,j="",k=db.clientWidth||db.offsetWidth,l=db.clientHeight||db.offsetHeight;function m(a,b,c,d){var e=O?"width: "+(c?k-c-a:k)+"px":"right: "+c+"px";j+='
'}if(wb.from.ch&&b.y>=0){var n=i?k-c.x:0;m(b.x,b.y,n,e)}var o=Math.max(0,b.y+(wb.from.ch?e:0)),p=Math.min(c.y,l)-o;p>.2*e&&m(0,o,0,p),(!i||!wb.from.ch)&&c.yc||h>g.text.length)h=g.text.length;return{line:d,ch:h}}d+=b}}var e=Zb(a.line),f=a.ch==e.text.length&&a.ch!=c;return e.hidden?a.line>=b?d(1)||d(-1):d(-1)||d(1):a}function Tc(a,b,c){var d=Vc({line:a,ch:b||0});(c?Qc:Rc)(d,d)}function Uc(a){return Math.max(0,Math.min(a,tb.size-1))}function Vc(a){if(a.line<0)return{line:0,ch:0};if(a.line>=tb.size)return{line:tb.size-1,ch:Zb(tb.size-1).text.length};var b=a.ch,c=Zb(a.line).text.length;return b==null||b>c?{line:a.line,ch:c}:b<0?{line:a.line,ch:0}:a}function Wc(a,b){function g(){for(var b=d+a,c=a<0?-1:tb.size;b!=c;b+=a){var e=Zb(b);if(!e.hidden)return d=b,f=e,!0}}function h(b){if(e==(a<0?0:f.text.length)){if(!!b||!g())return!1;e=a<0?f.text.length:0}else e+=a;return!0}var c=wb.inverted?wb.from:wb.to,d=c.line,e=c.ch,f=Zb(d);if(b=="char")h();else if(b=="column")h(!0);else if(b=="word"){var i=!1;for(;;){if(a<0&&!h())break;if(gb(f.text.charAt(e)))i=!0;else if(i){a<0&&(a=1,h());break}if(a>0&&!h())break}}return{line:d,ch:e}}function Xc(a,b){var c=a<0?wb.from:wb.to;if(xb||_(wb.from,wb.to))c=Wc(a,b);Tc(c.line,c.ch,!0)}function Yc(a,b){_(wb.from,wb.to)?a<0?uc("",Wc(a,b),wb.to):uc("",wb.from,Wc(a,b)):uc("",wb.from,wb.to),Fb=!0}function $c(a,b){var c=0,d=wd(wb.inverted?wb.from:wb.to,!0);Zc!=null&&(d.x=Zc),b=="page"?c=Math.min(R.clientHeight,window.innerHeight||document.documentElement.clientHeight):b=="line"&&(c=Cd());var e=xd(d.x,d.y+c*a+2);b=="page"&&(R.scrollTop+=wd(e,!0).y-d.y),Tc(e.line,e.ch,!0),Zc=d.x}function _c(a){var b=Zb(a.line).text,c=a.ch,d=a.ch;while(c>0&&gb(b.charAt(c-1)))--c;while(dRb.length&&(Rb=a.text)});Gb.push({from:0,to:tb.size})}function gd(a){var b=f.tabSize-a%f.tabSize,c=Tb[b];if(c)return c;for(var d='',e=0;e",width:b}}function hd(){R.className=R.className.replace(/\s*cm-s-\S+/g,"")+f.theme.replace(/(^|\s)\s*/g," cm-s-")}function id(){this.set=[]}function jd(a,b,c){function e(a,b,c,e){Zb(a).addMark(new p(b,c,e,d))}a=Vc(a),b=Vc(b);var d=new id;if(!ab(a,b))return d;if(a.line==b.line)e(a.line,a.ch,b.ch,c);else{e(a.line,a.ch,null,c);for(var f=a.line+1,g=b.line;f=a.ch)&&b.push(f.marker||f)}return b}function md(a,b,c){return typeof a=="number"&&(a=Zb(Uc(a))),a.gutterMarker={text:b,style:c},Kb=!0,a}function nd(a){typeof a=="number"&&(a=Zb(Uc(a))),a.gutterMarker=null,Kb=!0}function od(a,b){var c=a,d=a;return typeof a=="number"?d=Zb(Uc(a)):c=w(a),c==null?null:b(d,c)?(Gb.push({from:c,to:c+1}),d):null}function pd(a,b,c){return od(a,function(a){if(a.className!=b||a.bgClassName!=c)return a.className=b,a.bgClassName=c,!0})}function qd(a,b){return od(a,function(a,c){if(a.hidden!=b){a.hidden=b,$b(a,b?0:1);var d=wb.from.line,e=wb.to.line;if(b&&(d==c||e==c)){var f=d==c?Sc({line:d,ch:0},d,0):wb.from,g=e==c?Sc({line:e,ch:0},e,0):wb.to;if(!g)return;Rc(f,g)}return Kb=!0}})}function rd(a){if(typeof a=="number"){if(!Xb(a))return null;var b=a;a=Zb(a);if(!a)return null}else{var b=w(a);if(b==null)return null}var c=a.gutterMarker;return{line:b,handle:a,text:a.text,markerText:c&&c.text,markerClass:c&&c.style,lineClass:a.className,bgClass:a.bgClassName}}function sd(a){return kb.innerHTML="
x
",kb.firstChild.firstChild.firstChild.nodeValue=a,kb.firstChild.firstChild.offsetWidth||10}function td(a,b){function e(a){return vd(c,a).left}if(b<=0)return 0;var c=Zb(a),d=c.text,f=0,g=0,h=d.length,i,j=Math.min(h,Math.ceil(b/Fd()));for(;;){var k=e(j);if(!(k<=b&&ji)return h;j=Math.floor(h*.8),k=e(j),kb-g?f:h;var l=Math.ceil((f+h)/2),m=e(l);m>b?(h=l,i=m):(f=l,g=m)}}function vd(a,b){if(b==0)return{top:0,left:0};var c=f.lineWrapping&&b"+a.getHTML(gd,b,ud,c)+"
";var d=document.getElementById(ud),e=d.offsetTop,g=d.offsetLeft;if(M&&e==0&&g==0){var h=document.createElement("span");h.innerHTML="x",d.parentNode.insertBefore(h,d.nextSibling),e=h.offsetTop}return{top:e,left:g}}function wd(a,b){var c,d=Cd(),e=d*(y(tb,a.line)-(b?Mb:0));if(a.ch==0)c=0;else{var g=vd(Zb(a.line),a.ch);c=g.left,f.lineWrapping&&(e+=Math.max(0,g.top))}return{x:c,y:e,yBot:e+d}}function xd(a,b){function l(a){var b=vd(h,a);if(j){var d=Math.round(b.top/c);return Math.max(0,b.left+(d-k)*R.clientWidth)}return b.left}b<0&&(b=0);var c=Cd(),d=Fd(),e=Mb+Math.floor(b/c),g=x(tb,e);if(g>=tb.size)return{line:tb.size-1,ch:Zb(tb.size-1).text.length};var h=Zb(g),i=h.text,j=f.lineWrapping,k=j?e-y(tb,g):0;if(a<=0&&k==0)return{line:g,ch:0};var m=0,n=0,o=i.length,p,q=Math.min(o,Math.ceil((a+k*R.clientWidth*.9)/d));for(;;){var r=l(q);if(!(r<=a&&qp)return{line:g,ch:o};q=Math.floor(o*.8),r=l(q),ra-n?m:o};var s=Math.ceil((m+o)/2),t=l(s);t>a?(o=s,p=t):(m=s,n=t)}}function yd(a){var b=wd(a,!0),c=Y(db);return{x:c.left+b.x,y:c.top+b.y,yBot:c.top+b.yBot}}function Cd(){if(Bd==null){Bd="
";for(var a=0;a<49;++a)Bd+="x
";Bd+="x
"}var b=nb.clientHeight;return b==Ad?zd:(Ad=b,kb.innerHTML=Bd,zd=kb.firstChild.offsetHeight/50||1,kb.innerHTML="",zd)}function Fd(){return R.clientWidth==Ed?Dd:(Ed=R.clientWidth,Dd=sd("x"))}function Gd(){return db.offsetTop}function Hd(){return db.offsetLeft}function Id(a,b){var c=Y(R,!0),d,e;try{d=a.clientX,e=a.clientY}catch(a){return null}if(!b&&(d-c.left>R.clientWidth||e-c.top>R.clientHeight))return null;var f=Y(db,!0);return xd(d-f.left,e-f.top)}function Jd(a){function f(){var a=hb(D.value).join("\n");a!=e&&Vd(vc)(a,"end"),A.style.position="relative",D.style.cssText=d,N&&(R.scrollTop=c),Jb=!1,Ec(!0),Ac()}var b=Id(a),c=R.scrollTop;if(!b||window.opera)return;(_(wb.from,wb.to)||ab(b,wb.from)||!ab(b,wb.to))&&Vd(Tc)(b.line,b.ch);var d=D.style.cssText;A.style.position="absolute",D.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: white; "+"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Jb=!0;var e=D.value=yc();Fc(),$(D);if(L){E(a);var g=I(window,"mouseup",function(){g(),setTimeout(f,20)},!0)}else setTimeout(f,50)}function Kd(){clearInterval(rb);var a=!0;lb.style.visibility="",rb=setInterval(function(){lb.style.visibility=(a=!a)?"":"hidden"},650)}function Md(a){function p(a,b,c){if(!a.text)return;var d=a.styles,e=g?0:a.text.length-1,f;for(var i=g?0:d.length-2,j=g?d.length:-2;i!=j;i+=2*h){var k=d[i];if(d[i+1]!=null&&d[i+1]!=m){e+=h*k.length;continue}for(var l=g?0:k.length-1,p=g?k.length:-1;l!=p;l+=h,e+=h)if(e>=b&&e"==g)n.push(f);else{if(n.pop()!=q.charAt(0))return{pos:e,match:!1};if(!n.length)return{pos:e,match:!0}}}}}var b=wb.inverted?wb.from:wb.to,c=Zb(b.line),d=b.ch-1,e=d>=0&&Ld[c.text.charAt(d)]||Ld[c.text.charAt(++d)];if(!e)return;var f=e.charAt(0),g=e.charAt(1)==">",h=g?1:-1,i=c.styles;for(var j=d+1,k=0,l=i.length;ke;--d){if(d==0)return 0;var g=Zb(d-1);if(g.stateAfter)return d;var h=g.indentation(f.tabSize);if(c==null||b>h)c=d-1,b=h}return c}function Od(a){var b=Nd(a),c=b&&Zb(b-1).stateAfter;return c?c=m(sb,c):c=n(sb),tb.iter(b,a,function(a){a.highlight(sb,c,f.tabSize),a.stateAfter=m(sb,c)}),b=tb.size)continue;var d=Nd(c),e=d&&Zb(d-1).stateAfter;e?e=m(sb,e):e=n(sb);var g=0,h=sb.compareStates,i=!1,j=d,k=!1;tb.iter(j,tb.size,function(b){var d=b.stateAfter;if(+(new Date)>a)return ub.push(j),Rd(f.workDelay),i&&Gb.push({from:c,to:j+1}),k=!0;var l=b.highlight(sb,e,f.tabSize);l&&(i=!0),b.stateAfter=m(sb,e);var n=null;if(h){var o=d&&h(d,e);o!=K&&(n=!!o)}n==null&&(l!==!1||!d?g=0:++g>3&&(!sb.indent||sb.indent(d,"")==sb.indent(e,""))&&(n=!0));if(n)return!0;++j});if(k)return;i&&Gb.push({from:c,to:j+1})}b&&f.onHighlightComplete&&f.onHighlightComplete(Yb)}function Rd(a){if(!ub.length)return;qb.set(a,Vd(Qd))}function Sd(){Eb=Fb=Hb=null,Gb=[],Ib=!1,Lb=[]}function Td(){var a=!1,b;Ib&&(a=!Hc()),Gb.length?b=Kc(Gb,!0):(Ib&&Oc(),Kb&&Nc()),a&&Hc(),Ib&&(Gc(),Kd()),vb&&!Jb&&(Eb===!0||Eb!==!1&&Ib)&&Ec(Fb),Ib&&f.matchBrackets&&setTimeout(Vd(function(){Qb&&(Qb(),Qb=null),_(wb.from,wb.to)&&Md(!1)}),20);var c=Hb,d=Lb;Ib&&f.onCursorActivity&&f.onCursorActivity(Yb),c&&f.onChange&&Yb&&f.onChange(Yb,c);for(var e=0;eh&&a.y>b.offsetHeight&&(f=a.y-b.offsetHeight),g+b.offsetWidth>i&&(g=i-b.offsetWidth)}b.style.top=f+Gd()+"px",b.style.left=b.style.right="",e=="right"?(g=U.clientWidth-b.offsetWidth,b.style.right="0px"):(e=="left"?g=0:e=="middle"&&(g=(U.clientWidth-b.offsetWidth)/2),b.style.left=g+Hd()+"px"),c&&Ic(g,f,g+b.offsetWidth,f+b.offsetHeight)},lineCount:function(){return tb.size},clipPos:Vc,getCursor:function(a){return a==null&&(a=wb.inverted),bb(a?wb.from:wb.to)},somethingSelected:function(){return!_(wb.from,wb.to)},setCursor:Vd(function(a,b,c){b==null&&typeof a.line=="number"?Tc(a.line,a.ch,c):Tc(a,b,c)}),setSelection:Vd(function(a,b,c){(c?Qc:Rc)(Vc(a),Vc(b||a))}),getLine:function(a){if(Xb(a))return Zb(a).text},getLineHandle:function(a){if(Xb(a))return Zb(a)},setLine:Vd(function(a,b){Xb(a)&&uc(b,{line:a,ch:0},{line:a,ch:Zb(a).text.length})}),removeLine:Vd(function(a){Xb(a)&&uc("",{line:a,ch:0},Vc({line:a+1,ch:0}))}),replaceRange:Vd(uc),getRange:function(a,b){return xc(Vc(a),Vc(b))},triggerOnKeyDown:Vd(kc),execCommand:function(a){return h[a](Yb)},moveH:Vd(Xc),deleteH:Vd(Yc),moveV:Vd($c),toggleOverwrite:function(){Cb?(Cb=!1,lb.className=lb.className.replace(" CodeMirror-overwrite","")):(Cb=!0,lb.className+=" CodeMirror-overwrite")},posFromIndex:function(a){var b=0,c;return tb.iter(0,tb.size,function(d){var e=d.text.length+1;if(e>a)return c=a,!0;a-=e,++b}),Vc({line:b,ch:c})},indexFromPos:function(a){if(a.line<0||a.ch<0)return 0;var b=a.ch;return tb.iter(0,a.line,function(a){b+=a.text.length+1}),b},scrollTo:function(a,b){a!=null&&(R.scrollLeft=a),b!=null&&(R.scrollTop=b),Kc([])},operation:function(a){return Vd(a)()},compoundChange:function(a){return Wd(a)},refresh:function(){Kc(!0),R.scrollHeight>Ab&&(R.scrollTop=Ab)},getInputField:function(){return D},getWrapperElement:function(){return s},getScrollerElement:function(){return R},getGutterElement:function(){return X}},ic=null,jc,zc=!1,Cc="",Zc=null;id.prototype.clear=Vd(function(){var a=Infinity,b=-Infinity;for(var c=0,d=this.set.length;c",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},Ud=0;for(var Xd in g)g.propertyIsEnumerable(Xd)&&!Yb.propertyIsEnumerable(Xd)&&(Yb[Xd]=g[Xd]);return Yb}function j(a){return typeof a=="string"?i[a]:a}function k(a,b,c,d,e){function f(b){b=j(b);var c=b[a];if(c!=null&&d(c))return!0;if(b.nofallthrough)return e&&e(),!0;var g=b.fallthrough;if(g==null)return!1;if(Object.prototype.toString.call(g)!="[object Array]")return f(g);for(var h=0,i=g.length;ha&&d.push(h.slice(a-f,Math.min(h.length,b-f)),c[e+1]),i>=a&&(g=1)):g==1&&(i>b?d.push(h.slice(0,b-f),c[e+1]):d.push(h,c[e+1])),f=i}}function t(a){this.lines=a,this.parent=null;for(var b=0,c=a.length,d=0;b=0&&d>=0;--c,--d)if(a.charAt(c)!=b.charAt(d))break;return d+1}function fb(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c2){c.dependencies=[];for(var d=2;d0&&b.ch=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.posb},eatSpace:function(){var a=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return W(this.string,this.start,this.tabSize)},indentation:function(){return W(this.string,null,this.tabSize)},match:function(a,b,c){if(typeof a!="string"){var e=this.string.slice(this.pos).match(a);return e&&b!==!1&&(this.pos+=e[0].length),e}function d(a){return c?a.toLowerCase():a}if(d(this.string).indexOf(d(a),this.pos)==this.pos)return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},a.StringStream=o,p.prototype={attach:function(a){this.marker.set.push(a)},detach:function(a){var b=fb(this.marker.set,a);b>-1&&this.marker.set.splice(b,1)},split:function(a,b){if(this.to<=a&&this.to!=null)return null;var c=this.fromthis.from&&(d=b&&(this.from=Math.max(d,this.from)+e),c&&(bthis.from||this.from==null)?this.to=null:this.to!=null&&this.to>b&&(this.to=d=this.to},sameSet:function(a){return this.marker==a.marker}},q.prototype={attach:function(a){this.line=a},detach:function(a){this.line==a&&(this.line=null)},split:function(a,b){if(athis.to},clipTo:function(a,b,c,d,e){(a||bthis.to)?(this.from=0,this.to=-1):this.from>b&&(this.from=this.to=Math.max(d,this.from)+e)},sameSet:function(a){return!1},find:function(){return!this.line||!this.line.parent?null:{line:w(this.line),ch:this.from}},clear:function(){if(this.line){var a=fb(this.line.marked,this);a!=-1&&this.line.marked.splice(a,1),this.line=null}}},r.inheritMarks=function(a,b){var c=new r(a),d=b&&b.marked;if(d)for(var e=0;e5e3){e[f++]=this.text.slice(d.pos),e[f++]=null;break}}return e.length!=f&&(e.length=f,g=!0),f&&e[f-2]!=i&&(g=!0),g||(e.length<5&&this.text.length<10?null:!1)},getTokenAt:function(a,b,c){var d=this.text,e=new o(d);while(e.pos',d,""):e.push(d)}function p(a){return a?"cm-"+a.replace(/ +/g," cm-"):null}var e=[],f=!0,g=0,i=h;if(b!=null){var j=0,k='';i=function(a,c){var f=a.length;b>=j&&bj&&(h(a.slice(0,b-j),c),d&&e.push("")),e.push(k),h(a.slice(b-j),c),e.push(""),b--,j+=f):(j+=f,h(a,c),j==b&&j==o?e.push(k+""):j>b+10&&/\s/.test(a)&&(i=function(){}))}}var l=this.styles,m=this.text,n=this.marked,o=m.length;if(!m&&b==null)i(" ");else if(!n||!n.length)for(var q=0,r=0;ro&&(s=s.slice(0,o-r)),r+=u,i(s,p(t))}else{var v=0,q=0,w="",t,x=0,y=n[0].from||0,z=[],A=0;function B(){var a;while(AD?w.slice(0,D-v):w,F);if(E>=D){w=w.slice(D-v),v=D;break}v=E}w=l[q++],t=p(l[q++])}}}return e.join("")},cleanUp:function(){this.parent=null;if(this.marked)for(var a=0,b=this.marked.length;a50){while(f.lines.length>50){var h=f.lines.splice(f.lines.length-25,25),i=new t(h);f.height-=i.height,this.children.splice(d+1,0,i),i.parent=this}this.maybeSpill()}break}a-=g}},maybeSpill:function(){if(this.children.length<=10)return;var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new u(b);if(!a.parent){var d=new u(a.children);d.parent=a,a.children=[d,c],a=d}else{a.size-=c.size,a.height-=c.height;var e=fb(a.parent.children,a);a.parent.children.splice(e+1,0,c)}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()},iter:function(a,b,c){this.iterN(a,b-a,c)},iterN:function(a,b,c){for(var d=0,e=this.children.length;d400||!f||this.closed||f.start>a+c.length||f.start+f.added0;--j)f.old.unshift(c[j-1]);for(var j=i;j>0;--j)f.old.push(c[c.length-j]);h&&(f.start=a),f.added+=b-(c.length-h-i)}this.time=d},startCompound:function(){this.compound++||(this.closed=!0)},endCompound:function(){--this.compound||(this.closed=!0)}},a.e_stop=E,a.e_preventDefault=C,a.e_stopPropagation=D,a.connect=I,J.prototype={set:function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)}};var K=a.Pass={toString:function(){return"CodeMirror.Pass"}},L=/gecko\/\d{7}/i.test(navigator.userAgent),M=/MSIE \d/.test(navigator.userAgent),N=/MSIE [1-8]\b/.test(navigator.userAgent),O=M&&document.documentMode==5,P=/WebKit\//.test(navigator.userAgent),Q=/Chrome\//.test(navigator.userAgent),R=/Apple Computer/.test(navigator.vendor),S=/KHTML\//.test(navigator.userAgent),T=function(){if(N)return!1;var a=document.createElement("div");return"draggable"in a||"dragDrop"in a}(),U=function(){var a=document.createElement("textarea");return a.value="foo\nbar",a.value.indexOf("\r")>-1?"\r\n":"\n"}(),V=/^$/;L?V=/$'/:R?V=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:Q&&(V=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/),document.documentElement.getBoundingClientRect!=null&&(Y=function(a,b){try{var c=a.getBoundingClientRect();c={top:c.top,left:c.left}}catch(d){c={top:0,left:0}}if(!b)if(window.pageYOffset==null){var e=document.documentElement||document.body.parentNode;e.scrollTop==null&&(e=document.body),c.top+=e.scrollTop,c.left+=e.scrollLeft}else c.top+=window.pageYOffset,c.left+=window.pageXOffset;return c});var cb=document.createElement("pre");db("a")=="\na"?db=function(a){return cb.textContent=a,cb.innerHTML.slice(1)}:db(" ")!=" "&&(db=function(a){return cb.innerHTML="",cb.appendChild(document.createTextNode(a)),cb.innerHTML}),a.htmlEscape=db;var hb="\n\nb".split(/\n/).length!=3?function(a){var b=0,c,d=[];while((c=a.indexOf("\n",b))>-1)d.push(a.slice(b,a.charAt(c-1)=="\r"?c-1:c)),b=c+1;return d.push(a.slice(b)),d}:function(a){return a.split(/\r?\n/)};a.splitLines=hb;var ib=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!b||b.parentElement()!=a?!1:b.compareEndPoints("StartToEnd",b)!=0};a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var jb={3:"Enter",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:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};return a.keyNames=jb,function(){for(var a=0;a<10;a++)jb[a+48]=String(a);for(var a=65;a<=90;a++)jb[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)jb[a+111]=jb[a+63235]="F"+a}(),a}();CodeMirror.defineMode("clike",function(a,b){function k(a,b){var c=a.next();if(g[c]){var h=g[c](a,b);if(h!==!1)return h}if(c=='"'||c=="'")return b.tokenize=l(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return j=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if(c=="/"){if(a.eat("*"))return b.tokenize=m,m(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(i.test(c))return a.eatWhile(i),"operator";a.eatWhile(/[\w\$_]/);var k=a.current();return d.propertyIsEnumerable(k)?(e.propertyIsEnumerable(k)&&(j="newstatement"),"keyword"):f.propertyIsEnumerable(k)?"atom":"word"}function l(a){return function(b,c){var d=!1,e,f=!1;while((e=b.next())!=null){if(e==a&&!d){f=!0;break}d=!d&&e=="\\"}if(f||!d&&!h)c.tokenize=null;return"string"}}function m(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=null;break}c=d=="*"}return"comment"}function n(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function o(a,b,c){return a.context=new n(a.indented,b,c,null,a.context)}function p(a){var b=a.context.type;if(b==")"||b=="]"||b=="}")a.indented=a.context.indented;return a.context=a.context.prev}var c=a.indentUnit,d=b.keywords||{},e=b.blockKeywords||{},f=b.atoms||{},g=b.hooks||{},h=b.multiLineStrings,i=/[+\-*&%=<>!?|\/]/,j;return{startState:function(a){return{tokenize:null,context:new n((a||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;a.sol()&&(c.align==null&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0);if(a.eatSpace())return null;j=null;var d=(b.tokenize||k)(a,b);if(d=="comment"||d=="meta")return d;c.align==null&&(c.align=!0);if(j!=";"&&j!=":"||c.type!="statement")if(j=="{")o(b,a.column(),"}");else if(j=="[")o(b,a.column(),"]");else if(j=="(")o(b,a.column(),")");else if(j=="}"){while(c.type=="statement")c=p(b);c.type=="}"&&(c=p(b));while(c.type=="statement")c=p(b)}else j==c.type?p(b):(c.type=="}"||c.type=="top"||c.type=="statement"&&j=="newstatement")&&o(b,a.column(),"statement");else p(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=k&&a.tokenize!=null)return 0;var d=a.context,e=b&&b.charAt(0);d.type=="statement"&&e=="}"&&(d=d.prev);var f=e==d.type;return d.type=="statement"?d.indented+(e=="{"?0:c):d.align?d.column+(f?0:1):d.indented+(f?0:c)},electricChars:"{}"}}),function(){function a(a){var b={},c=a.split(" ");for(var d=0;d ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"),p=m("* *1 *2 *3 *agent* *allow-unresolved-vars* *assert *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - / < <= = == > >= accessor aclone agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map 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 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 booleans bound-fn bound-fn* butlast byte byte-array bytes case cast 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 concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? extend extend-protocol extend-type extends? extenders false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format 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 hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt 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? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace 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 num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc 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 quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reify reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq"),q=m("ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch let letfn binding loop for doseq dotimes when-let if-let defstruct struct-map assoc testing deftest handler-case handle dotrace deftrace"),r={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-fA-F]/,sign:/[+-]/,exponent:/[eE]/,keyword_char:/[^\s\(\[\;\)\]]/,basic:/[\w\$_\-]/,lang_keyword:/[\w*+!\-_?:\/]/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(a,b){b.indentStack==null&&a.sol()&&(b.indentation=a.indentation());if(a.eatSpace())return null;var f=null;switch(b.mode){case"string":var l,m=!1;while((l=a.next())!=null){if(l=='"'&&!m){b.mode=!1;break}m=!m&&l=="\\"}f=e;break;default:var s=a.next();if(s=='"')b.mode="string",f=e;else if(s=="'"&&!r.digit_or_colon.test(a.peek()))f=g;else if(s==";")a.skipToEnd(),f=d;else if(v(s,a))f=h;else if(s=="("||s=="["){var w="",x=a.column();if(s=="(")while((letter=a.eat(r.keyword_char))!=null)w+=letter;w.length>0&&q.propertyIsEnumerable(w)?t(b,x+k,s):(a.eatSpace(),a.eol()||a.peek()==";"?t(b,x+1,s):t(b,x+a.current().length,s)),a.backUp(a.current().length-1),f=i}else if(s==")"||s=="]")f=i,b.indentStack!=null&&b.indentStack.type==(s==")"?"(":"[")&&u(b);else{if(s==":")return a.eatWhile(r.lang_keyword),g;a.eatWhile(r.basic),o&&o.propertyIsEnumerable(a.current())?f=j:p&&p.propertyIsEnumerable(a.current())?f=c:n&&n.propertyIsEnumerable(a.current())?f=g:f=null}}return f},indent:function(a,b){return a.indentStack==null?a.indentation:a.indentStack.indent}}}),CodeMirror.defineMIME("text/x-clojure","clojure"),CodeMirror.defineMode("coffeescript",function(a){function c(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function r(a,c){if(a.sol()){var k=c.scopes[0].offset;if(a.eatSpace()){var l=a.indentation();return l>k?"indent":l0&&v(a,c)}if(a.eatSpace())return null;var p=a.peek();if(a.match("###"))return c.tokenize=t,c.tokenize(a,c);if(p==="#")return a.skipToEnd(),"comment";if(a.match(/^-?[0-9\.]/,!1)){var r=!1;a.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),a.match(/^-?\d+\.\d*/)&&(r=!0),a.match(/^-?\.\d+/)&&(r=!0);if(r)return a.peek()=="."&&a.backUp(1),"number";var u=!1;a.match(/^-?0x[0-9a-f]+/i)&&(u=!0),a.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(u=!0),a.match(/^-?0(?![\dx])/i)&&(u=!0);if(u)return"number"}if(a.match(n))return c.tokenize=s(a.current(),"string"),c.tokenize(a,c);if(a.match(o)){if(a.current()!="/"||a.match(/^.*\//,!1))return c.tokenize=s(a.current(),"string-2"),c.tokenize(a,c);a.backUp(1)}return a.match(h)||a.match(g)?"punctuation":a.match(f)||a.match(d)||a.match(j)?"operator":a.match(e)?"punctuation":a.match(q)?"atom":a.match(m)?"keyword":a.match(i)?"variable":(a.next(),b)}function s(c,d){var e=c.length==1;return function(g,h){while(!g.eol()){g.eatWhile(/[^'"\/\\]/);if(g.eat("\\")){g.next();if(e&&g.eol())return d}else{if(g.match(c))return h.tokenize=r,d;g.eat(/['"\/]/)}}return e&&(a.mode.singleLineStringErrors?d=b:h.tokenize=r),d}}function t(a,b){while(!a.eol()){a.eatWhile(/[^#]/);if(a.match("###")){b.tokenize=r;break}a.eatWhile("#")}return"comment"}function u(b,c,d){d=d||"coffee";var e=0;if(d==="coffee"){for(var f=0;f"||e==="=>")&&!c.lambda&&c.scopes[0].type=="coffee"&&a.peek()===""||d==="indent")&&u(a,c);var f="[({".indexOf(e);return f!==-1&&u(a,c,"])}".slice(f,f+1)),k.exec(e)&&u(a,c),e=="then"&&v(a,c),d==="dedent"&&v(a,c)?b:(f="])}".indexOf(e),f!==-1&&v(a,c)?b:(c.dedent>0&&a.eol()&&c.scopes[0].type=="coffee"&&(c.scopes.length>1&&c.scopes.shift(),c.dedent-=1),d))}var b="error",d=new RegExp("^[\\+\\-\\*/%&|\\^~<>!?]"),e=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),f=new RegExp("^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"),g=new RegExp("^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),h=new RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"),i=new RegExp("^[_A-Za-z$][_A-Za-z$0-9]*"),j=c(["and","or","not","is","isnt","in","instanceof","typeof"]),k=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],l=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","throw","when","until"],m=c(k.concat(l));k=c(k);var n=new RegExp("^('{3}|\"{3}|['\"])"),o=new RegExp("^(/{3}|/)"),p=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],q=c(p),x={startState:function(a){return{tokenize:r,scopes:[{offset:a||0,type:"coffee"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=w(a,b);return b.lastToken={style:c,content:a.current()},a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a,b){return a.tokenize!=r?0:a.scopes[0].offset}};return x}),CodeMirror.defineMIME("text/x-coffeescript","coffeescript"),CodeMirror.defineMode("css",function(a){function d(a,b){return c=b,a}function e(a,b){var c=a.next();if(c=="@")return a.eatWhile(/[\w\\\-]/),d("meta",a.current());if(c=="/"&&a.eat("*"))return b.tokenize=f,f(a,b);if(c=="<"&&a.eat("!"))return b.tokenize=g,g(a,b);if(c!="=")return c!="~"&&c!="|"||!a.eat("=")?c=='"'||c=="'"?(b.tokenize=h(c),b.tokenize(a,b)):c=="#"?(a.eatWhile(/[\w\\\-]/),d("atom","hash")):c=="!"?(a.match(/^\s*\w*/),d("keyword","important")):/\d/.test(c)?(a.eatWhile(/[\w.%]/),d("number","unit")):/[,.+>*\/]/.test(c)?d(null,"select-op"):/[;{}:\[\]]/.test(c)?d(null,c):(a.eatWhile(/[\w\\\-]/),d("variable","variable")):d(null,"compare");d(null,"compare")}function f(a,b){var c=!1,f;while((f=a.next())!=null){if(c&&f=="/"){b.tokenize=e;break}c=f=="*"}return d("comment","comment")}function g(a,b){var c=0,f;while((f=a.next())!=null){if(c>=2&&f==">"){b.tokenize=e;break}c=f=="-"?c+1:0}return d("comment","comment")}function h(a){return function(b,c){var f=!1,g;while((g=b.next())!=null){if(g==a&&!f)break;f=!f&&g=="\\"}return f||(c.tokenize=e),d("string","string")}}var b=a.indentUnit,c;return{startState:function(a){return{tokenize:e,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;var d=b.tokenize(a,b),e=b.stack[b.stack.length-1];if(c=="hash"&&e!="rule")d="string-2";else if(d=="variable")if(e=="rule")d="number";else if(!e||e=="@media{")d="tag";return e=="rule"&&/^[\{\};]$/.test(c)&&b.stack.pop(),c=="{"?e=="@media"?b.stack[b.stack.length-1]="@media{":b.stack.push("{"):c=="}"?b.stack.pop():c=="@media"?b.stack.push("@media"):e=="{"&&c!="comment"&&b.stack.push("rule"),d},indent:function(a,c){var d=a.stack.length;return/^\}/.test(c)&&(d-=a.stack[a.stack.length-1]=="rule"?2:1),a.baseIndent+d*b},electricChars:"}"}}),CodeMirror.defineMIME("text/css","css"),CodeMirror.defineMode("diff",function(){return{token:function(a){var b=a.next();a.skipToEnd();if(b=="+")return"plus";if(b=="-")return"minus";if(b=="@")return"rangeinfo"}}}),CodeMirror.defineMIME("text/x-diff","diff"),CodeMirror.defineMode("ecl",function(a){function b(a){var b={},c=a.split(" ");for(var d=0;d=0&&(!isNaN(e[n])||e[n]=="_"))--n;if(n>0){var q=e.substr(0,n+1);if(i.propertyIsEnumerable(q))return k.propertyIsEnumerable(q)&&(p="newstatement"),"variable-3"}return l.propertyIsEnumerable(e)?"atom":"word"}function r(a){return function(b,c){var d=!1,e,f=!1;while((e=b.next())!=null){if(e==a&&!d){f=!0;break}d=!d&&e=="\\"}if(f||!d&&!n)c.tokenize=q;return"string"}}function s(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=q;break}c=d=="*"}return"comment"}function t(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function u(a,b,c){return a.context=new t(a.indented,b,c,null,a.context)}function v(a){var b=a.context.type;if(b==")"||b=="]"||b=="}")a.indented=a.context.indented;return a.context=a.context.prev}var e=a.indentUnit,f=b("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"),g=b("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),h=b("__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"),i=b("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),j=b("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),k=b("catch class do else finally for if switch try while"),l=b("true false null"),m={"#":c},n,o=/[+\-*&%=<>!?|\/]/,p;return{startState:function(a){return{tokenize:null,context:new t((a||0)-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;a.sol()&&(c.align==null&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0);if(a.eatSpace())return null;p=null;var d=(b.tokenize||q)(a,b);if(d=="comment"||d=="meta")return d;c.align==null&&(c.align=!0);if(p!=";"&&p!=":"||c.type!="statement")if(p=="{")u(b,a.column(),"}");else if(p=="[")u(b,a.column(),"]");else if(p=="(")u(b,a.column(),")");else if(p=="}"){while(c.type=="statement")c=v(b);c.type=="}"&&(c=v(b));while(c.type=="statement")c=v(b)}else p==c.type?v(b):(c.type=="}"||c.type=="top"||c.type=="statement"&&p=="newstatement")&&u(b,a.column(),"statement");else v(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=q&&a.tokenize!=null)return 0;var c=a.context,d=b&&b.charAt(0);c.type=="statement"&&d=="}"&&(c=c.prev);var f=d==c.type;return c.type=="statement"?c.indented+(d=="{"?0:e):c.align?c.column+(f?0:1):c.indented+(f?0:e)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-ecl"),CodeMirror.defineMode("gfm",function(a,b){function f(a,b){return a.sol()&&a.match(/^```([\w+#]*)/)?(b.localMode=e(RegExp.$1),b.localMode&&(b.localState=b.localMode.startState()),b.token=g,"code"):c.token(a,b.mdState)}function g(a,b){return a.sol()&&a.match(/^```/)?(b.localMode=b.localState=null,b.token=f,"code"):b.localMode?b.localMode.token(a,b.localState):(a.skipToEnd(),"code")}function h(a,b){var d;if(a.match(/^\w+:\/\/\S+/))return"linkhref";if(a.match(/^[^\[*\\<>` _][^\[*\\<>` ]*[^\[*\\<>` _]/))return c.getType(b);if(d=a.match(/^[^\[*\\<>` ]+/)){var e=d[0];return e[0]==="_"&&e[e.length-1]==="_"?(a.backUp(e.length),undefined):c.getType(b)}if(a.eatSpace())return null}var c=CodeMirror.getMode(a,"markdown"),d={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp"},e=function(){var b,c={},e={},f,g=CodeMirror.listModes();for(b=0;b!|\/]/,h;return{startState:function(a){return{tokenize:null,context:new l((a||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;a.sol()&&(c.align==null&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0,c.type=="case"&&(c.type="}"));if(a.eatSpace())return null;h=null;var d=(b.tokenize||i)(a,b);return d=="comment"?d:(c.align==null&&(c.align=!0),h=="{"?m(b,a.column(),"}"):h=="["?m(b,a.column(),"]"):h=="("?m(b,a.column(),")"):h=="case"?c.type="case":h=="}"&&c.type=="}"?c=n(b):h==c.type&&n(b),b.startOfLine=!1,d)},indent:function(a,b){if(a.tokenize!=i&&a.tokenize!=null)return 0;var d=a.context,e=b&&b.charAt(0);if(d.type=="case"&&/^(?:case|default)\b/.test(b))return a.context.type="}",d.indented;var f=e==d.type;return d.align?d.column+(f?0:1):d.indented+(f?0:c)},electricChars:"{}:"}}),CodeMirror.defineMIME("text/x-go","go"),CodeMirror.defineMode("groovy",function(a,b){function c(a){var b={},c=a.split(" ");for(var d=0;d"))return g="->",null;if(/[+\-*&%=<>!?|\/~]/.test(c))return a.eatWhile(/[+\-*&%=<>|~]/),"operator";a.eatWhile(/[\w\$_]/);if(c=="@")return a.eatWhile(/[\w\$_\.]/),"meta";if(b.lastToken==".")return"property";if(a.eat(":"))return g="proplabel","property";var h=a.current();return f.propertyIsEnumerable(h)?"atom":d.propertyIsEnumerable(h)?(e.propertyIsEnumerable(h)&&(g="newstatement"),"keyword"):"word"}function i(a,b,c){function e(b,c){var e=!1,f,g=!d;while((f=b.next())!=null){if(f==a&&!e){if(!d)break;if(b.match(a+a)){g=!0;break}}if(a=='"'&&f=="$"&&!e&&b.eat("{"))return c.tokenize.push(j()),"string";e=!e&&f=="\\"}return g&&c.tokenize.pop(),"string"}var d=!1;if(a!="/"&&b.eat(a)){if(!b.eat(a))return"string";d=!0}return c.tokenize.push(e),e(b,c)}function j(){function b(b,c){if(b.peek()=="}"){a--;if(a==0)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)}else b.peek()=="{"&&a++;return h(b,c)}var a=1;return b.isBase=!0,b}function k(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize.pop();break}c=d=="*"}return"comment"}function l(a){return!a||a=="operator"||a=="->"||/[\.\[\{\(,;:]/.test(a)||a=="newstatement"||a=="keyword"||a=="proplabel"}function m(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function n(a,b,c){return a.context=new m(a.indented,b,c,null,a.context)}function o(a){var b=a.context.type;if(b==")"||b=="]"||b=="}")a.indented=a.context.indented;return a.context=a.context.prev}var d=c("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 transient try void volatile while"),e=c("catch class do else finally for if switch try while enum interface def"),f=c("null true false this"),g;return h.isBase=!0,{startState:function(b){return{tokenize:[h],context:new m((b||0)-a.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(a,b){var c=b.context;a.sol()&&(c.align==null&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0,c.type=="statement"&&!l(b.lastToken)&&(o(b),c=b.context));if(a.eatSpace())return null;g=null;var d=b.tokenize[b.tokenize.length-1](a,b);if(d=="comment")return d;c.align==null&&(c.align=!0);if(g!=";"&&g!=":"||c.type!="statement")if(g=="->"&&c.type=="statement"&&c.prev.type=="}")o(b),b.context.align=!1;else if(g=="{")n(b,a.column(),"}");else if(g=="[")n(b,a.column(),"]");else if(g=="(")n(b,a.column(),")");else if(g=="}"){while(c.type=="statement")c=o(b);c.type=="}"&&(c=o(b));while(c.type=="statement")c=o(b)}else g==c.type?o(b):(c.type=="}"||c.type=="top"||c.type=="statement"&&g=="newstatement")&&n(b,a.column(),"statement");else o(b);return b.startOfLine=!1,b.lastToken=g||d,d},indent:function(b,c){if(!b.tokenize[b.tokenize.length-1].isBase)return 0;var d=c&&c.charAt(0),e=b.context;e.type=="statement"&&!l(b.lastToken)&&(e=e.prev);var f=d==e.type;return e.type=="statement"?e.indented+(d=="{"?0:a.indentUnit):e.align?e.column+(f?0:1):e.indented+(f?0:a.indentUnit)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-groovy","groovy"),CodeMirror.defineMode("haskell",function(a,b){function c(a,b,c){return b(c),c(a,b)}function m(a,b){if(a.eatWhile(l))return null;var m=a.next();if(k.test(m)){if(m=="{"&&a.eat("-")){var p="comment";return a.eat("#")&&(p="meta"),c(a,b,n(p,1))}return null}if(m=="'")return a.eat("\\")?a.next():a.next(),a.eat("'")?"string":"error";if(m=='"')return c(a,b,o);if(e.test(m))return a.eatWhile(i),a.eat(".")?"qualifier":"variable-2";if(d.test(m))return a.eatWhile(i),"variable";if(f.test(m)){if(m=="0"){if(a.eat(/[xX]/))return a.eatWhile(g),"integer";if(a.eat(/[oO]/))return a.eatWhile(h),"number"}a.eatWhile(f);var p="number";return a.eat(".")&&(p="number",a.eatWhile(f)),a.eat(/[eE]/)&&(p="number",a.eat(/[-+]/),a.eatWhile(f)),p}if(j.test(m)){if(m=="-"&&a.eat(/-/)){a.eatWhile(/-/);if(!a.eat(j))return a.skipToEnd(),"comment"}var p="variable";return m==":"&&(p="variable-2"),a.eatWhile(j),p}return"error"}function n(a,b){return b==0?m:function(c,d){var e=b;while(!c.eol()){var f=c.next();if(f=="{"&&c.eat("-"))++e;else if(f=="-"&&c.eat("}")){--e;if(e==0)return d(m),a}}return d(n(a,e)),a}}function o(a,b){while(!a.eol()){var c=a.next();if(c=='"')return b(m),"string";if(c=="\\"){if(a.eol()||a.eat(l))return b(p),"string";a.eat("&")||a.next()}}return b(m),"error"}function p(a,b){return a.eat("\\")?c(a,b,o):(a.next(),b(m),"error")}var d=/[a-z_]/,e=/[A-Z]/,f=/[0-9]/,g=/[0-9A-Fa-f]/,h=/[0-7]/,i=/[a-z_A-Z0-9']/,j=/[-!#$%&*+.\/<=>?@\\^|~:]/,k=/[(),;[\]`{}]/,l=/[ \t\v\f]/,q=function(){function b(b){return function(){for(var c=0;c","@","~","=>"),b("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<=","=<<","==",">",">=",">>",">>=","^","^^","||","*","**"),b("builtin")("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"),b("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","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"),a}();return{startState:function(){return{f:m}},copyState:function(a){return{f:a.f}},token:function(a,b){var c=b.f(a,function(a){b.f=a}),d=a.current();return d in q?q[d]:c}}}),CodeMirror.defineMIME("text/x-haskell","haskell"),CodeMirror.defineMode("htmlembedded",function(a,b){function g(a,b){return a.match(c,!1)?(b.token=h,e.token(a,b.scriptState)):f.token(a,b.htmlState)}function h(a,b){return a.match(d,!1)?(b.token=g,f.token(a,b.htmlState)):e.token(a,b.scriptState)}var c=b.scriptStartRegex||/^<%/i,d=b.scriptEndRegex||/^%>/i,e,f;return{startState:function(){return e=e||CodeMirror.getMode(a,b.scriptingModeSpec),f=f||CodeMirror.getMode(a,"htmlmixed"),{token:b.startOpen?h:g,htmlState:f.startState(),scriptState:e.startState()}},token:function(a,b){return b.token(a,b)},indent:function(a,b){return a.token==g?f.indent(a.htmlState,b):e.indent(a.scriptState,b)},copyState:function(a){return{token:a.token,htmlState:CodeMirror.copyState(f,a.htmlState),scriptState:CodeMirror.copyState(e,a.scriptState)}},electricChars:"/{}:"}},"htmlmixed"),CodeMirror.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),CodeMirror.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),CodeMirror.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),CodeMirror.defineMode("htmlmixed",function(a,b){function f(a,b){var f=c.token(a,b.htmlState);return f=="tag"&&a.current()==">"&&b.htmlState.context&&(/^script$/i.test(b.htmlState.context.tagName)?(b.token=h,b.localState=d.startState(c.indent(b.htmlState,"")),b.mode="javascript"):/^style$/i.test(b.htmlState.context.tagName)&&(b.token=i,b.localState=e.startState(c.indent(b.htmlState,"")),b.mode="css")),f}function g(a,b,c){var d=a.current(),e=d.search(b);return e>-1&&a.backUp(d.length-e),c}function h(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=f,b.localState=null,b.mode="html",f(a,b)):g(a,/<\/\s*script\s*>/,d.token(a,b.localState))}function i(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=f,b.localState=null,b.mode="html",f(a,b)):g(a,/<\/\s*style\s*>/,e.token(a,b.localState))}var c=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),d=CodeMirror.getMode(a,"javascript"),e=CodeMirror.getMode(a,"css");return{startState:function(){var a=c.startState();return{token:f,localState:null,mode:"html",htmlState:a}},copyState:function(a){if(a.localState)var b=CodeMirror.copyState(a.token==i?e:d,a.localState);return{token:a.token,localState:b,mode:a.mode,htmlState:CodeMirror.copyState(c,a.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(a,b){return a.token==f||/^\s*<\//.test(b)?c.indent(a.htmlState,b):a.token==h?d.indent(a.localState,b):e.indent(a.localState,b)},compareStates:function(a,b){return a.mode!=b.mode?!1:a.localState?CodeMirror.Pass:c.compareStates(a.htmlState,b.htmlState)},electricChars:"/{}:"}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed"),CodeMirror.defineMode("javascript",function(a,b){function g(a,b,c){return b.tokenize=c,c(a,b)}function h(a,b){var c=!1,d;while((d=a.next())!=null){if(d==b&&!c)return!1;c=!c&&d=="\\"}return c}function k(a,b,c){return i=a,j=c,b}function l(a,b){var c=a.next();if(c=='"'||c=="'")return g(a,b,m(c));if(/[\[\]{}\(\),;\:\.]/.test(c))return k(c);if(c=="0"&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),k("number","number");if(/\d/.test(c))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),k("number","number");if(c=="/")return a.eat("*")?g(a,b,n):a.eat("/")?(a.skipToEnd(),k("comment","comment")):b.reAllowed?(h(a,"/"),a.eatWhile(/[gimy]/),k("regexp","string-2")):(a.eatWhile(f),k("operator",null,a.current()));if(c=="#")return a.skipToEnd(),k("error","error");if(f.test(c))return a.eatWhile(f),k("operator",null,a.current());a.eatWhile(/[\w\$_]/);var d=a.current(),i=e.propertyIsEnumerable(d)&&e[d];return i&&b.kwAllowed?k(i.type,i.style,d):k("variable","variable",d)}function m(a){return function(b,c){return h(b,a)||(c.tokenize=l),k("string","string")}}function n(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=l;break}c=d=="*"}return k("comment","comment")}function p(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,d!=null&&(this.align=d)}function q(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0}function r(a,b,c,e,f){var g=a.cc;s.state=a,s.stream=f,s.marked=null,s.cc=g,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);for(;;){var h=g.length?g.pop():d?D:C;if(h(c,e)){while(g.length&&g[g.length-1].lex)g.pop()();return s.marked?s.marked:c=="variable"&&q(a,e)?"variable-2":b}}}function t(){for(var a=arguments.length-1;a>=0;a--)s.cc.push(arguments[a])}function u(){return t.apply(null,arguments),!0}function v(a){var b=s.state;if(b.context){s.marked="def";for(var c=b.localVars;c;c=c.next)if(c.name==a)return;b.localVars={name:a,next:b.localVars}}}function x(){s.state.context||(s.state.localVars=w),s.state.context={prev:s.state.context,vars:s.state.localVars}}function y(){s.state.localVars=s.state.context.vars,s.state.context=s.state.context.prev}function z(a,b){var c=function(){var c=s.state;c.lexical=new p(c.indented,s.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function A(){var a=s.state;a.lexical.prev&&(a.lexical.type==")"&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function B(a){return function(c){return c==a?u():a==";"?t():u(arguments.callee)}}function C(a){return a=="var"?u(z("vardef"),L,B(";"),A):a=="keyword a"?u(z("form"),D,C,A):a=="keyword b"?u(z("form"),C,A):a=="{"?u(z("}"),K,A):a==";"?u():a=="function"?u(R):a=="for"?u(z("form"),B("("),z(")"),N,B(")"),A,C,A):a=="variable"?u(z("stat"),G):a=="switch"?u(z("form"),D,z("}","switch"),B("{"),K,A,A):a=="case"?u(D,B(":")):a=="default"?u(B(":")):a=="catch"?u(z("form"),x,B("("),S,B(")"),C,A,y):t(z("stat"),D,B(";"),A)}function D(a){return o.hasOwnProperty(a)?u(F):a=="function"?u(R):a=="keyword c"?u(E):a=="("?u(z(")"),E,B(")"),A,F):a=="operator"?u(D):a=="["?u(z("]"),J(D,"]"),A,F):a=="{"?u(z("}"),J(I,"}"),A,F):u()}function E(a){return a.match(/[;\}\)\],]/)?t():t(D)}function F(a,b){if(a=="operator"&&/\+\+|--/.test(b))return u(F);if(a=="operator"||a==":")return u(D);if(a==";")return;if(a=="(")return u(z(")"),J(D,")"),A,F);if(a==".")return u(H,F);if(a=="[")return u(z("]"),D,B("]"),A,F)}function G(a){return a==":"?u(A,C):t(F,B(";"),A)}function H(a){if(a=="variable")return s.marked="property",u()}function I(a){a=="variable"&&(s.marked="property");if(o.hasOwnProperty(a))return u(B(":"),D)}function J(a,b){function c(d){return d==","?u(a,c):d==b?u():u(B(b))}return function(e){return e==b?u():t(a,c)}}function K(a){return a=="}"?u():t(C,K)}function L(a,b){return a=="variable"?(v(b),u(M)):u()}function M(a,b){if(b=="=")return u(D,M);if(a==",")return u(L)}function N(a){return a=="var"?u(L,P):a==";"?t(P):a=="variable"?u(O):t(P)}function O(a,b){return b=="in"?u(D):u(F,P)}function P(a,b){return a==";"?u(Q):b=="in"?u(D):u(D,B(";"),Q)}function Q(a){a!=")"&&u(D)}function R(a,b){if(a=="variable")return v(b),u(R);if(a=="(")return u(z(")"),x,J(S,")"),A,C,y)}function S(a,b){if(a=="variable")return v(b),u()}var c=a.indentUnit,d=b.json,e=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"};return{"if":b,"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":f,"false":f,"null":f,"undefined":f,NaN:f,Infinity:f}}(),f=/[+\-*&%=<>!?|]/,i,j,o={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},s={state:null,column:null,marked:null,cc:null},w={name:"this",next:{name:"arguments"}};return A.lex=!0,{startState:function(a){return{tokenize:l,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new p((a||0)-c,0,"block",!1),localVars:b.localVars,context:b.localVars&&{vars:b.localVars},indented:0}},token:function(a,b){a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation());if(a.eatSpace())return null;var c=b.tokenize(a,b);return i=="comment"?c:(b.reAllowed=i=="operator"||i=="keyword c"||!!i.match(/^[\[{}\(,;:]$/),b.kwAllowed=i!=".",r(b,c,i,j,a))},indent:function(a,b){if(a.tokenize!=l)return 0;var d=b&&b.charAt(0),e=a.lexical;e.type=="stat"&&d=="}"&&(e=e.prev);var f=e.type,g=d==f;return f=="vardef"?e.indented+4:f=="form"&&d=="{"?e.indented:f=="stat"||f=="form"?e.indented+c:e.info=="switch"&&!g?e.indented+(/^(?:case|default)\b/.test(b)?c:2*c):e.align?e.column+(g?0:1):e.indented+(g?0:c)},electricChars:":{}"}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMode("jinja2",function(a,b){function d(a,b){var c=a.next();if(c=="{")if(c=a.eat(/\{|%|#/))return a.eat("-"),b.tokenize=e(c),"tag"}function e(a){return a=="{"&&(a="}"),function(b,e){var f=b.next();return(f==a||f=="-"&&b.eat(a))&&b.eat("}")?(e.tokenize=d,"tag"):b.match(c)?"keyword":a=="#"?"comment":"string"}}var c=["block","endblock","for","endfor","in","true","false","loop","none","self","super","if","as","not","and","else","import","with","without","context"];return c=new RegExp("^(("+c.join(")|(")+"))\\b"),{startState:function(){return{tokenize:d}},token:function(a,b){return b.tokenize(a,b)}}}),CodeMirror.defineMode("css",function(a){function d(a,b){return c=b,a}function f(a){for(var b=0;b*\/]/.test(c)?d(null,"select-op"):/[;{}:\[\]()]/.test(c)?c==":"?(a.eatWhile(/[active|hover|link|visited]/),a.current().match(/active|hover|link|visited/)?d("tag","tag"):d(null,c)):d(null,c):c=="."?(a.eatWhile(/[\a-zA-Z0-9\-_]/),d("tag","tag")):c=="#"?(a.eatWhile(/[A-Za-z0-9]/),a.current().length===4||a.current().length===7?a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false)!=null?a.current().substring(1)!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false)?d("atom","tag"):(a.eatSpace(),/[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(a.peek())?d("atom","tag"):a.peek()=="}"?d("number","unit"):/[a-zA-Z\\]/.test(a.peek())?d("atom","tag"):a.eol()?d("atom","tag"):d("number","unit")):(a.eatWhile(/[\w\\\-]/),d("atom","tag")):(a.eatWhile(/[\w\\\-]/),d("atom","tag"))):c=="&"?(a.eatWhile(/[\w\-]/),d(null,c)):(a.eatWhile(/[\w\\\-_%.{]/),a.current().match(/http|https/)!=null?(a.eatWhile(/[\w\\\-_%.{:\/]/),d("string","string")):a.peek()=="<"||a.peek()==">"?d("tag","tag"):a.peek().match(/\(/)!=null?d(null,c):a.peek()=="/"&&b.stack[b.stack.length-1]!=undefined?d("string","string"):a.current().match(/\-\d|\-.\d/)?d("number","unit"):f(a.current())?d("tag","tag"):/\/|[\s\)]/.test(a.peek()||a.eol()||a.eatSpace()&&a.peek()=="/")&&a.current().indexOf(".")!==-1?a.current().substring(a.current().length-1,a.current().length)=="{"?(a.backUp(1),d("tag","tag")):a.eatSpace()&&a.peek().match(/[{<>.a-zA-Z]/)!=null||a.eol()?d("tag","tag"):d("string","string"):a.eol()?(a.current().substring(a.current().length-1,a.current().length)=="{"&&a.backUp(1),d("tag","tag")):d("variable","variable")):d(null,"compare");d(null,"compare")}function h(a,b){return a.skipToEnd(),b.tokenize=g,d("comment","comment")}function i(a,b){var c=!1,e;while((e=a.next())!=null){if(c&&e=="/"){b.tokenize=g;break}c=e=="*"}return d("comment","comment")}function j(a,b){var c=0,e;while((e=a.next())!=null){if(c>=2&&e==">"){b.tokenize=g;break}c=e=="-"?c+1:0}return d("comment","comment")}function k(a){return function(b,c){var e=!1,f;while((f=b.next())!=null){if(f==a&&!e)break;e=!e&&f=="\\"}return e||(c.tokenize=g),d("string","string")}}var b=a.indentUnit,c,e=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","legend","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr"];return{startState:function(a){return{tokenize:g,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;var d=b.tokenize(a,b),e=b.stack[b.stack.length-1];if(c=="hash"&&e=="rule")d="atom";else if(d=="variable")if(e=="rule")d=null;else if(!e||e=="@media{")d=a.current()=="when"?"variable":a.string.match(/#/g)!=undefined?null:/[\s,|\s\)]/.test(a.peek())?"tag":null;return e=="rule"&&/^[\{\};]$/.test(c)&&b.stack.pop(),c=="{"?e=="@media"?b.stack[b.stack.length-1]="@media{":b.stack.push("{"):c=="}"?b.stack.pop():c=="@media"?b.stack.push("@media"):e=="{"&&c!="comment"&&b.stack.push("rule"),d},indent:function(a,c){var d=a.stack.length;return/^\}/.test(c)&&(d-=a.stack[a.stack.length-1]=="rule"?2:1),a.baseIndent+d*b},electricChars:"}"}}),CodeMirror.defineMIME("text/x-less","less"),CodeMirror.mimeModes.hasOwnProperty("text/css")||CodeMirror.defineMIME("text/css","less"),CodeMirror.defineMode("lua",function(a,b){function d(a){return new RegExp("^(?:"+a.join("|")+")","i")}function e(a){return new RegExp("^(?:"+a.join("|")+")$","i")}function l(a){var b=0;while(a.eat("="))++b;return a.eat("["),b}function m(a,b){var c=a.next();return c=="-"&&a.eat("-")?a.eat("[")?(b.cur=n(l(a),"comment"))(a,b):(a.skipToEnd(),"comment"):c=='"'||c=="'"?(b.cur=o(c))(a,b):c=="["&&/[\[=]/.test(a.peek())?(b.cur=n(l(a),"string"))(a,b):/\d/.test(c)?(a.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(c)?(a.eatWhile(/[\w\\\-_.]/),"variable"):null}function n(a,b){return function(c,d){var e=null,f;while((f=c.next())!=null)if(e==null)f=="]"&&(e=0);else if(f=="=")++e;else{if(f=="]"&&e==a){d.cur=m;break}e=null}return b}}function o(a){return function(b,c){var d=!1,e;while((e=b.next())!=null){if(e==a&&!d)break;d=!d&&e=="\\"}return d||(c.cur=m),"string"}}var c=a.indentUnit,f=e(b.specials||[]),g=e(["_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"]),h=e(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),i=e(["function","if","repeat","do","\\(","{"]),j=e(["end","until","\\)","}"]),k=d(["end","until","\\)","}","else","elseif"]);return{startState:function(a){return{basecol:a||0,indentDepth:0,cur:m}},token:function(a,b){if(a.eatSpace())return null;var c=b.cur(a,b),d=a.current();return c=="variable"&&(h.test(d)?c="keyword":g.test(d)?c="builtin":f.test(d)&&(c="variable-2")),c!="comment"&&c!="string"&&(i.test(d)?++b.indentDepth:j.test(d)&&--b.indentDepth),c},indent:function(a,b){var d=k.test(b);return a.basecol+c*(a.indentDepth-(d?1:0))}}}),CodeMirror.defineMIME("text/x-lua","lua"),CodeMirror.defineMode("markdown",function(a,b){function s(a,b,c){return b.f=b.inline=c,c(a,b)}function t(a,b,c){return b.f=b.block=c,c(a,b)}function u(a){return a.em=!1,a.strong=!1,null}function v(a,b){var c;if(b.indentationDiff>=4)return b.indentation-=b.indentationDiff,a.skipToEnd(),e;if(a.eatSpace())return null;if(a.peek()==="#"||a.match(q))b.header=!0;else if(a.eat(">"))b.indentation++,b.quote=!0;else{if(a.peek()==="[")return s(a,b,C);if(a.match(n,!0))return h;if(c=a.match(o,!0)||a.match(p,!0))return b.indentation+=c[0].length,g}return s(a,b,b.inline)}function w(a,b){var d=c.token(a,b.htmlState);return d==="tag"&&b.htmlState.type!=="openTag"&&!b.htmlState.context&&(b.f=z,b.block=v),d}function x(a){var b=[];return a.strong?b.push(a.em?m:l):a.em&&b.push(k),a.header&&b.push(d),a.quote&&b.push(f),b.length?b.join(" "):null}function y(a,b){return a.match(r,!0)?x(b):undefined}function z(a,b){var c=b.text(a,b);if(typeof c!="undefined")return c;var d=a.next();if(d==="\\")return a.next(),x(b);if(d==="`")return s(a,b,F(e,"`"));if(d==="[")return s(a,b,A);if(d==="<"&&a.match(/^\w/,!1))return a.backUp(1),t(a,b,w);var f=x(b);return d==="*"||d==="_"?a.eat(d)?(b.strong=!b.strong)?x(b):f:(b.em=!b.em)?x(b):f:x(b)}function A(a,b){while(!a.eol()){var c=a.next();c==="\\"&&a.next();if(c==="]")return b.inline=b.f=B,i}return i}function B(a,b){a.eatSpace();var c=a.next();return c==="("||c==="["?s(a,b,F(j,c==="("?")":"]")):"error"}function C(a,b){return a.match(/^[^\]]*\]:/,!0)?(b.f=D,i):s(a,b,z)}function D(a,b){return a.eatSpace(),a.match(/^[^\s]+/,!0),b.f=b.inline=z,j}function E(a){return E[a]||(E[a]=new RegExp("^(?:[^\\\\\\"+a+"]|\\\\.)*(?:\\"+a+"|$)")),E[a]}function F(a,b,c){return c=c||z,function(d,e){return d.match(E(b)),e.inline=e.f=c,a}}var c=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),d="header",e="comment",f="quote",g="string",h="hr",i="link",j="string",k="em",l="strong",m="emstrong",n=/^([*\-=_])(?:\s*\1){2,}\s*$/,o=/^[*\-+]\s+/,p=/^[0-9]+\.\s+/,q=/^(?:\={3,}|-{3,})$/,r=/^[^\[*_\\<>`]+/;return{startState:function(){return{f:v,block:v,htmlState:c.startState(),indentation:0,inline:z,text:y,em:!1,strong:!1,header:!1,quote:!1}},copyState:function(a){return{f:a.f,block:a.block,htmlState:CodeMirror.copyState(c,a.htmlState),indentation:a.indentation,inline:a.inline,text:a.text,em:a.em,strong:a.strong,header:a.header,quote:a.quote}},token:function(a,b){if(a.sol()){if(a.match(/^\s*$/,!0))return u(b);b.header=!1,b.quote=!1,b.f=b.block;var c=a.match(/^\s*/,!0)[0].replace(/\t/g," ").length;b.indentationDiff=c-b.indentation,b.indentation=c;if(c>0)return null}return b.f(a,b)},blankLine:u,getType:x}},"xml"),CodeMirror.defineMIME("text/x-markdown","markdown"),CodeMirror.defineMode("mysql",function(a){function d(a){return new RegExp("^(?:"+a.join("|")+")$","i")}function h(a,b){var d=a.next();c=null;if(d=="$"||d=="?")return a.match(/^[\w\d]*/),"variable-2";if(d=="<"&&!a.match(/^[\s\u00a0=]/,!1))return a.match(/^[^\s\u00a0>]*>?/),"atom";if(d=='"'||d=="'")return b.tokenize=i(d),b.tokenize(a,b);if(d=="`")return b.tokenize=j(d),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(d))return c=d,null;if(d!="-"){if(g.test(d))return a.eatWhile(g),null;if(d==":")return a.eatWhile(/[\w\d\._\-]/),"atom";a.eatWhile(/[_\w\d]/);if(a.eat(":"))return a.eatWhile(/[\w\d_\-]/),"atom";var h=a.current(),k;return e.test(h)?null:f.test(h)?"keyword":"variable"}ch2=a.next();if(ch2=="-")return a.skipToEnd(),"comment"}function i(a){return function(b,c){var d=!1,e;while((e=b.next())!=null){if(e==a&&!d){c.tokenize=h;break}d=!d&&e=="\\"}return"string"}}function j(a){return function(b,c){var d=!1,e;while((e=b.next())!=null){if(e==a&&!d){c.tokenize=h;break}d=!d&&e=="\\"}return"variable-2"}}function k(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function l(a){a.indent=a.context.indent,a.context=a.context.prev}var b=a.indentUnit,c,e=d(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),f=d(["ACCESSIBLE","ALTER","AS","BEFORE","BINARY","BY","CASE","CHARACTER","COLUMN","CONTINUE","CROSS","CURRENT_TIMESTAMP","DATABASE","DAY_MICROSECOND","DEC","DEFAULT","DESC","DISTINCT","DOUBLE","EACH","ENCLOSED","EXIT","FETCH","FLOAT8","FOREIGN","GRANT","HIGH_PRIORITY","HOUR_SECOND","IN","INNER","INSERT","INT2","INT8","INTO","JOIN","KILL","LEFT","LINEAR","LOCALTIME","LONG","LOOP","MATCH","MEDIUMTEXT","MINUTE_SECOND","NATURAL","NULL","OPTIMIZE","OR","OUTER","PRIMARY","RANGE","READ_WRITE","REGEXP","REPEAT","RESTRICT","RIGHT","SCHEMAS","SENSITIVE","SHOW","SPECIFIC","SQLSTATE","SQL_CALC_FOUND_ROWS","STARTING","TERMINATED","TINYINT","TRAILING","UNDO","UNLOCK","USAGE","UTC_DATE","VALUES","VARCHARACTER","WHERE","WRITE","ZEROFILL","ALL","AND","ASENSITIVE","BIGINT","BOTH","CASCADE","CHAR","COLLATE","CONSTRAINT","CREATE","CURRENT_TIME","CURSOR","DAY_HOUR","DAY_SECOND","DECLARE","DELETE","DETERMINISTIC","DIV","DUAL","ELSEIF","EXISTS","FALSE","FLOAT4","FORCE","FULLTEXT","HAVING","HOUR_MINUTE","IGNORE","INFILE","INSENSITIVE","INT1","INT4","INTERVAL","ITERATE","KEYS","LEAVE","LIMIT","LOAD","LOCK","LONGTEXT","MASTER_SSL_VERIFY_SERVER_CERT","MEDIUMINT","MINUTE_MICROSECOND","MODIFIES","NO_WRITE_TO_BINLOG","ON","OPTIONALLY","OUT","PRECISION","PURGE","READS","REFERENCES","RENAME","REQUIRE","REVOKE","SCHEMA","SELECT","SET","SPATIAL","SQLEXCEPTION","SQL_BIG_RESULT","SSL","TABLE","TINYBLOB","TO","TRUE","UNIQUE","UPDATE","USING","UTC_TIMESTAMP","VARCHAR","WHEN","WITH","YEAR_MONTH","ADD","ANALYZE","ASC","BETWEEN","BLOB","CALL","CHANGE","CHECK","CONDITION","CONVERT","CURRENT_DATE","CURRENT_USER","DATABASES","DAY_MINUTE","DECIMAL","DELAYED","DESCRIBE","DISTINCTROW","DROP","ELSE","ESCAPED","EXPLAIN","FLOAT","FOR","FROM","GROUP","HOUR_MICROSECOND","IF","INDEX","INOUT","INT","INT3","INTEGER","IS","KEY","LEADING","LIKE","LINES","LOCALTIMESTAMP","LONGBLOB","LOW_PRIORITY","MEDIUMBLOB","MIDDLEINT","MOD","NOT","NUMERIC","OPTION","ORDER","OUTFILE","PROCEDURE","READ","REAL","RELEASE","REPLACE","RETURN","RLIKE","SECOND_MICROSECOND","SEPARATOR","SMALLINT","SQL","SQLWARNING","SQL_SMALL_RESULT","STRAIGHT_JOIN","THEN","TINYTEXT","TRIGGER","UNION","UNSIGNED","USE","UTC_TIME","VARBINARY","VARYING","WHILE","XOR","FULL","COLUMNS","MIN","MAX","STDEV","COUNT"]),g=/[*+\-<>=&|]/;return{startState:function(a){return{tokenize:h,context:null,indent:0,col:0}},token:function(a,b){a.sol()&&(b.context&&b.context.align==null&&(b.context.align=!1),b.indent=a.indentation());if(a.eatSpace())return null;var d=b.tokenize(a,b);d!="comment"&&b.context&&b.context.align==null&&b.context.type!="pattern"&&(b.context.align=!0);if(c=="(")k(b,")",a.column());else if(c=="[")k(b,"]",a.column());else if(c=="{")k(b,"}",a.column());else if(/[\]\}\)]/.test(c)){while(b.context&&b.context.type=="pattern")l(b);b.context&&c==b.context.type&&l(b)}else c=="."&&b.context&&b.context.type=="pattern"?l(b):/atom|string|variable/.test(d)&&b.context&&(/[\}\]]/.test(b.context.type)?k(b,"pattern",a.column()):b.context.type=="pattern"&&!b.context.align&&(b.context.align=!0,b.context.col=a.column()));return d},indent:function(a,c){var d=c&&c.charAt(0),e=a.context;if(/[\]\}]/.test(d))while(e&&e.type=="pattern")e=e.prev;var f=e&&d==e.type;return e?e.type=="pattern"?e.col:e.align?e.col+(f?0:1):e.indent+(f?0:b):0}}}),CodeMirror.defineMIME("text/x-mysql","mysql"),CodeMirror.defineMode("ntriples",function(){function a(a,b){var c=a.location,d;c==Location.PRE_SUBJECT&&b=="<"?d=Location.WRITING_SUB_URI:c==Location.PRE_SUBJECT&&b=="_"?d=Location.WRITING_BNODE_URI:c==Location.PRE_PRED&&b=="<"?d=Location.WRITING_PRED_URI:c==Location.PRE_OBJ&&b=="<"?d=Location.WRITING_OBJ_URI:c==Location.PRE_OBJ&&b=="_"?d=Location.WRITING_OBJ_BNODE:c==Location.PRE_OBJ&&b=='"'?d=Location.WRITING_OBJ_LITERAL:c==Location.WRITING_SUB_URI&&b==">"?d=Location.PRE_PRED:c==Location.WRITING_BNODE_URI&&b==" "?d=Location.PRE_PRED:c==Location.WRITING_PRED_URI&&b==">"?d=Location.PRE_OBJ:c==Location.WRITING_OBJ_URI&&b==">"?d=Location.POST_OBJ:c==Location.WRITING_OBJ_BNODE&&b==" "?d=Location.POST_OBJ:c==Location.WRITING_OBJ_LITERAL&&b=='"'?d=Location.POST_OBJ:c==Location.WRITING_LIT_LANG&&b==" "?d=Location.POST_OBJ:c==Location.WRITING_LIT_TYPE&&b==">"?d=Location.POST_OBJ:c==Location.WRITING_OBJ_LITERAL&&b=="@"?d=Location.WRITING_LIT_LANG:c==Location.WRITING_OBJ_LITERAL&&b=="^"?d=Location.WRITING_LIT_TYPE:b!=" "||c!=Location.PRE_SUBJECT&&c!=Location.PRE_PRED&&c!=Location.PRE_OBJ&&c!=Location.POST_OBJ?c==Location.POST_OBJ&&b=="."?d=Location.PRE_SUBJECT:d=Location.ERROR:d=c,a.location=d}return Location={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12},untilSpace=function(a){return a!=" "},untilEndURI=function(a){return a!=">"},{startState:function(){return{location:Location.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(b,c){var d=b.next();if(d=="<"){a(c,d);var e="";return b.eatWhile(function(a){return a!="#"&&a!=">"?(e+=a,!0):!1}),c.uris.push(e),b.match("#",!1)?"variable":(b.next(),a(c,">"),"variable")}if(d=="#"){var f="";return b.eatWhile(function(a){return a!=">"&&a!=" "?(f+=a,!0):!1}),c.anchors.push(f),"variable-2"}if(d==">")return a(c,">"),"variable";if(d=="_"){a(c,d);var g="";return b.eatWhile(function(a){return a!=" "?(g+=a,!0):!1}),c.bnodes.push(g),b.next(),a(c," "),"builtin"}if(d=='"')return a(c,d),b.eatWhile(function(a){return a!='"'}),b.next(),b.peek()!="@"&&b.peek()!="^"&&a(c,'"'),"string";if(d=="@"){a(c,"@");var h="";return b.eatWhile(function(a){return a!=" "?(h+=a,!0):!1}),c.langs.push(h),b.next(),a(c," "),"string-2"}if(d=="^"){b.next(),a(c,"^");var i="";return b.eatWhile(function(a){return a!=">"?(i+=a,!0):!1}),c.types.push(i),b.next(),a(c,">"),"variable"}d==" "&&a(c,d),d=="."&&a(c,d)}}}),CodeMirror.defineMIME("text/n-triples","ntriples"),CodeMirror.defineMode("pascal",function(a){function b(a){var b={},c=a.split(" ");for(var d=0;d!?|\/]/;return{startState:function(a){return{tokenize:null}},token:function(a,b){if(a.eatSpace())return null;var c=(b.tokenize||f)(a,b);return c=="comment"||c=="meta"?c:c},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-pascal","pascal"),CodeMirror.defineMode("perl",function(a,b){function f(a,b,c,d,e){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(a,b){var f=!1,g,i=0;while(g=a.next()){if(g===c[i]&&!f)return c[++i]!==undefined?(b.chain=c[i],b.style=d,b.tail=e):e&&a.eatWhile(e),b.tokenize=h,d;f=!f&&g=="\\"}return d},b.tokenize(a,b)}function g(a,b,c){return b.tokenize=function(a,b){return a.string==c&&(b.tokenize=h),a.skipToEnd(),"string"},b.tokenize(a,b)}function h(a,b){if(a.eatSpace())return null;if(b.chain)return f(a,b,b.chain,b.style,b.tail);if(a.match(/^\-?[\d\.]/,!1)&&a.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(a.match(/^<<(?=\w)/))return a.eatWhile(/\w/),g(a,b,a.current().substr(2));if(a.sol()&&a.match(/^\=item(?!\w)/))return g(a,b,"=cut");var h=a.next();if(h=='"'||h=="'"){if(a.prefix(3)=="<<"+h){var i=a.pos;a.eatWhile(/\w/);var j=a.current().substr(1);if(j&&a.eat(h))return g(a,b,j);a.pos=i}return f(a,b,[h],"string")}if(h=="q"){var k=a.look(-2);if(!k||!/\w/.test(k)){k=a.look(0);if(k=="x"){k=a.look(1);if(k=="(")return a.eatSuffix(2),f(a,b,[")"],d,e);if(k=="[")return a.eatSuffix(2),f(a,b,["]"],d,e);if(k=="{")return a.eatSuffix(2),f(a,b,["}"],d,e);if(k=="<")return a.eatSuffix(2),f(a,b,[">"],d,e);if(/[\^'"!~\/]/.test(k))return a.eatSuffix(1),f(a,b,[a.eat(k)],d,e)}else if(k=="q"){k=a.look(1);if(k=="(")return a.eatSuffix(2),f(a,b,[")"],"string");if(k=="[")return a.eatSuffix(2),f(a,b,["]"],"string");if(k=="{")return a.eatSuffix(2),f(a,b,["}"],"string");if(k=="<")return a.eatSuffix(2),f(a,b,[">"],"string");if(/[\^'"!~\/]/.test(k))return a.eatSuffix(1),f(a,b,[a.eat(k)],"string")}else if(k=="w"){k=a.look(1);if(k=="(")return a.eatSuffix(2),f(a,b,[")"],"bracket");if(k=="[")return a.eatSuffix(2),f(a,b,["]"],"bracket");if(k=="{")return a.eatSuffix(2),f(a,b,["}"],"bracket");if(k=="<")return a.eatSuffix(2),f(a,b,[">"],"bracket");if(/[\^'"!~\/]/.test(k))return a.eatSuffix(1),f(a,b,[a.eat(k)],"bracket")}else if(k=="r"){k=a.look(1);if(k=="(")return a.eatSuffix(2),f(a,b,[")"],d,e);if(k=="[")return a.eatSuffix(2),f(a,b,["]"],d,e);if(k=="{")return a.eatSuffix(2),f(a,b,["}"],d,e);if(k=="<")return a.eatSuffix(2),f(a,b,[">"],d,e);if(/[\^'"!~\/]/.test(k))return a.eatSuffix(1),f(a,b,[a.eat(k)],d,e)}else if(/[\^'"!~\/(\[{<]/.test(k)){if(k=="(")return a.eatSuffix(1),f(a,b,[")"],"string");if(k=="[")return a.eatSuffix(1),f(a,b,["]"],"string");if(k=="{")return a.eatSuffix(1),f(a,b,["}"],"string");if(k=="<")return a.eatSuffix(1),f(a,b,[">"],"string");if(/[\^'"!~\/]/.test(k))return f(a,b,[a.eat(k)],"string")}}}if(h=="m"){var k=a.look(-2);if(!k||!/\w/.test(k)){k=a.eat(/[(\[{<\^'"!~\/]/);if(k){if(/[\^'"!~\/]/.test(k))return f(a,b,[k],d,e);if(k=="(")return f(a,b,[")"],d,e);if(k=="[")return f(a,b,["]"],d,e);if(k=="{")return f(a,b,["}"],d,e);if(k=="<")return f(a,b,[">"],d,e)}}}if(h=="s"){var k=/[\/>\]})\w]/.test(a.look(-2));if(!k){k=a.eat(/[(\[{<\^'"!~\/]/);if(k)return k=="["?f(a,b,["]","]"],d,e):k=="{"?f(a,b,["}","}"],d,e):k=="<"?f(a,b,[">",">"],d,e):k=="("?f(a,b,[")",")"],d,e):f(a,b,[k,k],d,e)}}if(h=="y"){var k=/[\/>\]})\w]/.test(a.look(-2));if(!k){k=a.eat(/[(\[{<\^'"!~\/]/);if(k)return k=="["?f(a,b,["]","]"],d,e):k=="{"?f(a,b,["}","}"],d,e):k=="<"?f(a,b,[">",">"],d,e):k=="("?f(a,b,[")",")"],d,e):f(a,b,[k,k],d,e)}}if(h=="t"){var k=/[\/>\]})\w]/.test(a.look(-2));if(!k){k=a.eat("r");if(k){k=a.eat(/[(\[{<\^'"!~\/]/);if(k)return k=="["?f(a,b,["]","]"],d,e):k=="{"?f(a,b,["}","}"],d,e):k=="<"?f(a,b,[">",">"],d,e):k=="("?f(a,b,[")",")"],d,e):f(a,b,[k,k],d,e)}}}if(h=="`")return f(a,b,[h],"variable-2");if(h=="/")return/~\s*$/.test(a.prefix())?f(a,b,[h],d,e):"operator";if(h=="$"){var i=a.pos;if(a.eatWhile(/\d/)||a.eat("{")&&a.eatWhile(/\d/)&&a.eat("}"))return"variable-2";a.pos=i}if(/[$@%]/.test(h)){var i=a.pos;if(a.eat("^")&&a.eat(/[A-Z]/)||!/[@$%&]/.test(a.look(-2))&&a.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var k=a.current();if(c[k])return"variable-2"}a.pos=i}if(/[$@%&]/.test(h))if(a.eatWhile(/[\w$\[\]]/)||a.eat("{")&&a.eatWhile(/[\w$\[\]]/)&&a.eat("}")){var k=a.current();return c[k]?"variable-2":"variable"}if(h=="#"&&a.look(-2)!="$")return a.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(h)){var i=a.pos;a.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);if(c[a.current()])return"operator";a.pos=i}if(h=="_"&&a.pos==1){if(a.suffix(6)=="_END__")return f(a,b,["\0"],"comment");if(a.suffix(7)=="_DATA__")return f(a,b,["\0"],"variable-2");if(a.suffix(7)=="_C__")return f(a,b,["\0"],"string")}if(/\w/.test(h)){var i=a.pos;if(a.look(-2)=="{"&&(a.look(0)=="}"||a.eatWhile(/\w/)&&a.look(0)=="}"))return"string";a.pos=i}if(/[A-Z]/.test(h)){var l=a.look(-2),i=a.pos;a.eatWhile(/[A-Z_]/);if(!/[\da-z]/.test(a.look(0))){var k=c[a.current()];return k?(k[1]&&(k=k[0]),l!=":"?k==1?"keyword":k==2?"def":k==3?"atom":k==4?"operator":k==5?"variable-2":"meta":"meta"):"meta"}a.pos=i}if(/[a-zA-Z_]/.test(h)){var l=a.look(-2);a.eatWhile(/\w/);var k=c[a.current()];return k?(k[1]&&(k=k[0]),l!=":"?k==1?"keyword":k==2?"def":k==3?"atom":k==4?"operator":k==5?"variable-2":"meta":"meta"):"meta"}return null}var c={"->":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},d="string-2",e=/[goseximacplud]/;return{startState:function(){return{tokenize:h,chain:null,style:null,tail:null}},token:function(a,b){return(b.tokenize||h)(a,b)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-perl","perl"),CodeMirror.StringStream.prototype.look=function(a){return this.string.charAt(this.pos+(a||0))},CodeMirror.StringStream.prototype.prefix=function(a){if(a){var b=this.pos-a;return this.string.substr(b>=0?b:0,a)}return this.string.substr(0,this.pos-1)},CodeMirror.StringStream.prototype.suffix=function(a){var b=this.string.length,c=b-this.pos+1;return this.string.substr(this.pos,a&&a=(c=this.string.length-1)?this.pos=c:this.pos=b},function(){function a(a){var b={},c=a.split(" ");for(var d=0;d",!1))a.next();return"comment"},"/":function(a,b){if(a.eat("/")){while(!a.eol()&&!a.match("?>",!1))a.next();return"comment"}return!1}}};CodeMirror.defineMode("php",function(a,b){function h(a,b){var c=b.mode=="php";a.sol()&&b.pending!='"'&&(b.pending=null);if(b.curMode==d){if(a.match(/^<\?\w*/))return b.curMode=g,b.curState=b.php,b.curClose="?>",b.mode="php","meta";if(b.pending=='"'){while(!a.eol()&&a.next()!='"');var i="string"}else if(b.pending&&a.pos/.test(j)?b.pending='"':b.pending={end:a.pos,style:i},a.backUp(j.length-k)):i=="tag"&&a.current()==">"&&b.curState.context&&(/^script$/i.test(b.curState.context.tagName)?(b.curMode=e,b.curState=e.startState(d.indent(b.curState,"")),b.curClose=/^<\/\s*script\s*>/i,b.mode="javascript"):/^style$/i.test(b.curState.context.tagName)&&(b.curMode=f,b.curState=f.startState(d.indent(b.curState,"")),b.curClose=/^<\/\s*style\s*>/i,b.mode="css")),i}return(!c||b.php.tokenize==null)&&a.match(b.curClose,c)?(b.curMode=d,b.curState=b.html,b.curClose=null,b.mode="html",c?"meta":h(a,b)):b.curMode.token(a,b.curState)}var d=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),e=CodeMirror.getMode(a,"javascript"),f=CodeMirror.getMode(a,"css"),g=CodeMirror.getMode(a,c);return{startState:function(){var a=d.startState();return{html:a,php:g.startState(),curMode:b.startOpen?g:d,curState:b.startOpen?g.startState():a,curClose:b.startOpen?/^\?>/:null,mode:b.startOpen?"php":"html",pending:null}},copyState:function(a){var b=a.html,c=CodeMirror.copyState(d,b),e=a.php,f=CodeMirror.copyState(g,e),h;return a.curState==b?h=c:a.curState==e?h=f:h=CodeMirror.copyState(a.curMode,a.curState),{html:c,php:f,curMode:a.curMode,curState:h,curClose:a.curClose,mode:a.mode,pending:a.pending}},token:h,indent:function(a,b){return a.curMode!=g&&/^\s*<\//.test(b)||a.curMode==g&&/^\?>/.test(b)?d.indent(a.html,b):a.curMode.indent(a.curState,b)},electricChars:"/{}:"}},"xml","clike","javascript","css"),CodeMirror.defineMIME("application/x-httpd-php","php"),CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),CodeMirror.defineMIME("text/x-php",c)}(),CodeMirror.defineMode("pig",function(a,b){function i(a,b,c){return b.tokenize=c,c(a,b)}function k(a,b){return j=a,b}function l(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=n;break}c=d=="*"}return k("comment","comment")}function m(a){return function(b,c){var d=!1,e,f=!1;while((e=b.next())!=null){if(e==a&&!d){f=!0;break}d=!d&&e=="\\"}if(f||!d&&!g)c.tokenize=n;return k("string","error")}}function n(a,b){var c=a.next();return c=='"'||c=="'"?i(a,b,m(c)):/[\[\]{}\(\),;\.]/.test(c)?k(c):/\d/.test(c)?(a.eatWhile(/[\w\.]/),k("number","number")):c=="/"?a.eat("*")?i(a,b,l):(a.eatWhile(h),k("operator","operator")):c=="-"?a.eat("-")?(a.skipToEnd(),k("comment","comment")):(a.eatWhile(h),k("operator","operator")):h.test(c)?(a.eatWhile(h),k("operator","operator")):(a.eatWhile(/[\w\$_]/),d&&d.propertyIsEnumerable(a.current().toUpperCase())&&!a.eat(")")&&!a.eat(".")?("keyword","keyword"):e&&e.propertyIsEnumerable(a.current().toUpperCase())?("keyword","variable-2"):f&&f.propertyIsEnumerable(a.current().toUpperCase())?("keyword","variable-3"):k("word","pig-word"))}var c=a.indentUnit,d=b.keywords,e=b.builtins,f=b.types,g=b.multiLineStrings,h=/[*+\-%<>=&?:\/!|]/,j;return{startState:function(a){return{tokenize:n,startOfLine:!0}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c}}}),function(){function a(a){var b={},c=a.split(" ");for(var d=0;d!?:\/|]/,k;return{startState:function(a){return{tokenize:m,startOfLine:!0}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c}}}),function(){function a(a){var b={},c=a.split(" ");for(var d=0;dd?s="indent":l0&&w(a,b)}if(a.eatSpace())return null;var m=a.peek();if(m==="#")return a.skipToEnd(),"comment";if(a.match(/^[0-9\.]/,!1)){var n=!1;a.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),a.match(/^\d+\.\d*/)&&(n=!0),a.match(/^\.\d+/)&&(n=!0);if(n)return a.eat(/J/i),"number";var o=!1;a.match(/^0x[0-9a-f]+/i)&&(o=!0),a.match(/^0b[01]+/i)&&(o=!0),a.match(/^0o[0-7]+/i)&&(o=!0),a.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(a.eat(/J/i),o=!0),a.match(/^0(?![\dx])/i)&&(o=!0);if(o)return a.eat(/L/i),"number"}return a.match(p)?(b.tokenize=u(a.current()),b.tokenize(a,b)):a.match(i)||a.match(h)?null:a.match(g)||a.match(e)||a.match(k)?"operator":a.match(f)?null:a.match(q)?"keyword":a.match(r)?"builtin":a.match(j)?"variable":(a.next(),c)}function u(a){while("rub".indexOf(a.charAt(0).toLowerCase())>=0)a=a.substr(1);var d=a.length==1,e="string";return function(g,h){while(!g.eol()){g.eatWhile(/[^'"\\]/);if(g.eat("\\")){g.next();if(d&&g.eol())return e}else{if(g.match(a))return h.tokenize=t,e;g.eat(/['"]/)}}if(d){if(b.singleLineStringErrors)return c;h.tokenize=t}return e}}function v(b,c,d){d=d||"py";var e=0;if(d==="py"){if(c.scopes[0].type!=="py"){c.scopes[0].offset=b.indentation();return}for(var f=0;f0&&a.eol()&&b.scopes[0].type=="py"&&(b.scopes.length>1&&b.scopes.shift(),b.dedent-=1),d))}var c="error",e=new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"),f=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),g=new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),h=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),i=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),j=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),k=d(["and","or","not","is","in"]),l=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield"],m=["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__"],n={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]},o={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};if(!b.version||parseInt(b.version,10)!==3){l=l.concat(n.keywords),m=m.concat(n.builtins);var p=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}else{l=l.concat(o.keywords),m=m.concat(o.builtins);var p=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}var q=d(l),r=d(m),s=null,y={startState:function(a){return{tokenize:t,scopes:[{offset:a||0,type:"py"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken={style:c,content:a.current()},a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a,b){return a.tokenize!=t?0:a.scopes[0].offset}};return y}),CodeMirror.defineMIME("text/x-python","python"),CodeMirror.defineMode("r",function(a){function b(a){var b=a.split(" "),c={};for(var d=0;d=!&|~$:]/,h;return{startState:function(b){return{tokenize:i,ctx:{type:"top",indent:-a.indentUnit,align:!1},indent:0,afterIdent:!1}},token:function(a,b){a.sol()&&(b.ctx.align==null&&(b.ctx.align=!1),b.indent=a.indentation());if(a.eatSpace())return null;var c=b.tokenize(a,b);c!="comment"&&b.ctx.align==null&&(b.ctx.align=!0);var d=b.ctx.type;return(h==";"||h=="{"||h=="}")&&d=="block"&&l(b),h=="{"?k(b,"}",a):h=="("?(k(b,")",a),b.afterIdent&&(b.ctx.argList=!0)):h=="["?k(b,"]",a):h=="block"?k(b,"block",a):h==d&&l(b),b.afterIdent=c=="variable"||c=="keyword",c},indent:function(b,c){if(b.tokenize!=i)return 0;var d=c&&c.charAt(0),e=b.ctx,f=d==e.type;return e.type=="block"?e.indent+(d=="{"?0:a.indentUnit):e.align?e.column+(f?0:1):e.indent+(f?0:a.indentUnit)}}}),CodeMirror.defineMIME("text/x-rsrc","r"),CodeMirror.defineMode("changes",function(a,b){var c=/^-+$/,d=/^(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} - /,e=/^[\w+.-]+@[\w.-]+/;return{token:function(a){if(a.sol()){if(a.match(c))return"tag";if(a.match(d))return"tag"}return a.match(e)?"string":(a.next(),null)}}}),CodeMirror.defineMIME("text/x-rpm-changes","changes"),CodeMirror.defineMode("spec",function(a,b){var c=/^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,d=/^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/,e=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/,f=/^%(ifnarch|ifarch|if)/,g=/^%(else|endif)/,h=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(a,b){var i=a.peek();if(i=="#")return a.skipToEnd(),"comment";if(a.sol()){if(a.match(d))return"preamble";if(a.match(e))return"section"}if(a.match(/^\$\w+/))return"def";if(a.match(/^\$\{\w+\}/))return"def";if(a.match(g))return"keyword";if(a.match(f))return b.controlFlow=!0,"keyword";if(b.controlFlow){if(a.match(h))return"operator";if(a.match(/^(\d+)/))return"number";a.eol()&&(b.controlFlow=!1)}if(a.match(c))return"number";if(a.match(/^%[\w]+/))return a.match(/^\(/)&&(b.macroParameters=!0),"macro";if(b.macroParameters){if(a.match(/^\d+/))return"number";if(a.match(/^\)/))return b.macroParameters=!1,"macro"}return a.match(/^%\{\??[\w \-]+\}/)?"macro":(a.next(),null)}}}),CodeMirror.defineMIME("text/x-rpm-spec","spec"),CodeMirror.defineMode("rst",function(a,b){function c(a,b,c){a.fn=b,d(a,c)}function d(a,b){a.ctx=b||{}}function e(a,b){if(b&&typeof b!="string"){var d=b.current();b=d[d.length-1]}c(a,x,{back:b})}function f(a){if(a){var b=CodeMirror.listModes();for(var c in b)if(b[c]==a)return!0}return!1}function g(b){return f(b)?CodeMirror.getMode(a,b):null}function x(a,b){function l(a){return f||!b.ctx.back||a.test(b.ctx.back)}function m(b){return a.eol()||a.match(b,!1)}function n(b){return a.match(b)&&l(/\W/)&&m(/\W/)}var d,f,g;if(a.eat(/\\/))return d=a.next(),e(b,d),null;f=a.sol();if(f&&(d=a.eat(j))){for(g=0;a.eat(d);g++);if(g>=3&&a.match(/^\s*$/))return e(b,null),"header";a.backUp(g+1)}if(f&&a.match(q))return a.eol()||c(b,z),"meta";if(a.match(r)){if(!h)c(b,C);else{var k=h;c(b,C,{mode:k,local:k.startState()})}return"meta"}if(f&&a.match(w,!1)){if(!i)return c(b,C),"meta";var k=i;return c(b,C,{mode:k,local:k.startState()}),null}if(n(o))return e(b,a),"footnote";if(n(p))return e(b,a),"citation";d=a.next();if(l(s)){if(!(d!==":"&&d!=="|"||!a.eat(/\S/))){var t;return d===":"?t="builtin":t="atom",c(b,y,{ch:d,wide:!1,prev:null,token:t}),t}if(d==="*"||d==="`"){var u=d,v=!1;d=a.next(),d==u&&(v=!0,d=a.next());if(d&&!/\s/.test(d)){var t;return u==="*"?t=v?"strong":"em":t=v?"string":"string-2",c(b,y,{ch:u,wide:v,prev:null,token:t}),t}}}return e(b,d),null}function y(a,b){function g(a){return b.ctx.prev=a,f}var d=a.next(),f=b.ctx.token;if(d!=b.ctx.ch)return g(d);if(/\s/.test(b.ctx.prev))return g(d);if(b.ctx.wide){d=a.next();if(d!=b.ctx.ch)return g(d)}return!a.eol()&&!t.test(a.peek())?(b.ctx.wide&&a.backUp(1),g(d)):(c(b,x),e(b,d),f)}function z(a,b){var d=null;if(a.match(k))d="attribute";else if(a.match(l))d="link";else if(a.match(m))d="quote";else{if(!a.match(n))return a.eatSpace(),a.eol()?(e(b,a),null):(a.skipToEnd(),c(b,B),"comment");d="quote"}return c(b,A,{start:!0}),d}function A(a,b){var c="body";return!b.ctx.start||a.sol()?D(a,b,c):(a.skipToEnd(),d(b),c)}function B(a,b){return D(a,b,"comment")}function C(a,b){return h?a.sol()?(a.eatSpace()||e(b,a),null):h.token(a,b.ctx.local):D(a,b,"meta")}function D(a,b,c){return a.eol()||a.eatSpace()?(a.skipToEnd(),c):(e(b,a),null)}var h=g(b.verbatim),i=g("python"),j=/^[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/,k=/^\s*\w([-:.\w]*\w)?::(\s|$)/,l=/^\s*_[\w-]+:(\s|$)/,m=/^\s*\[(\d+|#)\](\s|$)/,n=/^\s*\[[A-Za-z][\w-]*\](\s|$)/,o=/^\[(\d+|#)\]_/,p=/^\[[A-Za-z][\w-]*\]_/,q=/^\.\.(\s|$)/,r=/^::\s*$/,s=/^[-\s"([{/:.,;!?\\_]/,u=/^\s*((\d+|[A-Za-z#])[.)]|\((\d+|[A-Z-a-z#])\))\s/,v=/^\s*[-\+\*]\s/,w=/^\s+(>>>|In \[\d+\]:)\s/;return{startState:function(){return{fn:x,ctx:{}}},copyState:function(a){return{fn:a.fn,ctx:a.ctx}},token:function(a,b){var c=b.fn(a,b);return c}}},"python"),CodeMirror.defineMIME("text/x-rst","rst"),CodeMirror.defineMode("ruby",function(a,b){function c(a){var b={};for(var c=0,d=a.length;c")?"arrow":/[=+\-\/*:\.^%<>~|]/.test(c)?(a.eatWhile(/[=+\-\/*:\.^%<>~|]/),"operator"):null:(h="|",null)}function k(){var a=1;return function(b,c){if(b.peek()=="}"){a--;if(a==0)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)}else b.peek()=="{"&&a++;return j(b,c)}}function l(a,b,c,d){return function(e,f){var g=!1,h;while((h=e.next())!=null){if(h==a&&(d||!g)){f.tokenize.pop();break}if(c&&h=="#"&&!g&&e.eat("{")){f.tokenize.push(k(arguments.callee));break}g=!g&&h=="\\"}return b}}function m(a){return function(b,c){return b.match(a)?c.tokenize.pop():b.skipToEnd(),"string"}}function n(a,b){return a.sol()&&a.match("=end")&&a.eol()&&b.tokenize.pop(),a.skipToEnd(),"comment"}var d=c(["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"]),e=c(["def","class","case","for","while","do","module","then","catch","loop","proc","begin"]),f=c(["end","until"]),g={"[":"]","{":"}","(":")"},h;return{startState:function(){return{tokenize:[j],indented:0,context:{type:"top",indented:-a.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(a,b){a.sol()&&(b.indented=a.indentation());var c=b.tokenize[b.tokenize.length-1](a,b),g;if(c=="ident"){var i=a.current();c=d.propertyIsEnumerable(a.current())?"keyword":/^[A-Z]/.test(i)?"tag":b.lastTok=="def"||b.lastTok=="class"||b.varList?"def":"variable",e.propertyIsEnumerable(i)?g="indent":f.propertyIsEnumerable(i)?g="dedent":(i=="if"||i=="unless")&&a.column()==a.indentation()&&(g="indent")}if(h||c&&c!="comment")b.lastTok=i||h||c;return h=="|"&&(b.varList=!b.varList),g=="indent"||/[\(\[\{]/.test(h)?b.context={prev:b.context,type:h||c,indented:b.indented}:(g=="dedent"||/[\)\]\}]/.test(h))&&b.context.prev&&(b.context=b.context.prev),a.eol()&&(b.continuedLine=h=="\\"||c=="operator"),c},indent:function(b,c){if(b.tokenize[b.tokenize.length-1]!=j)return 0;var d=c&&c.charAt(0),e=b.context,f=e.type==g[d]||e.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(c);return e.indented+(f?0:a.indentUnit)+(b.continuedLine?a.indentUnit:0)},electricChars:"}de"}}),CodeMirror.defineMIME("text/x-ruby","ruby"),CodeMirror.defineMode("rust",function(){function h(a,b){return f=a,b}function i(a,b){var c=a.next();if(c=='"')return b.tokenize=j,b.tokenize(a,b);if(c=="'")return f="atom",a.eat("\\")?a.skipTo("'")?(a.next(),"string"):"error":(a.next(),a.eat("'")?"string":"error");if(c=="/"){if(a.eat("/"))return a.skipToEnd(),"comment";if(a.eat("*"))return b.tokenize=k(1),b.tokenize(a,b)}if(c=="#")return a.eat("[")?(f="open-attr",null):(a.eatWhile(/\w/),h("macro","meta"));if(c==":"&&a.match(":<"))return h("op",null);if(c.match(/\d/)||c=="."&&a.eat(/\d/)){var d=!1;return!a.match(/^x[\da-f]+/i)&&!a.match(/^b[01]+/)&&(a.eatWhile(/\d/),a.eat(".")&&(d=!0,a.eatWhile(/\d/)),a.match(/^e[+\-]?\d+/i)&&(d=!0)),d?a.match(/^f(?:32|64)/):a.match(/^[ui](?:8|16|32|64)/),h("atom","number")}return c.match(/[()\[\]{}:;,]/)?h(c,null):c=="-"&&a.eat(">")?h("->",null):c.match(e)?(a.eatWhile(e),h("op",null)):(a.eatWhile(/\w/),g=a.current(),a.match(/^::\w/)?(a.backUp(1),h("prefix","variable-2")):b.keywords.propertyIsEnumerable(g)?h(b.keywords[g],g.match(/true|false/)?"atom":"keyword"):h("name","variable"))}function j(a,b){var c,d=!1;while(c=a.next()){if(c=='"'&&!d)return b.tokenize=i,h("atom","string");d=!d&&c=="\\"}return h("op","string")}function k(a){return function(b,c){var d=null,e;while(e=b.next()){if(e=="/"&&d=="*"){if(a==1){c.tokenize=i;break}return c.tokenize=k(a-1),c.tokenize(b,c)}if(e=="*"&&d=="/")return c.tokenize=k(a+1),c.tokenize(b,c);d=e}return"comment"}}function m(){for(var a=arguments.length-1;a>=0;a--)l.cc.push(arguments[a])}function n(){return m.apply(null,arguments),!0}function o(a,b){var c=function(){var c=l.state;c.lexical={indented:c.indented,column:l.stream.column(),type:a,prev:c.lexical,info:b}};return c.lex=!0,c}function p(){var a=l.state;a.lexical.prev&&(a.lexical.type==")"&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function q(){l.state.keywords=d}function r(){l.state.keywords=c}function s(a,b){function c(d){return d==","?n(a,c):d==b?n():n(c)}return function(d){return d==b?n():m(a,c)}}function t(a,b){return n(o("stat",b),a,p,u)}function u(a){return a=="}"?n():a=="let"?t(C,"let"):a=="fn"?t(G):a=="type"?n(o("stat"),H,v,p,u):a=="enum"?t(I):a=="mod"?t(K):a=="iface"?t(L):a=="impl"?t(M):a=="open-attr"?n(o("]"),s(w,"]"),p):a=="ignore"||a.match(/[\]\);,]/)?n(u):m(o("stat"),w,p,v,u)}function v(a){return a==";"?n():m()}function w(a){return a=="atom"||a=="name"?n(x):a=="{"?n(o("}"),z,p):a.match(/[\[\(]/)?Y(a,w):a.match(/[\]\)\};,]/)?m():a=="if-style"?n(w,w):a=="else-style"||a=="op"?n(w):a=="for"?n(S,E,F,w,w):a=="alt"?n(w,U):a=="fn"?n(G):a=="macro"?n(X):n()}function x(a){return g=="."?n(y):g=="::<"?n(N,x):a=="op"||g==":"?n(w):a=="("||a=="["?Y(a,w):m()}function y(a){return g.match(/^\w+$/)?(l.marked="variable",n(x)):m(w)}function z(a){if(a=="op"){if(g=="|")return n(B,p,o("}","block"),u);if(g=="||")return n(p,o("}","block"),u)}return g=="mutable"||g.match(/^\w+$/)&&l.stream.peek()==":"&&!l.stream.match("::",!1)?m(A(w)):m(u)}function A(a){function b(c){return g=="mutable"||g=="with"?(l.marked="keyword",n(b)):g.match(/^\w*$/)?(l.marked="variable",n(b)):c==":"?n(a,b):c=="}"?n():n(b)}return b}function B(a){return a=="name"?(l.marked="def",n(B)):a=="op"&&g=="|"?n():n(B)}function C(a){return a.match(/[\]\)\};]/)?n():g=="="?n(w,D):a==","?n(C):m(S,E,C)}function D(a){return a.match(/[\]\)\};,]/)?m(C):m(w,D)}function E(a){return a==":"?n(q,P,r):m()}function F(a){return a=="name"&&g=="in"?(l.marked="keyword",n()):m()}function G(a){return g=="@"||g=="~"?(l.marked="keyword",n(G)):a=="name"?(l.marked="def",n(G)):g=="<"?n(N,G):a=="{"?m(w):a=="("?n(o(")"),s(O,")"),p,G):a=="->"?n(q,P,r,G):a==";"?n():n(G)}function H(a){return a=="name"?(l.marked="def",n(H)):g=="<"?n(N,H):g=="="?n(q,P,r):n(H)}function I(a){return a=="name"?(l.marked="def",n(I)):g=="<"?n(N,I):g=="="?n(q,P,r,v):a=="{"?n(o("}"),q,J,r,p):n(I)}function J(a){return a=="}"?n():a=="("?n(o(")"),s(P,")"),p,J):(g.match(/^\w+$/)&&(l.marked="def"),n(J))}function K(a){return a=="name"?(l.marked="def",n(K)):a=="{"?n(o("}"),u,p):m()}function L(a){return a=="name"?(l.marked="def",n(L)):g=="<"?n(N,L):a=="{"?n(o("}"),u,p):m()}function M(a){return g=="<"?n(N,M):g=="of"||g=="for"?(l.marked="keyword",n(P,M)):a=="name"?(l.marked="def",n(M)):a=="{"?n(o("}"),u,p):m()}function N(a){return g==">"?n():g==","?n(N):g==":"?n(P,N):m(P,N)}function O(a){return a=="name"?(l.marked="def",n(O)):a==":"?n(q,P,r):m()}function P(a){return a=="name"?(l.marked="variable-3",n(Q)):g=="mutable"?(l.marked="keyword",n(P)):a=="atom"?n(Q):a=="op"||a=="obj"?n(P):a=="fn"?n(R):a=="{"?n(o("{"),A(P),p):Y(a,P)}function Q(a){return g=="<"?n(N):m()}function R(a){return a=="("?n(o("("),s(P,")"),p,R):a=="->"?n(P):m()}function S(a){return a=="name"?(l.marked="def",n(T)):a=="atom"?n(T):a=="op"?n(S):a.match(/[\]\)\};,]/)?m():Y(a,S)}function T(a){return a=="op"&&g=="."?n():g=="to"?(l.marked="keyword",n(S)):m()}function U(a){return a=="{"?n(o("}","alt"),V,p):m()}function V(a){return a=="}"?n():a=="|"?n(V):g=="when"?(l.marked="keyword",n(w,W)):a.match(/[\]\);,]/)?n(V):m(S,W)}function W(a){return a=="{"?n(o("}","alt"),u,p,V):m(V)}function X(a){return a.match(/[\[\(\{]/)?Y(a,w):m()}function Y(a,b){return a=="["?n(o("]"),s(b,"]"),p):a=="("?n(o(")"),s(b,")"),p):a=="{"?n(o("}"),s(b,"}"),p):n()}function Z(a,b,c){var d=a.cc;l.state=a,l.stream=b,l.marked=null,l.cc=d;for(;;){var e=d.length?d.pop():u;if(e(f)){while(d.length&&d[d.length-1].lex)d.pop()();return l.marked||c}}}var a=4,b=2,c={"if":"if-style","while":"if-style","else":"else-style","do":"else-style",ret:"else-style",fail:"else-style","break":"atom",cont:"atom","const":"let",resource:"fn",let:"let",fn:"fn","for":"for",alt:"alt",iface:"iface",impl:"impl",type:"type","enum":"enum",mod:"mod",as:"op","true":"atom","false":"atom",assert:"op",check:"op",claim:"op","native":"ignore",unsafe:"ignore","import":"else-style","export":"else-style",copy:"op",log:"op",log_err:"op",use:"op",bind:"op",self:"atom"},d=function(){var a={fn:"fn",block:"fn",obj:"obj"},b="bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" ");for(var c=0,d=b.length;c!?|\.@]/,f,g,l={state:null,stream:null,marked:null,cc:null};return p.lex=q.lex=r.lex=!0,{startState:function(){return{tokenize:i,cc:[],lexical:{indented:-a,column:0,type:"top",align:!1},keywords:c,indented:0}},token:function(a,b){a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation());if(a.eatSpace())return null;f=g=null;var c=b.tokenize(a,b);return c=="comment"?c:(b.lexical.hasOwnProperty("align")||(b.lexical.align=!0),f=="prefix"?c:(g||(g=a.current()),Z(b,a,c)))},indent:function(c,d){if(c.tokenize!=i)return 0;var e=d&&d.charAt(0),f=c.lexical,g=f.type,h=e==g;return g=="stat"?f.indented+a:f.align?f.column+(h?0:1):f.indented+(h?0:f.info=="alt"?b:a)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-rustsrc","rust"),CodeMirror.defineMode("scheme",function(a,b){function l(a){var b={},c=a.split(" ");for(var d=0;dinteger char-alphabetic? 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? 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-copy string-fill! string-length string-ref string-set! 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?"),n=l("define let letrec let* lambda");return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1}},token:function(a,b){b.indentStack==null&&a.sol()&&(b.indentation=a.indentation());if(a.eatSpace())return null;var i=null;switch(b.mode){case"string":var k,l=!1;while((k=a.next())!=null){if(k=='"'&&!l){b.mode=!1;break}l=!l&&k=="\\"}i=e;break;case"comment":var k,o=!1;while((k=a.next())!=null){if(k=="#"&&o){b.mode=!1;break}o=k=="|"}i=d;break;case"s-expr-comment":b.mode=!1;if(a.peek()!="("&&a.peek()!="["){a.eatWhile(/[^/s]/),i=d;break}b.sExprComment=0;default:var s=a.next();if(s=='"')b.mode="string",i=e;else if(s=="'")i=f;else if(s=="#")a.eat("|")?(b.mode="comment",i=d):a.eat(/[tf]/)?i=f:a.eat(";")&&(b.mode="s-expr-comment",i=d);else if(s==";")a.skipToEnd(),i=d;else if(s=="-")isNaN(parseInt(a.peek()))?i=null:(a.eatWhile(/[\/0-9]/),i=g);else if(r(s,a))i=g;else if(s=="("||s=="["){var t="",u=a.column();while((letter=a.eat(/[^\s\(\[\;\)\]]/))!=null)t+=letter;t.length>0&&n.propertyIsEnumerable(t)?p(b,u+j,s):(a.eatSpace(),a.eol()||a.peek()==";"?p(b,u+1,s):p(b,u+a.current().length,s)),a.backUp(a.current().length-1),typeof b.sExprComment=="number"&&b.sExprComment++,i=h}else s==")"||s=="]"?(i=h,b.indentStack!=null&&b.indentStack.type==(s==")"?"(":"[")&&(q(b),typeof b.sExprComment=="number"&&--b.sExprComment==0&&(i=d,b.sExprComment=!1))):(a.eatWhile(/[\w\$_\-]/),m&&m.propertyIsEnumerable(a.current())?i=c:i=null)}return typeof b.sExprComment=="number"?d:i},indent:function(a,b){return a.indentStack==null?a.indentation:a.indentStack.indent}}}),CodeMirror.defineMIME("text/x-scheme","scheme"),CodeMirror.defineMode("shell",function(a){function e(a,e){var i=a.sol(),j=a.next();if(j==="'"||j==='"'||j==="`")return e.tokens.unshift(f(j)),h(a,e);if(j==="#")return i&&a.eat("!")?(a.skipToEnd(),"meta"):(a.skipToEnd(),"comment");if(j==="$")return e.tokens.unshift(g),h(a,e);if(j==="+"||j==="=")return"operator";if(j==="-")return a.eat("-"),a.eatWhile(/\w/),"attribute";if(/\d/.test(j)){a.eatWhile(/\d/);if(!/\w/.test(a.peek()))return"number"}a.eatWhile(/\w/);var k=a.current();return a.peek()==="="&&/\w+/.test(k)?"def":b.indexOf(k)!==-1?"atom":d.indexOf(k)!==-1?"builtin":c.indexOf(k)!==-1?"keyword":"word"}function f(a){return function(b,c){var d,e=!1,f=!1;while((d=b.next())!=null){if(d===a&&!f){e=!0;break}if(d==="$"&&!f&&a!=="'"){f=!0,b.backUp(1),c.tokens.unshift(g);break}f=!f&&d==="\\"}return(e||!f)&&c.tokens.shift(),a==="`"||a===")"?"quote":"string"}}function h(a,b){return(b.tokens[0]||e)(a,b)}var b=["true","false"],c=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],d=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","kill","killall","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],g=function(a,b){b.tokens.length>1&&a.eat("$");var c=a.next(),d=/\w/;return c==="{"&&(d=/[^}]/),c==="("?(b.tokens[0]=f(")"),h(a,b)):(/\d/.test(c)||(a.eatWhile(d),a.eat("}")),b.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(a,b){return a.eatSpace()?null:h(a,b)}}}),CodeMirror.defineMIME("text/x-sh","shell"),CodeMirror.defineMode("smalltalk",function(a,b){var c=/[+\-/\\*~<>=@%|&?!.:;^]/,d=/true|false|nil|self|super|thisContext/,e=function(a,b){this.next=a,this.parent=b},f=function(a,b,c){this.name=a,this.context=b,this.eos=c},g=function(){this.context=new e(h,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};g.prototype.userIndent=function(b){this.userIndentationDelta=b>0?b/a.indentUnit-this.indentation:0};var h=function(a,b,g){var h=new f(null,b,!1),l=a.next();return l==='"'?h=i(a,new e(i,b)):l==="'"?h=j(a,new e(j,b)):l==="#"?(a.eatWhile(/[^ .]/),h.name="string-2"):l==="$"?(a.eatWhile(/[^ ]/),h.name="string-2"):l==="|"&&g.expectVariable?h.context=new e(k,b):/[\[\]{}()]/.test(l)?(h.name="bracket",h.eos=/[\[{(]/.test(l),l==="["?g.indentation++:l==="]"&&(g.indentation=Math.max(0,g.indentation-1))):c.test(l)?(a.eatWhile(c),h.name="operator",h.eos=l!==";"):/\d/.test(l)?(a.eatWhile(/[\w\d]/),h.name="number"):/[\w_]/.test(l)?(a.eatWhile(/[\w\d_]/),h.name=g.expectVariable?d.test(a.current())?"keyword":"variable":null):h.eos=g.expectVariable,h},i=function(a,b){return a.eatWhile(/[^"]/),new f("comment",a.eat('"')?b.parent:b,!0)},j=function(a,b){return a.eatWhile(/[^']/),new f("string",a.eat("'")?b.parent:b,!1)},k=function(a,b,c){var d=new f(null,b,!1),e=a.next();return e==="|"?(d.context=b.parent,d.eos=!0):(a.eatWhile(/[^|]/),d.name="variable"),d};return{startState:function(){return new g},token:function(a,b){b.userIndent(a.indentation());if(a.eatSpace())return null;var c=b.context.next(a,b.context,b);return b.context=c.context,b.expectVariable=c.eos,b.lastToken=c,c.name},blankLine:function(a){a.userIndent(0)},indent:function(b,c){var d=b.context.next===h&&c&&c.charAt(0)==="]"?-1:b.userIndentationDelta;return(b.indentation+d)*a.indentUnit},electricChars:"]"}}),CodeMirror.defineMIME("text/x-stsrc",{name:"smalltalk"}),CodeMirror.defineMode("smarty",function(a,b){function h(a,b){return d=b,a}function i(a,b){function c(c){return b.tokenize=c,c(a,b)}return a.match(f,!0)?a.eat("*")?c(l("comment","*"+g)):(b.tokenize=j,"tag"):(a.next(),null)}function j(a,b){if(a.match(g,!0))return b.tokenize=i,h("tag",null);var f=a.next();if(f=="$")return a.eatWhile(e.validIdentifier),h("variable-2","variable");if(f==".")return h("operator","property");if(e.stringChar.test(f))return b.tokenize=k(f),h("string","string");if(e.operatorChars.test(f))return a.eatWhile(e.operatorChars),h("operator","operator");if(f=="["||f=="]")return h("bracket","bracket");if(/\d/.test(f))return a.eatWhile(/\d/),h("number","number");if(b.last=="variable"){if(f=="@")return a.eatWhile(e.validIdentifier),h("property","property");if(f=="|")return a.eatWhile(e.validIdentifier),h("qualifier","modifier")}else{if(b.last=="whitespace")return a.eatWhile(e.validIdentifier),h("attribute","modifier");if(b.last=="property")return a.eatWhile(e.validIdentifier),h("property",null);if(/\s/.test(f))return d="whitespace",null}var j="";f!="/"&&(j+=f);var l="";while(l=a.eat(e.validIdentifier))j+=l;var m,n;for(m=0,n=c.length;m!?]/,validIdentifier:/[a-zA-Z0-9\_]/,stringChar:/[\'\"]/},f=typeof a.mode.leftDelimiter!="undefined"?a.mode.leftDelimiter:"{",g=typeof a.mode.rightDelimiter!="undefined"?a.mode.rightDelimiter:"}";return{startState:function(){return{tokenize:i,mode:"smarty",last:null}},token:function(a,b){var c=b.tokenize(a,b);return b.last=d,c},electricChars:""}}),CodeMirror.defineMIME("text/x-smarty","smarty"),CodeMirror.defineMode("sparql",function(a){function d(a){return new RegExp("^(?:"+a.join("|")+")$","i")}function h(a,b){var d=a.next();c=null;if(d=="$"||d=="?")return a.match(/^[\w\d]*/),"variable-2";if(d=="<"&&!a.match(/^[\s\u00a0=]/,!1))return a.match(/^[^\s\u00a0>]*>?/),"atom";if(d=='"'||d=="'")return b.tokenize=i(d),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(d))return c=d,null;if(d=="#")return a.skipToEnd(),"comment";if(g.test(d))return a.eatWhile(g),null;if(d==":")return a.eatWhile(/[\w\d\._\-]/),"atom";a.eatWhile(/[_\w\d]/);if(a.eat(":"))return a.eatWhile(/[\w\d_\-]/),"atom";var h=a.current(),j;return e.test(h)?null:f.test(h)?"keyword":"variable"}function i(a){return function(b,c){var d=!1,e;while((e=b.next())!=null){if(e==a&&!d){c.tokenize=h;break}d=!d&&e=="\\"}return"string"}}function j(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function k(a){a.indent=a.context.indent,a.context=a.context.prev}var b=a.indentUnit,c,e=d(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),f=d(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc"]),g=/[*+\-<>=&|]/;return{startState:function(a){return{tokenize:h,context:null,indent:0,col:0}},token:function(a,b){a.sol()&&(b.context&&b.context.align==null&&(b.context.align=!1),b.indent=a.indentation());if(a.eatSpace())return null;var d=b.tokenize(a,b);d!="comment"&&b.context&&b.context.align==null&&b.context.type!="pattern"&&(b.context.align=!0);if(c=="(")j(b,")",a.column());else if(c=="[")j(b,"]",a.column());else if(c=="{")j(b,"}",a.column());else if(/[\]\}\)]/.test(c)){while(b.context&&b.context.type=="pattern")k(b);b.context&&c==b.context.type&&k(b)}else c=="."&&b.context&&b.context.type=="pattern"?k(b):/atom|string|variable/.test(d)&&b.context&&(/[\}\]]/.test(b.context.type)?j(b,"pattern",a.column()):b.context.type=="pattern"&&!b.context.align&&(b.context.align=!0,b.context.col=a.column()));return d},indent:function(a,c){var d=c&&c.charAt(0),e=a.context;if(/[\]\}]/.test(d))while(e&&e.type=="pattern")e=e.prev;var f=e&&d==e.type;return e?e.type=="pattern"?e.col:e.align?e.col+(f?0:1):e.indent+(f?0:b):0}}}),CodeMirror.defineMIME("application/x-sparql-query","sparql"),CodeMirror.defineMode("stex",function(a,b){function c(a,b){a.cmdState.push(b)}function d(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function e(a){if(a.cmdState.length>0){var b=a.cmdState.pop();b.closeBracket()}}function f(a){var b=a.cmdState;for(var c=b.length-1;c>=0;c--){var d=b[c];if(d.name=="DEFAULT")continue;return d.styleIdentifier()}return null}function g(a,b,c,d){return function(){this.name=a,this.bracketNo=0,this.style=b,this.styles=d,this.brackets=c,this.styleIdentifier=function(a){return this.bracketNo<=this.styles.length?this.styles[this.bracketNo-1]:null},this.openBracket=function(a){return this.bracketNo++,"bracket"},this.closeBracket=function(a){}}}function i(a,b){a.f=b}function j(a,b){if(a.match(/^\\[a-zA-Z@]+/)){var e=a.current();e=e.substr(1,e.length-1);var g=h[e];return typeof g=="undefined"&&(g=h.DEFAULT),g=new g,c(b,g),i(b,l),g.style}if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/]/))return"tag";var j=a.next();if(j=="%")return a.eol()||i(b,k),"comment";if(j=="}"||j=="]")return g=d(b),g?(g.closeBracket(j),i(b,l),"bracket"):"error";return j=="{"||j=="["?(g=h.DEFAULT,g=new g,c(b,g),"bracket"):/\d/.test(j)?(a.eatWhile(/[\w.%]/),"atom"):(a.eatWhile(/[\w-_]/),f(b))}function k(a,b){return a.skipToEnd(),i(b,j),"comment"}function l(a,b){var c=a.peek();if(c=="{"||c=="["){var f=d(b),g=f.openBracket(c);return a.eat(c),i(b,j),"bracket"}return/[ \t\r]/.test(c)?(a.eat(c),null):(i(b,j),f=d(b),f&&e(b),j(a,b))}var h=new Array;return h.importmodule=g("importmodule","tag","{[",["string","builtin"]),h.documentclass=g("documentclass","tag","{[",["","atom"]),h.usepackage=g("documentclass","tag","[",["atom"]),h.begin=g("documentclass","tag","[",["atom"]),h.end=g("documentclass","tag","[",["atom"]),h.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=function(a){},this.openBracket=function(a){},this.closeBracket=function(a){}},{startState:function(){return{f:j,cmdState:[]}},copyState:function(a){return{f:a.f,cmdState:a.cmdState.slice(0,a.cmdState.length)}},token:function(a,b){var c=b.f(a,b),d=a.current();return c}}}),CodeMirror.defineMIME("text/x-stex","stex"),CodeMirror.defineMode("tiddlywiki",function(a,b){function s(a,b,c){return b.tokenize=c,c(a,b)}function t(a,b){var c=!1,d;while((d=a.next())!=null){if(d==b&&!c)return!1;c=!c&&d=="\\"}return c}function w(a,b,c){return u=a,v=c,b}function x(a,b){var c=a.sol(),e,p;b.block=!1,e=a.peek();if(c&&/[<\/\*{}\-]/.test(e)){if(a.match(o))return b.block=!0,s(a,b,B);if(a.match(j))return w("quote","quote");if(a.match(h)||a.match(i))return w("code","code");if(a.match(k)||a.match(l)||a.match(m)||a.match(n))return w("code","code");if(a.match(g))return w("hr","hr")}e=a.next();if(c&&/[\/\*!#;:>|]/.test(e)){if(e=="!")return a.skipToEnd(),w("header","header");if(e=="*")return a.eatWhile("*"),w("list","list");if(e=="#")return a.eatWhile("#"),w("list","list");if(e==";")return a.eatWhile(";"),w("list","list");if(e==":")return a.eatWhile(":"),w("list","list");if(e==">")return a.eatWhile(">"),w("quote","quote");if(e=="|")return w("table","table")}if(e=="{"&&a.match(/\{\{/))return s(a,b,B);if(/[hf]/i.test(e)&&/[ti]/i.test(a.peek())&&a.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return w("link-external","link-external");if(e=='"')return w("string","string");if(e=="~")return w("text","brace");if(/[\[\]]/.test(e)&&a.peek()==e)return a.next(),w("brace","brace");if(e=="@")return a.eatWhile(f),w("link-external","link-external");if(/\d/.test(e))return a.eatWhile(/\d/),w("number","number");if(e=="/"){if(a.eat("%"))return s(a,b,z);if(a.eat("/"))return s(a,b,C)}if(e=="_"&&a.eat("_"))return s(a,b,D);if(e=="-"&&a.eat("-")){if(a.peek()!=" ")return s(a,b,E);if(a.peek()==" ")return w("text","brace")}if(e=="'"&&a.eat("'"))return s(a,b,A);if(e!="<")return w(e);if(a.eat("<"))return s(a,b,F);a.eatWhile(/[\w\$_]/);var q=a.current(),r=d.propertyIsEnumerable(q)&&d[q];return r?w(r.type,r.style,q):w("text",null,q)}function y(a){return function(b,c){return t(b,a)||(c.tokenize=x),w("string","string")}}function z(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=x;break}c=d=="%"}return w("comment","comment")}function A(a,b){var c=!1,d;while(d=a.next()){if(d=="'"&&c){b.tokenize=x;break}c=d=="'"}return w("text","strong")}function B(a,b){var c,d=b.block;return d&&a.current()?w("code","code"):!d&&a.match(r)?(b.tokenize=x,w("code","code-inline")):d&&a.sol()&&a.match(p)?(b.tokenize=x,w("code","code")):(c=a.next(),d?w("code","code"):w("code","code-inline"))}function C(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=x;break}c=d=="/"}return w("text","em")}function D(a,b){var c=!1,d;while(d=a.next()){if(d=="_"&&c){b.tokenize=x;break}c=d=="_"}return w("text","underlined")}function E(a,b){var c=!1,d,e;while(d=a.next()){if(d=="-"&&c){b.tokenize=x;break}c=d=="-"}return w("text","line-through")}function F(a,b){var c,d,f,g;return a.current()=="<<"?w("brace","macro"):(c=a.next(),c?c==">"&&a.peek()==">"?(a.next(),b.tokenize=x,w("brace","macro")):(a.eatWhile(/[\w\$_]/),f=a.current(),g=e.propertyIsEnumerable(f)&&e[f],g?w(g.type,g.style,f):w("macro",null,f)):(b.tokenize=x,w(c)))}var c=a.indentUnit,d=function(){function a(a){return{type:a,style:"text"}}return{}}(),e=function(){function a(a){return{type:a,style:"macro"}}return{allTags:a("allTags"),closeAll:a("closeAll"),list:a("list"),newJournal:a("newJournal"),newTiddler:a("newTiddler"),permaview:a("permaview"),saveChanges:a("saveChanges"),search:a("search"),slider:a("slider"),tabs:a("tabs"),tag:a("tag"),tagging:a("tagging"),tags:a("tags"),tiddler:a("tiddler"),timeline:a("timeline"),today:a("today"),version:a("version"),option:a("option"),"with":a("with"),filter:a("filter")}}(),f=/[\w_\-]/i,g=/^\-\-\-\-+$/,h=/^\/\*\*\*$/,i=/^\*\*\*\/$/,j=/^<<<$/,k=/^\/\/\{\{\{$/,l=/^\/\/\}\}\}$/,m=/^$/,n=/^$/,o=/^\{\{\{$/,p=/^\}\}\}$/,q=/\{\{\{/,r=/.*?\}\}\}/,u,v;return{startState:function(a){return{tokenize:x,indented:0,level:0}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c},electricChars:""}}),CodeMirror.defineMIME("text/x-tiddlywiki","tiddlywiki"),CodeMirror.defineMode("tiki",function(a,b){function c(a,b,c){return function(d,f){while(!d.eol()){if(d.match(b)){f.tokenize=e;break}d.next()}return c&&(f.tokenize=c),a}}function d(a,b){return function(b,c){while(!b.eol())b.next();return c.tokenize=e,a}}function e(a,b){function f(c){return b.tokenize=c,c(a,b)}var g=a.sol(),j=a.next();switch(j){case"{":h=a.eat("/")?"closeTag":"openTag",a.eatSpace(),tagName="";var k;while(k=a.eat(/[^\s\u00a0=\"\'\/?(}]/))tagName+=k;return b.tokenize=i,"tag";case"_":if(a.eat("_"))return f(c("strong","__",e));break;case"'":if(a.eat("'"))return f(c("em","''",e));break;case"(":if(a.eat("("))return f(c("variable-2","))",e));break;case"[":return f(c("variable-3","]",e));case"|":if(a.eat("|"))return f(c("comment","||"));break;case"-":if(a.eat("="))return f(c("header string","=-",e));if(a.eat("-"))return f(c("error tw-deleted","--",e));break;case"=":if(a.match("=="))return f(c("tw-underline","===",e));break;case":":if(a.eat(":"))return f(c("comment","::"));break;case"^":return f(c("tw-box","^"));case"~":if(a.match("np~"))return f(c("meta","~/np~"))}if(g)switch(j){case"!":return a.match("!!!!!")?f(d("header string")):a.match("!!!!")?f(d("header string")):a.match("!!!")?f(d("header string")):a.match("!!")?f(d("header string")):f(d("header string"));case"*":case"#":case"+":return f(d("tw-listitem bracket"))}return null}function i(a,b){var c=a.next(),d=a.peek();return c=="}"?(b.tokenize=e,"tag"):c=="("||c==")"?"bracket":c=="="?(h="equals",d==">"&&(c=a.next(),d=a.peek()),/[\'\"]/.test(d)||(b.tokenize=k()),"operator"):/[\'\"]/.test(c)?(b.tokenize=j(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function j(a){return function(b,c){while(!b.eol())if(b.next()==a){c.tokenize=i;break}return"string"}}function k(){return function(a,b){while(!a.eol()){var c=a.next(),d=a.peek();if(c==" "||c==","||/[ )}]/.test(d)){b.tokenize=i;break}}return"string"}}function n(){for(var a=arguments.length-1;a>=0;a--)l.cc.push(arguments[a])}function o(){return n.apply(null,arguments),!0}function p(a,b){var c=l.context&&l.context.noIndent;l.context={prev:l.context,pluginName:a,indent:l.indented,startOfLine:b,noIndent:c}}function q(){l.context&&(l.context=l.context.prev)}function r(a){if(a=="openPlugin")return l.pluginName=g,o(u,s(l.startOfLine));if(a=="closePlugin"){var b=!1;return l.context?(b=l.context.pluginName!=g,q()):b=!0,b&&(m="error"),o(t(b))}return a=="string"?((!l.context||l.context.name!="!cdata")&&p("!cdata"),l.tokenize==e&&q(),o()):o()}function s(a){return function(b){return b=="selfclosePlugin"||b=="endPlugin"?o():b=="endPlugin"?(p(l.pluginName,a),o()):o()}}function t(a){return function(b){return a&&(m="error"),b=="endPlugin"?o():n()}}function u(a){return a=="keyword"?(m="attribute",o(u)):a=="equals"?o(v,u):n()}function v(a){return a=="keyword"?(m="string",o()):a=="string"?o(w):n()}function w(a){return a=="string"?o(w):n()}var f=a.indentUnit,g,h,l,m;return{startState:function(){return{tokenize:e,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(a,b){a.sol()&&(b.startOfLine=!0,b.indented=a.indentation());if(a.eatSpace())return null;m=h=g=null;var c=b.tokenize(a,b);if((c||h)&&c!="comment"){l=b;for(;;){var d=b.cc.pop()||r;if(d(h||c))break}}return b.startOfLine=!1,m||c},indent:function(a,b){var c=a.context;if(c&&c.noIndent)return 0;c&&/^{\//.test(b)&&(c=c.prev);while(c&&!c.startOfLine)c=c.prev;return c?c.indent+f:0},compareStates:function(a,b){if(a.indented!=b.indented||a.pluginName!=b.pluginName)return!1;for(var c=a.context,d=b.context;;c=c.prev,d=d.prev){if(!c||!d)return c==d;if(c.pluginName!=d.pluginName)return!1}},electricChars:"/"}}),CodeMirror.defineMIME("text/tiki","tiki"),CodeMirror.defineMode("vbscript",function(){var a=/^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im;return{token:function(b){if(b.eatSpace())return null;var c=b.next();if(c=="'")return b.skipToEnd(),"comment";if(c=='"')return b.skipTo('"'),"string";if(/\w/.test(c)){b.eatWhile(/\w/);if(a.test(b.current()))return"keyword"}return null}}}),CodeMirror.defineMIME("text/vbscript","vbscript"),CodeMirror.defineMode("velocity",function(a){function b(a){var b={},c=a.split(" ");for(var d=0;d!?:\/|]/,h=!0;return{startState:function(a){return{tokenize:j,beforeParams:!1,inParams:!1}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),CodeMirror.defineMIME("text/velocity","velocity"),CodeMirror.defineMode("verilog",function(a,b){function k(a,b){var c=a.next();if(g[c]){var h=g[c](a,b);if(h!==!1)return h}if(c=='"')return b.tokenize=l(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return j=c,null;if(/[\d']/.test(c))return a.eatWhile(/[\w\.']/),"number";if(c=="/"){if(a.eat("*"))return b.tokenize=m,m(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(i.test(c))return a.eatWhile(i),"operator";a.eatWhile(/[\w\$_]/);var k=a.current();return d.propertyIsEnumerable(k)?(e.propertyIsEnumerable(k)&&(j="newstatement"),"keyword"):f.propertyIsEnumerable(k)?"atom":"word"}function l(a){return function(b,c){var d=!1,e,f=!1;while((e=b.next())!=null){if(e==a&&!d){f=!0;break}d=!d&&e=="\\"}if(f||!d&&!h)c.tokenize=k;return"string"}}function m(a,b){var c=!1,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=k;break}c=d=="*"}return"comment"}function n(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function o(a,b,c){return a.context=new n(a.indented,b,c,null,a.context)}function p(a){var b=a.context.type;if(b==")"||b=="]"||b=="}")a.indented=a.context.indented;return a.context=a.context.prev}var c=a.indentUnit,d=b.keywords||{},e=b.blockKeywords||{},f=b.atoms||{},g=b.hooks||{},h=b.multiLineStrings,i=/[&|~>")):null:a.match("--")?c(k("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(l(1))):null;if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),b.tokenize=k("meta","?>"),"meta";g=a.eat("/")?"closeTag":"openTag",a.eatSpace(),f="";var e;while(e=a.eat(/[^\s\u00a0=<>\"\'\/?]/))f+=e;return b.tokenize=i,"tag"}if(d=="&"){var h;return a.eat("#")?a.eat("x")?h=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):h=a.eatWhile(/[\d]/)&&a.eat(";"):h=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),h?"atom":"error"}return a.eatWhile(/[^&<]/),null}function i(a,b){var c=a.next();return c==">"||c=="/"&&a.eat(">")?(b.tokenize=h,g=c==">"?"endTag":"selfcloseTag","tag"):c=="="?(g="equals",null):/[\'\"]/.test(c)?(b.tokenize=j(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function j(a){return function(b,c){while(!b.eol())if(b.next()==a){c.tokenize=i;break}return"string"}}function k(a,b){return function(c,d){while(!c.eol()){if(c.match(b)){d.tokenize=h;break}c.next()}return a}}function l(a){return function(b,c){var d;while((d=b.next())!=null){if(d=="<")return c.tokenize=l(a+1),c.tokenize(b,c);if(d==">"){if(a==1){c.tokenize=h;break}return c.tokenize=l(a-1),c.tokenize(b,c)}}return"meta"}}function o(){for(var a=arguments.length-1;a>=0;a--)m.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a,b){var c=d.doNotIndent.hasOwnProperty(a)||m.context&&m.context.noIndent;m.context={prev:m.context,tagName:a,indent:m.indented,startOfLine:b,noIndent:c}}function r(){m.context&&(m.context=m.context.prev)}function s(a){if(a=="openTag")return m.tagName=f,p(w,t(m.startOfLine));if(a=="closeTag"){var b=!1;return m.context?m.context.tagName!=f&&(d.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())&&r(),b=!m.context||m.context.tagName!=f):b=!0,b&&(n="error"),p(u(b))}return p()}function t(a){return function(b){return b=="selfcloseTag"||b=="endTag"&&d.autoSelfClosers.hasOwnProperty(m.tagName.toLowerCase())?(v(m.tagName.toLowerCase()),p()):b=="endTag"?(v(m.tagName.toLowerCase()),q(m.tagName,a),p()):p()}}function u(a){return function(b){return a&&(n="error"),b=="endTag"?(r(),p()):(n="error",p(arguments.callee))}}function v(a){var b;for(;;){if(!m.context)return;b=m.context.tagName.toLowerCase();if(!d.contextGrabbers.hasOwnProperty(b)||!d.contextGrabbers[b].hasOwnProperty(a))return;r()}}function w(a){return a=="word"?(n="attribute",p(x,w)):a=="endTag"||a=="selfcloseTag"?o():(n="error",p(w))}function x(a){return a=="equals"?p(y,w):(d.allowMissing||(n="error"),a=="endTag"||a=="selfcloseTag"?o():p())}function y(a){return a=="string"?p(z):a=="word"&&d.allowUnquoted?(n="string",p()):(n="error",a=="endTag"||a=="selfCloseTag"?o():p())}function z(a){return a=="string"?p(z):o()}var c=a.indentUnit,d=b.htmlMode?{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},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:!1}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},e=b.alignCDATA,f,g,m,n;return{startState:function(){return{tokenize:h,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}},token:function(a,b){a.sol()&&(b.startOfLine=!0,b.indented=a.indentation());if(a.eatSpace())return null;n=g=f=null;var c=b.tokenize(a,b);b.type=g;if((c||g)&&c!="comment"){m=b;for(;;){var d=b.cc.pop()||s;if(d(g||c))break}}return b.startOfLine=!1,n||c},indent:function(a,b,d){var f=a.context;if(a.tokenize!=i&&a.tokenize!=h||f&&f.noIndent)return d?d.match(/^(\s*)/)[0].length:0;if(e&&/\"\'\/?]/))r+=s;return g(a,b,l(r,m))}if(d=="{")return x(b,{type:"codeblock"}),f("","");if(d=="}")return y(b),f("","");if(q(b))return d==">"?f("tag","tag"):d=="/"&&a.eat(">")?(y(b),f("tag","tag")):f("word","word");if(/\d/.test(d))return a.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),f("number","atom");if(d==="("&&a.eat(":"))return x(b,{type:"comment"}),g(a,b,i);if(!!h||d!=='"'&&d!=="'"){if(d==="$")return g(a,b,k);if(d===":"&&a.eat("="))return f("operator","keyword");if(d==="(")return x(b,{type:"paren"}),f("","");if(d===")")return y(b),f("","");if(d==="[")return x(b,{type:"bracket"}),f("","");if(d==="]")return y(b),f("","");var u=c.propertyIsEnumerable(d)&&c[d];if(h&&d==='"')while(a.next()!=='"');if(h&&d==="'")while(a.next()!=="'");u||a.eatWhile(/[\w\$_-]/);var w=a.eat(":");!a.eat(":")&&w&&a.eatWhile(/[\w\$_-]/),a.match(/^[ \t]*\(/,!1)&&(e=!0);var z=a.current();return u=c.propertyIsEnumerable(z)&&c[z],e&&!u&&(u={type:"function_call",style:"variable def"}),t(b)?(y(b),f("word","word",z)):((z=="element"||z=="attribute"||u.type=="axis_specifier")&&x(b,{type:"xmlconstructor"}),u?f(u.type,u.style,z):f("word","word",z))}return g(a,b,j(d))}function i(a,b){var c=!1,d=!1,e=0,g;while(g=a.next()){if(g==")"&&c){if(!(e>0)){y(b);break}e--}else g==":"&&d&&e++;c=g==":",d=g=="("}return f("comment","comment")}function j(a,b){return function(c,d){var e;if(u(d)&&c.current()==a)return y(d),b&&(d.tokenize=b),f("string","string");x(d,{type:"string",name:a,tokenize:j(a,b)});if(c.match("{",!1)&&r(d))return d.tokenize=h,f("string","string");while(e=c.next()){if(e==a){y(d),b&&(d.tokenize=b);break}if(c.match("{",!1)&&r(d))return d.tokenize=h,f("string","string")}return f("string","string")}}function k(a,b){var c=/[\w\$_-]/;if(a.eat('"')){while(a.next()!=='"');a.eat(":")}else a.eatWhile(c),a.match(":=",!1)||a.eat(":");return a.eatWhile(c),b.tokenize=h,f("variable","variable")}function l(a,b){return function(c,d){return c.eatSpace(),b&&c.eat(">")?(y(d),d.tokenize=h,f("tag","tag")):(c.eat("/")||x(d,{type:"tag",name:a,tokenize:h}),c.eat(">")?(d.tokenize=h,f("tag","tag")):(d.tokenize=m,f("tag","tag")))}}function m(a,b){var c=a.next();if(c=="/"&&a.eat(">"))return r(b)&&y(b),q(b)&&y(b),f("tag","tag");if(c==">")return r(b)&&y(b),f("tag","tag");if(c=="=")return f("","");if(c=='"'||c=="'")return g(a,b,j(c,m));r(b)||x(b,{type:"attribute",name:name,tokenize:m}),a.eat(/[a-zA-Z_:]/),a.eatWhile(/[-a-zA-Z0-9_:.]/),a.eatSpace();if(a.match(">",!1)||a.match("/",!1))y(b),b.tokenize=h;return f("attribute","attribute")}function n(a,b){while(ch=a.next())if(ch=="-"&&a.match("->",!0))return b.tokenize=h,f("comment","comment")}function o(a,b){while(ch=a.next())if(ch=="]"&&a.match("]",!0))return b.tokenize=h,f("comment","comment")}function p(a,b){while(ch=a.next())if(ch=="?"&&a.match(">",!0))return b.tokenize=h,f("comment","comment meta")}function q(a){return w(a,"tag")}function r(a){return w(a,"attribute")}function s(a){return w(a,"codeblock")}function t(a){return w(a,"xmlconstructor")}function u(a){return w(a,"string")}function v(a){return a.current()==='"'?a.match(/^[^\"]+\"\:/,!1):a.current()==="'"?a.match(/^[^\"]+\'\:/,!1):!1}function w(a,b){return a.stack.length&&a.stack[a.stack.length-1].type==b}function x(a,b){a.stack.push(b)}function y(a){var b=a.stack.pop(),c=a.stack.length&&a.stack[a.stack.length-1].tokenize;a.tokenize=c||h}var c=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={type:"punctuation",style:""},h={type:"axis_specifier",style:"qualifier"},i={"if":b,"switch":b,"while":b,"for":b,"else":c,then:c,"try":c,"finally":c,"catch":c,element:d,attribute:d,let:d,"implements":d,"import":d,module:d,namespace:d,"return":d,"super":d,"this":d,"throws":d,where:d,"private":d,",":g,"null":f,"fn:false()":f,"fn:true()":f},j=["after","ancestor","ancestor-or-self","and","as","ascending","assert","attribute","before","by","case","cast","child","comment","declare","default","define","descendant","descendant-or-self","descending","document","document-node","element","else","eq","every","except","external","following","following-sibling","follows","for","function","if","import","in","instance","intersect","item","let","module","namespace","node","node","of","only","or","order","parent","precedes","preceding","preceding-sibling","processing-instruction","ref","return","returns","satisfies","schema","schema-element","self","some","sortby","stable","text","then","to","treat","typeswitch","union","variable","version","where","xquery","empty-sequence"];for(var k=0,l=j.length;k",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(var k=0,l=n.length;kc.keyCol)return a.skipToEnd(),"string";c.literal&&(c.literal=!1);if(a.sol()){c.keyCol=0,c.pair=!1,c.pairStart=!1;if(a.match(/---/))return"def";if(a.match(/\.\.\./))return"def";if(a.match(/\s*-\s+/))return"meta"}if(!c.pair&&a.match(/^\s*([a-z0-9\._-])+(?=\s*:)/i))return c.pair=!0,c.keyCol=a.indentation(),"atom";if(c.pair&&a.match(/^:\s*/))return c.pairStart=!0,"meta";if(a.match(/^(\{|\}|\[|\])/))return d=="{"?c.inlinePairs++:d=="}"?c.inlinePairs--:d=="["?c.inlineList++:c.inlineList--,"meta";if(c.inlineList>0&&!e&&d==",")return a.next(),"meta";if(c.inlinePairs>0&&!e&&d==",")return c.keyCol=0,c.pair=!1,c.pairStart=!1,a.next(),"meta";if(c.pairStart){if(a.match(/^\s*(\||\>)\s*/))return c.literal=!0,"meta";if(a.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(c.inlinePairs==0&&a.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(c.inlinePairs>0&&a.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(a.match(b))return"keyword"}return c.pairStart=!1,c.escaped=d=="\\",a.next(),null},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),CodeMirror.defineMIME("text/x-yaml","yaml")