import{o as e}from"./chunk-6hGRweTZ.js";import{t}from"./codemirror-mxAyinHX.js";import{d as n,f as r,m as i,p as a,s as o}from"./esm-MZoV4-G5.js";import{t as s}from"./mode-indent-IK9pkvVY.js";e(t()).default.defineMode(`graphql-variables`,e=>{let t=o({eatWhitespace:e=>e.eatSpace(),lexRules:c,parseRules:l,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:s,electricInput:/^\s*[}\]]/,fold:`brace`,closeBrackets:{pairs:`[]{}""`,explode:`[]{}`}}});var c={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},l={Document:[a(`{`),n(`Variable`,r(a(`,`))),a(`}`)],Variable:[u(`variable`),a(`:`),`Value`],Value(e){switch(e.kind){case`Number`:return`NumberValue`;case`String`:return`StringValue`;case`Punctuation`:switch(e.value){case`[`:return`ListValue`;case`{`:return`ObjectValue`}return null;case`Keyword`:switch(e.value){case`true`:case`false`:return`BooleanValue`;case`null`:return`NullValue`}return null}},NumberValue:[i(`Number`,`number`)],StringValue:[i(`String`,`string`)],BooleanValue:[i(`Keyword`,`builtin`)],NullValue:[i(`Keyword`,`keyword`)],ListValue:[a(`[`),n(`Value`,r(a(`,`))),a(`]`)],ObjectValue:[a(`{`),n(`ObjectField`,r(a(`,`))),a(`}`)],ObjectField:[u(`attribute`),a(`:`),`Value`]};function u(e){return{style:e,match:e=>e.kind===`String`,update(e,t){e.name=t.value.slice(1,-1)}}}
//# sourceMappingURL=mode-tZL0bsq_.js.map