Liferay.Loader.define("liferay!object-web$codemirror@5.65.12/mode/dtd/dtd",["module","exports","require","../../lib/codemirror"],(function(t,e,n){var r,o=void 0;window;r=function(t){"use strict";t.defineMode("dtd",(function(t){var e,n=t.indentUnit;function ret(t,n){return e=n,t}function tokenBase(t,e){var n=t.next();if("<"!=n||!t.eat("!")){if("<"==n&&t.eat("?"))return e.tokenize=function inBlock(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=tokenBase;break}n.next()}return t}}("meta","?>"),ret("meta",n);if("#"==n&&t.eatWhile(/[\w]/))return ret("atom","tag");if("|"==n)return ret("keyword","separator");if(n.match(/[\(\)\[\]\-\.,\+\?>]/))return ret(null,n);if(n.match(/[\[\]]/))return ret("rule",n);if('"'==n||"'"==n)return e.tokenize=function tokenString(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){n.tokenize=tokenBase;break}o=!o&&"\\"==r}return ret("string","tag")}}(n),e.tokenize(t,e);if(t.eatWhile(/[a-zA-Z\?\+\d]/)){var r=t.current();return null!==r.substr(r.length-1,r.length).match(/\?|\+/)&&t.backUp(1),ret("tag","tag")}return"%"==n||"*"==n?ret("number","number"):(t.eatWhile(/[\w\\\-_%.{,]/),ret(null,null))}return t.eatWhile(/[\-]/)?(e.tokenize=tokenSGMLComment,tokenSGMLComment(t,e)):t.eatWhile(/[\w]/)?ret("keyword","doindent"):void 0}function tokenSGMLComment(t,e){for(var n,r=0;null!=(n=t.next());){if(r>=2&&">"==n){e.tokenize=tokenBase;break}r="-"==n?r+1:0}return ret("comment","comment")}return{startState:function(t){return{tokenize:tokenBase,baseIndent:t||0,stack:[]}},token:function(t,n){if(t.eatSpace())return null;var r=n.tokenize(t,n),o=n.stack[n.stack.length-1];return"["==t.current()||"doindent"===e||"["==e?n.stack.push("rule"):"endtag"===e?n.stack[n.stack.length-1]="endtag":"]"==t.current()||"]"==e||">"==e&&"rule"==o?n.stack.pop():"["==e&&n.stack.push("["),r},indent:function(t,r){var o=t.stack.length;return"]"===r.charAt(0)?o--:">"===r.substr(r.length-1,r.length)&&("<"===r.substr(0,1)||"doindent"==e&&r.length>1||("doindent"==e?o--:">"==e&&r.length>1||"tag"==e&&">"!==r||("tag"==e&&"rule"==t.stack[t.stack.length-1]?o--:"tag"==e?o++:">"===r&&"rule"==t.stack[t.stack.length-1]&&">"===e?o--:">"===r&&"rule"==t.stack[t.stack.length-1]||("<"!==r.substr(0,1)&&">"===r.substr(0,1)?o-=1:">"===r||(o-=1)))),null!=e&&"]"!=e||o--),t.baseIndent+o*n},electricChars:"]>"}})),t.defineMIME("application/xml-dtd","dtd")},"object"==typeof e&&"object"==typeof t?r(n("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=dtd.js.map