'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.runMode=function(k,c,f,d){c=a.getMode(a.defaults,c);var n=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||9>document.documentMode);if(f.appendChild){var m=d&&d.tabSize||a.defaults.tabSize,l=f,g=0;l.innerHTML="";f=function(a,d){if("\n"==a)l.appendChild(document.createTextNode(n?
"\r":a)),g=0;else{for(var b="",e=0;;){var c=a.indexOf("\t",e);if(-1==c){b+=a.slice(e);g+=a.length-e;break}else{g+=c-e;b+=a.slice(e,c);e=m-g%m;g+=e;for(var f=0;f<e;++f)b+=" ";e=c+1}}d?(a=l.appendChild(document.createElement("span")),a.className="cm-"+d.replace(/ +/g," cm-"),a.appendChild(document.createTextNode(b))):l.appendChild(document.createTextNode(b))}}}k=a.splitLines(k);d=d&&d.state||a.startState(c);for(var h=0,p=k.length;h<p;++h){h&&f("\n");var b=new a.StringStream(k[h]);for(!b.string&&c.blankLine&&
c.blankLine(d);!b.eol();){var q=c.token(b,d);f(b.current(),q,h,b.start,d);b.start=b.pos}}}});
