"use strict";(self.webpackChunksc_components=self.webpackChunksc_components||[]).push([[1033],{11033(m,p,d){d.d(p,{cypher:()=>y});var i,o=function(n){return new RegExp("^(?:"+n.join("|")+")$","i")},f=function(n){i=null;var e=n.next();if('"'===e)return n.match(/^.*?"/),"string";if("'"===e)return n.match(/^.*?'/),"string";if(/[{}\(\),\.;\[\]]/.test(e))return i=e,"punctuation";if("/"===e&&n.eat("/"))return n.skipToEnd(),"comment";if(a.test(e))return n.eatWhile(a),null;if(n.eatWhile(/[_\w\d]/),n.eat(":"))return n.eatWhile(/[\w\d_\-]/),"atom";var t=n.current();return h.test(t)?"builtin":x.test(t)?"def":g.test(t)||v.test(t)?"keyword":"variable"},l=function(n,e,t){return n.context={prev:n.context,indent:n.indent,col:t,type:e}},c=function(n){return n.indent=n.context.indent,n.context=n.context.prev},h=o(["abs","acos","allShortestPaths","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endnode","exp","extract","filter","floor","haversin","head","id","keys","labels","last","left","length","log","log10","lower","ltrim","max","min","node","nodes","percentileCont","percentileDisc","pi","radians","rand","range","reduce","rel","relationship","relationships","replace","reverse","right","round","rtrim","shortestPath","sign","sin","size","split","sqrt","startnode","stdev","stdevp","str","substring","sum","tail","tan","timestamp","toFloat","toInt","toString","trim","type","upper"]),x=o(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),g=o(["as","asc","ascending","assert","by","case","commit","constraint","create","csv","cypher","delete","desc","descending","detach","distinct","drop","else","end","ends","explain","false","fieldterminator","foreach","from","headers","in","index","is","join","limit","load","match","merge","null","on","optional","order","periodic","profile","remove","return","scan","set","skip","start","starts","then","true","union","unique","unwind","using","when","where","with","call","yield"]),v=o(["access","active","assign","all","alter","as","catalog","change","copy","create","constraint","constraints","current","database","databases","dbms","default","deny","drop","element","elements","exists","from","grant","graph","graphs","if","index","indexes","label","labels","management","match","name","names","new","node","nodes","not","of","on","or","password","populated","privileges","property","read","relationship","relationships","remove","replace","required","revoke","role","roles","set","show","start","status","stop","suspended","to","traverse","type","types","user","users","with","write"]),a=/[*+\-<>=&|~%^]/;const y={name:"cypher",startState:function(){return{tokenize:f,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()&&(e.context&&null==e.context.align&&(e.context.align=!1),e.indent=n.indentation()),n.eatSpace())return null;var t=e.tokenize(n,e);if("comment"!==t&&e.context&&null==e.context.align&&"pattern"!==e.context.type&&(e.context.align=!0),"("===i)l(e,")",n.column());else if("["===i)l(e,"]",n.column());else if("{"===i)l(e,"}",n.column());else if(/[\]\}\)]/.test(i)){for(;e.context&&"pattern"===e.context.type;)c(e);e.context&&i===e.context.type&&c(e)}else"."===i&&e.context&&"pattern"===e.context.type?c(e):/atom|string|variable/.test(t)&&e.context&&(/[\}\]]/.test(e.context.type)?l(e,"pattern",n.column()):"pattern"===e.context.type&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return t},indent:function(n,e,t){var s=e&&e.charAt(0),r=n.context;if(/[\]\}]/.test(s))for(;r&&"pattern"===r.type;)r=r.prev;var u=r&&s===r.type;return r?"keywords"===r.type?null:r.align?r.col+(u?0:1):r.indent+(u?0:t.unit):0}}}}]);