(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]="2aa1afbf-f034-4923-a981-b35451b699b0",e._sentryDebugIdIdentifier="sentry-dbid-2aa1afbf-f034-4923-a981-b35451b699b0")}catch{}})();var r,f=s(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]),p=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function s(e){return new RegExp("^("+e.join("|")+")$")}function c(e,n){var o=e.sol(),i=e.next();if(r=null,o){if(i=="/")return(n.tokenize=x)(e,n);if(i=="\\")return e.eol()||/\s/.test(e.peek())?(e.skipToEnd(),/^\\\s*$/.test(e.current())?(n.tokenize=k)(e):n.tokenize=c,"comment"):(n.tokenize=c,"builtin")}if(/\s/.test(i))return e.peek()=="/"?(e.skipToEnd(),"comment"):"null";if(i=='"')return(n.tokenize=v)(e,n);if(i=="`")return e.eatWhile(/[A-Za-z\d_:\/.]/),"macroName";if(i=="."&&/\d/.test(e.peek())||/\d/.test(i)){var t=null;return e.backUp(1),e.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||e.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||e.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||e.match(/^\d+[ptuv]{1}/)?t="temporal":(e.match(/^0[NwW]{1}/)||e.match(/^0x[\da-fA-F]*/)||e.match(/^[01]+[b]{1}/)||e.match(/^\d+[chijn]{1}/)||e.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(t="number"),t&&(!(i=e.peek())||p.test(i))?t:(e.next(),"error")}return/[A-Za-z]|\./.test(i)?(e.eatWhile(/[A-Za-z._\d]/),f.test(e.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(i)||/[{}\(\[\]\)]/.test(i)?null:"error"}function x(e,n){return e.skipToEnd(),/^\/\s*$/.test(e.current())?(n.tokenize=a)(e,n):n.tokenize=c,"comment"}function a(e,n){var o=e.sol()&&e.peek()=="\\";return e.skipToEnd(),o&&/^\\\s*$/.test(e.current())&&(n.tokenize=c),"comment"}function k(e){return e.skipToEnd(),"comment"}function v(e,n){for(var o=!1,i,t=!1;i=e.next();){if(i=='"'&&!o){t=!0;break}o=!o&&i=="\\"}return t&&(n.tokenize=c),"string"}function l(e,n,o){e.context={prev:e.context,indent:e.indent,col:o,type:n}}function u(e){e.indent=e.context.indent,e.context=e.context.prev}const g={name:"q",startState:function(){return{tokenize:c,context:null,indent:0,col:0}},token:function(e,n){e.sol()&&(n.context&&n.context.align==null&&(n.context.align=!1),n.indent=e.indentation());var o=n.tokenize(e,n);if(o!="comment"&&n.context&&n.context.align==null&&n.context.type!="pattern"&&(n.context.align=!0),r=="(")l(n,")",e.column());else if(r=="[")l(n,"]",e.column());else if(r=="{")l(n,"}",e.column());else if(/[\]\}\)]/.test(r)){for(;n.context&&n.context.type=="pattern";)u(n);n.context&&r==n.context.type&&u(n)}else r=="."&&n.context&&n.context.type=="pattern"?u(n):/atom|string|variable/.test(o)&&n.context&&(/[\}\]]/.test(n.context.type)?l(n,"pattern",e.column()):n.context.type=="pattern"&&!n.context.align&&(n.context.align=!0,n.context.col=e.column()));return o},indent:function(e,n,o){var i=n&&n.charAt(0),t=e.context;if(/[\]\}]/.test(i))for(;t&&t.type=="pattern";)t=t.prev;var d=t&&i==t.type;return t?t.type=="pattern"?t.col:t.align?t.col+(d?0:1):t.indent+(d?0:o.unit):0},languageData:{commentTokens:{line:"/"}}};export{g as q};
//# sourceMappingURL=q-Dz2jxFzM.js.map
