@dillonkearns/elm-graphql
Version:
[](https://github.com/dillonkearns/elm-graphql/actions?query=branch%3Amaster) [](https://pa
36 lines (27 loc) • 1.56 MB
JavaScript
#!/usr/bin/env node
await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
var Khe=Object.create;var Xw=Object.defineProperty;var zhe=Object.getOwnPropertyDescriptor;var Qhe=Object.getOwnPropertyNames;var Whe=Object.getPrototypeOf,Yhe=Object.prototype.hasOwnProperty;var G=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Jhe=(t,e)=>()=>(t&&(e=t(t=0)),e);var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zw=(t,e)=>{for(var r in e)Xw(t,r,{get:e[r],enumerable:!0})},Xhe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qhe(e))!Yhe.call(t,i)&&i!==r&&Xw(t,i,{get:()=>e[i],enumerable:!(n=zhe(e,i))||n.enumerable});return t};var xr=(t,e,r)=>(r=t!=null?Khe(Whe(t)):{},Xhe(e||!t||!t.__esModule?Xw(r,"default",{value:t,enumerable:!0}):r,t));var B2=b(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.versionInfo=Ll.version=void 0;var tpe="16.10.0";Ll.version=tpe;var rpe=Object.freeze({major:16,minor:10,patch:0,preReleaseTag:null});Ll.versionInfo=rpe});var Tn=b(rT=>{"use strict";Object.defineProperty(rT,"__esModule",{value:!0});rT.devAssert=npe;function npe(t,e){if(!!!t)throw new Error(e)}});var R$=b(nT=>{"use strict";Object.defineProperty(nT,"__esModule",{value:!0});nT.isPromise=ipe;function ipe(t){return typeof t?.then=="function"}});var Qs=b(iT=>{"use strict";Object.defineProperty(iT,"__esModule",{value:!0});iT.isObjectLike=spe;function spe(t){return typeof t=="object"&&t!==null}});var rn=b(sT=>{"use strict";Object.defineProperty(sT,"__esModule",{value:!0});sT.invariant=ope;function ope(t,e){if(!!!t)throw new Error(e??"Unexpected invariant triggered.")}});var x$=b(oT=>{"use strict";Object.defineProperty(oT,"__esModule",{value:!0});oT.getLocation=cpe;var ape=rn(),upe=/\r\n|[\n\r]/g;function cpe(t,e){let r=0,n=1;for(let i of t.body.matchAll(upe)){if(typeof i.index=="number"||(0,ape.invariant)(!1),i.index>=e)break;r=i.index+i[0].length,n+=1}return{line:n,column:e+1-r}}});var aT=b(C$=>{"use strict";Object.defineProperty(C$,"__esModule",{value:!0});C$.printLocation=fpe;C$.printSourceLocation=M2;var lpe=x$();function fpe(t){return M2(t.source,(0,lpe.getLocation)(t.source,t.start))}function M2(t,e){let r=t.locationOffset.column-1,n="".padStart(r)+t.body,i=e.line-1,s=t.locationOffset.line-1,a=e.line+s,c=e.line===1?r:0,f=e.column+c,p=`${t.name}:${a}:${f}
`,h=n.split(/\r\n|[\n\r]/g),m=h[i];if(m.length>120){let g=Math.floor(f/80),y=f%80,_=[];for(let E=0;E<m.length;E+=80)_.push(m.slice(E,E+80));return p+q2([[`${a} |`,_[0]],..._.slice(1,g+1).map(E=>["|",E]),["|","^".padStart(y)],["|",_[g+1]]])}return p+q2([[`${a-1} |`,h[i-1]],[`${a} |`,m],["|","^".padStart(f)],[`${a+1} |`,h[i+1]]])}function q2(t){let e=t.filter(([n,i])=>i!==void 0),r=Math.max(...e.map(([n])=>n.length));return e.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
`)}});var Pe=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.GraphQLError=void 0;Pl.formatError=mpe;Pl.printError=dpe;var hpe=Qs(),G2=x$(),U2=aT();function ppe(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var uT=class t extends Error{constructor(e,...r){var n,i,s;let{nodes:a,source:c,positions:f,path:p,originalError:h,extensions:m}=ppe(r);super(e),this.name="GraphQLError",this.path=p??void 0,this.originalError=h??void 0,this.nodes=H2(Array.isArray(a)?a:a?[a]:void 0);let g=H2((n=this.nodes)===null||n===void 0?void 0:n.map(_=>_.loc).filter(_=>_!=null));this.source=c??(g==null||(i=g[0])===null||i===void 0?void 0:i.source),this.positions=f??g?.map(_=>_.start),this.locations=f&&c?f.map(_=>(0,G2.getLocation)(c,_)):g?.map(_=>(0,G2.getLocation)(_.source,_.start));let y=(0,hpe.isObjectLike)(h?.extensions)?h?.extensions:void 0;this.extensions=(s=m??y)!==null&&s!==void 0?s: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}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let r of this.nodes)r.loc&&(e+=`
`+(0,U2.printLocation)(r.loc));else if(this.source&&this.locations)for(let r of this.locations)e+=`
`+(0,U2.printSourceLocation)(this.source,r);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};Pl.GraphQLError=uT;function H2(t){return t===void 0||t.length===0?void 0:t}function dpe(t){return t.toString()}function mpe(t){return t.toJSON()}});var N$=b(cT=>{"use strict";Object.defineProperty(cT,"__esModule",{value:!0});cT.syntaxError=$pe;var gpe=Pe();function $pe(t,e,r){return new gpe.GraphQLError(`Syntax Error: ${r}`,{source:t,positions:[e]})}});var Ws=b(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.Token=Li.QueryDocumentKeys=Li.OperationTypeNode=Li.Location=void 0;Li.isNode=vpe;var lT=class{constructor(e,r,n){this.start=e.start,this.end=r.end,this.startToken=e,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Li.Location=lT;var fT=class{constructor(e,r,n,i,s,a){this.kind=e,this.start=r,this.end=n,this.line=i,this.column=s,this.value=a,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}}};Li.Token=fT;var V2={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};Li.QueryDocumentKeys=V2;var ype=new Set(Object.keys(V2));function vpe(t){let e=t?.kind;return typeof e=="string"&&ype.has(e)}var hT;Li.OperationTypeNode=hT;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(hT||(Li.OperationTypeNode=hT={}))});var Dl=b(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.DirectiveLocation=void 0;var pT;Sp.DirectiveLocation=pT;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(pT||(Sp.DirectiveLocation=pT={}))});var st=b(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.Kind=void 0;var dT;wp.Kind=dT;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(dT||(wp.Kind=dT={}))});var k$=b(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.isDigit=K2;Ku.isLetter=mT;Ku.isNameContinue=Epe;Ku.isNameStart=bpe;Ku.isWhiteSpace=_pe;function _pe(t){return t===9||t===32}function K2(t){return t>=48&&t<=57}function mT(t){return t>=97&&t<=122||t>=65&&t<=90}function bpe(t){return mT(t)||t===95}function Epe(t){return mT(t)||K2(t)||t===95}});var Op=b(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.dedentBlockStringLines=Spe;Tp.isPrintableAsBlockString=Tpe;Tp.printBlockString=Ope;var gT=k$();function Spe(t){var e;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<t.length;++a){var s;let c=t[a],f=wpe(c);f!==c.length&&(n=(s=n)!==null&&s!==void 0?s:a,i=a,a!==0&&f<r&&(r=f))}return t.map((a,c)=>c===0?a:a.slice(r)).slice((e=n)!==null&&e!==void 0?e:0,i+1)}function wpe(t){let e=0;for(;e<t.length&&(0,gT.isWhiteSpace)(t.charCodeAt(e));)++e;return e}function Tpe(t){if(t==="")return!0;let e=!0,r=!1,n=!0,i=!1;for(let s=0;s<t.length;++s)switch(t.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(e&&!i)return!1;i=!0,e=!0,r=!1;break;case 9:case 32:r||(r=e);break;default:n&&(n=r),e=!1}return!(e||n&&i)}function Ope(t,e){let r=t.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,s=n.length>1&&n.slice(1).every(y=>y.length===0||(0,gT.isWhiteSpace)(y.charCodeAt(0))),a=r.endsWith('\\"""'),c=t.endsWith('"')&&!a,f=t.endsWith("\\"),p=c||f,h=!(e!=null&&e.minimize)&&(!i||t.length>70||p||s||a),m="",g=i&&(0,gT.isWhiteSpace)(t.charCodeAt(0));return(h&&!g||s)&&(m+=`
`),m+=r,(h||p)&&(m+=`
`),'"""'+m+'"""'}});var Ip=b(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.TokenKind=void 0;var $T;Ap.TokenKind=$T;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})($T||(Ap.TokenKind=$T={}))});var P$=b(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.Lexer=void 0;xp.isPunctuatorTokenKind=Ipe;var vs=N$(),Q2=Ws(),Ape=Op(),zu=k$(),Ze=Ip(),vT=class{constructor(e){let r=new Q2.Token(Ze.TokenKind.SOF,0,0,0,0);this.source=e,this.lastToken=r,this.token=r,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!==Ze.TokenKind.EOF)do if(e.next)e=e.next;else{let r=Rpe(this,e.end);e.next=r,r.prev=e,e=r}while(e.kind===Ze.TokenKind.COMMENT);return e}};xp.Lexer=vT;function Ipe(t){return t===Ze.TokenKind.BANG||t===Ze.TokenKind.DOLLAR||t===Ze.TokenKind.AMP||t===Ze.TokenKind.PAREN_L||t===Ze.TokenKind.PAREN_R||t===Ze.TokenKind.SPREAD||t===Ze.TokenKind.COLON||t===Ze.TokenKind.EQUALS||t===Ze.TokenKind.AT||t===Ze.TokenKind.BRACKET_L||t===Ze.TokenKind.BRACKET_R||t===Ze.TokenKind.BRACE_L||t===Ze.TokenKind.PIPE||t===Ze.TokenKind.BRACE_R}function jl(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function L$(t,e){return W2(t.charCodeAt(e))&&Y2(t.charCodeAt(e+1))}function W2(t){return t>=55296&&t<=56319}function Y2(t){return t>=56320&&t<=57343}function Qu(t,e){let r=t.source.body.codePointAt(e);if(r===void 0)return Ze.TokenKind.EOF;if(r>=32&&r<=126){let n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function pr(t,e,r,n,i){let s=t.line,a=1+r-t.lineStart;return new Q2.Token(e,r,n,s,a,i)}function Rpe(t,e){let r=t.source.body,n=r.length,i=e;for(;i<n;){let s=r.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return xpe(t,i);case 33:return pr(t,Ze.TokenKind.BANG,i,i+1);case 36:return pr(t,Ze.TokenKind.DOLLAR,i,i+1);case 38:return pr(t,Ze.TokenKind.AMP,i,i+1);case 40:return pr(t,Ze.TokenKind.PAREN_L,i,i+1);case 41:return pr(t,Ze.TokenKind.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return pr(t,Ze.TokenKind.SPREAD,i,i+3);break;case 58:return pr(t,Ze.TokenKind.COLON,i,i+1);case 61:return pr(t,Ze.TokenKind.EQUALS,i,i+1);case 64:return pr(t,Ze.TokenKind.AT,i,i+1);case 91:return pr(t,Ze.TokenKind.BRACKET_L,i,i+1);case 93:return pr(t,Ze.TokenKind.BRACKET_R,i,i+1);case 123:return pr(t,Ze.TokenKind.BRACE_L,i,i+1);case 124:return pr(t,Ze.TokenKind.PIPE,i,i+1);case 125:return pr(t,Ze.TokenKind.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?Dpe(t,i):Npe(t,i)}if((0,zu.isDigit)(s)||s===45)return Cpe(t,i,s);if((0,zu.isNameStart)(s))return jpe(t,i);throw(0,vs.syntaxError)(t.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:jl(s)||L$(r,i)?`Unexpected character: ${Qu(t,i)}.`:`Invalid character: ${Qu(t,i)}.`)}return pr(t,Ze.TokenKind.EOF,n,n)}function xpe(t,e){let r=t.source.body,n=r.length,i=e+1;for(;i<n;){let s=r.charCodeAt(i);if(s===10||s===13)break;if(jl(s))++i;else if(L$(r,i))i+=2;else break}return pr(t,Ze.TokenKind.COMMENT,e,i,r.slice(e+1,i))}function Cpe(t,e,r){let n=t.source.body,i=e,s=r,a=!1;if(s===45&&(s=n.charCodeAt(++i)),s===48){if(s=n.charCodeAt(++i),(0,zu.isDigit)(s))throw(0,vs.syntaxError)(t.source,i,`Invalid number, unexpected digit after 0: ${Qu(t,i)}.`)}else i=yT(t,i,s),s=n.charCodeAt(i);if(s===46&&(a=!0,s=n.charCodeAt(++i),i=yT(t,i,s),s=n.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=n.charCodeAt(++i),(s===43||s===45)&&(s=n.charCodeAt(++i)),i=yT(t,i,s),s=n.charCodeAt(i)),s===46||(0,zu.isNameStart)(s))throw(0,vs.syntaxError)(t.source,i,`Invalid number, expected digit but got: ${Qu(t,i)}.`);return pr(t,a?Ze.TokenKind.FLOAT:Ze.TokenKind.INT,e,i,n.slice(e,i))}function yT(t,e,r){if(!(0,zu.isDigit)(r))throw(0,vs.syntaxError)(t.source,e,`Invalid number, expected digit but got: ${Qu(t,e)}.`);let n=t.source.body,i=e+1;for(;(0,zu.isDigit)(n.charCodeAt(i));)++i;return i}function Npe(t,e){let r=t.source.body,n=r.length,i=e+1,s=i,a="";for(;i<n;){let c=r.charCodeAt(i);if(c===34)return a+=r.slice(s,i),pr(t,Ze.TokenKind.STRING,e,i+1,a);if(c===92){a+=r.slice(s,i);let f=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?kpe(t,i):Lpe(t,i):Ppe(t,i);a+=f.value,i+=f.size,s=i;continue}if(c===10||c===13)break;if(jl(c))++i;else if(L$(r,i))i+=2;else throw(0,vs.syntaxError)(t.source,i,`Invalid character within String: ${Qu(t,i)}.`)}throw(0,vs.syntaxError)(t.source,i,"Unterminated string.")}function kpe(t,e){let r=t.source.body,n=0,i=3;for(;i<12;){let s=r.charCodeAt(e+i++);if(s===125){if(i<5||!jl(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|Rp(s),n<0)break}throw(0,vs.syntaxError)(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+i)}".`)}function Lpe(t,e){let r=t.source.body,n=z2(r,e+2);if(jl(n))return{value:String.fromCodePoint(n),size:6};if(W2(n)&&r.charCodeAt(e+6)===92&&r.charCodeAt(e+7)===117){let i=z2(r,e+8);if(Y2(i))return{value:String.fromCodePoint(n,i),size:12}}throw(0,vs.syntaxError)(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+6)}".`)}function z2(t,e){return Rp(t.charCodeAt(e))<<12|Rp(t.charCodeAt(e+1))<<8|Rp(t.charCodeAt(e+2))<<4|Rp(t.charCodeAt(e+3))}function Rp(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function Ppe(t,e){let r=t.source.body;switch(r.charCodeAt(e+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(0,vs.syntaxError)(t.source,e,`Invalid character escape sequence: "${r.slice(e,e+2)}".`)}function Dpe(t,e){let r=t.source.body,n=r.length,i=t.lineStart,s=e+3,a=s,c="",f=[];for(;s<n;){let p=r.charCodeAt(s);if(p===34&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34){c+=r.slice(a,s),f.push(c);let h=pr(t,Ze.TokenKind.BLOCK_STRING,e,s+3,(0,Ape.dedentBlockStringLines)(f).join(`
`));return t.line+=f.length-1,t.lineStart=i,h}if(p===92&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34&&r.charCodeAt(s+3)===34){c+=r.slice(a,s),a=s+1,s+=4;continue}if(p===10||p===13){c+=r.slice(a,s),f.push(c),p===13&&r.charCodeAt(s+1)===10?s+=2:++s,c="",a=s,i=s;continue}if(jl(p))++s;else if(L$(r,s))s+=2;else throw(0,vs.syntaxError)(t.source,s,`Invalid character within String: ${Qu(t,s)}.`)}throw(0,vs.syntaxError)(t.source,s,"Unterminated string.")}function jpe(t,e){let r=t.source.body,n=r.length,i=e+1;for(;i<n;){let s=r.charCodeAt(i);if((0,zu.isNameContinue)(s))++i;else break}return pr(t,Ze.TokenKind.NAME,e,i,r.slice(e,i))}});var vt=b(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.inspect=Bpe;var Fpe=10,J2=2;function Bpe(t){return D$(t,[])}function D$(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return qpe(t,e);default:return String(t)}}function qpe(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let r=[...e,t];if(Mpe(t)){let n=t.toJSON();if(n!==t)return typeof n=="string"?n:D$(n,r)}else if(Array.isArray(t))return Upe(t,r);return Gpe(t,r)}function Mpe(t){return typeof t.toJSON=="function"}function Gpe(t,e){let r=Object.entries(t);return r.length===0?"{}":e.length>J2?"["+Hpe(t)+"]":"{ "+r.map(([i,s])=>i+": "+D$(s,e)).join(", ")+" }"}function Upe(t,e){if(t.length===0)return"[]";if(e.length>J2)return"[Array]";let r=Math.min(Fpe,t.length),n=t.length-r,i=[];for(let s=0;s<r;++s)i.push(D$(t[s],e));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function Hpe(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return e}});var Cp=b(j$=>{"use strict";Object.defineProperty(j$,"__esModule",{value:!0});j$.instanceOf=void 0;var Vpe=vt(),Kpe=globalThis.process&&process.env.NODE_ENV==="production",zpe=Kpe?function(e,r){return e instanceof r}:function(e,r){if(e instanceof r)return!0;if(typeof e=="object"&&e!==null){var n;let i=r.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(n=e.constructor)===null||n===void 0?void 0:n.name;if(i===s){let a=(0,Vpe.inspect)(e);throw new Error(`Cannot use ${i} "${a}" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1};j$.instanceOf=zpe});var B$=b(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.Source=void 0;Np.isSource=Ype;var bT=Tn(),Qpe=vt(),Wpe=Cp(),F$=class{constructor(e,r="GraphQL request",n={line:1,column:1}){typeof e=="string"||(0,bT.devAssert)(!1,`Body must be a string. Received: ${(0,Qpe.inspect)(e)}.`),this.body=e,this.name=r,this.locationOffset=n,this.locationOffset.line>0||(0,bT.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,bT.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Np.Source=F$;function Ype(t){return(0,Wpe.instanceOf)(t,F$)}});var Fl=b(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.Parser=void 0;ja.parse=Xpe;ja.parseConstValue=ede;ja.parseType=tde;ja.parseValue=Zpe;var Wu=N$(),kp=Ws(),Jpe=Dl(),He=st(),Z2=P$(),X2=B$(),ge=Ip();function Xpe(t,e){let r=new Yu(t,e),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}function Zpe(t,e){let r=new Yu(t,e);r.expectToken(ge.TokenKind.SOF);let n=r.parseValueLiteral(!1);return r.expectToken(ge.TokenKind.EOF),n}function ede(t,e){let r=new Yu(t,e);r.expectToken(ge.TokenKind.SOF);let n=r.parseConstValueLiteral();return r.expectToken(ge.TokenKind.EOF),n}function tde(t,e){let r=new Yu(t,e);r.expectToken(ge.TokenKind.SOF);let n=r.parseTypeReference();return r.expectToken(ge.TokenKind.EOF),n}var Yu=class{constructor(e,r={}){let n=(0,X2.isSource)(e)?e:new X2.Source(e);this._lexer=new Z2.Lexer(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(ge.TokenKind.NAME);return this.node(e,{kind:He.Kind.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:He.Kind.DOCUMENT,definitions:this.many(ge.TokenKind.SOF,this.parseDefinition,ge.TokenKind.EOF)})}parseDefinition(){if(this.peek(ge.TokenKind.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),r=e?this._lexer.lookahead():this._lexer.token;if(r.kind===ge.TokenKind.NAME){switch(r.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()}if(e)throw(0,Wu.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){let e=this._lexer.token;if(this.peek(ge.TokenKind.BRACE_L))return this.node(e,{kind:He.Kind.OPERATION_DEFINITION,operation:kp.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let r=this.parseOperationType(),n;return this.peek(ge.TokenKind.NAME)&&(n=this.parseName()),this.node(e,{kind:He.Kind.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(ge.TokenKind.NAME);switch(e.value){case"query":return kp.OperationTypeNode.QUERY;case"mutation":return kp.OperationTypeNode.MUTATION;case"subscription":return kp.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ge.TokenKind.PAREN_L,this.parseVariableDefinition,ge.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:He.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ge.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ge.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(ge.TokenKind.DOLLAR),this.node(e,{kind:He.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:He.Kind.SELECTION_SET,selections:this.many(ge.TokenKind.BRACE_L,this.parseSelection,ge.TokenKind.BRACE_R)})}parseSelection(){return this.peek(ge.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e=this._lexer.token,r=this.parseName(),n,i;return this.expectOptionalToken(ge.TokenKind.COLON)?(n=r,i=this.parseName()):i=r,this.node(e,{kind:He.Kind.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ge.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let r=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ge.TokenKind.PAREN_L,r,ge.TokenKind.PAREN_R)}parseArgument(e=!1){let r=this._lexer.token,n=this.parseName();return this.expectToken(ge.TokenKind.COLON),this.node(r,{kind:He.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(ge.TokenKind.SPREAD);let r=this.expectOptionalKeyword("on");return!r&&this.peek(ge.TokenKind.NAME)?this.node(e,{kind:He.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:He.Kind.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:He.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:He.Kind.FRAGMENT_DEFINITION,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 r=this._lexer.token;switch(r.kind){case ge.TokenKind.BRACKET_L:return this.parseList(e);case ge.TokenKind.BRACE_L:return this.parseObject(e);case ge.TokenKind.INT:return this.advanceLexer(),this.node(r,{kind:He.Kind.INT,value:r.value});case ge.TokenKind.FLOAT:return this.advanceLexer(),this.node(r,{kind:He.Kind.FLOAT,value:r.value});case ge.TokenKind.STRING:case ge.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case ge.TokenKind.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:He.Kind.BOOLEAN,value:!0});case"false":return this.node(r,{kind:He.Kind.BOOLEAN,value:!1});case"null":return this.node(r,{kind:He.Kind.NULL});default:return this.node(r,{kind:He.Kind.ENUM,value:r.value})}case ge.TokenKind.DOLLAR:if(e)if(this.expectToken(ge.TokenKind.DOLLAR),this._lexer.token.kind===ge.TokenKind.NAME){let n=this._lexer.token.value;throw(0,Wu.syntaxError)(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);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:He.Kind.STRING,value:e.value,block:e.kind===ge.TokenKind.BLOCK_STRING})}parseList(e){let r=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:He.Kind.LIST,values:this.any(ge.TokenKind.BRACKET_L,r,ge.TokenKind.BRACKET_R)})}parseObject(e){let r=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:He.Kind.OBJECT,fields:this.any(ge.TokenKind.BRACE_L,r,ge.TokenKind.BRACE_R)})}parseObjectField(e){let r=this._lexer.token,n=this.parseName();return this.expectToken(ge.TokenKind.COLON),this.node(r,{kind:He.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let r=[];for(;this.peek(ge.TokenKind.AT);)r.push(this.parseDirective(e));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let r=this._lexer.token;return this.expectToken(ge.TokenKind.AT),this.node(r,{kind:He.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e=this._lexer.token,r;if(this.expectOptionalToken(ge.TokenKind.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(ge.TokenKind.BRACKET_R),r=this.node(e,{kind:He.Kind.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(ge.TokenKind.BANG)?this.node(e,{kind:He.Kind.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:He.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ge.TokenKind.STRING)||this.peek(ge.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),i=this.many(ge.TokenKind.BRACE_L,this.parseOperationTypeDefinition,ge.TokenKind.BRACE_R);return this.node(e,{kind:He.Kind.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){let e=this._lexer.token,r=this.parseOperationType();this.expectToken(ge.TokenKind.COLON);let n=this.parseNamedType();return this.node(e,{kind:He.Kind.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:He.Kind.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:He.Kind.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ge.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ge.TokenKind.BRACE_L,this.parseFieldDefinition,ge.TokenKind.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(ge.TokenKind.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:He.Kind.FIELD_DEFINITION,description:r,name:n,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(ge.TokenKind.PAREN_L,this.parseInputValueDef,ge.TokenKind.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(ge.TokenKind.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(ge.TokenKind.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(e,{kind:He.Kind.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:He.Kind.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:He.Kind.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(ge.TokenKind.EQUALS)?this.delimitedMany(ge.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:He.Kind.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(ge.TokenKind.BRACE_L,this.parseEnumValueDefinition,ge.TokenKind.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:He.Kind.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,Wu.syntaxError)(this._lexer.source,this._lexer.token.start,`${q$(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:He.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(ge.TokenKind.BRACE_L,this.parseInputValueDef,ge.TokenKind.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===ge.TokenKind.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()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let r=this.parseConstDirectives(),n=this.optionalMany(ge.TokenKind.BRACE_L,this.parseOperationTypeDefinition,ge.TokenKind.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:He.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ge.TokenKind.AT);let n=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(e,{kind:He.Kind.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(ge.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Jpe.DirectiveLocation,r.value))return r;throw this.unexpected(e)}node(e,r){return this._options.noLocation!==!0&&(r.loc=new kp.Location(e,this._lexer.lastToken,this._lexer.source)),r}peek(e){return this._lexer.token.kind===e}expectToken(e){let r=this._lexer.token;if(r.kind===e)return this.advanceLexer(),r;throw(0,Wu.syntaxError)(this._lexer.source,r.start,`Expected ${eM(e)}, found ${q$(r)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){let r=this._lexer.token;if(r.kind===ge.TokenKind.NAME&&r.value===e)this.advanceLexer();else throw(0,Wu.syntaxError)(this._lexer.source,r.start,`Expected "${e}", found ${q$(r)}.`)}expectOptionalKeyword(e){let r=this._lexer.token;return r.kind===ge.TokenKind.NAME&&r.value===e?(this.advanceLexer(),!0):!1}unexpected(e){let r=e??this._lexer.token;return(0,Wu.syntaxError)(this._lexer.source,r.start,`Unexpected ${q$(r)}.`)}any(e,r,n){this.expectToken(e);let i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(e,r,n){if(this.expectOptionalToken(e)){let i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(e,r,n){this.expectToken(e);let i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(e,r){this.expectOptionalToken(e);let n=[];do n.push(r.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,r=this._lexer.advance();if(r.kind!==ge.TokenKind.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw(0,Wu.syntaxError)(this._lexer.source,r.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};ja.Parser=Yu;function q$(t){let e=t.value;return eM(t.kind)+(e!=null?` "${e}"`:"")}function eM(t){return(0,Z2.isPunctuatorTokenKind)(t)?`"${t}"`:t}});var Fa=b(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.didYouMean=nde;var rde=5;function nde(t,e){let[r,n]=e?[t,e]:[void 0,t],i=" Did you mean ";r&&(i+=r+" ");let s=n.map(f=>`"${f}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let a=s.slice(0,rde),c=a.pop();return i+a.join(", ")+", or "+c+"?"}});var tM=b(ST=>{"use strict";Object.defineProperty(ST,"__esModule",{value:!0});ST.identityFunc=ide;function ide(t){return t}});var Ba=b(wT=>{"use strict";Object.defineProperty(wT,"__esModule",{value:!0});wT.keyMap=sde;function sde(t,e){let r=Object.create(null);for(let n of t)r[e(n)]=n;return r}});var Lp=b(TT=>{"use strict";Object.defineProperty(TT,"__esModule",{value:!0});TT.keyValMap=ode;function ode(t,e,r){let n=Object.create(null);for(let i of t)n[e(i)]=r(i);return n}});var AT=b(OT=>{"use strict";Object.defineProperty(OT,"__esModule",{value:!0});OT.mapValue=ade;function ade(t,e){let r=Object.create(null);for(let n of Object.keys(t))r[n]=e(t[n],n);return r}});var Pp=b(RT=>{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.naturalCompare=ude;function ude(t,e){let r=0,n=0;for(;r<t.length&&n<e.length;){let i=t.charCodeAt(r),s=e.charCodeAt(n);if(M$(i)&&M$(s)){let a=0;do++r,a=a*10+i-IT,i=t.charCodeAt(r);while(M$(i)&&a>0);let c=0;do++n,c=c*10+s-IT,s=e.charCodeAt(n);while(M$(s)&&c>0);if(a<c)return-1;if(a>c)return 1}else{if(i<s)return-1;if(i>s)return 1;++r,++n}}return t.length-e.length}var IT=48,cde=57;function M$(t){return!isNaN(t)&&IT<=t&&t<=cde}});var qa=b(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.suggestionList=fde;var lde=Pp();function fde(t,e){let r=Object.create(null),n=new xT(t),i=Math.floor(t.length*.4)+1;for(let s of e){let a=n.measure(s,i);a!==void 0&&(r[s]=a)}return Object.keys(r).sort((s,a)=>{let c=r[s]-r[a];return c!==0?c:(0,lde.naturalCompare)(s,a)})}var xT=class{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=rM(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,r){if(this._input===e)return 0;let n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let i=rM(n),s=this._inputArray;if(i.length<s.length){let h=i;i=s,s=h}let a=i.length,c=s.length;if(a-c>r)return;let f=this._rows;for(let h=0;h<=c;h++)f[0][h]=h;for(let h=1;h<=a;h++){let m=f[(h-1)%3],g=f[h%3],y=g[0]=h;for(let _=1;_<=c;_++){let E=i[h-1]===s[_-1]?0:1,R=Math.min(m[_]+1,g[_-1]+1,m[_-1]+E);if(h>1&&_>1&&i[h-1]===s[_-2]&&i[h-2]===s[_-1]){let x=f[(h-2)%3][_-2];R=Math.min(R,x+1)}R<y&&(y=R),g[_]=R}if(y>r)return}let p=f[a%3][c];return p<=r?p:void 0}};function rM(t){let e=t.length,r=new Array(e);for(let n=0;n<e;++n)r[n]=t.charCodeAt(n);return r}});var G$=b(NT=>{"use strict";Object.defineProperty(NT,"__esModule",{value:!0});NT.toObjMap=hde;function hde(t){if(t==null)return Object.create(null);if(Object.getPrototypeOf(t)===null)return t;let e=Object.create(null);for(let[r,n]of Object.entries(t))e[r]=n;return e}});var nM=b(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.printString=pde;function pde(t){return`"${t.replace(dde,mde)}"`}var dde=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function mde(t){return gde[t.charCodeAt(0)]}var gde=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var Ju=b(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.BREAK=void 0;Ma.getEnterLeaveForKind=U$;Ma.getVisitFn=bde;Ma.visit=vde;Ma.visitInParallel=_de;var $de=Tn(),yde=vt(),LT=Ws(),iM=st(),Bl=Object.freeze({});Ma.BREAK=Bl;function vde(t,e,r=LT.QueryDocumentKeys){let n=new Map;for(let x of Object.values(iM.Kind))n.set(x,U$(e,x));let i,s=Array.isArray(t),a=[t],c=-1,f=[],p=t,h,m,g=[],y=[];do{c++;let x=c===a.length,F=x&&f.length!==0;if(x){if(h=y.length===0?void 0:g[g.length-1],p=m,m=y.pop(),F)if(s){p=p.slice();let D=0;for(let[B,Q]of f){let W=B-D;Q===null?(p.splice(W,1),D++):p[W]=Q}}else{p=Object.defineProperties({},Object.getOwnPropertyDescriptors(p));for(let[D,B]of f)p[D]=B}c=i.index,a=i.keys,f=i.edits,s=i.inArray,i=i.prev}else if(m){if(h=s?c:a[c],p=m[h],p==null)continue;g.push(h)}let j;if(!Array.isArray(p)){var _,E;(0,LT.isNode)(p)||(0,$de.devAssert)(!1,`Invalid AST Node: ${(0,yde.inspect)(p)}.`);let D=x?(_=n.get(p.kind))===null||_===void 0?void 0:_.leave:(E=n.get(p.kind))===null||E===void 0?void 0:E.enter;if(j=D?.call(e,p,h,m,g,y),j===Bl)break;if(j===!1){if(!x){g.pop();continue}}else if(j!==void 0&&(f.push([h,j]),!x))if((0,LT.isNode)(j))p=j;else{g.pop();continue}}if(j===void 0&&F&&f.push([h,p]),x)g.pop();else{var R;i={inArray:s,index:c,keys:a,edits:f,prev:i},s=Array.isArray(p),a=s?p:(R=r[p.kind])!==null&&R!==void 0?R:[],c=-1,f=[],m&&y.push(m),m=p}}while(i!==void 0);return f.length!==0?f[f.length-1][1]:t}function _de(t){let e=new Array(t.length).fill(null),r=Object.create(null);for(let n of Object.values(iM.Kind)){let i=!1,s=new Array(t.length).fill(void 0),a=new Array(t.length).fill(void 0);for(let f=0;f<t.length;++f){let{enter:p,leave:h}=U$(t[f],n);i||(i=p!=null||h!=null),s[f]=p,a[f]=h}if(!i)continue;let c={enter(...f){let p=f[0];for(let m=0;m<t.length;m++)if(e[m]===null){var h;let g=(h=s[m])===null||h===void 0?void 0:h.apply(t[m],f);if(g===!1)e[m]=p;else if(g===Bl)e[m]=Bl;else if(g!==void 0)return g}},leave(...f){let p=f[0];for(let m=0;m<t.length;m++)if(e[m]===null){var h;let g=(h=a[m])===null||h===void 0?void 0:h.apply(t[m],f);if(g===Bl)e[m]=Bl;else if(g!==void 0&&g!==!1)return g}else e[m]===p&&(e[m]=null)}};r[n]=c}return r}function U$(t,e){let r=t[e];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:t.enter,leave:t.leave}}function bde(t,e,r){let{enter:n,leave:i}=U$(t,e);return r?i:n}});var fi=b(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});PT.print=Tde;var Ede=Op(),Sde=nM(),wde=Ju();function Tde(t){return(0,wde.visit)(t,Ade)}var Ode=80,Ade={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>Ie(t.definitions,`
`)},OperationDefinition:{leave(t){let e=nt("(",Ie(t.variableDefinitions,", "),")"),r=Ie([t.operation,Ie([t.name,e]),Ie(t.directives," ")]," ");return(r==="query"?"":r+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:r,directives:n})=>t+": "+e+nt(" = ",r)+nt(" ",Ie(n," "))},SelectionSet:{leave:({selections:t})=>_s(t)},Field:{leave({alias:t,name:e,arguments:r,directives:n,selectionSet:i}){let s=nt("",t,": ")+e,a=s+nt("(",Ie(r,", "),")");return a.length>Ode&&(a=s+nt(`(
`,H$(Ie(r,`
`)),`
)`)),Ie([a,Ie(n," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+nt(" ",Ie(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:r})=>Ie(["...",nt("on ",t),Ie(e," "),r]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${t}${nt("(",Ie(r,", "),")")} on ${e} ${nt("",Ie(n," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?(0,Ede.printBlockString)(t):(0,Sde.printString)(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+Ie(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+Ie(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+nt("(",Ie(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:r})=>nt("",t,`
`)+Ie(["schema",Ie(e," "),_s(r)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:r})=>nt("",t,`
`)+Ie(["scalar",e,Ie(r," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:n,fields:i})=>nt("",t,`
`)+Ie(["type",e,nt("implements ",Ie(r," & ")),Ie(n," "),_s(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:r,type:n,directives:i})=>nt("",t,`
`)+e+(sM(r)?nt(`(