define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";function i(e){this.type=e,this.style={},this.textContent=""}var u=e("../edit_session").EditSession,o=e("../layer/text").Text,g=e("../config"),h=e("../lib/dom"),s=e("../lib/lang").escapeHTML;i.prototype.cloneNode=function(){return this},i.prototype.appendChild=function(e){this.textContent+=e.toString()},i.prototype.toString=function(){var e=[];if("fragment"!=this.type){e.push("<",this.type),this.className&&e.push(" class='",this.className,"'");var t,n=[];for(t in this.style)n.push(t,":",this.style[t]);n.length&&e.push(" style='",n.join(""),"'"),e.push(">")}return this.textContent&&e.push(this.textContent),"fragment"!=this.type&&e.push("</",this.type,">"),e.join("")};function p(){this.config={},this.dom=d}var d={createTextNode:function(e,t){return s(e)},createElement:function(e){return new i(e)},createFragment:function(){return new i("fragment")}};p.prototype=o.prototype;function m(s,e,r){var t=s.className.match(/lang-(\w+)/),n=e.mode||t&&"ace/mode/"+t[1];if(!n)return!1;var t=e.theme||"ace/theme/textmate",i="",a=[];if(s.firstElementChild)for(var o=0,c=0;c<s.childNodes.length;c++){var l=s.childNodes[c];3==l.nodeType?(o+=l.data.length,i+=l.data):a.push(o,l)}else i=s.textContent,e.trim&&(i=i.trim());m.render(i,n,t,e.firstLineNumber,!e.showGutter,function(e){h.importCssString(e.css,"ace_highlight"),s.innerHTML=e.html;for(var t=s.firstChild.firstChild,n=0;n<a.length;n+=2){var i=e.session.doc.indexToPosition(a[n]),o=a[n+1],i=t.children[i.row];i&&i.appendChild(o)}r&&r()})}m.render=function(t,n,i,o,s,r){function a(){var e=m.renderSync(t,n,i,o,s);return r?r(e):e}var c,l=1,h=u.prototype.$modes;return"string"==typeof i&&(l++,g.loadModule(["theme",i],function(e){i=e,--l||a()})),"string"==typeof(n=n&&"object"==typeof n&&!n.getTokenizer?(c=n).path:n)&&(l++,g.loadModule(["mode",n],function(e){h[n]&&!c||(h[n]=new e.Mode(c)),n=h[n],--l||a()})),--l||a()},m.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var s=new u("");s.setUseWorker(!1),s.setMode(t);var r=new p;r.setSession(s),Object.keys(r.$tabStrings).forEach(function(e){var t;"string"==typeof r.$tabStrings[e]&&((t=d.createFragment()).textContent=r.$tabStrings[e],r.$tabStrings[e]=t)}),s.setValue(e);var a=s.getLength(),e=d.createElement("div");e.className=n.cssClass;var c=d.createElement("div");c.className="ace_static_highlight"+(o?"":" ace_show_gutter"),c.style["counter-reset"]="ace_line "+(i-1);for(var l=0;l<a;l++){var h,g=d.createElement("div");g.className="ace_line",o||((h=d.createElement("span")).className="ace_gutter ace_gutter-cell",h.textContent="",g.appendChild(h)),r.$renderLine(g,l,!1),g.textContent+="\n",c.appendChild(g)}return e.appendChild(c),{css:".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;white-space: pre-wrap}.ace_static_highlight .ace_gutter {width: 2em;text-align: right;padding: 0 3px 0 0;margin-right: 3px;contain: none;}.ace_static_highlight.ace_show_gutter .ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line { position: relative; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;top: 0;bottom: 0;left: 0;position: absolute;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}"+n.cssText,html:e.toString(),session:s}},n.exports=m,n.exports.highlight=m}),window.require(["ace/ext/static_highlight"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)});