import{g as dn}from"./index-DiQX2EYw.js";function fn(V,Q){for(var k=0;k<Q.length;k++){const g=Q[k];if(typeof g!="string"&&!Array.isArray(g)){for(const D in g)if(D!=="default"&&!(D in V)){const U=Object.getOwnPropertyDescriptor(g,D);U&&Object.defineProperty(V,D,U.get?U:{enumerable:!0,get:()=>g[D]})}}}return Object.freeze(Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}))}var te={exports:{}},ge;function En(){return ge||(ge=1,(function(V,Q){(function(k){function g(){var D=k();return D.default||D}V.exports=g()})(function(){var k=Object.defineProperty,g=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,U=Object.prototype.hasOwnProperty,z=(e,t)=>{for(var i in t)k(e,i,{get:t[i],enumerable:!0})},Re=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of D(t))!U.call(e,n)&&n!==i&&k(e,n,{get:()=>t[n],enumerable:!(r=g(t,n))||r.enumerable});return e},be=e=>Re(k({},"__esModule",{value:!0}),e),ie={};z(ie,{languages:()=>xt,options:()=>Ct,parsers:()=>he,printers:()=>hn});var Le=(e,t)=>(i,r,...n)=>i|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,n),Fe=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},we=Le("replaceAll",function(){if(typeof this=="string")return Fe}),H=we,Pe=()=>{},Me=Pe,Ve="indent",Ue="group",Be="if-break",W="line",je="break-parent",Ge=Me;function N(e){return{type:Ve,contents:e}}var Ke={type:je};function A(e,t={}){return Ge(t.expandedStates),{type:Ue,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function y(e,t="",i={}){return{type:Be,breakContents:e,flatContents:t,groupId:i.groupId}}function f(e,t){let i=[];for(let r=0;r<t.length;r++)r!==0&&i.push(e),i.push(t[r]);return i}var F={type:W},u={type:W,soft:!0},$e={type:W,hard:!0},p=[$e,Ke];function Z(e){return(t,i,r)=>{if(i===!1)return!1;let n=!!r?.backwards,{length:s}=t,c=i;for(;c>=0&&c<s;){let l=t.charAt(c);if(e instanceof RegExp){if(!e.test(l))return c}else if(!e.includes(l))return c;n?c--:c++}return c===-1||c===s?c:!1}}var ne=Z(" 	"),Ye=Z(",; 	"),qe=Z(/[^\n\r]/),re=e=>e===`
`||e==="\r"||e==="\u2028"||e==="\u2029";function Je(e,t,i){if(t===!1)return!1;let r=!!i?.backwards,n=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&n===`
`)return t-2;if(re(n))return t-1}else{if(n==="\r"&&e.charAt(t+1)===`
`)return t+2;if(re(n))return t+1}return t}var se=Je;function Xe(e,t,i={}){let r=ne(e,i.backwards?t-1:t,i),n=se(e,r,i);return r!==n}var Qe=Xe,ze=()=>!0;function He(e,t){let i=e.node;return i.printed=!0,t.printer.printComment(e,t)}function ae(e,t,i={}){let{indent:r=!1,marker:n,filter:s=ze}=i,c=new Set(e.node?.comments?.filter(m=>!(m.leading||m.trailing||m.marker!==n||!s(m))));if(c.size===0)return"";let l=e.map(({node:m})=>c.has(m)?He(e,t):"","comments").filter(Boolean),E=f(p,l);return r?N([p,E]):E}function We(e){return Array.isArray(e)&&e.length>0}var v=We,Ze=class extends Error{name="UnexpectedNodeError";constructor(e,t,i="type"){super(`Unexpected ${t} node ${i}: ${JSON.stringify(e[i])}.`),this.node=e}},et=Ze,B=null;function j(e){if(B!==null&&typeof B.property){let t=B;return B=j.prototype=null,t}return B=j.prototype=e??Object.create(null),new j}var tt=10;for(let e=0;e<=tt;e++)j();function it(e){return j(e)}function nt(e,t="type"){it(e);function i(r){let n=r[t],s=e[n];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return s}return i}var rt=nt,I=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],st={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:I[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:I[1],FragmentArgument:I[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:I[1],Directive:["name","arguments"],NamedType:I[0],ListType:I[2],NonNullType:I[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:I[2],ScalarTypeDefinition:I[3],ObjectTypeDefinition:I[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:I[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:I[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:I[5],ScalarTypeExtension:I[5],ObjectTypeExtension:I[6],InterfaceTypeExtension:I[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},at=rt(st,"kind"),ot=at,oe=e=>e.loc.start,ce=e=>e.loc.end;function le(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}le.ignoredProperties=new Set(["loc","comments"]);var ct="format",lt=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,ut=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/,pt=e=>ut.test(e),ht=e=>lt.test(e),dt=e=>`# @${ct}

${e}`;function ft(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let i=t+2;i<e.length;++i)if(e.charAt(i)==="*"&&e.charAt(i+1)==="/")return i+2}return t}var Et=ft;function mt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?qe(e,t):t}var Tt=mt;function Nt(e,t){let i=null,r=t;for(;r!==i;)i=r,r=Ye(e,r),r=Et(e,r),r=ne(e,r);return r=Tt(e,r),r=se(e,r),r!==!1&&Qe(e,r)}var It=Nt;function _(e,t,i,r){return e.map(({isLast:n,node:s})=>{let c=i();return!n&&It(t.originalText,ce(s))?[c,p]:c},r)}function ue(e,t,i){let{node:r}=e;return v(r.arguments)?A(["(",N([u,f([y("",", "),u],_(e,t,i,"arguments"))]),u,")"]):""}function O(e,t,i){let{node:r}=e;if(!r.description)return"";let n=[i("description")];return r.kind==="InputValueDefinition"&&!r.description.block?n.push(F):n.push(p),n}function T(e,t){let{node:i}=e;if(!v(i.directives))return"";let r=f(F,e.map(t,"directives"));return i.kind==="FragmentDefinition"||i.kind==="OperationDefinition"?A([F,r]):[" ",A(N([u,r]))]}function pe(e,t){let{node:i}=e;return v(i.variableDefinitions)?A(["(",N([u,f([y("",", "),u],e.map(t,"variableDefinitions"))]),u,")"]):""}function vt(e,t,i){let{node:r}=e;switch(r.kind){case"Document":return[...f(p,_(e,t,i,"definitions")),p];case"OperationDefinition":{let n=t.originalText[oe(r)]!=="{",s=!!r.name;return[O(e,t,i),n?r.operation:"",n&&s?[" ",i("name")]:"",n&&!s&&v(r.variableDefinitions)?" ":"",pe(e,i),T(e,i),!n&&!s?"":" ",i("selectionSet")]}case"FragmentDefinition":return[O(e,t,i),"fragment ",i("name"),pe(e,i)," on ",i("typeCondition"),T(e,i)," ",i("selectionSet")];case"SelectionSet":return["{",N([p,f(p,_(e,t,i,"selections"))]),p,"}"];case"Field":return A([r.alias?[i("alias"),": "]:"",i("name"),v(r.arguments)?A(["(",N([u,f([y("",", "),u],_(e,t,i,"arguments"))]),u,")"]):"",T(e,i),r.selectionSet?" ":"",i("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let n=H(0,r.value,'"""','\\"""').split(`
`);return n.length===1&&(n[0]=n[0].trim()),n.every(s=>s==="")&&(n.length=0),f(p,['"""',...n,'"""'])}return['"',H(0,H(0,r.value,/["\\]/g,"\\$&"),`
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",i("name")];case"ListValue":{let n=!v(r.values);return A(["[",ae(e,t,{indent:!0}),n?"":N([u,f([y("",", "),u],e.map(i,"values"))]),u,"]"])}case"ObjectValue":{let n=!v(r.fields),s=t.bracketSpacing&&!n?" ":"";return A(["{",s,ae(e,t,{indent:!0}),n?"":[N([u,f([y("",", "),u],e.map(i,"fields"))])],u,y("",s),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[i("name"),": ",i("value")];case"Directive":return["@",i("name"),ue(e,t,i)];case"NamedType":return i("name");case"VariableDefinition":return[O(e,t,i),i("variable"),": ",i("type"),r.defaultValue?[" = ",i("defaultValue")]:"",T(e,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:n}=r,s=[];return n.endsWith("TypeDefinition")?s.push(O(e,t,i)):s.push("extend "),n.startsWith("ObjectType")?s.push("type"):n.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",i("name")),!n.startsWith("InputObjectType")&&v(r.interfaces)&&s.push(" implements ",N([A([f([" &",F],e.map(i,"interfaces"))])])),s.push(T(e,i)),v(r.fields)&&s.push([" {",N([p,f(p,_(e,t,i,"fields"))]),p,"}"]),s}case"FieldDefinition":return[O(e,t,i),i("name"),v(r.arguments)?A(["(",N([u,f([y("",", "),u],_(e,t,i,"arguments"))]),u,")"]):"",": ",i("type"),T(e,i)];case"DirectiveDefinition":return[O(e,t,i),"directive ","@",i("name"),v(r.arguments)?A(["(",N([u,f([y("",", "),u],_(e,t,i,"arguments"))]),u,")"]):"",T(e,i),r.repeatable?" repeatable":""," on ",...f(" | ",e.map(i,"locations"))];case"DirectiveExtension":return["extend directive @",i("name"),T(e,i)];case"EnumTypeExtension":case"EnumTypeDefinition":return[O(e,t,i),r.kind==="EnumTypeExtension"?"extend ":"","enum ",i("name"),T(e,i),v(r.values)?[" {",N([p,f(p,_(e,t,i,"values"))]),p,"}"]:""];case"EnumValueDefinition":return[O(e,t,i),i("name"),T(e,i)];case"InputValueDefinition":return[O(e,t,i),i("name"),": ",i("type"),r.defaultValue?[" = ",i("defaultValue")]:"",T(e,i)];case"SchemaExtension":return["extend schema",T(e,i),...v(r.operationTypes)?[" {",N([p,f(p,_(e,t,i,"operationTypes"))]),p,"}"]:[]];case"SchemaDefinition":return[O(e,t,i),"schema",T(e,i)," {",v(r.operationTypes)?N([p,f(p,_(e,t,i,"operationTypes"))]):"",p,"}"];case"OperationTypeDefinition":return[r.operation,": ",i("type")];case"FragmentSpread":return["...",i("name"),ue(e,t,i),T(e,i)];case"InlineFragment":return["...",r.typeCondition?[" on ",i("typeCondition")]:"",T(e,i)," ",i("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return A([O(e,t,i),A([r.kind==="UnionTypeExtension"?"extend ":"","union ",i("name"),T(e,i),v(r.types)?[" =",y(""," "),N([y([F,"| "]),f([F,"| "],e.map(i,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[O(e,t,i),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",i("name"),T(e,i)];case"NonNullType":return[i("type"),"!"];case"ListType":return["[",i("type"),"]"];default:throw new et(r,"Graphql","kind")}}function At(e){return e.kind!=="Comment"}function Ot({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function Dt(e){let{node:t}=e;return t?.comments?.some(i=>i.value.trim()==="prettier-ignore")}var yt={print:vt,massageAstNode:le,hasPrettierIgnore:Dt,insertPragma:dt,printComment:Ot,canAttachComment:At,getVisitorKeys:ot},_t=yt,xt=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],kt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."}},gt={bracketSpacing:kt.bracketSpacing},Ct=gt,he={};z(he,{graphql:()=>pn});function St(e,t){return e?.__kind===t}var Rt=St;function bt(e){return typeof e=="object"&&e!==null}function Lt(e,t){throw new Error("Unexpected invariant triggered.")}var Ft=/\r\n|[\n\r]/g;function ee(e,t){let i=0,r=1;for(let n of e.body.matchAll(Ft)){if(typeof n.index!="number"&&Lt(),n.index>=t)break;i=n.index+n[0].length,r+=1}return{line:r,column:t+1-i}}function wt(e){return de(e.source,ee(e.source,e.start))}function de(e,t){let i=e.locationOffset.column-1,r="".padStart(i)+e.body,n=t.line-1,s=e.locationOffset.line-1,c=t.line+s,l=t.line===1?i:0,E=t.column+l,m=`${e.name}:${c}:${E}
`,C=r.split(/\r\n|[\n\r]/g),M=C[n];if(M.length>120){let X=Math.floor(E/80),K=E%80,S=[];for(let R=0;R<M.length;R+=80)S.push(M.slice(R,R+80));return m+fe([[`${c} |`,S[0]],...S.slice(1,X+1).map(R=>["|",R]),["|","^".padStart(K)],["|",S[X+1]]])}return m+fe([[`${c-1} |`,C[n-1]],[`${c} |`,M],["|","^".padStart(E)],[`${c+1} |`,C[n+1]]])}function fe(e){let t=e.filter(([r,n])=>n!==void 0),i=Math.max(...t.map(([r])=>r.length));return t.map(([r,n])=>r.padStart(i)+(n?" "+n:"")).join(`
`)}var Ee=class Ce extends Error{constructor(t,i={}){let{nodes:r,source:n,positions:s,path:c,originalError:l,cause:E,extensions:m}=i,C="cause"in i,M=C?E:l,X=C||l!=null?{cause:M}:void 0;super(t,X),this.name="GraphQLError",this.path=c??void 0;let K=l??(E instanceof Error?E:void 0);this.originalError=K,this.nodes=me(Array.isArray(r)?r:r?[r]:void 0);let S=me(this.nodes?.map(x=>x.loc).filter(x=>x!=null));this.source=n??S?.[0]?.source,this.positions=s??S?.map(x=>x.start),this.locations=s&&n?s.map(x=>ee(n,x)):S?.map(x=>ee(x.source,x.start));let R=bt(K?.extensions)?K.extensions:void 0;this.extensions=m??R??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l?.stack!=null?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,Ce):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let i of this.nodes)i.loc&&(t+=`

`+wt(i.loc));else if(this.source&&this.locations)for(let i of this.locations)t+=`

`+de(this.source,i);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function me(e){return e===void 0||e.length===0?void 0:e}var Pt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Mt=Pt,Vt=class{constructor(e,t,i){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Te=class{constructor(e,t,i,r,n,s){this.kind=e,this.start=t,this.end=i,this.line=r,this.column=n,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},$={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},o={};z(o,{ARGUMENT:()=>Yt,ARGUMENT_COORDINATE:()=>bi,BOOLEAN:()=>ei,DIRECTIVE:()=>ai,DIRECTIVE_ARGUMENT_COORDINATE:()=>Fi,DIRECTIVE_COORDINATE:()=>Li,DIRECTIVE_DEFINITION:()=>Ai,DIRECTIVE_EXTENSION:()=>Di,DOCUMENT:()=>Bt,ENUM:()=>ii,ENUM_TYPE_DEFINITION:()=>Ni,ENUM_TYPE_EXTENSION:()=>gi,ENUM_VALUE_DEFINITION:()=>Ii,FIELD:()=>$t,FIELD_DEFINITION:()=>fi,FLOAT:()=>Wt,FRAGMENT_ARGUMENT:()=>qt,FRAGMENT_DEFINITION:()=>Qt,FRAGMENT_SPREAD:()=>Jt,INLINE_FRAGMENT:()=>Xt,INPUT_OBJECT_TYPE_DEFINITION:()=>vi,INPUT_OBJECT_TYPE_EXTENSION:()=>Ci,INPUT_VALUE_DEFINITION:()=>Ei,INT:()=>Ht,INTERFACE_TYPE_DEFINITION:()=>mi,INTERFACE_TYPE_EXTENSION:()=>xi,LIST:()=>ni,LIST_TYPE:()=>ci,MEMBER_COORDINATE:()=>Ri,NAME:()=>Ut,NAMED_TYPE:()=>oi,NON_NULL_TYPE:()=>li,NULL:()=>ti,OBJECT:()=>ri,OBJECT_FIELD:()=>si,OBJECT_TYPE_DEFINITION:()=>di,OBJECT_TYPE_EXTENSION:()=>_i,OPERATION_DEFINITION:()=>jt,OPERATION_TYPE_DEFINITION:()=>pi,SCALAR_TYPE_DEFINITION:()=>hi,SCALAR_TYPE_EXTENSION:()=>yi,SCHEMA_DEFINITION:()=>ui,SCHEMA_EXTENSION:()=>Oi,SELECTION_SET:()=>Kt,STRING:()=>Zt,TYPE_COORDINATE:()=>Si,UNION_TYPE_DEFINITION:()=>Ti,UNION_TYPE_EXTENSION:()=>ki,VARIABLE:()=>zt,VARIABLE_DEFINITION:()=>Gt});var Ut="Name",Bt="Document",jt="OperationDefinition",Gt="VariableDefinition",Kt="SelectionSet",$t="Field",Yt="Argument",qt="FragmentArgument",Jt="FragmentSpread",Xt="InlineFragment",Qt="FragmentDefinition",zt="Variable",Ht="IntValue",Wt="FloatValue",Zt="StringValue",ei="BooleanValue",ti="NullValue",ii="EnumValue",ni="ListValue",ri="ObjectValue",si="ObjectField",ai="Directive",oi="NamedType",ci="ListType",li="NonNullType",ui="SchemaDefinition",pi="OperationTypeDefinition",hi="ScalarTypeDefinition",di="ObjectTypeDefinition",fi="FieldDefinition",Ei="InputValueDefinition",mi="InterfaceTypeDefinition",Ti="UnionTypeDefinition",Ni="EnumTypeDefinition",Ii="EnumValueDefinition",vi="InputObjectTypeDefinition",Ai="DirectiveDefinition",Oi="SchemaExtension",Di="DirectiveExtension",yi="ScalarTypeExtension",_i="ObjectTypeExtension",xi="InterfaceTypeExtension",ki="UnionTypeExtension",gi="EnumTypeExtension",Ci="InputObjectTypeExtension",Si="TypeCoordinate",Ri="MemberCoordinate",bi="ArgumentCoordinate",Li="DirectiveCoordinate",Fi="DirectiveArgumentCoordinate";function Ne(e,t){throw new Error(t)}function wi(e){return e===9||e===32}function w(e){return e>=48&&e<=57}function Ie(e){return e>=97&&e<=122||e>=65&&e<=90}function ve(e){return Ie(e)||e===95}function Pi(e){return Ie(e)||w(e)||e===95}function Mi(e){let t=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let n=0;n<e.length;++n){let s=e[n],c=Vi(s);c!==s.length&&(i??(i=n),r=n,n!==0&&c<t&&(t=c))}return e.map((n,s)=>s===0?n:n.slice(t)).slice(i??0,r+1)}function Vi(e){let t=0;for(;t<e.length&&wi(e.charCodeAt(t));)++t;return t}var Ui={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function h(e,t,i){return new Ee(`Syntax Error: ${i}`,{source:e,positions:[t]})}function Bi(){let e;try{let t=globalThis.process;typeof t?.getBuiltinModule=="function"&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}var b=Bi(),Ae=b?.tracingChannel("graphql:parse");b?.tracingChannel("graphql:validate"),b?.tracingChannel("graphql:execute"),b?.tracingChannel("graphql:execute:variableCoercion"),b?.tracingChannel("graphql:execute:rootSelectionSet"),b?.tracingChannel("graphql:subscribe"),b?.tracingChannel("graphql:resolve");var ji=["start","end","asyncStart","asyncEnd","error"];function Gi(e){if(e==null)return!1;let t=e.hasSubscribers;if(t!==void 0)return t;for(let i of ji)if(e[i].hasSubscribers)return!0;return!1}var a={SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"},Ki=class{constructor(e){let t=new Te(a.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==a.EOF)do if(e.next)e=e.next;else{let t=Yi(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===a.COMMENT);return e}};function $i(e){return e===a.BANG||e===a.DOLLAR||e===a.AMP||e===a.PAREN_L||e===a.PAREN_R||e===a.DOT||e===a.SPREAD||e===a.COLON||e===a.EQUALS||e===a.AT||e===a.BRACKET_L||e===a.BRACKET_R||e===a.BRACE_L||e===a.PIPE||e===a.BRACE_R}function P(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Y(e,t){return Oe(e.charCodeAt(t))&&De(e.charCodeAt(t+1))}function Oe(e){return e>=55296&&e<=56319}function De(e){return e>=56320&&e<=57343}function L(e,t){let i=e.source.body.codePointAt(t);if(i===void 0)return a.EOF;if(i>=32&&i<=126){let r=String.fromCodePoint(i);return r==='"'?`'"'`:`"${r}"`}return"U+"+i.toString(16).toUpperCase().padStart(4,"0")}function d(e,t,i,r,n){let s=e.line,c=1+i-e.lineStart;return new Te(t,i,r,s,c,n)}function Yi(e,t){let i=e.source.body,r=i.length,n=t;for(;n<r;){let s=i.charCodeAt(n);switch(s){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++e.line,e.lineStart=n;continue;case 13:i.charCodeAt(n+1)===10?n+=2:++n,++e.line,e.lineStart=n;continue;case 35:return qi(e,n);case 33:return d(e,a.BANG,n,n+1);case 36:return d(e,a.DOLLAR,n,n+1);case 38:return d(e,a.AMP,n,n+1);case 40:return d(e,a.PAREN_L,n,n+1);case 41:return d(e,a.PAREN_R,n,n+1);case 46:{let c=i.charCodeAt(n+1);if(c===46&&i.charCodeAt(n+2)===46)return d(e,a.SPREAD,n,n+3);if(c===46)throw h(e.source,n,'Unexpected "..", did you mean "..."?');if(w(c)){let l=e.source.body.slice(n+1,q(e,n+1,c));throw h(e.source,n,`Invalid number, expected digit before ".", did you mean "0.${l}"?`)}break}case 58:return d(e,a.COLON,n,n+1);case 61:return d(e,a.EQUALS,n,n+1);case 64:return d(e,a.AT,n,n+1);case 91:return d(e,a.BRACKET_L,n,n+1);case 93:return d(e,a.BRACKET_R,n,n+1);case 123:return d(e,a.BRACE_L,n,n+1);case 124:return d(e,a.PIPE,n,n+1);case 125:return d(e,a.BRACE_R,n,n+1);case 34:return i.charCodeAt(n+1)===34&&i.charCodeAt(n+2)===34?Wi(e,n):Xi(e,n)}if(w(s)||s===45)return Ji(e,n,s);if(ve(s))return Zi(e,n);throw h(e.source,n,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:P(s)||Y(i,n)?`Unexpected character: ${L(e,n)}.`:`Invalid character: ${L(e,n)}.`)}return d(e,a.EOF,r,r)}function qi(e,t){let i=e.source.body,r=i.length,n=t+1;for(;n<r;){let s=i.charCodeAt(n);if(s===10||s===13)break;if(P(s))++n;else if(Y(i,n))n+=2;else break}return d(e,a.COMMENT,t,n,i.slice(t+1,n))}function Ji(e,t,i){let r=e.source.body,n=t,s=i,c=!1;if(s===45&&(s=r.charCodeAt(++n)),s===48){if(s=r.charCodeAt(++n),w(s))throw h(e.source,n,`Invalid number, unexpected digit after 0: ${L(e,n)}.`)}else n=q(e,n,s),s=r.charCodeAt(n);if(s===46&&(c=!0,s=r.charCodeAt(++n),n=q(e,n,s),s=r.charCodeAt(n)),(s===69||s===101)&&(c=!0,s=r.charCodeAt(++n),(s===43||s===45)&&(s=r.charCodeAt(++n)),n=q(e,n,s),s=r.charCodeAt(n)),s===46||ve(s))throw h(e.source,n,`Invalid number, expected digit but got: ${L(e,n)}.`);return d(e,c?a.FLOAT:a.INT,t,n,r.slice(t,n))}function q(e,t,i){if(!w(i))throw h(e.source,t,`Invalid number, expected digit but got: ${L(e,t)}.`);let r=e.source.body,n=t+1;for(;w(r.charCodeAt(n));)++n;return n}function Xi(e,t){let i=e.source.body,r=i.length,n=t+1,s=n,c="";for(;n<r;){let l=i.charCodeAt(n);if(l===34)return c+=i.slice(s,n),d(e,a.STRING,t,n+1,c);if(l===92){c+=i.slice(s,n);let E=i.charCodeAt(n+1)===117?i.charCodeAt(n+2)===123?Qi(e,n):zi(e,n):Hi(e,n);c+=E.value,n+=E.size,s=n;continue}if(l===10||l===13)break;if(P(l))++n;else if(Y(i,n))n+=2;else throw h(e.source,n,`Invalid character within String: ${L(e,n)}.`)}throw h(e.source,n,"Unterminated string.")}function Qi(e,t){let i=e.source.body,r=0,n=3;for(;n<12;){let s=i.charCodeAt(t+n++);if(s===125){if(n<5||!P(r))break;return{value:String.fromCodePoint(r),size:n}}if(r=r<<4|G(s),r<0)break}throw h(e.source,t,`Invalid Unicode escape sequence: "${i.slice(t,t+n)}".`)}function zi(e,t){let i=e.source.body,r=ye(i,t+2);if(P(r))return{value:String.fromCodePoint(r),size:6};if(Oe(r)&&i.charCodeAt(t+6)===92&&i.charCodeAt(t+7)===117){let n=ye(i,t+8);if(De(n))return{value:String.fromCodePoint(r,n),size:12}}throw h(e.source,t,`Invalid Unicode escape sequence: "${i.slice(t,t+6)}".`)}function ye(e,t){return G(e.charCodeAt(t))<<12|G(e.charCodeAt(t+1))<<8|G(e.charCodeAt(t+2))<<4|G(e.charCodeAt(t+3))}function G(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Hi(e,t){let i=e.source.body;switch(i.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw h(e.source,t,`Invalid character escape sequence: "${i.slice(t,t+2)}".`)}function Wi(e,t){let i=e.source.body,r=i.length,n=e.lineStart,s=t+3,c=s,l="",E=[];for(;s<r;){let m=i.charCodeAt(s);if(m===34&&i.charCodeAt(s+1)===34&&i.charCodeAt(s+2)===34){l+=i.slice(c,s),E.push(l);let C=d(e,a.BLOCK_STRING,t,s+3,Mi(E).join(`
`));return e.line+=E.length-1,e.lineStart=n,C}if(m===92&&i.charCodeAt(s+1)===34&&i.charCodeAt(s+2)===34&&i.charCodeAt(s+3)===34){l+=i.slice(c,s),c=s+1,s+=4;continue}if(m===10||m===13){l+=i.slice(c,s),E.push(l),m===13&&i.charCodeAt(s+1)===10?s+=2:++s,l="",c=s,n=s;continue}if(P(m))++s;else if(Y(i,s))s+=2;else throw h(e.source,s,`Invalid character within String: ${L(e,s)}.`)}throw h(e.source,s,"Unterminated string.")}function Zi(e,t){let i=e.source.body,r=i.length,n=t+1;for(;n<r;){let s=i.charCodeAt(n);if(Pi(s))++n;else break}return d(e,a.NAME,t,n,i.slice(t,n))}var _e=Symbol("Source"),en=class{constructor(e,t="GraphQL request",i={line:1,column:1}){this.__kind=_e,this.body=e,this.name=t,this.locationOffset=i,this.locationOffset.line>0||Ne(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ne(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function tn(e){return Rt(e,_e)}function nn(e,t){return Gi(Ae)?Ae.traceSync(()=>xe(e,t),{source:e}):xe(e,t)}function xe(e,t){let i=new rn(e,t),r=i.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:i.tokenCount}),r}var rn=class{constructor(e,t={}){let{lexer:i,...r}=t;if(i)this._lexer=i;else{let n=tn(e)?e:new en(e);this._lexer=new Ki(n)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(a.NAME);return this.node(e,{kind:o.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:o.DOCUMENT,definitions:this.many(a.SOF,this.parseDefinition,a.EOF)})}parseDefinition(){if(this.peek(a.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===a.BRACE_L)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===a.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(t.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){let e=this._lexer.token;if(this.peek(a.BRACE_L))return this.node(e,{kind:o.OPERATION_DEFINITION,operation:$.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let t=this.parseDescription(),i=this.parseOperationType(),r;return this.peek(a.NAME)&&(r=this.parseName()),this.node(e,{kind:o.OPERATION_DEFINITION,operation:i,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(a.NAME);switch(e.value){case"query":return $.QUERY;case"mutation":return $.MUTATION;case"subscription":return $.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(a.PAREN_L,this.parseVariableDefinition,a.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:o.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(a.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(a.DOLLAR),this.node(e,{kind:o.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:o.SELECTION_SET,selections:this.many(a.BRACE_L,this.parseSelection,a.BRACE_R)})}parseSelection(){return this.peek(a.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e=this._lexer.token,t=this.parseName(),i,r;return this.expectOptionalToken(a.COLON)?(i=t,r=this.parseName()):r=t,this.node(e,{kind:o.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(a.PAREN_L,t,a.PAREN_R)}parseFragmentArguments(){let e=this.parseFragmentArgument;return this.optionalMany(a.PAREN_L,e,a.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,i=this.parseName();return this.expectToken(a.COLON),this.node(t,{kind:o.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let e=this._lexer.token,t=this.parseName();return this.expectToken(a.COLON),this.node(e,{kind:o.FRAGMENT_ARGUMENT,name:t,value:this.parseValueLiteral(!1)})}parseFragment(){let e=this._lexer.token;this.expectToken(a.SPREAD);let t=this.expectOptionalKeyword("on");if(!t&&this.peek(a.NAME)){let i=this.parseFragmentName();return this.peek(a.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(e,{kind:o.FRAGMENT_SPREAD,name:i,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(e,{kind:o.FRAGMENT_SPREAD,name:i,directives:this.parseDirectives(!1)})}return this.node(e,{kind:o.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(e,{kind:o.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:o.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case a.BRACKET_L:return this.parseList(e);case a.BRACE_L:return this.parseObject(e);case a.INT:return this.advanceLexer(),this.node(t,{kind:o.INT,value:t.value});case a.FLOAT:return this.advanceLexer(),this.node(t,{kind:o.FLOAT,value:t.value});case a.STRING:case a.BLOCK_STRING:return this.parseStringLiteral();case a.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:o.BOOLEAN,value:!0});case"false":return this.node(t,{kind:o.BOOLEAN,value:!1});case"null":return this.node(t,{kind:o.NULL});default:return this.node(t,{kind:o.ENUM,value:t.value})}case a.DOLLAR:if(e)if(this.expectToken(a.DOLLAR),this._lexer.token.kind===a.NAME){let i=this._lexer.token.value;throw h(this._lexer.source,t.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:o.STRING,value:e.value,block:e.kind===a.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:o.LIST,values:this.any(a.BRACKET_L,t,a.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:o.OBJECT,fields:this.any(a.BRACE_L,t,a.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,i=this.parseName();return this.expectToken(a.COLON),this.node(t,{kind:o.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(a.AT);)t.push(this.parseDirective(e));if(t.length)return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(a.AT),this.node(t,{kind:o.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e=this._lexer.token,t;if(this.expectOptionalToken(a.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(a.BRACKET_R),t=this.node(e,{kind:o.LIST_TYPE,type:i})}else t=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(e,{kind:o.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:o.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(a.STRING)||this.peek(a.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);return this.node(e,{kind:o.SCHEMA_DEFINITION,description:t,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(a.COLON);let i=this.parseNamedType();return this.node(e,{kind:o.OPERATION_TYPE_DEFINITION,operation:t,type:i})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:o.SCALAR_TYPE_DEFINITION,description:t,name:i,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:o.OBJECT_TYPE_DEFINITION,description:t,name:i,interfaces:r,directives:n,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(a.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseFieldDefinition,a.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(a.COLON);let n=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:o.FIELD_DEFINITION,description:t,name:i,arguments:r,type:n,directives:s})}parseArgumentDefs(){return this.optionalMany(a.PAREN_L,this.parseInputValueDef,a.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName();this.expectToken(a.COLON);let r=this.parseTypeReference(),n;this.expectOptionalToken(a.EQUALS)&&(n=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(e,{kind:o.INPUT_VALUE_DEFINITION,description:t,name:i,type:r,defaultValue:n,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:o.INTERFACE_TYPE_DEFINITION,description:t,name:i,interfaces:r,directives:n,fields:s})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();return this.node(e,{kind:o.UNION_TYPE_DEFINITION,description:t,name:i,directives:r,types:n})}parseUnionMemberTypes(){return this.expectOptionalToken(a.EQUALS)?this.delimitedMany(a.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();return this.node(e,{kind:o.ENUM_TYPE_DEFINITION,description:t,name:i,directives:r,values:n})}parseEnumValuesDefinition(){return this.optionalMany(a.BRACE_L,this.parseEnumValueDefinition,a.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:o.ENUM_VALUE_DEFINITION,description:t,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw h(this._lexer.source,this._lexer.token.start,`${J(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();return this.node(e,{kind:o.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:i,directives:r,fields:n})}parseInputFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseInputValueDef,a.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===a.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),i=this.optionalMany(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);if(t===void 0&&i===void 0)throw this.unexpected();return this.node(e,{kind:o.SCHEMA_EXTENSION,directives:t,operationTypes:i})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),i=this.parseConstDirectives();if(i===void 0)throw this.unexpected();return this.node(e,{kind:o.SCALAR_TYPE_EXTENSION,name:t,directives:i})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(i===void 0&&r===void 0&&n===void 0)throw this.unexpected();return this.node(e,{kind:o.OBJECT_TYPE_EXTENSION,name:t,interfaces:i,directives:r,fields:n})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(i===void 0&&r===void 0&&n===void 0)throw this.unexpected();return this.node(e,{kind:o.INTERFACE_TYPE_EXTENSION,name:t,interfaces:i,directives:r,fields:n})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i===void 0&&r===void 0)throw this.unexpected();return this.node(e,{kind:o.UNION_TYPE_EXTENSION,name:t,directives:i,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i===void 0&&r===void 0)throw this.unexpected();return this.node(e,{kind:o.ENUM_TYPE_EXTENSION,name:t,directives:i,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i===void 0&&r===void 0)throw this.unexpected();return this.node(e,{kind:o.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:i,fields:r})}parseDirectiveExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(a.AT);let t=this.parseName(),i=this.parseConstDirectives();if(i===void 0)throw this.unexpected();return this.node(e,{kind:o.DIRECTIVE_EXTENSION,name:t,directives:i})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(a.AT);let i=this.parseName(),r=this.parseArgumentDefs(),n=this.parseConstDirectives(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let c=this.parseDirectiveLocations();return this.node(e,{kind:o.DIRECTIVE_DEFINITION,description:t,name:i,arguments:r,directives:n,repeatable:s,locations:c})}parseDirectiveLocations(){return this.delimitedMany(a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Mt(Ui,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e=this._lexer.token,t=this.expectOptionalToken(a.AT),i=this.parseName(),r;!t&&this.expectOptionalToken(a.DOT)&&(r=this.parseName());let n;return(t||r)&&this.expectOptionalToken(a.PAREN_L)&&(n=this.parseName(),this.expectToken(a.COLON),this.expectToken(a.PAREN_R)),t?n?this.node(e,{kind:o.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:n}):this.node(e,{kind:o.DIRECTIVE_COORDINATE,name:i}):r?n?this.node(e,{kind:o.ARGUMENT_COORDINATE,name:i,fieldName:r,argumentName:n}):this.node(e,{kind:o.MEMBER_COORDINATE,name:i,memberName:r}):this.node(e,{kind:o.TYPE_COORDINATE,name:i})}node(e,t){return this._options.noLocation!==!0&&(t.loc=new Vt(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw h(this._lexer.source,t.start,`Expected ${ke(e)}, found ${J(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){let t=this._lexer.token;if(t.kind===a.NAME&&t.value===e)this.advanceLexer();else throw h(this._lexer.source,t.start,`Expected "${e}", found ${J(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===a.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){let t=e??this._lexer.token;return h(this._lexer.source,t.start,`Unexpected ${J(t)}.`)}any(e,t,i){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(i);)r.push(t.call(this));return r}optionalMany(e,t,i){if(this.expectOptionalToken(e)){let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(i));return r}}many(e,t,i){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,t){this.expectOptionalToken(e);let i=[];do i.push(t.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==a.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw h(this._lexer.source,t.start,`Document contains more than ${e} tokens. Parsing aborted.`)}};function J(e){let t=e.value;return ke(e.kind)+(t!=null?` "${t}"`:"")}function ke(e){return $i(e)?`"${e}"`:e}function sn(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var an=sn;function on(e){let t=[],{startToken:i,endToken:r}=e.loc;for(let n=i;n!==r;n=n.next)n.kind==="Comment"&&t.push({...n,loc:{start:n.start,end:n.end}});return t}var cn={experimentalFragmentArguments:!0};function ln(e){if(!(e instanceof Ee))return e;let{message:t,locations:[i]}=e;return an(t,{loc:{start:i},cause:e})}function un(e){let t;try{t=nn(e,cn)}catch(i){throw ln(i)}return t.comments=on(t),t}var pn={parse:un,astFormat:"graphql",hasPragma:pt,hasIgnorePragma:ht,locStart:oe,locEnd:ce},hn={graphql:_t};return be(ie)})})(te)),te.exports}var Se=En();const mn=dn(Se),Nn=fn({__proto__:null,default:mn},[Se]);export{Nn as g};
