Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/tiki/tiki",["module","exports","require","../../lib/codemirror"],(function(n,t,e){var i,r=void 0;window;i=function(n){"use strict";n.defineMode("tiki",(function(n){function inBlock(n,t,e){return function(i,r){for(;!i.eol();){if(i.match(t)){r.tokenize=inText;break}i.next()}return e&&(r.tokenize=e),n}}function inLine(n){return function(t,e){for(;!t.eol();)t.next();return e.tokenize=inText,n}}function inText(n,t){function chain(e){return t.tokenize=e,e(n,t)}var e=n.sol(),i=n.next();switch(i){case"{":return n.eat("/"),n.eatSpace(),n.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),t.tokenize=inPlugin,"tag";case"_":if(n.eat("_"))return chain(inBlock("strong","__",inText));break;case"'":if(n.eat("'"))return chain(inBlock("em","''",inText));break;case"(":if(n.eat("("))return chain(inBlock("variable-2","))",inText));break;case"[":return chain(inBlock("variable-3","]",inText));case"|":if(n.eat("|"))return chain(inBlock("comment","||"));break;case"-":if(n.eat("="))return chain(inBlock("header string","=-",inText));if(n.eat("-"))return chain(inBlock("error tw-deleted","--",inText));break;case"=":if(n.match("=="))return chain(inBlock("tw-underline","===",inText));break;case":":if(n.eat(":"))return chain(inBlock("comment","::"));break;case"^":return chain(inBlock("tw-box","^"));case"~":if(n.match("np~"))return chain(inBlock("meta","~/np~"))}if(e)switch(i){case"!":return n.match("!!!!!")||n.match("!!!!")||n.match("!!!")||n.match("!!"),chain(inLine("header string"));case"*":case"#":case"+":return chain(inLine("tw-listitem bracket"))}return null}var t,e,i,r,o=n.indentUnit;function inPlugin(n,t){var i=n.next(),r=n.peek();return"}"==i?(t.tokenize=inText,"tag"):"("==i||")"==i?"bracket":"="==i?(e="equals",">"==r&&(n.next(),r=n.peek()),/[\'\"]/.test(r)||(t.tokenize=function inAttributeNoQuote(){return function(n,t){for(;!n.eol();){var e=n.next(),i=n.peek();if(" "==e||","==e||/[ )}]/.test(i)){t.tokenize=inPlugin;break}}return"string"}}()),"operator"):/[\'\"]/.test(i)?(t.tokenize=function inAttribute(n){return function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=inPlugin;break}return"string"}}(i),t.tokenize(n,t)):(n.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function pass(){for(var n=arguments.length-1;n>=0;n--)i.cc.push(arguments[n])}function cont(){return pass.apply(null,arguments),!0}function pushContext(n,t){var e=i.context&&i.context.noIndent;i.context={prev:i.context,pluginName:n,indent:i.indented,startOfLine:t,noIndent:e}}function popContext(){i.context&&(i.context=i.context.prev)}function element(n){if("openPlugin"==n)return i.pluginName=t,cont(attributes,function endplugin(n){return function(t){return"selfclosePlugin"==t||"endPlugin"==t?cont():"endPlugin"==t?(pushContext(i.pluginName,n),cont()):cont()}}(i.startOfLine));if("closePlugin"==n){var e=!1;return i.context?(e=i.context.pluginName!=t,popContext()):e=!0,e&&(r="error"),cont(function endcloseplugin(n){return function(t){return n&&(r="error"),"endPlugin"==t?cont():pass()}}(e))}return"string"==n?(i.context&&"!cdata"==i.context.name||pushContext("!cdata"),i.tokenize==inText&&popContext(),cont()):cont()}function attributes(n){return"keyword"==n?(r="attribute",cont(attributes)):"equals"==n?cont(attvalue,attributes):pass()}function attvalue(n){return"keyword"==n?(r="string",cont()):"string"==n?cont(attvaluemaybe):pass()}function attvaluemaybe(n){return"string"==n?cont(attvaluemaybe):pass()}return{startState:function(){return{tokenize:inText,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(n,o){if(n.sol()&&(o.startOfLine=!0,o.indented=n.indentation()),n.eatSpace())return null;r=e=t=null;var a=o.tokenize(n,o);if((a||e)&&"comment"!=a)for(i=o;!(o.cc.pop()||element)(e||a););return o.startOfLine=!1,r||a},indent:function(n,t){var e=n.context;if(e&&e.noIndent)return 0;for(e&&/^{\//.test(t)&&(e=e.prev);e&&!e.startOfLine;)e=e.prev;return e?e.indent+o:0},electricChars:"/"}})),n.defineMIME("text/tiki","tiki")},"object"==typeof t&&"object"==typeof n?i(e("../../lib/codemirror")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],i):i(CodeMirror)}));
//# sourceMappingURL=tiki.js.map