"+a.getHTML(c$)+"";a.className&&(b='
'+b+"
':"",bh.firstChild.firstChild.offsetWidth}if(b<=0)return 0;var c=bU(a),d=c.text,f=0,g=0,h=d.length,i,j=Math.min(h,Math.ceil(b/dx()));for(;;){var k=e(j);if(k<=b&&j",e);for(var g=1;g")}++d}),be.style.display="none",bf.innerHTML=c.join("");var e=String(bq.size).length,g=bf.firstChild,h=R(g),i="";while(h.length+i.length");c.push(" '}if(bt.from.ch&&b.y>=0){var l=i?bg.clientWidth-c.x:0;k(b.x,b.y,l,e)}var m=Math.max(0,b.y+(bt.from.ch?e:0)),n=Math.min(c.y,bg.clientHeight)-m;n>.2*e&&k(0,m,0,n),(!i||!bt.from.ch)&&c.y c||g>f.text.length)g=f.text.length;return{line:d,ch:g}}d+=b}}var e=bU(a.line);return e.hidden?a.line>=b?d(1)||d(-1):d(-1)||d(1):a}function cL(a,b,c){var d=cN({line:a,ch:b||0});(c?cI:cJ)(d,d)}function cM(a){return Math.max(0,Math.min(a,bq.size-1))}function cN(a){if(a.line<0)return{line:0,ch:0};if(a.line>=bq.size)return{line:bq.size-1,ch:bU(bq.size-1).text.length};var b=a.ch,c=bU(a.line).text.length;return b==null||b>c?{line:a.line,ch:c}:b<0?{line:a.line,ch:0}:a}function cO(a,b){function g(){for(var b=d+a,c=a<0?-1:bq.size;b!=c;b+=a){var e=bU(b);if(!e.hidden)return d=b,f=e,!0}}function h(b){if(e==(a<0?0:f.text.length))if(!b&&g())e=a<0?f.text.length:0;else return!1;else e+=a;return!0}var c=bt.inverted?bt.from:bt.to,d=c.line,e=c.ch,f=bU(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($(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 cP(a,b){var c=a<0?bt.from:bt.to;if(bu||T(bt.from,bt.to))c=cO(a,b);cL(c.line,c.ch,!0)}function cQ(a,b){T(bt.from,bt.to)?a<0?cm("",cO(a,b),bt.to):cm("",bt.from,cO(a,b)):cm("",bt.from,bt.to),bC=!0}function cS(a,b){var c=0,d=dn(bt.inverted?bt.from:bt.to,!0);cR!=null&&(d.x=cR),b=="page"?c=Math.min(P.clientHeight,window.innerHeight||document.documentElement.clientHeight):b=="line"&&(c=du());var e=dp(d.x,d.y+c*a+2);cL(e.line,e.ch,!0),cR=d.x}function cT(a){var b=bU(a.line).text,c=a.ch,d=a.ch;while(c>0&&$(b.charAt(c-1)))--c;while(d bO.length&&(bO=a.text)});bD.push({from:0,to:bq.size})}function c$(a){var b=f.tabSize-a%f.tabSize;for(var c='',d=0;d",width:b}}function c_(){P.className=P.className.replace(/\s*cm-s-\w+/g,"")+f.theme.replace(/(^|\s)\s*/g," cm-s-")}function da(){this.set=[]}function db(a,b,c){function e(a,b,c,e){bU(a).addMark(new o(b,c,e,d.set))}a=cN(a),b=cN(b);var d=new da;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.getHTML(c$,b)+''+X(a.text.charAt(b)||" ")+""+c+"
";var e=document.getElementById("CodeMirror-temp-"+dl),g=e.offsetTop,h=e.offsetLeft;if(L&&g==0&&h==0){var i=document.createElement("span");i.innerHTML="x",e.parentNode.insertBefore(i,e.nextSibling),g=i.offsetTop}return{top:g,left:h}}function dn(a,b){var c,d=du(),e=d*(x(bq,a.line)-(b?bJ:0));if(a.ch==0)c=0;else{var g=dm(bU(a.line),a.ch);c=g.left,f.lineWrapping&&(e+=Math.max(0,g.top))}return{x:c,y:e,yBot:e+d}}function dp(a,b){function l(a){var b=dm(h,a);if(j){var d=Math.round(b.top/c);return Math.max(0,b.left+(d-k)*P.clientWidth)}return b.left}b<0&&(b=0);var c=du(),d=dx(),e=bJ+Math.floor(b/c),g=w(bq,e);if(g>=bq.size)return{line:bq.size-1,ch:bU(bq.size-1).text.length};var h=bU(g),i=h.text,j=f.lineWrapping,k=j?e-x(bq,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*P.clientWidth*.9)/d));for(;;){var r=l(q);if(r<=a&&q";for(var a=0;a<49;++a)dt+="x"}var b=bk.clientHeight;return b==ds?dr:(ds=b,bh.innerHTML=dt,dr=bh.firstChild.offsetHeight/50||1,bh.innerHTML="",dr)}function dx(){return P.clientWidth==dw?dv:(dw=P.clientWidth,dv=dj("x"))}function dy(){return bg.offsetTop}function dz(){return bg.offsetLeft}function dA(a,b){var c=Q(P,!0),d,e;try{d=a.clientX,e=a.clientY}catch(a){return null}if(!b&&(d-c.left>P.clientWidth||e-c.top>P.clientHeight))return null;var f=Q(bg,!0);return dp(d-f.left,e-f.top)}function dB(a){function e(){var a=_(O.value).join("\n");a!=d&&dN(cn)(a,"end"),N.style.position="relative",O.style.cssText=c,bG=!1,cw(!0),cs()}var b=dA(a);if(!b||window.opera)return;(T(bt.from,bt.to)||U(b,bt.from)||!U(b,bt.to))&&dN(cL)(b.line,b.ch);var c=O.style.cssText;N.style.position="absolute",O.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);",bG=!0;var d=O.value=cq();cx(),S(O);if(K){D(a);var f=H(window,"mouseup",function(){f(),setTimeout(e,20)},!0)}else setTimeout(e,50)}function dC(){clearInterval(bo);var a=!0;bi.style.visibility="",bo=setInterval(function(){bi.style.visibility=(a=!a)?"":"hidden"},650)}function dE(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
";dt+="x