Liferay.Loader.define("liferay!layout-content-page-editor-web$codemirror@5.65.2/addon/runmode/runmode",["module","exports","require","../../lib/codemirror"],(function(e,t,n){window,function(e){"use strict";e.runMode=function(t,n,r,o){var a=e.getMode(e.defaults,n),d=o&&o.tabSize||e.defaults.tabSize;if(r.appendChild){var i=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),c=r,l=0;c.innerHTML="",r=function(e,t){if("\n"==e)return c.appendChild(document.createTextNode(i?"\r":e)),void(l=0);for(var n="",r=0;;){var o=e.indexOf("\t",r);if(-1==o){n+=e.slice(r),l+=e.length-r;break}l+=o-r,n+=e.slice(r,o);var a=d-l%d;l+=a;for(var u=0;u<a;++u)n+=" ";r=o+1}if(t){var f=c.appendChild(document.createElement("span"));f.className="cm-"+t.replace(/ +/g," cm-"),f.appendChild(document.createTextNode(n))}else c.appendChild(document.createTextNode(n))}}for(var u=e.splitLines(t),f=o&&o.state||e.startState(a),s=0,m=u.length;s<m;++s){s&&r("\n");var p=new e.StringStream(u[s],null,{lookAhead:function(e){return u[s+e]},baseToken:function(){}});for(!p.string&&a.blankLine&&a.blankLine(f);!p.eol();){var v=a.token(p,f);r(p.current(),v,s,p.start,f,a),p.start=p.pos}}}}("object"==typeof t&&"object"==typeof e?n("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=runmode.js.map