Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/velocity/velocity",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var r,o=void 0;window;r=function(e){"use strict";e.defineMode("velocity",(function(){function parseWords(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var e=parseWords("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),t=parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),n=parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),r=/[+\-*&%=<>!?:\/|]/;function chain(e,t,n){return t.tokenize=n,n(e,t)}function tokenBase(o,a){var i=a.beforeParams;a.beforeParams=!1;var s=o.next();if("'"==s&&!a.inString&&a.inParams)return a.lastTokenWasBuiltin=!1,chain(o,a,tokenString(s));if('"'!=s){if(/[\[\]{}\(\),;\.]/.test(s))return"("==s&&i?a.inParams=!0:")"==s&&(a.inParams=!1,a.lastTokenWasBuiltin=!0),null;if(/\d/.test(s))return a.lastTokenWasBuiltin=!1,o.eatWhile(/[\w\.]/),"number";if("#"==s&&o.eat("*"))return a.lastTokenWasBuiltin=!1,chain(o,a,tokenComment);if("#"==s&&o.match(/ *\[ *\[/))return a.lastTokenWasBuiltin=!1,chain(o,a,tokenUnparsed);if("#"==s&&o.eat("#"))return a.lastTokenWasBuiltin=!1,o.skipToEnd(),"comment";if("$"==s)return o.eat("!"),o.eatWhile(/[\w\d\$_\.{}-]/),n&&n.propertyIsEnumerable(o.current())?"keyword":(a.lastTokenWasBuiltin=!0,a.beforeParams=!0,"builtin");if(r.test(s))return a.lastTokenWasBuiltin=!1,o.eatWhile(r),"operator";o.eatWhile(/[\w\$_{}@]/);var l=o.current();return e&&e.propertyIsEnumerable(l)?"keyword":t&&t.propertyIsEnumerable(l)||o.current().match(/^#@?[a-z0-9_]+ *$/i)&&"("==o.peek()&&(!t||!t.propertyIsEnumerable(l.toLowerCase()))?(a.beforeParams=!0,a.lastTokenWasBuiltin=!1,"keyword"):a.inString?(a.lastTokenWasBuiltin=!1,"string"):o.pos>l.length&&"."==o.string.charAt(o.pos-l.length-1)&&a.lastTokenWasBuiltin?"builtin":(a.lastTokenWasBuiltin=!1,null)}return a.lastTokenWasBuiltin=!1,a.inString?(a.inString=!1,"string"):a.inParams?chain(o,a,tokenString(s)):void 0}function tokenString(e){return function(t,n){for(var r,o=!1,a=!1;null!=(r=t.next());){if(r==e&&!o){a=!0;break}if('"'==e&&"$"==t.peek()&&!o){n.inString=!0,a=!0;break}o=!o&&"\\"==r}return a&&(n.tokenize=tokenBase),"string"}}function tokenComment(e,t){for(var n,r=!1;n=e.next();){if("#"==n&&r){t.tokenize=tokenBase;break}r="*"==n}return"comment"}function tokenUnparsed(e,t){for(var n,r=0;n=e.next();){if("#"==n&&2==r){t.tokenize=tokenBase;break}"]"==n?r++:" "!=n&&(r=0)}return"meta"}return{startState:function(){return{tokenize:tokenBase,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}})),e.defineMIME("text/velocity","velocity")},"object"==typeof t&&"object"==typeof e?r(n("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=velocity.js.map