Liferay.Loader.define("portal-search-web$codemirror@5.62.0/mode/stex/stex",["module","exports","require","../../lib/codemirror"],(function(t,e,r){window,function(t){"use strict";t.defineMode("stex",(function(t,e){function r(t,e){t.cmdState.push(e)}function n(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function a(t,e,r){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=r,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var i={};function c(t,e){t.f=e}function o(t,e){var a;if(t.match(/^\\[a-zA-Z@]+/)){var o=t.current().slice(1);return r(e,a=new(a=i.hasOwnProperty(o)?i[o]:i.DEFAULT)),c(e,f),a.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return c(e,(function(t,e){return u(t,e,"\\]")})),"keyword";if(t.match("\\("))return c(e,(function(t,e){return u(t,e,"\\)")})),"keyword";if(t.match("$$"))return c(e,(function(t,e){return u(t,e,"$$")})),"keyword";if(t.match("$"))return c(e,(function(t,e){return u(t,e,"$")})),"keyword";var m=t.next();return"%"==m?(t.skipToEnd(),"comment"):"}"==m||"]"==m?(a=n(e))?(a.closeBracket(m),c(e,f),"bracket"):"error":"{"==m||"["==m?(r(e,a=new(a=i.DEFAULT)),"bracket"):/\d/.test(m)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(a=function(t){for(var e=t.cmdState,r=e.length-1;r>=0;r--){var n=e[r];if("DEFAULT"!=n.name)return n}return{styleIdentifier:function(){return null}}}(e)).name&&(a.argument=t.current()),a.styleIdentifier())}function u(t,e,r){if(t.eatSpace())return null;if(r&&t.match(r))return c(e,o),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var n=t.next();return"{"==n||"}"==n||"["==n||"]"==n||"("==n||")"==n?"bracket":"%"==n?(t.skipToEnd(),"comment"):"error"}function f(t,e){var r=t.peek();return"{"==r||"["==r?(n(e).openBracket(r),t.eat(r),c(e,o),"bracket"):/[ \t\r]/.test(r)?(t.eat(r),null):(c(e,o),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),o(t,e))}return i.importmodule=a("importmodule","tag",["string","builtin"]),i.documentclass=a("documentclass","tag",["","atom"]),i.usepackage=a("usepackage","tag",["atom"]),i.begin=a("begin","tag",["atom"]),i.end=a("end","tag",["atom"]),i.label=a("label","tag",["atom"]),i.ref=a("ref","tag",["atom"]),i.eqref=a("eqref","tag",["atom"]),i.cite=a("cite","tag",["atom"]),i.bibitem=a("bibitem","tag",["atom"]),i.Bibitem=a("Bibitem","tag",["atom"]),i.RBibitem=a("RBibitem","tag",["atom"]),i.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return u(t,e)}:o}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=o,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}("object"==typeof e&&"object"==typeof t?r("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=stex.js.map