(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[41085],{41085:function(_,h,y){"use strict";y.r(h),y.d(h,{groovy:function(){return C}});function f(e){for(var n={},t=e.split(" "),i=0;i"))return r="->",null;if(/[+\-*&%=<>!?|\/~]/.test(t))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),t=="@")return e.eatWhile(/[\w\$_\.]/),"meta";if(n.lastToken==".")return"property";if(e.eat(":"))return r="proplabel","property";var i=e.current();return E.propertyIsEnumerable(i)?"atom":x.propertyIsEnumerable(i)?(z.propertyIsEnumerable(i)?r="newstatement":m.propertyIsEnumerable(i)&&(r="standalone"),"keyword"):"variable"}d.isBase=!0;function v(e,n,t){var i=!1;if(e!="/"&&n.eat(e))if(n.eat(e))i=!0;else return"string";function o(u,k){for(var p=!1,a,b=!i;(a=u.next())!=null;){if(a==e&&!p){if(!i)break;if(u.match(e+e)){b=!0;break}}if(e=='"'&&a=="$"&&!p){if(u.eat("{"))return k.tokenize.push(T()),"string";if(u.match(/^\w/,!1))return k.tokenize.push(B),"string"}p=!p&&a=="\\"}return b&&k.tokenize.pop(),"string"}return t.tokenize.push(o),o(n,t)}function T(){var e=1;function n(t,i){if(t.peek()=="}"){if(e--,e==0)return i.tokenize.pop(),i.tokenize[i.tokenize.length-1](t,i)}else t.peek()=="{"&&e++;return d(t,i)}return n.isBase=!0,n}function B(e,n){var t=e.match(/^(\.|[\w\$_]+)/);return t?t[0]=="."?null:"variable":(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](e,n))}function w(e,n){for(var t=!1,i;i=e.next();){if(i=="/"&&t){n.tokenize.pop();break}t=i=="*"}return"comment"}function s(e,n){return!e||e=="operator"||e=="->"||/[\.\[\{\(,;:]/.test(e)||e=="newstatement"||e=="keyword"||e=="proplabel"||e=="standalone"&&!n}function g(e,n,t,i,o){this.indented=e,this.column=n,this.type=t,this.align=i,this.prev=o}function c(e,n,t){return e.context=new g(e.indented,n,t,null,e.context)}function l(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const C={name:"groovy",startState:function(e){return{tokenize:[d],context:new g(-e,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0,t.type=="statement"&&!s(n.lastToken,!0)&&(l(n),t=n.context)),e.eatSpace())return null;r=null;var i=n.tokenize[n.tokenize.length-1](e,n);if(i=="comment")return i;if(t.align==null&&(t.align=!0),(r==";"||r==":")&&t.type=="statement")l(n);else if(r=="->"&&t.type=="statement"&&t.prev.type=="}")l(n),n.context.align=!1;else if(r=="{")c(n,e.column(),"}");else if(r=="[")c(n,e.column(),"]");else if(r=="(")c(n,e.column(),")");else if(r=="}"){for(;t.type=="statement";)t=l(n);for(t.type=="}"&&(t=l(n));t.type=="statement";)t=l(n)}else r==t.type?l(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&r=="newstatement")&&c(n,e.column(),"statement");return n.startOfLine=!1,n.lastToken=r||i,i},indent:function(e,n,t){if(!e.tokenize[e.tokenize.length-1].isBase)return null;var i=n&&n.charAt(0),o=e.context;o.type=="statement"&&!s(e.lastToken,!0)&&(o=o.prev);var u=i==o.type;return o.type=="statement"?o.indented+(i=="{"?0:t.unit):o.align?o.column+(u?0:1):o.indented+(u?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}}}}]);