altair-static
Version:
Static package for altair graphql client
6 lines (5 loc) • 42.2 kB
JavaScript
;
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46d87476-40c3-5662-8449-71dc2de783eb")}catch(e){}}();
(self.webpackChunkaltair=self.webpackChunkaltair||[]).push([[257],{3257:(zt,X,z)=>{z.r(X),z.d(X,{default:()=>Xt,languages:()=>ue,options:()=>pe,parsers:()=>$,printers:()=>Oe});var xe=Object.defineProperty,H=(e,t)=>{for(var n in t)xe(e,n,{get:t[n],enumerable:!0})},W={};H(W,{languages:()=>ue,options:()=>pe,parsers:()=>$,printers:()=>Oe});var j=(e,t,n,r)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},_e="indent",ke="group",Se="if-break",K="line",Z=()=>{},L=Z,ee=Z;function I(e){return L(e),{type:_e,contents:e}}function y(e,t={}){return L(e),ee(t.expandedStates,!0),{type:ke,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function D(e,t="",n={}){return L(e),""!==t&&L(t),{type:Se,breakContents:e,flatContents:t,groupId:n.groupId}}var _={type:K},u={type:K,soft:!0},h=[{type:K,hard:!0},{type:"break-parent"}];function E(e,t){L(e),ee(t);let n=[];for(let r=0;r<t.length;r++)0!==r&&n.push(e),n.push(t[r]);return n}function V(e){return(t,n,r)=>{let i=!(null==r||!r.backwards);if(!1===n)return!1;let{length:s}=t,o=n;for(;o>=0&&o<s;){let c=t.charAt(o);if(e instanceof RegExp){if(!e.test(c))return o}else if(!e.includes(c))return o;i?o--:o++}return(-1===o||o===s)&&o}}V(/\s/);var te=V(" \t"),Re=V(",; \t"),Fe=V(/[^\n\r]/),ne=function we(e,t,n){let r=!(null==n||!n.backwards);if(!1===t)return!1;let i=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t},Me=function Ue(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let n=t+2;n<e.length;++n)if("*"===e.charAt(n)&&"/"===e.charAt(n+1))return n+2;return t},$e=function Ke(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Re(e,r),r=Me(e,r),r=te(e,r);return r=function Be(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Fe(e,t):t)}(e,r),r=ne(e,r),!1!==r&&function Pe(e,t,n={}){let r=te(e,n.backwards?t-1:t,n);return r!==ne(e,r,n)}(e,r)},ie=function Ge(e){return Array.isArray(e)&&e.length>0},Ye=class extends Error{name="UnexpectedNodeError";constructor(e,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},Je=Ye,R=null;function F(e){if(null!==R){let t=R;return R=F.prototype=null,t}return R=F.prototype=e??Object.create(null),new F}for(let e=0;e<=10;e++)F();var k,e,He=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},re=class{constructor(e,t,n,r,i,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,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}}},se={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"]};new Set(Object.keys(se)),(e=k||(k={})).QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription";var Ze=function Xe(e,t="type"){return function Qe(e){F(e)}(e),function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}}(se,"kind");function ae(e){return e.loc.start}function oe(e){return e.loc.end}var A=function nt(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return i.push("InputValueDefinition"!==r.kind||r.description.block?h:_),i};function T(e,t,n){if(0===n.directives.length)return"";let r=E(_,e.map(t,"directives"));return"FragmentDefinition"===n.kind||"OperationDefinition"===n.kind?y([_,r]):[" ",y(I([u,r]))]}function O(e,t,n,r){return e.map(({isLast:i,node:s})=>{let o=n();return!i&&$e(t.originalText,oe(s))?[o,h]:o},r)}function le(e,t){let{node:n}=e;return ie(n.variableDefinitions)?y(["(",I([u,E([D("",", "),u],e.map(t,"variableDefinitions"))]),u,")"]):""}function ce(e,t){"StringValue"===e.kind&&e.block&&!e.value.includes("\n")&&(t.value=e.value.trim())}ce.ignoredProperties=new Set(["loc","comments"]);var lt={print:function it(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(h,O(e,t,n,"definitions")),h];case"OperationDefinition":{let i="{"!==t.originalText[ae(r)],s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&ie(r.variableDefinitions)?" ":"",le(e,n),T(e,n,r),i||s?" ":"",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),le(e,n)," on ",n("typeCondition"),T(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",I([h,E(h,O(e,t,n,"selections"))]),h,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",I([u,E([D("",", "),u],O(e,t,n,"arguments"))]),u,")"]):"",T(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"StringValue":if(r.block){let i=j(!1,r.value,'"""',String.raw`\"""`).split("\n");return 1===i.length&&(i[0]=i[0].trim()),i.every(s=>""===s)&&(i.length=0),E(h,['"""',...i,'"""'])}return['"',j(!1,j(!1,r.value,/["\\]/g,String.raw`\$&`),"\n",String.raw`\n`),'"'];case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",I([u,E([D("",", "),u],e.map(n,"values"))]),u,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,I([u,E([D("",", "),u],e.map(n,"fields"))]),u,D("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",I([u,E([D("",", "),u],O(e,t,n,"arguments"))]),u,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",T(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(A(e,0,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...function at(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,o=e.map(n,"interfaces");for(let c=0;c<s.length;c++){let p=s[c];i.push(o[c]);let v=s[c+1];if(v){let m=t.originalText.slice(p.loc.end,v.loc.start).includes("#");i.push(" &",m?_:" ")}}return i}(e,t,n)),s.push(T(e,n,r)),r.fields.length>0&&s.push([" {",I([h,E(h,O(e,t,n,"fields"))]),h,"}"]),s}case"FieldDefinition":return[A(e,0,n),n("name"),r.arguments.length>0?y(["(",I([u,E([D("",", "),u],O(e,t,n,"arguments"))]),u,")"]):"",": ",n("type"),T(e,n,r)];case"DirectiveDefinition":return[A(e,0,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",I([u,E([D("",", "),u],O(e,t,n,"arguments"))]),u,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,0,n),"EnumTypeExtension"===r.kind?"extend ":"","enum ",n("name"),T(e,n,r),r.values.length>0?[" {",I([h,E(h,O(e,t,n,"values"))]),h,"}"]:""];case"EnumValueDefinition":return[A(e,0,n),n("name"),T(e,n,r)];case"InputValueDefinition":return[A(e,0,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",T(e,n,r)];case"SchemaExtension":return["extend schema",T(e,n,r),...r.operationTypes.length>0?[" {",I([h,E(h,O(e,t,n,"operationTypes"))]),h,"}"]:[]];case"SchemaDefinition":return[A(e,0,n),"schema",T(e,n,r)," {",r.operationTypes.length>0?I([h,E(h,O(e,t,n,"operationTypes"))]):"",h,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),T(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",T(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([A(e,0,n),y(["UnionTypeExtension"===r.kind?"extend ":"","union ",n("name"),T(e,n,r),r.types.length>0?[" =",D(""," "),I([D([_,"| "]),E([_,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,0,n),"ScalarTypeExtension"===r.kind?"extend ":"","scalar ",n("name"),T(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Je(r,"Graphql","kind")}},massageAstNode:ce,hasPrettierIgnore:function ot(e){var t;let{node:n}=e;return null==(t=n?.comments)?void 0:t.some(r=>"prettier-ignore"===r.value.trim())},insertPragma:function tt(e){return"# @format\n\n"+e},printComment:function st(e){let t=e.node;if("Comment"===t.kind)return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))},canAttachComment:function rt(e){return"Comment"!==e.kind},getVisitorKeys:Ze},ct=lt,ue=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}],pe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."}},$={};function dt(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}H($,{graphql:()=>Qt});var ft=/\r\n|[\n\r]/g;function G(e,t){let n=0,r=1;for(let i of e.body.matchAll(ft)){if("number"==typeof i.index||dt(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Et(e){return he(e.source,G(e.source,e.start))}function he(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=t.line+(e.locationOffset.line-1),p=t.column+(1===t.line?n:0),v=`${e.name}:${o}:${p}\n`,m=r.split(/\r\n|[\n\r]/g),C=m[i];if(C.length>120){let x=Math.floor(p/80),Q=p%80,N=[];for(let b=0;b<C.length;b+=80)N.push(C.slice(b,b+80));return v+de([[`${o} |`,N[0]],...N.slice(1,x+1).map(b=>["|",b]),["|","^".padStart(Q)],["|",N[x+1]]])}return v+de([[o-1+" |",m[i-1]],[`${o} |`,C],["|","^".padStart(p)],[`${o+1} |`,m[i+1]]])}function de(e){let t=e.filter(([r,i])=>void 0!==i),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join("\n")}var Y,l,a,Tt=class Ae extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:c,positions:p,path:v,originalError:m,extensions:C}=function mt(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(n);super(t),this.name="GraphQLError",this.path=v??void 0,this.originalError=m??void 0,this.nodes=fe(Array.isArray(o)?o:o?[o]:void 0);let x=fe(null===(r=this.nodes)||void 0===r?void 0:r.map(N=>N.loc).filter(N=>null!=N));this.source=c??(null==x||null===(i=x[0])||void 0===i?void 0:i.source),this.positions=p??x?.map(N=>N.start),this.locations=p&&c?p.map(N=>G(c,N)):x?.map(N=>G(N.source,N.start));let Q=function ht(e){return"object"==typeof e&&null!==e}(m?.extensions)?m?.extensions:void 0;this.extensions=null!==(s=C??Q)&&void 0!==s?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}}),null!=m&&m.stack?Object.defineProperty(this,"stack",{value:m.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ae):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 n of this.nodes)n.loc&&(t+="\n\n"+Et(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+="\n\n"+he(this.source,n);return t}toJSON(){let t={message:this.message};return null!=this.locations&&(t.locations=this.locations),null!=this.path&&(t.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function fe(e){return void 0===e||0===e.length?void 0:e}function f(e,t,n){return new Tt(`Syntax Error: ${n}`,{source:e,positions:[t]})}function Nt(e){return 9===e||32===e}function w(e){return e>=48&&e<=57}function Ee(e){return e>=97&&e<=122||e>=65&&e<=90}function me(e){return Ee(e)||95===e}function It(e){return Ee(e)||w(e)||95===e}function vt(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;let c=e[o],p=yt(c);p!==c.length&&(r=null!==(s=r)&&void 0!==s?s:o,i=o,0!==o&&p<n&&(n=p))}return e.map((o,c)=>0===c?o:o.slice(n)).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function yt(e){let t=0;for(;t<e.length&&Nt(e.charCodeAt(t));)++t;return t}!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Y||(Y={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(l||(l={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(a||(a={}));var Dt=class{constructor(e){let t=new re(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=At(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===a.COMMENT);return e}};function S(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function U(e,t){return Te(e.charCodeAt(t))&&Ne(e.charCodeAt(t+1))}function Te(e){return e>=55296&&e<=56319}function Ne(e){return e>=56320&&e<=57343}function g(e,t){let n=e.source.body.codePointAt(t);if(void 0===n)return a.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return'"'===r?"'\"'":`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function d(e,t,n,r,i){return new re(t,n,r,e.line,1+n-e.lineStart,i)}function At(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return xt(e,i);case 33:return d(e,a.BANG,i,i+1);case 36:return d(e,a.DOLLAR,i,i+1);case 38:return d(e,a.AMP,i,i+1);case 40:return d(e,a.PAREN_L,i,i+1);case 41:return d(e,a.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return d(e,a.SPREAD,i,i+3);break;case 58:return d(e,a.COLON,i,i+1);case 61:return d(e,a.EQUALS,i,i+1);case 64:return d(e,a.AT,i,i+1);case 91:return d(e,a.BRACKET_L,i,i+1);case 93:return d(e,a.BRACKET_R,i,i+1);case 123:return d(e,a.BRACE_L,i,i+1);case 124:return d(e,a.PIPE,i,i+1);case 125:return d(e,a.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?bt(e,i):_t(e,i)}if(w(s)||45===s)return gt(e,i,s);if(me(s))return Lt(e,i);throw f(e.source,i,39===s?"Unexpected single quote character ('), did you mean to use a double quote (\")?":S(s)||U(n,i)?`Unexpected character: ${g(e,i)}.`:`Invalid character: ${g(e,i)}.`)}return d(e,a.EOF,r,r)}function xt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(10===s||13===s)break;if(S(s))++i;else{if(!U(n,i))break;i+=2}}return d(e,a.COMMENT,t,i,n.slice(t+1,i))}function gt(e,t,n){let r=e.source.body,i=t,s=n,o=!1;if(45===s&&(s=r.charCodeAt(++i)),48===s){if(s=r.charCodeAt(++i),w(s))throw f(e.source,i,`Invalid number, unexpected digit after 0: ${g(e,i)}.`)}else i=J(e,i,s),s=r.charCodeAt(i);if(46===s&&(o=!0,s=r.charCodeAt(++i),i=J(e,i,s),s=r.charCodeAt(i)),(69===s||101===s)&&(o=!0,s=r.charCodeAt(++i),(43===s||45===s)&&(s=r.charCodeAt(++i)),i=J(e,i,s),s=r.charCodeAt(i)),46===s||me(s))throw f(e.source,i,`Invalid number, expected digit but got: ${g(e,i)}.`);return d(e,o?a.FLOAT:a.INT,t,i,r.slice(t,i))}function J(e,t,n){if(!w(n))throw f(e.source,t,`Invalid number, expected digit but got: ${g(e,t)}.`);let r=e.source.body,i=t+1;for(;w(r.charCodeAt(i));)++i;return i}function _t(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,o="";for(;i<r;){let c=n.charCodeAt(i);if(34===c)return o+=n.slice(s,i),d(e,a.STRING,t,i+1,o);if(92!==c){if(10===c||13===c)break;if(S(c))++i;else{if(!U(n,i))throw f(e.source,i,`Invalid character within String: ${g(e,i)}.`);i+=2}}else{o+=n.slice(s,i);let p=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?kt(e,i):St(e,i):Ct(e,i);o+=p.value,i+=p.size,s=i}}throw f(e.source,i,"Unterminated string.")}function kt(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(125===s){if(i<5||!S(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|P(s),r<0)break}throw f(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function St(e,t){let n=e.source.body,r=Ie(n,t+2);if(S(r))return{value:String.fromCodePoint(r),size:6};if(Te(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){let i=Ie(n,t+8);if(Ne(i))return{value:String.fromCodePoint(r,i),size:12}}throw f(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ie(e,t){return P(e.charCodeAt(t))<<12|P(e.charCodeAt(t+1))<<8|P(e.charCodeAt(t+2))<<4|P(e.charCodeAt(t+3))}function P(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ct(e,t){let n=e.source.body;switch(n.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:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw f(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function bt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,o=s,c="",p=[];for(;s<r;){let v=n.charCodeAt(s);if(34===v&&34===n.charCodeAt(s+1)&&34===n.charCodeAt(s+2)){c+=n.slice(o,s),p.push(c);let m=d(e,a.BLOCK_STRING,t,s+3,vt(p).join("\n"));return e.line+=p.length-1,e.lineStart=i,m}if(92!==v||34!==n.charCodeAt(s+1)||34!==n.charCodeAt(s+2)||34!==n.charCodeAt(s+3))if(10!==v&&13!==v)if(S(v))++s;else{if(!U(n,s))throw f(e.source,s,`Invalid character within String: ${g(e,s)}.`);s+=2}else c+=n.slice(o,s),p.push(c),13===v&&10===n.charCodeAt(s+1)?s+=2:++s,c="",o=s,i=s;else c+=n.slice(o,s),o=s+1,s+=4}throw f(e.source,s,"Unterminated string.")}function Lt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r&&It(n.charCodeAt(i));)++i;return d(e,a.NAME,t,i,n.slice(t,i))}function q(e,t){if(!e)throw new Error(t)}function ve(e){return M(e,[])}function M(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function Rt(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(function Ft(e){return"function"==typeof e.toJSON}(e)){let r=e.toJSON();if(r!==e)return"string"==typeof r?r:M(r,n)}else if(Array.isArray(e))return function Pt(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(M(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function wt(e,t){let n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function Vt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(([r,i])=>r+": "+M(i,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var Ut=globalThis.process&&"production"===globalThis.process.env.NODE_ENV?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;let r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){let s=ve(e);throw new Error(`Cannot use ${r} "${s}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1},ye=class{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||q(!1,`Body must be a string. Received: ${ve(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||q(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||q(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}},jt=class{constructor(e,t={}){let n=function Mt(e){return Ut(e,ye)}(e)?e:new ye(e);this._lexer=new Dt(n),this._options=t,this._tokenCounter=0}parseName(){let e=this.expectToken(a.NAME);return this.node(e,{kind:l.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.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(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()}if(e)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"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:l.OPERATION_DEFINITION,operation:k.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n,t=this.parseOperationType();return this.peek(a.NAME)&&(n=this.parseName()),this.node(e,{kind:l.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(a.NAME);switch(e.value){case"query":return k.QUERY;case"mutation":return k.MUTATION;case"subscription":return k.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:l.VARIABLE_DEFINITION,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:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.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 n,r,e=this._lexer.token,t=this.parseName();return this.expectOptionalToken(a.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:l.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){return this.optionalMany(a.PAREN_L,e?this.parseConstArgument:this.parseArgument,a.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(a.COLON),this.node(t,{kind:l.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(a.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(a.NAME)?this.node(e,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:l.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return this.expectKeyword("fragment"),this.node(e,!0===this._options.allowLegacyFragmentVariables?{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}:{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)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:l.INT,value:t.value});case a.FLOAT:return this.advanceLexer(),this.node(t,{kind:l.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:l.BOOLEAN,value:!0});case"false":return this.node(t,{kind:l.BOOLEAN,value:!1});case"null":return this.node(t,{kind:l.NULL});default:return this.node(t,{kind:l.ENUM,value:t.value})}case a.DOLLAR:if(e){if(this.expectToken(a.DOLLAR),this._lexer.token.kind===a.NAME)throw f(this._lexer.source,t.start,`Unexpected variable "$${this._lexer.token.value}" in constant value.`);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:l.STRING,value:e.value,block:e.kind===a.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:l.LIST,values:this.any(a.BRACKET_L,()=>this.parseValueLiteral(e),a.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(a.BRACE_L,()=>this.parseObjectField(e),a.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(a.COLON),this.node(t,{kind:l.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(a.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(a.AT),this.node(t,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let t,e=this._lexer.token;if(this.expectOptionalToken(a.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(a.BRACKET_R),t=this.node(e,{kind:l.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(e,{kind:l.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:l.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 n=this.parseConstDirectives(),r=this.many(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);return this.node(e,{kind:l.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(a.COLON);let n=this.parseNamedType();return this.node(e,{kind:l.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:l.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:l.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(a.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseFieldDefinition,a.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(a.COLON);let i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:l.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(a.PAREN_L,this.parseInputValueDef,a.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(a.COLON);let i,r=this.parseTypeReference();this.expectOptionalToken(a.EQUALS)&&(i=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(e,{kind:l.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:l.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:l.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(a.EQUALS)?this.delimitedMany(a.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:l.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(a.BRACE_L,this.parseEnumValueDefinition,a.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:l.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw f(this._lexer.source,this._lexer.token.start,`${B(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 n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}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()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.optionalMany(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:l.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:l.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:l.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:l.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:l.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:l.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(a.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(e,{kind:l.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Y,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new He(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 f(this._lexer.source,t.start,`Expected ${De(e)}, found ${B(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind!==a.NAME||t.value!==e)throw f(this._lexer.source,t.start,`Expected "${e}", found ${B(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===a.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=e??this._lexer.token;return f(this._lexer.source,t.start,`Unexpected ${B(t)}.`)}any(e,t,n){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]}many(e,t,n){this.expectToken(e);let r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==a.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw f(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function B(e){let t=e.value;return De(e.kind)+(null!=t?` "${t}"`:"")}function De(e){return function Ot(e){return e===a.BANG||e===a.DOLLAR||e===a.AMP||e===a.PAREN_L||e===a.PAREN_R||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}(e)?`"${e}"`:e}var Yt={allowLegacyFragmentVariables:!0},Qt={parse:function qt(e){let t;try{t=function Bt(e,t){return new jt(e,t).parseDocument()}(e,Yt)}catch(n){throw function Jt(e){if("GraphQLError"===e?.name){let{message:t,locations:[n]}=e;return function Kt(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}(t,{loc:{start:n},cause:e})}return e}(n)}return t.comments=function Gt(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)"Comment"===i.kind&&t.push({...i,loc:{start:i.start,end:i.end}});return t}(t),t},astFormat:"graphql",hasPragma:function et(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)},locStart:ae,locEnd:oe},Oe={graphql:ct},Xt=W}}]);
//# sourceMappingURL=257.js.map
//# debugId=46d87476-40c3-5662-8449-71dc2de783eb