import{C as i}from"./codemirror-CVZ5hDL3.js";import{R as o,a4 as e,a5 as l,a6 as t,a7 as n}from"./index-Cq7z4i0o.js";import{i as c}from"./mode-indent-Dvf_-b54.js";import"./codemirror-DpyRu-EA.js";i.defineMode("graphql-variables",a=>{const r=o({eatWhitespace:u=>u.eatSpace(),lexRules:b,parseRules:d,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:r.startState,token:r.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const b={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/},d={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[s("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[t("Number","number")],StringValue:[t("String","string")],BooleanValue:[t("Keyword","builtin")],NullValue:[t("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[s("attribute"),e(":"),"Value"]};function s(a){return{style:a,match:r=>r.kind==="String",update(r,u){r.name=u.value.slice(1,-1)}}}
//# sourceMappingURL=mode-88Ig2_CD.js.map
