(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b132dfef-3ee9-40a3-a50f-09f7c6469058",e._sentryDebugIdIdentifier="sentry-dbid-b132dfef-3ee9-40a3-a50f-09f7c6469058")}catch{}})();function o(e){for(var n={},r=0;r<e.length;++r)n[e[r]]=!0;return n}var v=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],y=["list","quote","bquote","eval","return","call","parse","deparse"],g=["if","else","repeat","while","function","for","in","next","break"],x=["if","else","repeat","while","function","for"],h=o(v),I=o(y),w=o(g),_=o(x),b=/[+\-*\/^<>=!&|~$:]/,f;function p(e,n){f=null;var r=e.next();if(r=="#")return e.skipToEnd(),"comment";if(r=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(r=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(r=="'"||r=='"')return n.tokenize=m(r),"string";if(r=="`")return e.match(/[^`]+`/),"string.special";if(r=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(r)){e.eatWhile(/[\w\.]/);var i=e.current();return h.propertyIsEnumerable(i)?"atom":w.propertyIsEnumerable(i)?(_.propertyIsEnumerable(i)&&!e.match(/\s*if(\s+|$)/,!1)&&(f="block"),"keyword"):I.propertyIsEnumerable(i)?"builtin":"variable"}else return r=="%"?(e.skipTo("%")&&e.next(),"variableName.special"):r=="<"&&e.eat("-")||r=="<"&&e.match("<-")||r=="-"&&e.match(/>>?/)||r=="="&&n.ctx.argList?"operator":b.test(r)?(r=="$"||e.eatWhile(b),"operator"):/[\(\){}\[\];]/.test(r)?(f=r,r==";"?"punctuation":null):null}function m(e){return function(n,r){if(n.eat("\\")){var i=n.next();return i=="x"?n.match(/^[a-f0-9]{2}/i):(i=="u"||i=="U")&&n.eat("{")&&n.skipTo("}")?n.next():i=="u"?n.match(/^[a-f0-9]{4}/i):i=="U"?n.match(/^[a-f0-9]{8}/i):/[0-7]/.test(i)&&n.match(/^[0-7]{1,2}/),"string.special"}else{for(var t;(t=n.next())!=null;){if(t==e){r.tokenize=p;break}if(t=="\\"){n.backUp(1);break}}return"string"}}}var s=1,u=2,c=4;function l(e,n,r){e.ctx={type:n,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function k(e,n){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|n,column:r.column,prev:r.prev}}function a(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}const N={name:"r",startState:function(e){return{tokenize:p,ctx:{type:"top",indent:-e,flags:u},indent:0,afterIdent:!1}},token:function(e,n){if(e.sol()&&((n.ctx.flags&3)==0&&(n.ctx.flags|=u),n.ctx.flags&c&&a(n),n.indent=e.indentation()),e.eatSpace())return null;var r=n.tokenize(e,n);return r!="comment"&&(n.ctx.flags&u)==0&&k(n,s),(f==";"||f=="{"||f=="}")&&n.ctx.type=="block"&&a(n),f=="{"?l(n,"}",e):f=="("?(l(n,")",e),n.afterIdent&&(n.ctx.argList=!0)):f=="["?l(n,"]",e):f=="block"?l(n,"block",e):f==n.ctx.type?a(n):n.ctx.type=="block"&&r!="comment"&&k(n,c),n.afterIdent=r=="variable"||r=="keyword",r},indent:function(e,n,r){if(e.tokenize!=p)return 0;var i=n&&n.charAt(0),t=e.ctx,d=i==t.type;return t.flags&c&&(t=t.prev),t.type=="block"?t.indent+(i=="{"?0:r.unit):t.flags&s?t.column+(d?0:1):t.indent+(d?0:r.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:v.concat(y,g)}};export{N as r};
//# sourceMappingURL=r-3DKwHX9a.js.map
