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