? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/plugins/editors/jckeditor/fields/modals/js/typography/lib/
File Upload :
Current File : /home/admin/public_html/old/plugins/editors/jckeditor/fields/modals/js/typography/lib/codemirror.js

/*------------------------------------------------------------------------
# Copyright (C) 2005-2012 WebxSolution Ltd. All Rights Reserved.
# @license - GPLv2.0
# Author: WebxSolution Ltd
# Websites:  http://www.webxsolution.com
# Terms of Use: An extension that is derived from the JoomlaCK editor will only be allowed under the following conditions: http://joomlackeditor.com/terms-of-use
# ------------------------------------------------------------------------*/ 
var CodeMirror=function(){function a(c,d){function bJ(a){return a>=0&&a<bj.size}function bL(a){return s(bj,a)}function bM(a,b){by=!0;var c=b-a.height;for(var d=a;d;d=d.parent)d.height+=c}function bN(a){var b={line:0,ch:0};b$(b,{line:bj.size-1,ch:bL(bj.size-1).text.length},W(a),b,b),bs=!0}function bO(a){var b=[];return bj.iter(0,bj.size,function(a){b.push(a.text)}),b.join("\n")}function bP(a){function j(a){var b=dn(a,!0);if(b&&!P(b,g)){bl||bY(),g=b,cy(d,b),bs=!1;var c=cs();if(b.line>=c.to||b.line<c.from)h=setTimeout(dB(function(){j(a)}),150)}}for(var c=C(a);c!=A;c=c.parentNode)if(c.parentNode==Y&&c!=Z)return;for(var c=C(a);c!=A;c=c.parentNode)if(c.parentNode==_)return e.onGutterClick&&e.onGutterClick(bK,V(_.childNodes,c)+bA,a),z(a);var d=dn(a);switch(D(a)){case 3:H&&!b&&dp(a);return;case 2:d&&cB(d.line,d.ch,!0);return}if(!d){C(a)==M&&z(a);return}bl||bY();var f=+(new Date);if(bp&&bp.time>f-400&&P(bp.pos,d))return z(a),setTimeout(co,20),cK(d.line);if(bo&&bo.time>f-400&&P(bo.pos,d))return bp={time:f,pos:d},z(a),cJ(d);bo={time:f,pos:d};var g=d,h;if(G&&!P(bm.from,bm.to)&&!Q(d,bm.from)&&!Q(bm.to,d)){J&&(ba.draggable=!0);var i=E(x,"mouseup",dB(function(b){J&&(ba.draggable=!1),bq=!1,i(),Math.abs(a.clientX-b.clientX)+Math.abs(a.clientY-b.clientY)<10&&(z(b),cB(d.line,d.ch,!0),co())}),!0);bq=!0;return}z(a),cB(d.line,d.ch,!0);var k=E(x,"mousemove",dB(function(a){clearTimeout(h),z(a),j(a)}),!0),i=E(x,"mouseup",dB(function(a){clearTimeout(h);var b=dn(a);b&&cy(d,b),z(a),co(),bs=!0,k(),i()}),!0)}function bQ(a){for(var b=C(a);b!=A;b=b.parentNode)if(b.parentNode==_)return z(a);var c=dn(a);if(!c)return;bp={time:+(new Date),pos:c},z(a),cJ(c)}function bR(a){a.preventDefault();var b=dn(a,!0),c=a.dataTransfer.files;if(!b||e.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==f&&(b=cD(b),dB(function(){var a=cd(g.join(""),b,b);cy(b,a)})())},d.readAsText(a)}var f=c.length,g=Array(f),h=0;for(var i=0;i<f;++i)d(c[i],i)}else try{var g=a.dataTransfer.getData("Text");if(g){var j=cd(g,b,b),k=bm.from,l=bm.to;cy(b,j),bq&&cd("",k,l),co()}}catch(a){}}function bS(a){var b=ch();T(b),a.dataTransfer.setDragImage(S,0,0),a.dataTransfer.setData("Text",b)}function bT(a){if(a.altGraphKey)return!1;var b=i(a,e.extraKeys,e.keyMap),c=h[e.keyMap].auto;c&&(e.keyMap=c);if(!b)return!1;if(typeof b!="string")b(bK);else if(g.propertyIsEnumerable(b))g[b](bK);else if(!c)return!1;return z(a),!0}function bV(a){bl||bY();var c=a.keyCode;I&&c==27&&(a.returnValue=!1),c==16||a.shiftKey?bn=bn||(bm.inverted?bm.to:bm.from):bn=null;if(e.onKeyEvent&&e.onKeyEvent(bK,y(a)))return;var d=bT(a);window.opera&&(bU=d?a.keyCode:null,!d&&(b?a.metaKey:a.ctrlKey)&&a.keyCode==88&&ce(""))}function bW(a){if(window.opera&&a.keyCode==bU){bU=null,z(a);return}if(e.onKeyEvent&&e.onKeyEvent(bK,y(a)))return;if(window.opera&&!a.which&&bT(a))return;if(e.electricChars&&bi.electricChars){var b=String.fromCharCode(a.charCode==null?a.keyCode:a.charCode);bi.electricChars.indexOf(b)>-1&&setTimeout(dB(function(){cM(bm.to.line,"smart")}),50)}ck()}function bX(a){if(e.onKeyEvent&&e.onKeyEvent(bK,y(a)))return;a.keyCode==16&&(bn=null)}function bY(){if(e.readOnly)return;bl||(e.onFocus&&e.onFocus(bK),bl=!0,A.className.search(/\bCodeMirror-focused\b/)==-1&&(A.className+=" CodeMirror-focused"),bx||cn(!0)),cj(),dq()}function bZ(){bl&&(e.onBlur&&e.onBlur(bK),bl=!1,A.className=A.className.replace(" CodeMirror-focused","")),clearInterval(bh),setTimeout(function(){bl||(bn=null)},150)}function b$(a,b,c,d,f){if(bH){var g=[];bj.iter(a.line,b.line+1,function(a){g.push(a.text)}),bH.addChange(a.line,c.length,g);while(bH.done.length>e.undoDepth)bH.done.shift()}cc(a,b,c,d,f)}function b_(a,b){var c=a.pop();if(c){var d=[],e=c.start+c.added;bj.iter(c.start,e,function(a){d.push(a.text)}),b.push({start:c.start,added:c.old.length,old:d});var f=cD({line:c.start+c.old.length-1,ch:U(d[d.length-1],c.old[c.old.length-1])});cc({line:c.start,ch:0},{line:e-1,ch:bL(e-1).text.length},c.old,f,f),bs=!0}}function ca(){b_(bH.done,bH.undone)}function cb(){b_(bH.undone,bH.done)}function cc(a,b,c,d,f){function v(a){return a<=Math.min(b.line,b.line+r)?a:a+r}var g=!1,h=bE.length;e.lineWrapping||bj.iter(a.line,b.line,function(a){if(a.text.length==h)return g=!0,!0});var i=b.line-a.line,j=bL(a.line),k=bL(b.line);if(j==k)if(c.length==1)j.replace(a.ch,b.ch,c[0]);else{k=j.split(b.ch,c[c.length-1]),j.replace(a.ch,null,c[0]),j.fixMarkEnds(k);var l=[];for(var m=1,n=c.length-1;m<n;++m)l.push(o.inheritMarks(c[m],j));l.push(k),bj.insert(a.line+1,l)}else if(c.length==1)j.replace(a.ch,null,c[0]),k.replace(null,b.ch,""),j.append(k),bj.remove(a.line+1,i);else{var l=[];j.replace(a.ch,null,c[0]),k.replace(null,b.ch,c[c.length-1]),j.fixMarkEnds(k);for(var m=1,n=c.length-1;m<n;++m)l.push(o.inheritMarks(c[m],j));i>1&&bj.remove(a.line+1,i-1),bj.insert(a.line+1,l)}if(e.lineWrapping){var p=M.clientWidth/dk()-3;bj.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&&bM(a,b)})}else bj.iter(a.line,m+c.length,function(a){var b=a.text;b.length>h&&(bE=b,h=b.length,bF=null,g=!1)}),g&&(h=0,bE="",bF=null,bj.iter(0,bj.size,function(a){var b=a.text;b.length>h&&(h=b.length,bE=b)}));var q=[],r=c.length-i-1;for(var m=0,s=bk.length;m<s;++m){var t=bk[m];t<a.line?q.push(t):t>b.line&&q.push(t+r)}var u=a.line+Math.min(c.length,500);dv(a.line,u),q.push(u),bk=q,dx(100),bu.push({from:a.line,to:b.line+1,diff:r}),bv={from:a,to:b,text:c},cz(d,f,v(bm.from.line),v(bm.to.line)),Y.style.height=bj.height*di()+2*dl()+"px"}function cd(a,b,c){function d(d){if(Q(d,b))return d;if(!Q(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=cD(b),c?c=cD(c):c=b,a=W(a);var e;return cf(a,b,c,function(a){return e=a,{from:d(bm.from),to:d(bm.to)}}),e}function ce(a,b){cf(W(a),bm.from,bm.to,function(a){return b=="end"?{from:a,to:a}:b=="start"?{from:bm.from,to:bm.from}:{from:bm.from,to:a}})}function cf(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});b$(b,c,a,f.from,f.to)}function cg(a,b){var c=a.line,d=b.line;if(c==d)return bL(c).text.slice(a.ch,b.ch);var e=[bL(c).text.slice(a.ch)];return bj.iter(c+1,d,function(a){e.push(a.text)}),e.push(bL(d).text.slice(0,b.ch)),e.join("\n")}function ch(){return cg(bm.from,bm.to)}function cj(){if(ci)return;bf.set(e.pollInterval,function(){dy(),cm(),bl&&cj(),dz()})}function ck(){function b(){dy();var c=cm();!c&&!a?(a=!0,bf.set(60,b)):(ci=!1,cj()),dz()}var a=!1;ci=!0,bf.set(20,b)}function cm(){if(bx||!bl||X(L))return!1;var a=L.value;if(a==cl)return!1;bn=null;var b=0,c=Math.min(cl.length,a.length);while(b<c&&cl[b]==a[b])++b;return b<cl.length?bm.from={line:bm.from.line,ch:bm.from.ch-(cl.length-b)}:br&&P(bm.from,bm.to)&&(bm.to={line:bm.to.line,ch:Math.min(bL(bm.to.line).text.length,bm.to.ch+(a.length-b))}),ce(a.slice(b),"end"),cl=a,!0}function cn(a){P(bm.from,bm.to)?a&&(cl=L.value=""):(cl="",L.value=ch(),L.select())}function co(){e.readOnly||L.focus()}function cp(){if(!bc.getBoundingClientRect)return;var a=bc.getBoundingClientRect(),b=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(a.top<0||a.bottom>b)&&bc.scrollIntoView()}function cq(){var a=dd(bm.inverted?bm.from:bm.to),b=e.lineWrapping?Math.min(a.x,ba.offsetWidth):a.x;return cr(b,a.y,b,a.yBot)}function cr(a,b,c,d){var f=dm(),g=dl(),h=di();b+=g,d+=g,a+=f,c+=f;var i=M.clientHeight,j=M.scrollTop,k=!1,l=!0;b<j?(M.scrollTop=Math.max(0,b-2*h),k=!0):d>j+i&&(M.scrollTop=d+h-i,k=!0);var m=M.clientWidth,n=M.scrollLeft,o=e.fixedGutter?$.clientWidth:0;return a<n+o?(a<50&&(a=0),M.scrollLeft=Math.max(0,a-10-o),k=!0):c>m+n-3&&(M.scrollLeft=c+10-m,k=!0,c>Y.clientWidth&&(l=!1)),k&&e.onScroll&&e.onScroll(bK),l}function cs(){var a=di(),b=M.scrollTop-dl(),c=Math.max(0,Math.floor(b/a)),d=Math.ceil((b+M.clientHeight)/a);return{from:u(bj,c),to:u(bj,d)}}function ct(a){if(!M.clientWidth){bA=bB=bz=0;return}var b=cs();if(a!==!0&&a.length==0&&b.from>=bA&&b.to<=bB)return;var c=Math.max(b.from-100,0),d=Math.min(bj.size,b.to+100);bA<c&&c-bA<20&&(c=bA),bB>d&&bB-d<20&&(d=Math.min(bj.size,bB));var f=a===!0?[]:cu([{from:bA,to:bB,domStart:0}],a),g=0;for(var h=0;h<f.length;++h){var i=f[h];i.from<c&&(i.domStart+=c-i.from,i.from=c),i.to>d&&(i.to=d),i.from>=i.to?f.splice(h--,1):g+=i.to-i.from}if(g==d-c)return;f.sort(function(a,b){return a.domStart-b.domStart});var j=di(),k=$.style.display;bd.style.display=$.style.display="none",cv(c,d,f),bd.style.display="";var l=c!=bA||d!=bB||bC!=M.clientHeight;l&&(bC=M.clientHeight),bA=c,bB=d,bz=v(bj,c),Z.style.top=bz*j+"px",Y.style.height=bj.height*j+2*dl()+"px";if(bd.childNodes.length!=bB-bA)throw new Error("BAD PATCH! "+JSON.stringify(f)+" size="+(bB-bA)+" nodes="+bd.childNodes.length);if(e.lineWrapping){bF=M.clientWidth;var m=bd.firstChild;bj.iter(bA,bB,function(a){if(!a.hidden){var b=Math.round(m.offsetHeight/j)||1;a.height!=b&&(bM(a,b),by=!0)}m=m.nextSibling})}else bF==null&&(bF=c_(bE)),bF>M.clientWidth?(ba.style.width=bF+"px",Y.style.width="",Y.style.width=M.scrollWidth+"px"):ba.style.width=Y.style.width="";$.style.display=k,(l||by)&&cw(),cx()}function cu(a,b){for(var c=0,d=b.length||0;c<d;++c){var e=b[c],f=[],g=e.diff||0;for(var h=0,i=a.length;h<i;++h){var j=a[h];e.to<=j.from&&e.diff?f.push({from:j.from+g,to:j.to+g,domStart:j.domStart}):e.to<=j.from||e.from>=j.to?f.push(j):(e.from>j.from&&f.push({from:j.from,to:e.from,domStart:j.domStart}),e.to<j.to&&f.push({from:e.to+g,to:j.to+g,domStart:j.domStart+(e.to-j.from)}))}a=f}return a}function cv(a,b,c){if(!c.length)bd.innerHTML="";else{function d(a){var b=a.nextSibling;return a.parentNode.removeChild(a),b}var e=0,f=bd.firstChild,g;for(var h=0;h<c.length;++h){var i=c[h];while(i.domStart>e)f=d(f),e++;for(var j=0,k=i.to-i.from;j<k;++j)f=f.nextSibling,e++}while(f)f=d(f)}var l=c.shift(),f=bd.firstChild,j=a,m=bm.from.line,n=bm.to.line,o=m<a&&n>=a,p=x.createElement("div"),q;bj.iter(a,b,function(a){var b=null,d=null;o?(b=0,n==j&&(o=!1,d=bm.to.ch)):m==j&&(n==j?(b=bm.from.ch,d=bm.to.ch):(o=!0,b=bm.from.ch)),l&&l.to==j&&(l=c.shift()),!l||l.from>j?(a.hidden?p.innerHTML="<pre></pre>":p.innerHTML=a.getHTML(b,d,!0,bG),bd.insertBefore(p.firstChild,f)):f=f.nextSibling,++j})}function cw(){if(!e.gutter&&!e.lineNumbers)return;var a=Z.offsetHeight,b=M.clientHeight;$.style.height=(a-b<2?b:a)+"px";var c=[],d=bA;bj.iter(bA,Math.max(bB,bA+1),function(a){if(a.hidden)c.push("<pre></pre>");else{var b=a.gutterMarker,f=e.lineNumbers?d+1+e.firstLineNumber:null;b&&b.text?f=b.text.replace("%N%",f!=null?f:""):f==null&&(f="\u00a0"),c.push(b&&b.style?'<pre class="'+b.style+'">':"<pre>",f);for(var g=1;g<a.height;++g)c.push("<br>&nbsp;");c.push("</pre>")}++d}),$.style.display="none",_.innerHTML=c.join("");var f=String(bj.size).length,g=_.firstChild,h=O(g),i="";while(h.length+i.length<f)i+="\u00a0";i&&g.insertBefore(x.createTextNode(i),g.firstChild),$.style.display="",ba.style.marginLeft=$.offsetWidth+"px",by=!1}function cx(){var a=bm.inverted?bm.from:bm.to,b=di(),c=dd(a,!0),d=c.y+bz*di();K.style.top=Math.max(Math.min(d,M.offsetHeight),0)+"px",K.style.left=c.x+"px",P(bm.from,bm.to)?(bc.style.top=c.y+"px",bc.style.left=(e.lineWrapping?Math.min(c.x,ba.offsetWidth):c.x)+"px",bc.style.display=""):bc.style.display="none"}function cy(a,b){var c=bn&&cD(bn);c&&(Q(c,a)?a=c:Q(b,c)&&(b=c)),cz(a,b),bt=!0}function cz(a,b,c,d){cH=null,c==null&&(c=bm.from.line,d=bm.to.line);if(P(bm.from,a)&&P(bm.to,b))return;if(Q(b,a)){var e=b;b=a,a=e}a.line!=c&&(a=cA(a,c,bm.from.ch)),b.line!=d&&(b=cA(b,d,bm.to.ch)),P(a,b)?bm.inverted=!1:P(a,bm.to)?bm.inverted=!1:P(b,bm.from)&&(bm.inverted=!0),P(a,b)?P(bm.from,bm.to)||bu.push({from:c,to:d+1}):P(bm.from,bm.to)?bu.push({from:a.line,to:b.line+1}):(P(a,bm.from)||(a.line<c?bu.push({from:a.line,to:Math.min(b.line,c)+1}):bu.push({from:c,to:Math.min(d,a.line)+1})),P(b,bm.to)||(b.line<d?bu.push({from:Math.max(c,a.line),to:d+1}):bu.push({from:Math.max(a.line,d),to:b.line+1}))),bm.from=a,bm.to=b,bw=!0}function cA(a,b,c){function d(b){var d=a.line+b,e=b==1?bj.size:-1;while(d!=e){var f=bL(d);if(!f.hidden){var g=a.ch;if(g>c||g>f.text.length)g=f.text.length;return{line:d,ch:g}}d+=b}}var e=bL(a.line);return e.hidden?a.line>=b?d(1)||d(-1):d(-1)||d(1):a}function cB(a,b,c){var d=cD({line:a,ch:b||0});(c?cy:cz)(d,d)}function cC(a){return Math.max(0,Math.min(a,bj.size-1))}function cD(a){if(a.line<0)return{line:0,ch:0};if(a.line>=bj.size)return{line:bj.size-1,ch:bL(bj.size-1).text.length};var b=a.ch,c=bL(a.line).text.length;return b==null||b>c?{line:a.line,ch:c}:b<0?{line:a.line,ch:0}:a}function cE(a,b){function g(){for(var b=d+a,c=a<0?-1:bj.size;b!=c;b+=a){var e=bL(b);if(!e.hidden)return d=b,f=e,!0}}function h(){if(e==(a<0?0:f.text.length))if(g())e=a<0?f.text.length:0;else return!1;else e+=a;return!0}var c=bm.inverted?bm.from:bm.to,d=c.line,e=c.ch,f=bL(d);if(b=="char")h();else if(b=="word"){var i=!1;for(;;){if(a<0&&!h())break;if(/\w/.test(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 cF(a,b){var c=a<0?bm.from:bm.to;if(bn||P(bm.from,bm.to))c=cE(a,b);cB(c.line,c.ch,!0)}function cG(a,b){P(bm.from,bm.to)?a<0?cd("",cE(a,b),bm.to):cd("",bm.from,cE(a,b)):cd("",bm.from,bm.to),bt=!0}function cI(a,b){var c=0,d=dd(bm.inverted?bm.from:bm.to,!0);cH!=null&&(d.x=cH),b=="page"?c=M.clientHeight:b=="line"&&(c=di());var e=de(d.x,d.y+c*a+2);cB(e.line,e.ch,!0),cH=d.x}function cJ(a){var b=bL(a.line).text,c=a.ch,d=a.ch;while(c>0&&/\w/.test(b.charAt(c-1)))--c;while(d<b.length&&/\w/.test(b.charAt(d)))++d;cy({line:a.line,ch:c},{line:a.line,ch:d})}function cK(a){cy({line:a,ch:0},{line:a,ch:bL(a).text.length})}function cL(a){if(P(bm.from,bm.to))return cM(bm.from.line,a);var b=bm.to.line-(bm.to.ch?0:1);for(var c=bm.from.line;c<=b;++c)cM(c,a)}function cM(a,b){b||(b="add");if(b=="smart")if(!bi.indent)b="prev";else var c=du(a);var d=bL(a),f=d.indentation(e.tabSize),g=d.text.match(/^\s*/)[0],h;b=="prev"?a?h=bL(a-1).indentation(e.tabSize):h=0:b=="smart"?h=bi.indent(c,d.text.slice(g.length)):b=="add"?h=f+e.indentUnit:b=="subtract"&&(h=f-e.indentUnit),h=Math.max(0,h);var i=h-f;if(!i){if(bm.from.line!=a&&bm.to.line!=a)return;var j=g}else{var j="",k=0;if(e.indentWithTabs)for(var l=Math.floor(h/e.tabSize);l;--l)k+=e.tabSize,j+="\t";while(k<h)++k,j+=" "}cd(j,{line:a,ch:0},{line:a,ch:g.length})}function cN(){bi=a.getMode(e,e.mode),bj.iter(0,bj.size,function(a){a.stateAfter=null}),bk=[0],dx()}function cO(){var a=e.gutter||e.lineNumbers;$.style.display=a?"":"none",a?by=!0:bd.parentNode.style.marginLeft=0}function cP(a,b){if(e.lineWrapping){A.className+=" CodeMirror-wrap";var c=M.clientWidth/dk()-3;bj.iter(0,bj.size,function(a){if(a.hidden)return;var b=Math.ceil(a.text.length/c)||1;b!=1&&bM(a,b)}),ba.style.width=Y.style.width=""}else A.className=A.className.replace(" CodeMirror-wrap",""),bF=null,bE="",bj.iter(0,bj.size,function(a){a.height!=1&&!a.hidden&&bM(a,1),a.text.length>bE.length&&(bE=a.text)});bu.push({from:0,to:bj.size})}function cQ(){for(var a='<span class="cm-tab">',b=0;b<e.tabSize;++b)a+=" ";return a+"</span>"}function cR(){bG=cQ(),ct(!0)}function cS(){this.set=[]}function cT(a,b,c){function e(a,b,c,e){bL(a).addMark(new m(b,c,e,d.set))}a=cD(a),b=cD(b);var d=new cS;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<g;++f)e(f,null,null,c);e(b.line,null,b.ch,c)}return bu.push({from:a.line,to:b.line+1}),d}function cU(a){a=cD(a);var b=new n(a.ch);return bL(a.line).addMark(b),b}function cV(a,b,c){return typeof a=="number"&&(a=bL(cC(a))),a.gutterMarker={text:b,style:c},by=!0,a}function cW(a){typeof a=="number"&&(a=bL(cC(a))),a.gutterMarker=null,by=!0}function cX(a,b){var c=a,d=a;return typeof a=="number"?d=bL(cC(a)):c=t(a),c==null?null:(b(d,c)&&bu.push({from:c,to:c+1}),d)}function cY(a,b){return cX(a,function(a){if(a.className!=b)return a.className=b,!0})}function cZ(a,b){return cX(a,function(a,c){if(a.hidden!=b)return a.hidden=b,bM(a,b?0:1),b&&(bm.from.line==c||bm.to.line==c)&&cz(cA(bm.from,bm.from.line,bm.from.ch),cA(bm.to,bm.to.line,bm.to.ch)),by=!0})}function c$(a){if(typeof a=="number"){if(!bJ(a))return null;var b=a;a=bL(a);if(!a)return null}else{var b=t(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}}function c_(a){return bb.innerHTML="<pre><span>x</span></pre>",bb.firstChild.firstChild.firstChild.nodeValue=a,bb.firstChild.firstChild.offsetWidth||10}function da(a,b){function e(a){return bb.innerHTML="<pre><span>"+c.getHTML(null,null,!1,bG,a)+"</span></pre>",bb.firstChild.firstChild.offsetWidth}if(b<=0)return 0;var c=bL(a),d=c.text,f=0,g=0,h=d.length,i,j=Math.min(h,Math.ceil(b/dk()));for(;;){var k=e(j);if(k<=b&&j<h)j=Math.min(h,Math.ceil(j*1.2));else{i=k,h=j;break}}if(b>i)return h;j=Math.floor(h*.8),k=e(j),k<b&&(f=j,g=k);for(;;){if(h-f<=1)return i-b>b-g?f:h;var l=Math.ceil((f+h)/2),m=e(l);m>b?(h=l,i=m):(f=l,g=m)}}function dc(a,b){var c="";if(e.lineWrapping){var d=a.text.indexOf(" ",b+2);c=a.text.slice(b+1,d<0?a.text.length:d+(I?5:0))}bb.innerHTML="<pre>"+a.getHTML(null,null,!1,bG,b)+'<span id="CodeMirror-temp-'+db+'">'+(a.text.charAt(b)||" ")+"</span>"+c+"</pre>";var f=document.getElementById("CodeMirror-temp-"+db),g=f.offsetTop,h=f.offsetLeft;if(I&&b&&g==0&&h==0){var i=document.createElement("span");i.innerHTML="x",f.parentNode.insertBefore(i,f.nextSibling),g=i.offsetTop}return{top:g,left:h}}function dd(a,b){var c,d=di(),f=d*(v(bj,a.line)-(b?bz:0));if(a.ch==0)c=0;else{var g=dc(bL(a.line),a.ch);c=g.left,e.lineWrapping&&(f+=Math.max(0,g.top))}return{x:c,y:f,yBot:f+d}}function de(a,b){function l(a){var b=dc(h,a);if(j){var d=Math.round(b.top/c);return Math.max(0,b.left+(d-k)*M.clientWidth)}return b.left}b<0&&(b=0);var c=di(),d=dk(),f=bz+Math.floor(b/c),g=u(bj,f);if(g>=bj.size)return{line:bj.size-1,ch:bL(bj.size-1).text.length};var h=bL(g),i=h.text,j=e.lineWrapping,k=j?f-v(bj,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*M.clientWidth*.9)/d));for(;;){var r=l(q);if(r<=a&&q<o)q=Math.min(o,Math.ceil(q*1.2));else{p=r,o=q;break}}if(a>p)return{line:g,ch:o};q=Math.floor(o*.8),r=l(q),r<a&&(m=q,n=r);for(;;){if(o-m<=1)return{line:g,ch:p-a>a-n?m:o};var s=Math.ceil((m+o)/2),t=l(s);t>a?(o=s,p=t):(m=s,n=t)}}function df(a){var b=dd(a,!0),c=N(ba);return{x:c.left+b.x,y:c.top+b.y,yBot:c.top+b.yBot}}function di(){var a=bd.offsetHeight;return a==dh?dg:(dh=a,bb.innerHTML="<pre>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x<br>x</pre>",dg=bb.firstChild.offsetHeight/10||1)}function dk(){return M.clientWidth==dh?dj:(dh=M.clientWidth,dj=c_("x"))}function dl(){return ba.offsetTop}function dm(){return ba.offsetLeft}function dn(a,b){var c=N(M,!0),d,e;try{d=a.clientX,e=a.clientY}catch(a){return null}if(!b&&(d-c.left>M.clientWidth||e-c.top>M.clientHeight))return null;var f=N(ba,!0);return de(d-f.left,e-f.top)}function dp(a){function e(){var a=W(L.value).join("\n");a!=d&&dB(ce)(a,"end"),K.style.position="relative",L.style.cssText=c,bx=!1,cn(!0),cj()}var b=dn(a);if(!b||window.opera)return;(P(bm.from,bm.to)||Q(b,bm.from)||!Q(b,bm.to))&&dB(cB)(b.line,b.ch);var c=L.style.cssText;K.style.position="absolute",L.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);",bx=!0;var d=L.value=ch();co(),L.select();if(H){B(a);var f=E(window,"mouseup",function(){f(),setTimeout(e,20)},!0)}else setTimeout(e,50)}function dq(){clearInterval(bh);var a=!0;bc.style.visibility="",bh=setInterval(function(){bc.style.visibility=(a=!a)?"":"hidden"},650)}function ds(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<c&&o.test(f=k.charAt(l))){var q=dr[f];if(q.charAt(1)==">"==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=bm.inverted?bm.from:bm.to,c=bL(b.line),d=b.ch-1,e=d>=0&&dr[c.text.charAt(d)]||dr[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;k<l;k+=2)if((j-=i[k].length)<=0){var m=i[k+1];break}var n=[c.text.charAt(d)],o=/[(){}[\]]/;for(var k=b.line,l=g?Math.min(k+100,bj.size):Math.max(-1,k-100);k!=l;k+=h){var c=bL(k),q=k==b.line,r=p(c,q&&g?d+1:0,q&&!g?d:c.text.length);if(r)break}r||(r={pos:null,match:!1});var m=r.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",s=cT({line:b.line,ch:d},{line:b.line,ch:d+1},m),t=r.pos!=null&&cT({line:k,ch:r.pos},{line:k,ch:r.pos+1},m),u=dB(function(){s.clear(),t&&t.clear()});a?setTimeout(u,800):bD=u}function dt(a){var b,c;for(var d=a,f=a-40;d>f;--d){if(d==0)return 0;var g=bL(d-1);if(g.stateAfter)return d;var h=g.indentation(e.tabSize);if(c==null||b>h)c=d-1,b=h}return c}function du(a){var b=dt(a),c=b&&bL(b-1).stateAfter;return c?c=j(bi,c):c=k(bi),bj.iter(b,a,function(a){a.highlight(bi,c,e.tabSize),a.stateAfter=j(bi,c)}),b<a&&bu.push({from:b,to:a}),a<bj.size&&!bL(a).stateAfter&&bk.push(a),c}function dv(a,b){var c=du(a);bj.iter(a,b,function(a){a.highlight(bi,c,e.tabSize),a.stateAfter=j(bi,c)})}function dw(){var a=+(new Date)+e.workTime,b=bk.length;while(bk.length){if(!bL(bA).stateAfter)var c=bA;else var c=bk.pop();if(c>=bj.size)continue;var d=dt(c),f=d&&bL(d-1).stateAfter;f?f=j(bi,f):f=k(bi);var g=0,h=bi.compareStates,i=!1,l=d,m=!1;bj.iter(l,bj.size,function(b){var d=b.stateAfter;if(+(new Date)>a)return bk.push(l),dx(e.workDelay),i&&bu.push({from:c,to:l+1}),m=!0;var k=b.highlight(bi,f,e.tabSize);k&&(i=!0),b.stateAfter=j(bi,f);if(h){if(d&&h(d,f))return!0}else if(k!==!1||!d)g=0;else if(++g>3)return!0;++l});if(m)return;i&&bu.push({from:c,to:l+1})}b&&e.onHighlightComplete&&e.onHighlightComplete(bK)}function dx(a){if(!bk.length)return;bg.set(a,dB(dw))}function dy(){bs=bt=null,bu=[],bv=bw=!1}function dz(){var a=!1;bw&&(a=!cq()),bu.length?ct(bu):(bw&&cx(),by&&cw()),a&&cq(),bw&&(cp(),dq()),bl&&!bx&&(bs===!0||bs!==!1&&bw)&&cn(bt),bw&&e.matchBrackets&&setTimeout(dB(function(){bD&&(bD(),bD=null),P(bm.from,bm.to)&&ds(!1)}),20);var b=bv;bw&&e.onCursorActivity&&e.onCursorActivity(bK),b&&e.onChange&&bK&&e.onChange(bK,b)}function dB(a){return function(){dA++||dy();try{var b=a.apply(this,arguments)}finally{--dA||dz()}return b}}var e={},l=a.defaults;for(var p in l)l.hasOwnProperty(p)&&(e[p]=(d&&d.hasOwnProperty(p)?d:l)[p]);var x=e.document,A=x.createElement("div");A.className="CodeMirror"+(e.lineWrapping?" CodeMirror-wrap":""),A.innerHTML='<div style="overflow: hidden; position: relative; width: 1px; height: 0px;"><textarea style="position: absolute; width: 1;" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scroll cm-s-'+e.theme+'">'+'<div style="position: relative">'+'<div style="position: relative">'+'<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>'+'<div class="CodeMirror-lines"><div style="position: relative">'+'<div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden"></div>'+'<pre class="CodeMirror-cursor">&#160;</pre>'+"<div></div>"+"</div></div></div></div></div>",c.appendChild?c.appendChild(A):c(A);var K=A.firstChild,L=K.firstChild,M=A.lastChild,Y=M.firstChild,Z=Y.firstChild,$=Z.firstChild,_=$.firstChild,ba=$.nextSibling.firstChild,bb=ba.firstChild,bc=bb.nextSibling,bd=bc.nextSibling;J||(ba.draggable=!0),e.tabindex!=null&&(L.tabindex=e.tabindex),!e.gutter&&!e.lineNumbers&&($.style.display="none");try{c_("x")}catch(be){throw be.message.match(/unknown runtime/i)&&(be=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")),be}var bf=new F,bg=new F,bh,bi,bj=new r([new q([new o("")])]),bk,bl;cN();var bm={from:{line:0,ch:0},to:{line:0,ch:0},inverted:!1},bn,bo,bp,bq,br=!1,bs,bt,bu,bv,bw,bx,by,bz=0,bA=0,bB=0,bC=0,bD,bE="",bF,bG=cQ();dB(function(){bN(e.value||""),bs=!1})();var bH=new w;E(M,"mousedown",dB(bP)),E(M,"dblclick",dB(bQ)),E(ba,"dragstart",bS),E(ba,"selectstart",z),H||E(M,"contextmenu",dp),E(M,"scroll",function(){ct([]),e.fixedGutter&&($.style.left=M.scrollLeft+"px"),e.onScroll&&e.onScroll(bK)}),E(window,"resize",function(){ct(!0)}),E(L,"keyup",dB(bX)),E(L,"input",ck),E(L,"keydown",dB(bV)),E(L,"keypress",dB(bW)),E(L,"focus",bY),E(L,"blur",bZ),E(M,"dragenter",B),E(M,"dragover",B),E(M,"drop",dB(bR)),E(M,"paste",function(){co(),ck()}),E(L,"paste",ck),E(L,"cut",dB(function(){ce("")}));var bI;try{bI=x.activeElement==L}catch(be){}bI?setTimeout(bY,20):bZ();var bK=A.CodeMirror={getValue:bO,setValue:dB(bN),getSelection:ch,replaceSelection:dB(ce),focus:function(){co(),bY(),ck()},setOption:function(a,b){var c=e[a];e[a]=b,(a=="lineNumbers"||a=="gutter"||a=="firstLineNumber"||a=="theme")&&dB(cO)(),a=="mode"||a=="indentUnit"?cN():a=="readOnly"&&b?(bZ(),L.blur()):a=="theme"?M.className=M.className.replace(/cm-s-\w+/,"cm-s-"+b):a=="lineWrapping"&&c!=b?dB(cP)():a=="tabSize"&&dB(cR)()},getOption:function(a){return e[a]},undo:dB(ca),redo:dB(cb),indentLine:dB(function(a,b){bJ(a)&&cM(a,b==null?"smart":b?"add":"subtract")}),indentSelection:dB(cL),historySize:function(){return{undo:bH.done.length,redo:bH.undone.length}},clearHistory:function(){bH=new w},matchBrackets:dB(function(){ds(!0)}),getTokenAt:dB(function(a){return a=cD(a),bL(a.line).getTokenAt(bi,du(a.line),a.ch)}),getStateAfter:function(a){return a=cC(a==null?bj.size-1:a),du(a+1)},cursorCoords:function(a){return a==null&&(a=bm.inverted),df(a?bm.from:bm.to)},charCoords:function(a){return df(cD(a))},coordsChar:function(a){var b=N(ba);return de(a.x-b.left,a.y-b.top)},markText:dB(cT),setBookmark:cU,setMarker:dB(cV),clearMarker:dB(cW),setLineClass:dB(cY),hideLine:dB(function(a){return cZ(a,!0)}),showLine:dB(function(a){return cZ(a,!1)}),lineInfo:c$,addWidget:function(a,b,c,d,e){a=dd(cD(a));var f=a.yBot,g=a.x;b.style.position="absolute",Y.appendChild(b);if(d=="over")f=a.y;else if(d=="near"){var h=Math.max(M.offsetHeight,bj.height*di()),i=Math.max(Y.clientWidth,ba.clientWidth)-dm();a.yBot+b.offsetHeight>h&&a.y>b.offsetHeight&&(f=a.y-b.offsetHeight),g+b.offsetWidth>i&&(g=i-b.offsetWidth)}b.style.top=f+dl()+"px",b.style.left=b.style.right="",e=="right"?(g=Y.clientWidth-b.offsetWidth,b.style.right="0px"):(e=="left"?g=0:e=="middle"&&(g=(Y.clientWidth-b.offsetWidth)/2),b.style.left=g+dm()+"px"),c&&cr(g,f,g+b.offsetWidth,f+b.offsetHeight)},lineCount:function(){return bj.size},clipPos:cD,getCursor:function(a){return a==null&&(a=bm.inverted),R(a?bm.from:bm.to)},somethingSelected:function(){return!P(bm.from,bm.to)},setCursor:dB(function(a,b,c){b==null&&typeof a.line=="number"?cB(a.line,a.ch,c):cB(a,b,c)}),setSelection:dB(function(a,b,c){(c?cy:cz)(cD(a),cD(b||a))}),getLine:function(a){if(bJ(a))return bL(a).text},setLine:dB(function(a,b){bJ(a)&&cd(b,{line:a,ch:0},{line:a,ch:bL(a).text.length})}),removeLine:dB(function(a){bJ(a)&&cd("",{line:a,ch:0},cD({line:a+1,ch:0}))}),replaceRange:dB(cd),getRange:function(a,b){return cg(cD(a),cD(b))},execCommand:function(a){return g[a](bK)},moveH:dB(cF),deleteH:dB(cG),moveV:dB(cI),toggleOverwrite:function(){br=!br},coordsFromIndex:function(a){var b=0,c;return bj.iter(0,bj.size,function(d){var e=d.text.length+1;if(e>a)return c=a,!0;a-=e,++b}),cD({line:b,ch:c})},operation:function(a){return dB(a)()},refresh:function(){ct(!0)},getInputField:function(){return L},getWrapperElement:function(){return A},getScrollerElement:function(){return M},getGutterElement:function(){return $}},bU=null,ci=!1,cl="",cH=null;cS.prototype.clear=dB(function(){var a=Infinity,b=-Infinity;for(var c=0,d=this.set.length;c<d;++c){var e=this.set[c],f=e.marked;if(!f||!e.parent)continue;var g=t(e);a=Math.min(a,g),b=Math.max(b,g);for(var h=0;h<f.length;++h)f[h].set==this.set&&f.splice(h--,1)}a!=Infinity&&bu.push({from:a,to:b+1})}),cS.prototype.find=function(){var a,b;for(var c=0,d=this.set.length;c<d;++c){var e=this.set[c],f=e.marked;for(var g=0;g<f.length;++g){var h=f[g];if(h.set==this.set)if(h.from!=null||h.to!=null){var i=t(e);i!=null&&(h.from!=null&&(a={line:i,ch:h.from}),h.to!=null&&(b={line:i,ch:h.to}))}}}return{from:a,to:b}};var db=Math.floor(Math.random()*16777215).toString(16),dg,dh,dj,dh=0,dr={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},dA=0;for(var dC in f)f.propertyIsEnumerable(dC)&&!bK.propertyIsEnumerable(dC)&&(bK[dC]=f[dC]);return bK}function i(a,b,c){function e(a,b,c){var d=b[a];if(d!=null)return d;c==null&&(c=b.fallthrough);if(c==null)return b.catchall;if(typeof c=="string")return e(a,h[c]);for(var f=0,g=c.length;f<g;++f){d=e(a,h[c[f]]);if(d!=null)return d}return null}function f(a){return b?e(a,b,c):e(a,h[c])}var d=Y[a.keyCode];if(d==null)return null;a.altKey&&(d="Alt-"+d),a.ctrlKey&&(d="Ctrl-"+d),a.metaKey&&(d="Cmd-"+d);if(a.shiftKey){var g=f("Shift-"+d);if(g!=null)return g}return f(d)}function j(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c}function k(a,b,c){return a.startState?a.startState(b,c):!0}function l(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8}function m(a,b,c,d){this.from=a,this.to=b,this.style=c,this.set=d}function n(a){this.from=a,this.to=a,this.line=null}function o(a,b){this.styles=b||[a,null],this.text=a,this.height=1,this.marked=this.gutterMarker=this.className=null,this.stateAfter=this.parent=this.hidden=null}function p(a,b,c,d){for(var e=0,f=0,g=0;f<b;e+=2){var h=c[e],i=f+h.length;g==0?(i>a&&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 q(a){this.lines=a,this.parent=null;for(var b=0,c=a.length,d=0;b<c;++b)a[b].parent=this,d+=a[b].height;this.height=d}function r(a){this.children=a;var b=0,c=0;for(var d=0,e=a.length;d<e;++d){var f=a[d];b+=f.chunkSize(),c+=f.height,f.parent=this}this.size=b,this.height=c,this.parent=null}function s(a,b){for(;;){for(var c=0,d=a.children.length;c<d;++c){var e=a.children[c],f=e.chunkSize();if(b<f){a=e;break}b-=f}if(a.lines)return a.lines[b]}}function t(a){if(a.parent==null)return null;var b=a.parent,c=V(b.lines,a);for(var d=b.parent;d;b=d,d=d.parent)for(var e=0,f=d.children.length;;++e){if(d.children[e]==b)break;c+=d.children[e].chunkSize()}return c}function u(a,b){var c=0;d:do{for(var e=0,f=a.children.length;e<f;++e){var g=a.children[e],h=g.height;if(b<h){a=g;continue d}b-=h,c+=g.chunkSize()}return c}while(!a.lines);for(var e=0,f=a.lines.length;e<f;++e){var i=a.lines[e],j=i.height;if(b<j)break;b-=j}return c+e}function v(a,b){var c=0;d:do{for(var e=0,f=a.children.length;e<f;++e){var g=a.children[e],h=g.chunkSize();if(b<h){a=g;continue d}b-=h,c+=g.height}return c}while(!a.lines);for(var e=0;e<b;++e)c+=a.lines[e].height;return c}function w(){this.time=0,this.done=[],this.undone=[]}function x(){B(this)}function y(a){return a.stop||(a.stop=x),a}function z(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function A(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function B(a){z(a),A(a)}function C(a){return a.target||a.srcElement}function D(a){if(a.which)return a.which;if(a.button&1)return 1;if(a.button&2)return 3;if(a.button&4)return 2}function E(a,b,c,d){if(typeof a.addEventListener=="function"){a.addEventListener(b,c,!1);if(d)return function(){a.removeEventListener(b,c,!1)}}else{var e=function(a){c(a||window.event)};a.attachEvent("on"+b,e);if(d)return function(){a.detachEvent("on"+b,e)}}}function F(){this.id=null}function L(a,b,c){b==null&&(b=a.search(/[^\s\u00a0]/),b==-1&&(b=a.length));for(var d=0,e=0;d<b;++d)a.charAt(d)=="\t"?e+=c-e%c:++e;return e}function M(a){return a.currentStyle?a.currentStyle:window.getComputedStyle(a,null)}function N(a,b){var c=a.ownerDocument.body,d=0,e=0,f=!1;for(var g=a;g;g=g.offsetParent){var h=g.offsetLeft,i=g.offsetTop;g==c?(d+=Math.abs(h),e+=Math.abs(i)):(d+=h,e+=i),b&&M(g).position=="fixed"&&(f=!0)}var j=b&&!f?null:c;for(var g=a.parentNode;g!=j;g=g.parentNode)g.scrollLeft!=null&&(d-=g.scrollLeft,e-=g.scrollTop);return{left:d,top:e}}function O(a){return a.textContent||a.innerText||a.nodeValue||""}function P(a,b){return a.line==b.line&&a.ch==b.ch}function Q(a,b){return a.line<b.line||a.line==b.line&&a.ch<b.ch}function R(a){return{line:a.line,ch:a.ch}}function T(a){return S.textContent=a,S.innerHTML}function U(a,b){if(!b)return a?a.length:0;if(!a)return b.length;for(var c=a.length,d=b.length;c>=0&&d>=0;--c,--d)if(a.charAt(c)!=b.charAt(d))break;return d+1}function V(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;++c)if(a[c]==b)return c;return-1}a.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:!1,tabSize:4,keyMap:"default",extraKeys:null,electricChars:!0,onKeyEvent:null,lineWrapping:!1,lineNumbers:!1,gutter:!1,fixedGutter:!1,firstLineNumber:1,readOnly:!1,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:!1,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,document:window.document};var b=/Mac/.test(navigator.platform),c=/Win/.test(navigator.platform),d={},e={};a.defineMode=function(b,c){!a.defaults.mode&&b!="null"&&(a.defaults.mode=b),d[b]=c},a.defineMIME=function(a,b){e[a]=b},a.getMode=function(b,c){typeof c=="string"&&e.hasOwnProperty(c)&&(c=e[c]);if(typeof c=="string")var f=c,g={};else if(c!=null)var f=c.name,g=c;var h=d[f];return h?h(b,g||{}):(window.console&&console.warn("No mode "+f+" found, falling back to plain text."),a.getMode(b,"text/plain"))},a.listModes=function(){var a=[];for(var b in d)d.propertyIsEnumerable(b)&&a.push(b);return a},a.listMIMEs=function(){var a=[];for(var b in e)e.propertyIsEnumerable(b)&&a.push({mime:b,mode:e[b]});return a};var f=a.extensions={};a.defineExtension=function(a,b){f[a]=b};var g=a.commands={selectAll:function(a){a.setSelection({line:0,ch:0},{line:a.lineCount()-1})},killLine:function(a){var b=a.getCursor(!0),c=a.getCursor(!1),d=!P(b,c);!d&&a.getLine(b.line).length==b.ch?a.replaceRange("",b,{line:b.line+1,ch:0}):a.replaceRange("",b,d?c:{line:b.line})},deleteLine:function(a){var b=a.getCursor().line;a.replaceRange("",{line:b,ch:0},{line:b})},undo:function(a){a.undo()},redo:function(a){a.redo()},goDocStart:function(a){a.setCursor(0,0,!0)},goDocEnd:function(a){a.setSelection({line:a.lineCount()-1},null,!0)},goLineStart:function(a){a.setCursor(a.getCursor().line,0,!0)},goLineStartSmart:function(a){var b=a.getCursor(),c=a.getLine(b.line),d=Math.max(0,c.search(/\S/));a.setCursor(b.line,b.ch<=d&&b.ch?0:d,!0)},goLineEnd:function(a){a.setSelection({line:a.getCursor().line},null,!0)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goWordLeft:function(a){a.moveH(-1,"word")},goWordRight:function(a){a.moveH(1,"word")},delCharLeft:function(a){a.deleteH(-1,"char")},delCharRight:function(a){a.deleteH(1,"char")},delWordLeft:function(a){a.deleteH(-1,"word")},delWordRight:function(a){a.deleteH(1,"word")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("\t","end")},transposeChars:function(a){var b=a.getCursor(),c=a.getLine(b.line);b.ch>0&&b.ch<c.length-1&&a.replaceRange(c.charAt(b.ch)+c.charAt(b.ch-1),{line:b.line,ch:b.ch-1},{line:b.line,ch:b.ch+1})},newlineAndIndent:function(a){a.replaceSelection("\n","end"),a.indentLine(a.getCursor().line)},toggleOverwrite:function(a){a.toggleOverwrite()}},h=a.keyMap={};h.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"indentMore","Shift-Tab":"indentLess",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},h.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Ctrl-R":"replace","Shift-Ctrl-R":"replaceAll",fallthrough:"basic"},h.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Cmd-Z":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordRight","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll",fallthrough:["basic","emacsy"]},h["default"]=b?h.macDefault:h.pcDefault,h.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},a.fromTextArea=function(b,c){function d(){b.value=h.getValue()}c||(c={}),c.value=b.value,!c.tabindex&&b.tabindex&&(c.tabindex=b.tabindex);if(b.form){var e=E(b.form,"submit",d,!0);if(typeof b.form.submit=="function"){var f=b.form.submit;function g(){d(),b.form.submit=f,b.form.submit(),b.form.submit=g}b.form.submit=g}}b.style.display="none";var h=a(function(a){b.parentNode.insertBefore(a,b.nextSibling)},c);return h.save=d,h.toTextArea=function(){d(),b.parentNode.removeChild(h.getWrapperElement()),b.style.display="",b.form&&(e(),typeof b.form.submit=="function"&&(b.form.submit=f))},h},a.copyState=j,a.startState=k,l.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if(typeof a=="string")var c=b==a;else var c=b&&(a.test?a.test(b):a(b));if(c)return++this.pos,b},eatWhile:function(a){var b=this.pos;while(this.eat(a));return this.pos>b},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 L(this.string,this.start,this.tabSize)},indentation:function(){return L(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=l,m.prototype={attach:function(a){this.set.push(a)},detach:function(a){var b=V(this.set,a);b>-1&&this.set.splice(b,1)},split:function(a,b){if(this.to<=a&&this.to!=null)return null;var c=this.from<a||this.from==null?null:this.from-a+b,d=this.to==null?null:this.to-a+b;return new m(c,d,this.style,this.set)},dup:function(){return new m(null,null,this.style,this.set)},clipTo:function(a,b,c,d,e){this.from!=null&&this.from>=b&&(this.from=Math.max(d,this.from)+e),this.to!=null&&this.to>b&&(this.to=d<this.to?this.to+e:b),a&&d>this.from&&(d<this.to||this.to==null)&&(this.from=null),c&&(b<this.to||this.to==null)&&(b>this.from||this.from==null)&&(this.to=null)},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(a){return this.set==a.set}},n.prototype={attach:function(a){this.line=a},detach:function(a){this.line==a&&(this.line=null)},split:function(a,b){if(a<this.from)return this.from=this.to=this.from-a+b,this},isDead:function(){return this.from>this.to},clipTo:function(a,b,c,d,e){(a||b<this.from)&&(c||d>this.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:t(this.line),ch:this.from}},clear:function(){if(this.line){var a=V(this.line.marked,this);a!=-1&&this.line.marked.splice(a,1),this.line=null}}},o.inheritMarks=function(a,b){var c=new o(a),d=b.marked;if(d)for(var e=0;e<d.length;++e)if(d[e].to==null&&d[e].style){var f=c.marked||(c.marked=[]),g=d[e],h=g.dup();f.push(h),h.attach(c)}return c},o.prototype={replace:function(a,b,c){!a&&(b==null||b==this.text.length)&&(this.className=this.gutterMarker=null);var d=[],e=this.marked,f=b==null?this.text.length:b;p(0,a,this.styles,d),c&&d.push(c,null),p(f,this.text.length,this.styles,d),this.styles=d,this.text=this.text.slice(0,a)+c+this.text.slice(f),this.stateAfter=null;if(e){var g=c.length-(f-a);for(var h=0,i=e[h];h<e.length;++h)i.clipTo(a==null,a||0,b==null,f,g),i.isDead()&&(i.detach(this),e.splice(h--,1))}},split:function(a,b){var c=[b,null],d=this.marked;p(a,this.text.length,this.styles,c);var e=new o(b+this.text.slice(a),c);if(d)for(var f=0;f<d.length;++f){var g=d[f],h=g.split(a,b.length);h&&(e.marked||(e.marked=[]),e.marked.push(h),h.attach(e))}return e},append:function(a){var b=this.text.length,c=a.marked,d=this.marked;this.text+=a.text,p(0,a.text.length,a.styles,this.styles);if(d)for(var e=0;e<d.length;++e)d[e].to==null&&(d[e].to=b);if(c&&c.length){d||(this.marked=d=[]);f:for(var e=0;e<c.length;++e){var g=c[e];if(!g.from)for(var h=0;h<d.length;++h){var i=d[h];if(i.to==b&&i.sameSet(g)){i.to=g.to==null?null:g.to+b,i.isDead()&&(i.detach(this),c.splice(e--,1));continue f}}d.push(g),g.attach(this),g.from+=b,g.to!=null&&(g.to+=b)}}},fixMarkEnds:function(a){var b=this.marked,c=a.marked;if(!b)return;for(var d=0;d<b.length;++d){var e=b[d],f=e.to==null;if(f&&c)for(var g=0;g<c.length;++g)if(c[g].sameSet(e)){f=!1;break}f&&(e.to=this.text.length)}},addMark:function(a){a.attach(this),this.marked==null&&(this.marked=[]),this.marked.push(a),this.marked.sort(function(a,b){return(a.from||0)-(b.from||0)})},highlight:function(a,b,c){var d=new l(this.text,c),e=this.styles,f=0,g=!1,h=e[0],i;this.text==""&&a.blankLine&&a.blankLine(b);while(!d.eol()){var j=a.token(d,b),k=this.text.slice(d.start,d.pos);d.start=d.pos,f&&e[f-1]==j?e[f-2]+=k:k&&(!g&&(e[f+1]!=j||f&&e[f-2]!=i)&&(g=!0),e[f++]=k,e[f++]=j,i=h,h=e[f]);if(d.pos>5e3){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 l(d);while(e.pos<c&&!e.eol()){e.start=e.pos;var f=a.token(e,b)}return{start:e.start,end:e.pos,string:e.current(),className:f||null,state:b}},indentation:function(a){return L(this.text,null,a)},getHTML:function(a,b,c,d,e){function h(a,b){if(!a)return;g&&I&&a.charAt(0)==" "&&(a="\u00a0"+a.slice(1)),g=!1,b?f.push('<span class="',b,'">',T(a).replace(/\t/g,d),"</span>"):f.push(T(a).replace(/\t/g,d))}var f=[],g=!0;c&&f.push(this.className?'<pre class="'+this.className+'">':"<pre>");var i=this.styles,j=this.text,k=this.marked;a==b&&(a=null);var l=j.length;e!=null&&(l=Math.min(e,l));if(!j&&e==null)h(" ",a!=null&&b==null?"CodeMirror-selected":null);else if(!k&&a==null)for(var m=0,n=0;n<l;m+=2){var o=i[m],p=i[m+1],q=o.length;n+q>l&&(o=o.slice(0,l-n)),n+=q,h(o,p&&"cm-"+p)}else{var r=0,m=0,s="",p,t=0,u=-1,v=null;function w(){k&&(u+=1,v=u<k.length?k[u]:null)}w();while(r<l){var x=l,y="";if(a!=null)if(a>r)x=a;else if(b==null||b>r)y=" CodeMirror-selected",b!=null&&(x=Math.min(x,b));while(v&&v.to!=null&&v.to<=r)w();v&&(v.from>r?x=Math.min(x,v.from):(y+=" "+v.style,v.to!=null&&(x=Math.min(x,v.to))));for(;;){var z=r+s.length,A=p;y&&(A=p?p+y:y),h(z>x?s.slice(0,x-r):s,A);if(z>=x){s=s.slice(x-r),r=x;break}r=z,s=i[m++],p="cm-"+i[m++]}}a!=null&&b==null&&h(" ","CodeMirror-selected")}return c&&f.push("</pre>"),f.join("")},cleanUp:function(){this.parent=null;if(this.marked)for(var a=0,b=this.marked.length;a<b;++a)this.marked[a].detach(this)}},q.prototype={chunkSize:function(){return this.lines.length},remove:function(a,b){for(var c=a,d=a+b;c<d;++c){var e=this.lines[c];e.cleanUp(),this.height-=e.height}this.lines.splice(a,b)},collapse:function(a){a.splice.apply(a,[a.length,0].concat(this.lines))},insertHeight:function(a,b,c){this.height+=c,this.lines.splice.apply(this.lines,[a,0].concat(b));for(var d=0,e=b.length;d<e;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;a<d;++a)if(c(this.lines[a]))return!0}},r.prototype={chunkSize:function(){return this.size},remove:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(a<e){var f=Math.min(b,e-a),g=d.height;d.remove(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null);if((b-=f)==0)break;a=0}else a-=e}if(this.size-b<25){var h=[];this.collapse(h),this.children=[new q(h)]}},collapse:function(a){for(var b=0,c=this.children.length;b<c;++b)this.children[b].collapse(a)},insert:function(a,b){var c=0;for(var d=0,e=b.length;d<e;++d)c+=b[d].height;this.insertHeight(a,b,c)},insertHeight:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0,e=this.children.length;d<e;++d){var f=this.children[d],g=f.chunkSize();if(a<=g){f.insertHeight(a,b,c);if(f.lines&&f.lines.length>50){while(f.lines.length>50){var h=f.lines.splice(f.lines.length-25,25),i=new q(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 r(b);if(!a.parent){var d=new r(a.children);d.parent=a,a.children=[d,c],a=d}else{a.size-=c.size,a.height-=c.height;var e=V(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;d<e;++d){var f=this.children[d],g=f.chunkSize();if(a<g){var h=Math.min(b,g-a);if(f.iterN(a,h,c))return!0;if((b-=h)==0)break;a=0}else a-=g}}},w.prototype={addChange:function(a,b,c){this.undone.length=0;var d=+(new Date),e=this.done[this.done.length-1];if(d-this.time>400||!e||e.start>a+b||e.start+e.added<a-e.added+e.old.length)this.done.push({start:a,added:b,old:c});else{var f=0;if(a<e.start){for(var g=e.start-a-1;g>=0;--g)e.old.unshift(c[g]);e.added+=e.start-a,e.start=a}else e.start<a&&(f=a-e.start,b+=f);for(var g=e.added-f,h=c.length;g<h;++g)e.old.push(c[g]);e.added<b&&(e.added=b)}this.time=d}},a.e_stop=B,a.e_preventDefault=z,a.e_stopPropagation=A,a.connect=E,F.prototype={set:function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)}};var G=function(){if(/MSIE [1-8]\b/.test(navigator.userAgent))return!1;var a=document.createElement("div");return"draggable"in a}(),H=/gecko\/\d{7}/i.test(navigator.userAgent),I=/MSIE \d/.test(navigator.userAgent),J=/WebKit\//.test(navigator.userAgent),K="\n";(function(){var a=document.createElement("textarea");a.value="foo\nbar",a.value.indexOf("\r")>-1&&(K="\r\n")})(),document.documentElement.getBoundingClientRect!=null&&(N=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 S=document.createElement("pre");T("a")=="\na"?T=function(a){return S.textContent=a,S.innerHTML.slice(1)}:T("\t")!="\t"&&(T=function(a){return S.innerHTML="",S.appendChild(document.createTextNode(a)),S.innerHTML}),a.htmlEscape=T;var W="\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=W;var X=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 Y={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:"Win",92:"Win",93:"Select",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=Y,function(){for(var a=0;a<10;a++)Y[a+48]=String(a);for(var a=65;a<=90;a++)Y[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Y[a+111]=Y[a+63235]="F"+a}(),a}();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=="=")d(null,"compare");else 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")}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="atom";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")

T1KUS90T
  root-grov@210.1.60.28:~$