PageSourceSearch

https://developers.vendr.com/assets/createServer-DN5AJLcN-4XjWRHxm.js

js vendr.com collected 2026-10-01 09:23:10 UTC 253,756 bytes, 64 lines download raw bytes

vendor: 16,384 bytes, line 1
1import{E as v,V as Gs,p as je,j as Xe,P as N,y as he,z as Ce,D as Oo,S as xo,G as Io,L as So,H as _o,I as x,R as Be,J as No,K as Vr,N as ko}from"./entry.client-yzFfjJ06.js";import{$ as Hs,Q as re,N as W,q as Et,y as d,l as Ee,Y as ue,p as D,z as Pe,C as Ao,m as Co,a as Ro,g as X,f as de,b as ne,c as Wt,K as wt,o as Re,U as Qs,M as se,d as L,e as Fo,h as $o,i as Do,j as Le,W as xt,J as nt,s as Ue,u as Ie,k as zt,n as Ws,r as zs,t as Kt,v as Po,w as jo,x as Ys,A as dn,O as Lo,X as Dn,G as Uo,V as Br,B as hn,D as pt,E as Pt,F as Mo,H as qo,I as Vo}from"./circular-wJaV4vh_-B-DtfxOE.js";import{S as Bo}from"./index-BvvmIczU-DPMK0kSd.js";const Oe=(t,e,n=[])=>{const r=e(t,n);if(typeof r!="object"||r===null)return r;const s=Array.isArray(r)?[]:{};for(const[i,o]of Object.entries(r)){const a=[...n,i];Array.isArray(o)?s[i]=o.map((l,u)=>typeof l=="object"&&l!=null?Oe(l,e,[...a,u.toString()]):l):typeof o=="object"&&o!=null?s[i]=Oe(o,e,a):s[i]=o}return s};function Go(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const Js=Object.freeze({major:16,minor:11,patch:0,preReleaseTag:null});function Ho(t){return typeof t?.then=="function"}var A;(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"})(A||(A={}));function Qo(t,e){const n=new Wo(t,e),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}class Wo{constructor(e,n={}){const r=Io(e)?e:new So(e);this._lexer=new _o(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(x.NAME);return this.node(e,{kind:d.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:d.DOCUMENT,definitions:this.many(x.SOF,this.parseDefinition,x.EOF)})}parseDefinition(){if(this.peek(x.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===x.NAME){switch(n.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 Be(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(x.BRACE_L))return this.node(e,{kind:d.OPERATION_DEFINITION,operation:he.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(x.NAME)&&(r=this.parseName()),this.node(e,{kind:d.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(x.NAME);switch(e.value){case"query":return he.QUERY;case"mutation":return he.MUTATION;case"subscription":return he.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(x.PAREN_L,this.parseVariableDefinition,x.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:d.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(x.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(x.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(x.DOLLAR),this.node(e,{kind:d.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:d.SELECTION_SET,selections:this.many(x.BRACE_L,this.parseSelection,x.BRACE_R)})}parseSelection(){return this.peek(x.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let r,s;return this.expectOptionalToken(x.COLON)?(r=n,s=this.parseName()):s=n,this.node(e,{kind:d.FIELD,alias:r,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(x.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(x.PAREN_L,n,x.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(x.COLON),this.node(n,{kind:d.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(x.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(x.NAME)?this.node(e,{kind:d.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:d.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:d.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:d.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){const n=this._lexer.token;switch(n.kind){case x.BRACKET_L:return this.parseList(e);case x.BRACE_L:return this.parseObject(e);case x.INT:return this.advanceLexer(),this.node(n,{kind:d.INT,value:n.value});case x.FLOAT:return this.advanceLexer(),this.node(n,{kind:d.FLOAT,value:n.value});case x.STRING:case x.BLOCK_STRING:return this.parseStringLiteral();case x.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:d.BOOLEAN,value:!0});case"false":return this.node(n,{kind:d.BOOLEAN,value:!1});case"null":return this.node(n,{kind:d.NULL});default:return this.node(n,{kind:d.ENUM,value:n.value})}case x.DOLLAR:if(e)if(this.expectToken(x.DOLLAR),this._lexer.token.kind===x.NAME){const r=this._lexer.token.value;throw Be(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:d.STRING,value:e.value,block:e.kind===x.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:d.LIST,values:this.any(x.BRACKET_L,n,x.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:d.OBJECT,fields:this.any(x.BRACE_L,n,x.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,r=this.parseName();return this.expectToken(x.COLON),this.node(n,{kind:d.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(x.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(x.AT),this.node(n,{kind:d.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(x.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(x.BRACKET_R),n=this.node(e,{kind:d.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(x.BANG)?this.node(e,{kind:d.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:d.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(x.STRING)||this.peek(x.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),s=this.many(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);return this.node(e,{kind:d.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:s})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(x.COLON);const r=this.parseNamedType();return this.node(e,{kind:d.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),s=this.parseConstDirectives();return this.node(e,{kind:d.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:s})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:d.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:s,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(x.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(x.BRACE_L,this.parseFieldDefinition,x.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseName(),s=this.parseArgumentDefs();this.expectToken(x.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:d.FIELD_DEFINITION,description:n,name:r,arguments:s,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(x.PAREN_L,this.parseInputValueDef,x.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(x.COLON);const s=this.parseTypeReference();let i;this.expectOptionalToken(x.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:d.INPUT_VALUE_DEFINITION,description:n,name:r,type:s,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:d.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:s,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:d.UNION_TYPE_DEFINITION,description:n,name:r,directives:s,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(x.EQUALS)?this.delimitedMany(x.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:d.ENUM_TYPE_DEFINITION,description:n,name:r,directives:s,values:i})}parseEnumValuesDefinition(){return this.optionalMany(x.BRACE_L,this.parseEnumValueDefinition,x.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),s=this.parseConstDirectives();return this.node(e,{kind:d.ENUM_VALUE_DEFINITION,description:n,name:r,directives:s})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Be(this._lexer.source,this._lexer.token.start,`${rn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:d.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:s,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(x.BRACE_L,this.parseInputValueDef,x.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===x.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(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:d.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(e,{kind:d.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(r.length===0&&s.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:d.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:s,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(r.length===0&&s.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:d.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:s,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();if(r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:d.UNION_TYPE_EXTENSION,name:n,directives:r,types:s})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();if(r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:d.ENUM_TYPE_EXTENSION,name:n,directives:r,values:s})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();if(r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:d.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:s})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(x.AT);const r=this.parseName(),s=th
1is.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:d.DIRECTIVE_DEFINITION,description:n,name:r,arguments:s,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(x.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(A,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new No(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw Be(this._lexer.source,n.start,`Expected ${Ks(e)}, found ${rn(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===x.NAME&&n.value===e)this.advanceLexer();else throw Be(this._lexer.source,n.start,`Expected "${e}", found ${rn(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===x.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e??this._lexer.token;return Be(this._lexer.source,n.start,`Unexpected ${rn(n)}.`)}any(e,n,r){this.expectToken(e);const s=[];for(;!this.expectOptionalToken(r);)s.push(n.call(this));return s}optionalMany(e,n,r){if(this.expectOptionalToken(e)){const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(r));return s}return[]}many(e,n,r){this.expectToken(e);const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(r));return s}delimitedMany(e,n){this.expectOptionalToken(e);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(n.kind!==x.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw Be(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function rn(t){const e=t.value;return Ks(t.kind)+(e!=null?` "${e}"`:"")}function Ks(t){return ko(t)?`"${t}"`:t}function Xs(t,e){return t===e?!0:L(t)&&L(e)||se(t)&&se(e)?Xs(t.ofType,e.ofType):!1}function bt(t,e,n){return e===n?!0:L(n)?L(e)?bt(t,e.ofType,n.ofType):!1:L(e)?bt(t,e.ofType,n):se(n)?se(e)?bt(t,e.ofType,n.ofType):!1:se(e)?!1:Re(n)&&(re(e)||W(e))&&t.isSubType(n,e)}function Gr(t,e,n){return e===n?!0:Re(e)?Re(n)?t.getPossibleTypes(e).some(r=>t.isSubType(n,r)):t.isSubType(e,n):Re(n)?t.isSubType(n,e):!1}const Jn=2147483647,Kn=-2147483648,Pn=new Pe({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(t){const e=Xt(t);if(typeof e=="boolean")return e?1:0;let n=e;if(typeof e=="string"&&e!==""&&(n=Number(e)),typeof n!="number"||!Number.isInteger(n))throw new v(`Int cannot represent non-integer value: ${N(e)}`);if(n>Jn||n<Kn)throw new v("Int cannot represent non 32-bit signed integer value: "+N(e));return n},parseValue(t){if(typeof t!="number"||!Number.isInteger(t))throw new v(`Int cannot represent non-integer value: ${N(t)}`);if(t>Jn||t<Kn)throw new v(`Int cannot represent non 32-bit signed integer value: ${t}`);return t},parseLiteral(t){if(t.kind!==d.INT)throw new v(`Int cannot represent non-integer value: ${X(t)}`,{nodes:t});const e=parseInt(t.value,10);if(e>Jn||e<Kn)throw new v(`Int cannot represent non 32-bit signed integer value: ${t.value}`,{nodes:t});return e}}),Tr=new Pe({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(t){const e=Xt(t);if(typeof e=="boolean")return e?1:0;let n=e;if(typeof e=="string"&&e!==""&&(n=Number(e)),typeof n!="number"||!Number.isFinite(n))throw new v(`Float cannot represent non numeric value: ${N(e)}`);return n},parseValue(t){if(typeof t!="number"||!Number.isFinite(t))throw new v(`Float cannot represent non numeric value: ${N(t)}`);return t},parseLiteral(t){if(t.kind!==d.FLOAT&&t.kind!==d.INT)throw new v(`Float cannot represent non numeric value: ${X(t)}`,t);return parseFloat(t.value)}}),V=new Pe({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(t){const e=Xt(t);if(typeof e=="string")return e;if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"&&Number.isFinite(e))return e.toString();throw new v(`String cannot represent value: ${N(t)}`)},parseValue(t){if(typeof t!="string")throw new v(`String cannot represent a non string value: ${N(t)}`);return t},parseLiteral(t){if(t.kind!==d.STRING)throw new v(`String cannot represent a non string value: ${X(t)}`,{nodes:t});return t.value}}
1),Z=new Pe({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(t){const e=Xt(t);if(typeof e=="boolean")return e;if(Number.isFinite(e))return e!==0;throw new v(`Boolean cannot represent a non boolean value: ${N(e)}`)},parseValue(t){if(typeof t!="boolean")throw new v(`Boolean cannot represent a non boolean value: ${N(t)}`);return t},parseLiteral(t){if(t.kind!==d.BOOLEAN)throw new v(`Boolean cannot represent a non boolean value: ${X(t)}`,{nodes:t});return t.value}}),jn=new Pe({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(t){const e=Xt(t);if(typeof e=="string")return e;if(Number.isInteger(e))return String(e);throw new v(`ID cannot represent value: ${N(t)}`)},parseValue(t){if(typeof t=="string")return t;if(typeof t=="number"&&Number.isInteger(t))return t.toString();throw new v(`ID cannot represent value: ${N(t)}`)},parseLiteral(t){if(t.kind!==d.STRING&&t.kind!==d.INT)throw new v("ID cannot represent a non-string and non-integer value: "+X(t),{nodes:t});return t.value}}),zo=Object.freeze([V,Pn,Tr,Z,jn]);function Xt(t){if(je(t)){if(typeof t.valueOf=="function"){const e=t.valueOf();if(!je(e))return e}if(typeof t.toJSON=="function")return t.toJSON()}return t}function Zs(t){return Gs(t,$e)}class $e{constructor(e){var n,r;this.name=Ao(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=(n=e.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=Hs(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||Xe(!1,`@${e.name} locations must be an Array.`);const s=(r=e.args)!==null&&r!==void 0?r:{};je(s)&&!Array.isArray(s)||Xe(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=Co(s)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Ro(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}
1const Er=new $e({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[A.FIELD,A.FRAGMENT_SPREAD,A.INLINE_FRAGMENT],args:{if:{type:new D(Z),description:"Included when true."}}}),wr=new $e({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[A.FIELD,A.FRAGMENT_SPREAD,A.INLINE_FRAGMENT],args:{if:{type:new D(Z),description:"Skipped when true."}}}),Yo="No longer supported",ei=new $e({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[A.FIELD_DEFINITION,A.ARGUMENT_DEFINITION,A.INPUT_FIELD_DEFINITION,A.ENUM_VALUE],args:{reason:{type:V,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Yo}}}),Jo=new $e({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[A.SCALAR],args:{url:{type:new D(V),description:"The URL that specifies the behavior of this scalar."}}}),Ko=new $e({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[A.INPUT_OBJECT],args:{}}),Zt=Object.freeze([Er,wr,ei,Jo,Ko]);function ti(t){return typeof t=="object"&&typeof t?.[Symbol.iterator]=="function"}function jt(t,e){if(L(e)){const n=jt(t,e.ofType);return n?.kind===d.NULL?null:n}if(t===null)return{kind:d.NULL};if(t===void 0)return null;if(se(e)){const n=e.ofType;if(ti(t)){const r=[];for(const s of t){const i=jt(s,n);i!=null&&r.push(i)}return{kind:d.LIST,values:r}}return jt(t,n)}if(ue(e)){if(!je(t))return null;const n=[];for(const r of Object.values(e.getFields())){const s=jt(t[r.name],r.type);s&&n.push({kind:d.OBJECT_FIELD,name:{kind:d.NAME,value:r.name},value:s})}return{kind:d.OBJECT,fields:n}}if(Le(e)){const n=e.serialize(t);if(n==null)return null;if(typeof n=="boolean")return{kind:d.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Hr.test(r)?{kind:d.INT,value:r}:{kind:d.FLOAT,value:r}}if(typeof n=="string")return wt(e)?{kind:d.ENUM,value:n}:e===jn&&Hr.test(n)?{kind:d.INT,value:n}:{kind:d.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${N(n)}.`)}Ce(!1,"Unexpected input type: "+N(e))}const Hr=/^-?(?:0|[1-9][0-9]*)$/,Or=new de({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:V,resolve:t=>t.description},types:{description:"A list of all types supported by this server.",type:new D(new ne(new D(we))),resolve(t){return Object.values(t.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new D(we),resolve:t=>t.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:we,resolve:t=>t.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:we,resolve:t=>t.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new D(new ne(new D(ni))),resolve:t=>t.getDirectives()}})}),ni=new de({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
2
3In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new D(V),resolve:t=>t.name},description:{type:V,resolve:t=>t.description},isRepeatable:{type:new D(Z),resolve:t=>t.isRepeatable},locations:{type:new D(new ne(new D(ri))),resolve:t=>t.locations},args:{type:new D(new ne(new D(Ln))),args:{includeDeprecated:{type:Z,defaultValue:!1}},resolve(t,{includeDeprecated:e}){return e?t.args:t.args.filter(n=>n.deprecationReason==null)}}})}),ri=new Wt({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:A.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:A.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:A.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:A.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:A.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:A.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:A.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:A.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:A.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:A.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:A.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:A.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:A.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:A.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:A.UNION,description:"Location adjacent to a union definition."},ENUM:{value:A.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:A.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:A.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:A.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),we=new de({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new D(oi),resolve(t){if(Qs(t))return K.SCALAR;
3if(W(t))return K.OBJECT;if(re(t))return K.INTERFACE;if(Et(t))return K.UNION;if(wt(t))return K.ENUM;if(ue(t))return K.INPUT_OBJECT;if(se(t))return K.LIST;if(L(t))return K.NON_NULL;Ce(!1,`Unexpected type: "${N(t)}".`)}},name:{type:V,resolve:t=>"name"in t?t.name:void 0},description:{type:V,resolve:t=>"description"in t?t.description:void 0},specifiedByURL:{type:V,resolve:t=>"specifiedByURL"in t?t.specifiedByURL:void 0},fields:{type:new ne(new D(si)),args:{includeDeprecated:{type:Z,defaultValue:!1}},resolve(t,{includeDeprecated:e}){if(W(t)||re(t)){const n=Object.values(t.getFields());return e?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new ne(new D(we)),resolve(t){if(W(t)||re(t))return t.getInterfaces()}},possibleTypes:{type:new ne(new D(we)),resolve(t,e,n,{schema:r}){if(Re(t))return r.getPossibleTypes(t)}},enumValues:{type:new ne(new D(ii)),args:{includeDeprecated:{type:Z,defaultValue:!1}},resolve(t,{includeDeprecated:e}){if(wt(t)){const n=t.getValues();return e?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new ne(new D(Ln)),args:{includeDeprecated:{type:Z,defaultValue:!1}},resolve(t,{includeDeprecated:e}){if(ue(t)){const n=Object.values(t.getFields());return e?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:we,resolve:t=>"ofType"in t?t.ofType:void 0},isOneOf:{type:Z,resolve:t=>{if(ue(t))return t.isOneOf}}})}),si=new de({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new D(V),resolve:t=>t.name},description:{type:V,resolve:t=>t.description},args:{type:new D(new ne(new D(Ln))),args:{includeDeprecated:{type:Z,defaultValue:!1}},resolve(t,{includeDeprecated:e}){return e?t.args:t.args.filter(n=>n.deprecationReason==null)}},type:{type:new D(we),resolve:t=>t.type},isDeprecated:{type:new D(Z),resolve:t=>t.deprecationReason!=null},deprecationReason:{type:V,resolve:t=>t.deprecationReason}})}),Ln=new de({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new D(V),resolve:t=>t.name},description:{type:V,resolve:t=>t.description},type:{type:new D(we),resolve:t=>t.type},defaultValue:{type:V,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(t){const{type:e,defaultValue:n}=t,r=jt(n,e);return r?X(r):null}},isDeprecated:{type:new D(Z),resolve:t=>t.deprecationReason!=null},deprecationReason:{type:V,resolve:t=>t.deprecationReason}})}),ii=new de({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new D(V),resolve:t=>t.name},description:{type:V,resolve:t=>t.description},isDeprecated:{type:new D(Z),resolve:t=>t.deprecationReason!=null},deprecationReason:{type:V,resolve:t=>t.deprecationReason}})});var K;(function(t){t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.INPUT_OBJECT="INPUT_OBJECT",t.LIST="LIST",t.NON_NULL="NON_NULL"})(K||(K={}));const oi=new Wt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:K.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:K.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:K.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:K.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:K.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:K.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:K.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:K.NON_NULL,description:"Indicates this type is a 
3non-null. `ofType` is a valid field."}}}),vn={name:"__schema",type:new D(Or),description:"Access the current type schema of this server.",args:[],resolve:(t,e,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Tn={name:"__type",type:we,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new D(V),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(t,{name:e},n,{schema:r})=>r.getType(e),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},En={name:"__typename",type:new D(V),description:"The name of the current Object type at runtime.",args:[],resolve:(t,e,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ai=Object.freeze([Or,ni,ri,we,si,Ln,ii,oi]);function li(t){return ai.some(({name:e})=>t.name===e)}function ui(t){return Gs(t,xr)}function Xo(t){if(!ui(t))throw new Error(`Expected ${N(t)} to be a GraphQL schema.`);return t}class xr{constructor(e){var n,r;this.__validationErrors=e.assumeValid===!0?[]:void 0,je(e)||Xe(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||Xe(!1,`"types" must be Array if provided but got: ${N(e.types)}.`),!e.directives||Array.isArray(e.directives)||Xe(!1,`"directives" must be Array if provided but got: ${N(e.directives)}.`),this.description=e.description,this.extensions=Hs(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(n=e.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=(r=e.directives)!==null&&r!==void 0?r:Zt;const s=new Set(e.types);if(e.types!=null)for(const i of e.types)s.delete(i),ve(i,s);this._queryType!=null&&ve(this._queryType,s),this._mutationType!=null&&ve(this._mutationType,s),this._subscriptionType!=null&&ve(this._subscriptionType,s);for(const i of this._directives)if(Zs(i))for(const o of i.args)ve(o.type,s);ve(Or,s),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const i of s){if(i==null)continue;const o=i.name;if(o||Xe(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=i,re(i)){for(const a of i.getInterfaces())if(re(a)){let l=this._implementationsMap[a.name];l===void 0&&(l=this._implementationsMap[a.name]={objects:[],interfaces:[]}),l.interfaces.push(i)}}else if(W(i)){for(const a of i.getInterfaces())if(re(a)){let l=this._implementationsMap[a.name];l===void 0&&(l=this._implementationsMap[a.name]={objects:[],interfaces:[]}),l.objects.push(i)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case he.QUERY:return this.getQueryType();case he.MUTATION:return this.getMutationType();case he.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return Et(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){return this._implementationsMap[e.name]??{objects:[],interfaces:[]}}isSubType(e,n){let r=this._subTypeMap[e.name];if(r===void 0){if(r=Object.create(null),Et(e))for(const s of e.getTypes())r[s.name]=!0;else{const s=this.getImplementations(e);for(const i of s.objects)r[i.name]=!0;for(const i of s.interfaces)r[i.name]=!0}this._subTypeMap[e.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(n=>n.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function ve(t,e){const n=Ee(t);if(!e.has(n)){if(e.add(n),Et(n))for(const r of n.getTypes())ve(r,e);
3else if(W(n)||re(n)){for(const r of n.getInterfaces())ve(r,e);for(const r of Object.values(n.getFields())){ve(r.type,e);for(const s of r.args)ve(s.type,e)}}else if(ue(n))for(const r of Object.values(n.getFields()))ve(r.type,e)}return e}function Zo(t){if(Xo(t),t.__validationErrors)return t.__validationErrors;const e=new ea(t);ta(e),na(e),ra(e);const n=e.getErrors();return t.__validationErrors=n,n}function ci(t){const e=Zo(t);if(e.length!==0)throw new Error(e.map(n=>n.message).join(`
4
5`))}class ea{constructor(e){this._errors=[],this.schema=e}reportError(e,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new v(e,{nodes:r}))}getErrors(){return this._errors}}function ta(t){const e=t.schema,n=e.getQueryType();if(!n)t.reportError("Query root type must be provided.",e.astNode);else if(!W(n)){var r;t.reportError(`Query root type must be Object type, it cannot be ${N(n)}.`,(r=Xn(e,he.QUERY))!==null&&r!==void 0?r:n.astNode)}const s=e.getMutationType();if(s&&!W(s)){var i;t.reportError(`Mutation root type must be Object type if provided, it cannot be ${N(s)}.`,(i=Xn(e,he.MUTATION))!==null&&i!==void 0?i:s.astNode)}const o=e.getSubscriptionType();if(o&&!W(o)){var a;t.reportError(`Subscription root type must be Object type if provided, it cannot be ${N(o)}.`,(a=Xn(e,he.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function Xn(t,e){var n;return(n=[t.astNode,...t.extensionASTNodes].flatMap(r=>{var s;return(s=r?.operationTypes)!==null&&s!==void 0?s:[]}).find(r=>r.operation===e))===null||n===void 0?void 0:n.type}function na(t){for(const n of t.schema.getDirectives()){if(!Zs(n)){t.reportError(`Expected directive but got: ${N(n)}.`,n?.astNode);continue}rt(t,n),n.locations.length===0&&t.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(const r of n.args)if(rt(t,r),Ie(r.type)||t.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${N(r.type)}.`,r.astNode),Kt(r)&&r.deprecationReason!=null){var e;t.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[Ir(r.astNode),(e=r.astNode)===null||e===void 0?void 0:e.type])}}}function rt(t,e){e.name.startsWith("__")&&t.reportError(`Name "${e.name}" must not begin with "__", which is reserved by GraphQL introspection.`,e.astNode)}function ra(t){const e=fa(t),n=t.schema.getTypeMap();for(const r of Object.values(n)){if(!Vo(r)){t.reportError(`Expected GraphQL named type but got: ${N(r)}.`,r.astNode);continue}li(r)||rt(t,r),W(r)||re(r)?(sa(t,r),ia(t,r)):Et(r)?la(t,r):wt(r)?ua(t,r):ue(r)&&(ca(t,r),e(r))}}function sa(t,e){const n=Object.values(e.getFields());n.length===0&&t.reportError(`Type ${e.name} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(const o of n){if(rt(t,o),!dn(o.type)){var r;t.reportError(`The type of ${e.name}.${o.name} must be Output Type but got: ${N(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(const a of o.args){const l=a.name;if(rt(t,a),!Ie(a.type)){var s;t.reportError(`The type of ${e.name}.${o.name}(${l}:) must be Input Type but got: ${N(a.type)}.`,(s=a.astNode)===null||s===void 0?void 0:s.type)}if(Kt(a)&&a.deprecationReason!=null){var i;t.reportError(`Required argument ${e.name}.${o.name}(${l}:) cannot be deprecated.`,[Ir(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}}}}function ia(t,e){const n=Object.create(null);for(const r of e.getInterfaces()){if(!re(r)){t.reportError(`Type ${N(e)} must only implement Interface types, it cannot implement ${N(r)}.`,Vt(e,r));continue}if(e===r){t.reportError(`Type ${e.name} cannot implement itself because it would create a circular reference.`,Vt(e,r));continue}if(n[r.name]){t.reportError(`Type ${e.name} can only implement ${r.name} once.`,Vt(e,r));continue}n[r.name]=!0,aa(t,e,r),oa(t,e,r)}}function oa(t,e,n){const r=e.getFields();for(const l of Object.values(n.getFields())){const u=l.name,c=r[u];if(!c){t.reportError(`Interface field ${n.name}.${u} expected but ${e.name} does not provide it.`,[l.astNode,e.astNode,...e.extensionASTNodes]);continue}if(!bt(t.schema,c.type,l.type)){var s,i;t.reportError(`Interface field ${n.name}.${u} expects type ${N(l.type)} but ${e.name}.${u} is type ${N(c.type)}.`,[(s=l.astNode)===null||s===void 0?void 0:s.type,(i=c.astNode)===null||i===void 0?void 0:i.type])}for(const f of l.args){const p=f.name,h=c.args.find(m=>m.name===p);if(!h){t.reportError(`Interface field argument ${n.name}.${u}(${p}:) expected but ${e.name}.${u} does not provide it.`,[f.astNode,c.astNode]);continue}if(!Xs(f.type,h.type)){var o,a;t.reportError(`Interface field argument ${n.name}.${u}(${p}:) expects type ${N(f.type)} but ${e.name}.${u}(${p}:) is type ${N(h.type)}.`,[(o=f.astNode)===null||o===void 0?void 0:o.type,(a=h.astNode)===null||a===void 0?void 0:a.type])}}for(const f of c.args){const p=f.name;!l.args.find(h=>
5h.name===p)&&Kt(f)&&t.reportError(`Object field ${e.name}.${u} includes required argument ${p} that is missing from the Interface field ${n.name}.${u}.`,[f.astNode,l.astNode])}}}function aa(t,e,n){const r=e.getInterfaces();for(const s of n.getInterfaces())r.includes(s)||t.reportError(s===e?`Type ${e.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${e.name} must implement ${s.name} because it is implemented by ${n.name}.`,[...Vt(n,s),...Vt(e,n)])}function la(t,e){const n=e.getTypes();n.length===0&&t.reportError(`Union type ${e.name} must define one or more member types.`,[e.astNode,...e.extensionASTNodes]);const r=Object.create(null);for(const s of n){if(r[s.name]){t.reportError(`Union type ${e.name} can only include type ${s.name} once.`,Qr(e,s.name));continue}r[s.name]=!0,W(s)||t.reportError(`Union type ${e.name} can only include Object types, it cannot include ${N(s)}.`,Qr(e,String(s)))}}function ua(t,e){const n=e.getValues();n.length===0&&t.reportError(`Enum type ${e.name} must define one or more values.`,[e.astNode,...e.extensionASTNodes]);for(const r of n)rt(t,r)}function ca(t,e){const n=Object.values(e.getFields());n.length===0&&t.reportError(`Input Object type ${e.name} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(const i of n){if(rt(t,i),!Ie(i.type)){var r;t.reportError(`The type of ${e.name}.${i.name} must be Input Type but got: ${N(i.type)}.`,(r=i.astNode)===null||r===void 0?void 0:r.type)}if(Ws(i)&&i.deprecationReason!=null){var s;t.reportError(`Required input field ${e.name}.${i.name} cannot be deprecated.`,[Ir(i.astNode),(s=i.astNode)===null||s===void 0?void 0:s.type])}e.isOneOf&&pa(e,i,t)}}function pa(t,e,n){if(L(e.type)){var r;n.reportError(`OneOf input field ${t.name}.${e.name} must be nullable.`,(r=e.astNode)===null||r===void 0?void 0:r.type)}e.defaultValue!==void 0&&n.reportError(`OneOf input field ${t.name}.${e.name} cannot have a default value.`,e.astNode)}function fa(t){const e=Object.create(null),n=[],r=Object.create(null);return s;function s(i){if(e[i.name])return;e[i.name]=!0,r[i.name]=n.length;const o=Object.values(i.getFields());for(const a of o)if(L(a.type)&&ue(a.type.ofType)){const l=a.type.ofType,u=r[l.name];if(n.push(a),u===void 0)s(l);else{const c=n.slice(u),f=c.map(p=>p.name).join(".");t.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${f}".`,c.map(p=>p.astNode))}n.pop()}r[i.name]=void 0}}function Vt(t,e){const{astNode:n,extensionASTNodes:r}=t;return(n!=null?[n,...r]:r).flatMap(s=>{var i;return(i=s.interfaces)!==null&&i!==void 0?i:[]}).filter(s=>s.name.value===e.name)}function Qr(t,e){const{astNode:n,extensionASTNodes:r}=t;return(n!=null?[n,...r]:r).flatMap(s=>{var i;return(i=s.types)!==null&&i!==void 0?i:[]}).filter(s=>s.name.value===e)}function Ir(t){var e;return t==null||(e=t.directives)===null||e===void 0?void 0:e.find(n=>n.name.value===ei.name)}function pe(t,e){switch(e.kind){case d.LIST_TYPE:{const n=pe(t,e.type);return n&&new ne(n)}case d.NON_NULL_TYPE:{const n=pe(t,e.type);return n&&new D(n)}case d.NAMED_TYPE:return t.getType(e.name.value)}}class pi{constructor(e,n,r){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??da,n&&(Ie(n)&&this._inputTypeStack.push(n),Ue(n)&&this._parentTypeStack.push(n),dn(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}
5getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const n=this._schema;switch(e.kind){case d.SELECTION_SET:{const s=Ee(this.getType());this._parentTypeStack.push(Ue(s)?s:void 0);break}case d.FIELD:{const s=this.getParentType();let i,o;s&&(i=this._getFieldDef(n,s,e),i&&(o=i.type)),this._fieldDefStack.push(i),this._typeStack.push(dn(o)?o:void 0);break}case d.DIRECTIVE:this._directive=n.getDirective(e.name.value);break;case d.OPERATION_DEFINITION:{const s=n.getRootType(e.operation);this._typeStack.push(W(s)?s:void 0);break}case d.INLINE_FRAGMENT:case d.FRAGMENT_DEFINITION:{const s=e.typeCondition,i=s?pe(n,s):Ee(this.getType());this._typeStack.push(dn(i)?i:void 0);break}case d.VARIABLE_DEFINITION:{const s=pe(n,e.type);this._inputTypeStack.push(Ie(s)?s:void 0);break}case d.ARGUMENT:{var r;let s,i;const o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(s=o.args.find(a=>a.name===e.name.value),s&&(i=s.type)),this._argument=s,this._defaultValueStack.push(s?s.defaultValue:void 0),this._inputTypeStack.push(Ie(i)?i:void 0);break}case d.LIST:{const s=zs(this.getInputType()),i=se(s)?s.ofType:s;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Ie(i)?i:void 0);break}case d.OBJECT_FIELD:{const s=Ee(this.getInputType());let i,o;ue(s)&&(o=s.getFields()[e.name.value],o&&(i=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(Ie(i)?i:void 0);break}case d.ENUM:{const s=Ee(this.getInputType());let i;wt(s)&&(i=s.getValue(e.value)),this._enumValue=i;break}}}leave(e){switch(e.kind){case d.SELECTION_SET:this._parentTypeStack.pop();break;case d.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case d.DIRECTIVE:this._directive=null;break;case d.OPERATION_DEFINITION:case d.INLINE_FRAGMENT:case d.FRAGMENT_DEFINITION:this._typeStack.pop();break;case d.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case d.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case d.LIST:case d.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case d.ENUM:this._enumValue=null;break}}}function da(t,e,n){const r=n.name.value;if(r===vn.name&&t.getQueryType()===e)return vn;if(r===Tn.name&&t.getQueryType()===e)return Tn;if(r===En.name&&Ue(e))return En;if(W(e)||re(e))return e.getFields()[r]}function fi(t,e){return{enter(...n){const r=n[0];t.enter(r);const s=Br(e,r.kind).enter;if(s){const i=s.apply(e,n);return i!==void 0&&(t.leave(r),xo(i)&&t.enter(i)),i}},leave(...n){const r=n[0],s=Br(e,r.kind).leave;let i;return s&&(i=s.apply(e,n)),t.leave(r),i}}}function ha(t){return t.kind===d.OPERATION_DEFINITION||t.kind===d.FRAGMENT_DEFINITION}function ga(t){return t.kind===d.SCHEMA_DEFINITION||Sr(t)||t.kind===d.DIRECTIVE_DEFINITION}function Sr(t){return t.kind===d.SCALAR_TYPE_DEFINITION||t.kind===d.OBJECT_TYPE_DEFINITION||t.kind===d.INTERFACE_TYPE_DEFINITION||t.kind===d.UNION_TYPE_DEFINITION||t.kind===d.ENUM_TYPE_DEFINITION||t.kind===d.INPUT_OBJECT_TYPE_DEFINITION}function ma(t){return t.kind===d.SCHEMA_EXTENSION||di(t)}function di(t){return t.kind===d.SCALAR_TYPE_EXTENSION||t.kind===d.OBJECT_TYPE_EXTENSION||t.kind===d.INTERFACE_TYPE_EXTENSION||t.kind===d.UNION_TYPE_EXTENSION||t.kind===d.ENUM_TYPE_EXTENSION||t.kind===d.INPUT_OBJECT_TYPE_EXTENSION}function ya(t){return{Document(e){for(const n of e.definitions)if(!ha(n)){const r=n.kind===d.SCHEMA_DEFINITION||n.kind===d.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';t.reportError(new v(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function ba(t){return{Field(e){const n=t.getParentType();if(n&&!t.getFieldDef()){const r=t.getSchema(),s=e.name.value;let i=nt("to use an inline fragment on",va(r,n,s));i===""&&(i=nt(Ta(n,s))),t.reportError(new v(`Cannot query field "${s}" on type "${n.name}".`+i,{nodes:e}))}}}}function va(t,e,n){if(!Re(e))return[];const r=new Set,s=Object.create(null);for(const o of t.getPossibleTypes(e))if(o.getFields()[n]){r.add(o),s[o.name]=1;for(const a of o.getInterfaces()){var i;a.getFields()[n]&&(r.add(a),s[a.name]=((i=s[a.name])!==null&&i!==void 0?i:0)+1)}}return[...r].sort((o,a)=>{const l=s[a.name]-s[o.name];return l!==0?l:re(o)&&t.isSubType(o,a)?-1:re(a)&&t.isSubType(a,o)?1:Dn(o.name,a.name)}).map(o=>o.name)}function Ta(t,e){if(W(t)||re(t)){const n=Object.keys(t.getFields());return xt(e,n)}return[]}function Ea(t){return{InlineFragment(e){const n=e.typeCondition;if(n){const r=pe(t.getSchema(),n);if(r&&!Ue(r)){const s=X(n);t.reportError(new v(`Fragment cannot condition on non composite type "${s}".`,{nodes:n}))}}},FragmentDefinition(e){const n=pe(t.getSchema(),e.typeCondition);if(n&&!Ue(n)){const r=X(e.typeCondition);t.reportError(new v(`Fragment "${e.name.value}" cannot condition on non composite type "${r}".`,{nodes:e.typeCondition}))}}}}function wa(t){return{...Oa(t),Argument(e){const n=t.getArgument(),r=t.getFieldDef(),s=t.getParentType();if(!n&&r&&s){const i=e.name.value,o=r.args.map(l=>
5l.name),a=xt(i,o);t.reportError(new v(`Unknown argument "${i}" on field "${s.name}.${r.name}".`+nt(a),{nodes:e}))}}}}function Oa(t){const e=Object.create(null),n=t.getSchema(),r=n?n.getDirectives():Zt;for(const o of r)e[o.name]=o.args.map(a=>a.name);const s=t.getDocument().definitions;for(const o of s)if(o.kind===d.DIRECTIVE_DEFINITION){var i;const a=(i=o.arguments)!==null&&i!==void 0?i:[];e[o.name.value]=a.map(l=>l.name.value)}return{Directive(o){const a=o.name.value,l=e[a];if(o.arguments&&l)for(const u of o.arguments){const c=u.name.value;if(!l.includes(c)){const f=xt(c,l);t.reportError(new v(`Unknown argument "${c}" on directive "@${a}".`+nt(f),{nodes:u}))}}return!1}}}function xa(t){const e=Object.create(null),n=t.getSchema(),r=n?n.getDirectives():Zt;for(const i of r)e[i.name]=i.locations;const s=t.getDocument().definitions;for(const i of s)i.kind===d.DIRECTIVE_DEFINITION&&(e[i.name.value]=i.locations.map(o=>o.value));return{Directive(i,o,a,l,u){const c=i.name.value,f=e[c];if(!f){t.reportError(new v(`Unknown directive "@${c}".`,{nodes:i}));return}const p=Ia(u);p&&!f.includes(p)&&t.reportError(new v(`Directive "@${c}" may not be used on ${p}.`,{nodes:i}))}}}function Ia(t){const e=t[t.length-1];switch("kind"in e||Ce(),e.kind){case d.OPERATION_DEFINITION:return Sa(e.operation);case d.FIELD:return A.FIELD;case d.FRAGMENT_SPREAD:return A.FRAGMENT_SPREAD;case d.INLINE_FRAGMENT:return A.INLINE_FRAGMENT;case d.FRAGMENT_DEFINITION:return A.FRAGMENT_DEFINITION;case d.VARIABLE_DEFINITION:return A.VARIABLE_DEFINITION;case d.SCHEMA_DEFINITION:case d.SCHEMA_EXTENSION:return A.SCHEMA;case d.SCALAR_TYPE_DEFINITION:case d.SCALAR_TYPE_EXTENSION:return A.SCALAR;case d.OBJECT_TYPE_DEFINITION:case d.OBJECT_TYPE_EXTENSION:return A.OBJECT;case d.FIELD_DEFINITION:return A.FIELD_DEFINITION;case d.INTERFACE_TYPE_DEFINITION:case d.INTERFACE_TYPE_EXTENSION:return A.INTERFACE;case d.UNION_TYPE_DEFINITION:case d.UNION_TYPE_EXTENSION:return A.UNION;case d.ENUM_TYPE_DEFINITION:case d.ENUM_TYPE_EXTENSION:return A.ENUM;case d.ENUM_VALUE_DEFINITION:return A.ENUM_VALUE;case d.INPUT_OBJECT_TYPE_DEFINITION:case d.INPUT_OBJECT_TYPE_EXTENSION:return A.INPUT_OBJECT;case d.INPUT_VALUE_DEFINITION:{const n=t[t.length-3];return"kind"in n||Ce(),n.kind===d.INPUT_OBJECT_TYPE_DEFINITION?A.INPUT_FIELD_DEFINITION:A.ARGUMENT_DEFINITION}default:Ce(!1,"Unexpected kind: "+N(e.kind))}}function Sa(t){switch(t){case he.QUERY:return A.QUERY;case he.MUTATION:return A.MUTATION;case he.SUBSCRIPTION:return A.SUBSCRIPTION}}function _a(t){return{FragmentSpread(e){const n=e.name.value;t.getFragment(n)||t.reportError(new v(`Unknown fragment "${n}".`,{nodes:e.name}))}}}function Na(t){const e=t.getSchema(),n=e?e.getTypeMap():Object.create(null),r=Object.create(null);for(const i of t.getDocument().definitions)Sr(i)&&(r[i.name.value]=!0);const s=[...Object.keys(n),...Object.keys(r)];return{NamedType(i,o,a,l,u){const c=i.name.value;if(!n[c]&&!r[c]){var f;const p=(f=u[2])!==null&&f!==void 0?f:a,h=p!=null&&ka(p);if(h&&Wr.includes(c))return;const m=xt(c,h?Wr.concat(s):s);t.reportError(new v(`Unknown type "${c}".`+nt(m),{nodes:i}))}}}}const Wr=[...zo,...ai].map(t=>t.name);function ka(t){return"kind"in t&&(ga(t)||ma(t))}function Aa(t){let e=0;return{Document(n){e=n.definitions.filter(r=>r.kind===d.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&e>1&&t.reportError(new v("This anonymous operation must be the only defined operation.",{nodes:n}))}}}const Ca=3;function Ra(t){function e(n,r=Object.create(null),s=0){if(n.kind===d.FRAGMENT_SPREAD){const i=n.name.value;if(r[i]===!0)return!1;const o=t.getFragment(i);if(!o)return!1;try{return r[i]=!0,e(o,r,s)}finally{r[i]=void 0}}if(n.kind===d.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(s++,s>=Ca))return!0;if("selectionSet"in n&&n.selectionSet){for(const i of n.selectionSet.selections)if(e(i,r,s))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&e(n))return t.reportError(new v("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function Fa(t){const e=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(i){return s(i),!1}};function s(i){if(e[i.name.value])return;const o=i.name.value;e[o]=!0;const a=t.getFragmentSpreads(i.selectionSet);if(a.length!==0){r[o]=n.length;for(const l of a){const u=l.name.value,c=r[u];if(n.push(l),c===void 0){const f=t.getFragment(u);f&&s(f)}else{const f=n.slice(c),p=f.slice(0,-1).map(h=>'"'+h.name.value+'"').join(", ");t.reportError(new v(`Cannot spread fragment "${u}" within itself`+(p!==""?` via ${p}.`:"."),{nodes:f}))}n.pop()}r[o]=void 0}}}function $a(t){let e=Object.create(null);return{OperationDefinition:{enter(){e=Object.create(null)},leave(n){const r=t.getRecursiveVariableUsages(n);for(const{node:s}of r){const i=s.name.value;e[i]!==!0&&t.reportError(new v(n.name?`Variable "$${i}" is not defined by operation "${n.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[s,n]}))}}},VariableDefinition(n){e[n.variable.name.value]=!0}}}function Da(t){const e=[],n=[];return{OperationDefinition(r){return e.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const s of e)for(const i of t.getRecursivelyReferencedFragments(s))r[i.name.value]=!0;for(const s of n){const i=s.name.value;r[i]!==!0&&t.reportError(new v(`Fragment "${i}" is never used.`,{nodes:s}))}}}}}function Pa(t){let e=[];return{OperationDefinition:{enter(){e=[]},leave(n){const r=Object.create(null),s=t.getRecursiveVariableUsages(n);for(const{node:i}of s)r[i.name.value]=!0;for(const i of e){const o=i.variable.name.value;r[o]!==!0&&t.reportError(new v(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:i}))}}},VariableDefinition(n){e.push(n)}}}function _r(t){switch(t.kind){case d.OBJECT:return{...t,fields:ja(t.fields)};case d.LIST:return{...t,values:t.values.map(_r)};case d.INT:case d.FLOAT:case d.STRING:case d.BOOLEAN:case d.NULL:case d.ENUM:case d.
5VARIABLE:return t}}function ja(t){return t.map(e=>({...e,value:_r(e.value)})).sort((e,n)=>Dn(e.name.value,n.name.value))}function hi(t){return Array.isArray(t)?t.map(([e,n])=>`subfields "${e}" conflict because `+hi(n)).join(" and "):t}function La(t){const e=new yi,n=new Ga,r=new Map;return{SelectionSet(s){const i=Ua(t,r,e,n,t.getParentType(),s);for(const[[o,a],l,u]of i){const c=hi(a);t.reportError(new v(`Fields "${o}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:l.concat(u)}))}}}}function Ua(t,e,n,r,s,i){const o=[],[a,l]=xn(t,e,s,i);if(qa(t,o,e,n,r,a),l.length!==0)for(let u=0;u<l.length;u++){wn(t,o,e,n,r,!1,a,l[u]);for(let c=u+1;c<l.length;c++)On(t,o,e,n,r,!1,l[u],l[c])}return o}function wn(t,e,n,r,s,i,o,a){if(r.has(o,a,i))return;r.add(o,a,i);const l=t.getFragment(a);if(!l)return;const[u,c]=fr(t,n,l);if(o!==u){Nr(t,e,n,r,s,i,o,u);for(const f of c)wn(t,e,n,r,s,i,o,f)}}function On(t,e,n,r,s,i,o,a){if(o===a||s.has(o,a,i))return;s.add(o,a,i);const l=t.getFragment(o),u=t.getFragment(a);if(!l||!u)return;const[c,f]=fr(t,n,l),[p,h]=fr(t,n,u);Nr(t,e,n,r,s,i,c,p);for(const m of h)On(t,e,n,r,s,i,o,m);for(const m of f)On(t,e,n,r,s,i,m,a)}function Ma(t,e,n,r,s,i,o,a,l){const u=[],[c,f]=xn(t,e,i,o),[p,h]=xn(t,e,a,l);Nr(t,u,e,n,r,s,c,p);for(const m of h)wn(t,u,e,n,r,s,c,m);for(const m of f)wn(t,u,e,n,r,s,p,m);for(const m of f)for(const w of h)On(t,u,e,n,r,s,m,w);return u}function qa(t,e,n,r,s,i){for(const[o,a]of Object.entries(i))if(a.length>1)for(let l=0;l<a.length;l++)for(let u=l+1;u<a.length;u++){const c=gi(t,n,r,s,!1,o,a[l],a[u]);c&&e.push(c)}}function Nr(t,e,n,r,s,i,o,a){for(const[l,u]of Object.entries(o)){const c=a[l];if(c)for(const f of u)for(const p of c){const h=gi(t,n,r,s,i,l,f,p);h&&e.push(h)}}}function gi(t,e,n,r,s,i,o,a){const[l,u,c]=o,[f,p,h]=a,m=s||l!==f&&W(l)&&W(f);if(!m){const E=u.name.value,S=p.name.value;if(E!==S)return[[i,`"${E}" and "${S}" are different fields`],[u],[p]];if(!Va(u,p))return[[i,"they have differing arguments"],[u],[p]]}const w=c?.type,k=h?.type;if(w&&k&&pr(w,k))return[[i,`they return conflicting types "${N(w)}" and "${N(k)}"`],[u],[p]];const T=u.selectionSet,$=p.selectionSet;if(T&&$){const E=Ma(t,e,n,r,m,Ee(w),T,Ee(k),$);return Ba(E,i,u,p)}}function Va(t,e){const n=t.arguments,r=e.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return!1;const s=new Map(r.map(({name:i,value:o})=>[i.value,o]));return n.every(i=>{const o=i.value,a=s.get(i.name.value);return a===void 0?!1:zr(o)===zr(a)})}function zr(t){return X(_r(t))}function pr(t,e){return se(t)?se(e)?pr(t.ofType,e.ofType):!0:se(e)?!0:L(t)?L(e)?pr(t.ofType,e.ofType):!0:L(e)?!0:Le(t)||Le(e)?t!==e:!1}function xn(t,e,n,r){const s=e.get(r);if(s)return s;const i=Object.create(null),o=Object.create(null);mi(t,n,r,i,o);const a=[i,Object.keys(o)];return e.set(r,a),a}function fr(t,e,n){const r=e.get(n.selectionSet);if(r)return r;const s=pe(t.getSchema(),n.typeCondition);return xn(t,e,s,n.selectionSet)}function mi(t,e,n,r,s){for(const i of n.selections)switch(i.kind){case d.FIELD:{const o=i.name.value;let a;(W(e)||re(e))&&(a=e.getFields()[o]);const l=i.alias?i.alias.value:o;r[l]||(r[l]=[]),r[l].push([e,i,a]);break}case d.FRAGMENT_SPREAD:s[i.name.value]=!0;break;case d.INLINE_FRAGMENT:{const o=i.typeCondition,a=o?pe(t.getSchema(),o):e;mi(t,a,i.selectionSet,r,s);break}}}function Ba(t,e,n,r){if(t.length>0)return[[e,t.map(([s])=>s)],[n,...t.map(([,s])=>s).flat()],[r,...t.map(([,,s])=>s).flat()]]}class yi{constructor(){this._data=new Map}has(e,n,r){var s;const i=(s=this._data.get(e))===null||s===void 0?void 0:s.get(n);return i===void 0?!1:r?!0:r===i}add(e,n,r){const s=this._data.get(e);s===void 0?this._data.set(e,new Map([[n,r]])):s.set(n,r)}}class Ga{constructor(){this._orderedPairSet=new yi}has(e,n,r){return e<n?this._orderedPairSet.has(e,n,r):this._orderedPairSet.has(n,e,r)}add(e,n,r){e<n?this._orderedPairSet.add(e,n,r):this._orderedPairSet.add(n,e,r)}}function Ha(t){return{InlineFragment(e){const n=t.getType(),r=t.getParentType();if(Ue(n)&&Ue(r)&&!Gr(t.getSchema(),n,r)){const s=N(r),i=N(n);t.reportError(new v(`Fragment cannot be spread here as objects of type "${s}" can never be of type "${i}".`,{nodes:e}))}},FragmentSpread(e){const n=e.name.value,r=Qa(t,n),s=t.getParentType();if(r&&s&&!Gr(t.getSchema(),r,s)){const i=N(s),o=N(r);t.reportError(new v(`Fragment "${n}" cannot be spread here as objects of type "${i}" can never be of type "${o}".`,{nodes:e}))}}}}function Qa(t,e){const n=t.getFragment(e);
5if(n){const r=pe(t.getSchema(),n.typeCondition);if(Ue(r))return r}}function Wa(t){return{...za(t),Field:{leave(e){var n;const r=t.getFieldDef();if(!r)return!1;const s=new Set((n=e.arguments)===null||n===void 0?void 0:n.map(i=>i.name.value));for(const i of r.args)if(!s.has(i.name)&&Kt(i)){const o=N(i.type);t.reportError(new v(`Field "${r.name}" argument "${i.name}" of type "${o}" is required, but it was not provided.`,{nodes:e}))}}}}}function za(t){var e;const n=Object.create(null),r=t.getSchema(),s=(e=r?.getDirectives())!==null&&e!==void 0?e:Zt;for(const a of s)n[a.name]=zt(a.args.filter(Kt),l=>l.name);const i=t.getDocument().definitions;for(const a of i)if(a.kind===d.DIRECTIVE_DEFINITION){var o;const l=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=zt(l.filter(Ya),u=>u.name.value)}return{Directive:{leave(a){const l=a.name.value,u=n[l];if(u){var c;const f=(c=a.arguments)!==null&&c!==void 0?c:[],p=new Set(f.map(h=>h.name.value));for(const[h,m]of Object.entries(u))if(!p.has(h)){const w=Uo(m.type)?N(m.type):X(m.type);t.reportError(new v(`Directive "@${l}" argument "${h}" of type "${w}" is required, but it was not provided.`,{nodes:a}))}}}}}}function Ya(t){return t.type.kind===d.NON_NULL_TYPE&&t.defaultValue==null}function Ja(t){return{Field(e){const n=t.getType(),r=e.selectionSet;if(n)if(Le(Ee(n))){if(r){const s=e.name.value,i=N(n);t.reportError(new v(`Field "${s}" must not have a selection since type "${i}" has no subfields.`,{nodes:r}))}}else if(r){if(r.selections.length===0){const s=e.name.value,i=N(n);t.reportError(new v(`Field "${s}" of type "${i}" must have at least one field selected.`,{nodes:e}))}}else{const s=e.name.value,i=N(n);t.reportError(new v(`Field "${s}" of type "${i}" must have a selection of subfields. Did you mean "${s} { ... }"?`,{nodes:e}))}}}}function Ka(t){return t.map(e=>typeof e=="number"?"["+e.toString()+"]":"."+e).join("")}function Yr(t,e,n){return{prev:t,key:e,typename:n}}function Ne(t){const e=[];let n=t;for(;n;)e.push(n.key),n=n.prev;return e.reverse()}function Xa(t,e,n=Za){return Lt(t,e,n,void 0)}function Za(t,e,n){let r="Invalid value "+N(e);throw t.length>0&&(r+=` at "value${Ka(t)}"`),n.message=r+": "+n.message,n}function Lt(t,e,n,r){if(L(e)){if(t!=null)return Lt(t,e.ofType,n,r);n(Ne(r),t,new v(`Expected non-nullable type "${N(e)}" not to be null.`));return}if(t==null)return null;if(se(e)){const s=e.ofType;return ti(t)?Array.from(t,(i,o)=>{const a=Yr(r,o,void 0);return Lt(i,s,n,a)}):[Lt(t,s,n,r)]}if(ue(e)){if(!je(t)||Array.isArray(t)){n(Ne(r),t,new v(`Expected type "${e.name}" to be an object.`));return}const s={},i=e.getFields();for(const o of Object.values(i)){const a=t[o.name];if(a===void 0){if(o.defaultValue!==void 0)s[o.name]=o.defaultValue;else if(L(o.type)){const l=N(o.type);n(Ne(r),t,new v(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}s[o.name]=Lt(a,o.type,n,Yr(r,o.name,e.name))}for(const o of Object.keys(t))if(!i[o]){const a=xt(o,Object.keys(e.getFields()));n(Ne(r),t,new v(`Field "${o}" is not defined by type "${e.name}".`+nt(a)))}if(e.isOneOf){const o=Object.keys(s);o.length!==1&&n(Ne(r),t,new v(`Exactly one key must be specified for OneOf type "${e.name}".`));const a=o[0],l=s[a];l===null&&n(Ne(r).concat(a),l,new v(`Field "${a}" must be non-null.`))}return s}if(Le(e)){let s;try{s=e.parseValue(t)}catch(i){i instanceof v?n(Ne(r),t,i):n(Ne(r),t,new v(`Expected type "${e.name}". `+i.message,{originalError:i}));return}return s===void 0&&n(Ne(r),t,new v(`Expected type "${e.name}".`)),s}Ce(!1,"Unexpected input type: "+N(e))}function Ze(t,e,n){if(t){if(t.kind===d.VARIABLE){const r=t.name.value;if(n==null||n[r]===void 0)return;const s=n[r];return s===null&&L(e)?void 0:s}if(L(e))return t.kind===d.NULL?void 0:Ze(t,e.ofType,n);if(t.kind===d.NULL)return null;if(se(e)){const r=e.ofType;if(t.kind===d.LIST){const i=[];for(const o of t.values)if(Jr(o,n)){if(L(r))return;i.push(null)}else{const a=Ze(o,r,n);if(a===void 0)return;i.push(a)}return i}const s=Ze(t,r,n);return s===void 0?void 0:[s]}if(ue(e)){if(t.kind!==d.OBJECT)return;const r=Object.create(null),s=zt(t.fields,i=>i.name.value);for(const i of Object.values(e.getFields())){const o=s[i.name];if(!o||Jr(o.value,n)){if(i.defaultValue!==void 0)r[i.name]=i.defaultValue;else if(L(i.type))return;continue}const a=Ze(o.value,i.type,n);if(a===void 0)return;r[i.name]=a}if(e.isOneOf){const i=Object.keys(r);if(i.length!==1||r[i[0]]===null)return}return r}if(Le(e)){let r;try{r=e.parseLiteral(t,n)}catch{return}return r===void 0?void 0:r}Ce(!1,"Unexpected input type: "+N(e))}}function Jr(t,e){return t.kind===d.VARIABLE&&(e==null||e[t.name.value]===void 0)}function el(t,e,n){var r;const s={},i=(r=e.arguments)!==null&&r!==void 0?r:[],o=zt(i,a=>a.name.value);for(const a of t.args){const l=a.name,u=a.type,c=o[l];if(!c){if(a.defaultValue!==void 0)s[l]=a.defaultValue;else if(L(u))throw new v(`Argument "${l}" of required type "${N(u)}" was not provided.`,{nodes:e});continue}const f=c.value;let p=f.kind===d.NULL;if(f.kind===d.VARIABLE){const m=f.name.value;if(n==null||!tl(n,m)){if(a.defaultValue!==void 0)s[l]=a.defaultValue;else if(L(u))throw new v(`Argument "${l}" of required type "${N(u)}" was provided the variable "$${m}" which was not provided a runtime value.`,{nodes:f});continue}p=n[m]==null}if(p&&L(u))throw new v(`Argument "${l}" of non-null type "${N(u)}" must not be null.`,{nodes:f});const h=Ze(f,u,n);if(h===void 0)throw new v(`Argument "${l}
5" has invalid value ${X(f)}.`,{nodes:f});s[l]=h}return s}function Ot(t,e,n){var r;const s=(r=e.directives)===null||r===void 0?void 0:r.find(i=>i.name.value===t.name);if(s)return el(t,s,n)}function tl(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function nl(t,e,n,r,s){const i=new Map;return dr(t,e,n,r,s,i,new Set),i}function dr(t,e,n,r,s,i,o){for(const a of s.selections)switch(a.kind){case d.FIELD:{if(!Zn(n,a))continue;const l=rl(a),u=i.get(l);u!==void 0?u.push(a):i.set(l,[a]);break}case d.INLINE_FRAGMENT:{if(!Zn(n,a)||!Kr(t,a,r))continue;dr(t,e,n,r,a.selectionSet,i,o);break}case d.FRAGMENT_SPREAD:{const l=a.name.value;if(o.has(l)||!Zn(n,a))continue;o.add(l);const u=e[l];if(!u||!Kr(t,u,r))continue;dr(t,e,n,r,u.selectionSet,i,o);break}}}function Zn(t,e){return Ot(wr,e,t)?.if===!0?!1:Ot(Er,e,t)?.if!==!1}function Kr(t,e,n){const r=e.typeCondition;if(!r)return!0;const s=pe(t,r);return s===n?!0:Re(s)?t.isSubType(s,n):!1}function rl(t){return t.alias?t.alias.value:t.name.value}function sl(t){return{OperationDefinition(e){if(e.operation==="subscription"){const n=t.getSchema(),r=n.getSubscriptionType();if(r){const s=e.name?e.name.value:null,i=Object.create(null),o=t.getDocument(),a=Object.create(null);for(const u of o.definitions)u.kind===d.FRAGMENT_DEFINITION&&(a[u.name.value]=u);const l=nl(n,a,i,r,e.selectionSet);if(l.size>1){const u=[...l.values()].slice(1).flat();t.reportError(new v(s!=null?`Subscription "${s}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:u}))}for(const u of l.values())u[0].name.value.startsWith("__")&&t.reportError(new v(s!=null?`Subscription "${s}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:u}))}}}}}function bi(t,e){const n=new Map;for(const r of t){const s=e(r),i=n.get(s);i===void 0?n.set(s,[r]):i.push(r)}return n}function il(t){return{Field:e,Directive:e};function e(n){var r;const s=(r=n.arguments)!==null&&r!==void 0?r:[],i=bi(s,o=>o.name.value);for(const[o,a]of i)a.length>1&&t.reportError(new v(`There can be only one argument named "${o}".`,{nodes:a.map(l=>l.name)}))}}function ol(t){const e=Object.create(null),n=t.getSchema(),r=n?n.getDirectives():Zt;for(const a of r)e[a.name]=!a.isRepeatable;const s=t.getDocument().definitions;for(const a of s)a.kind===d.DIRECTIVE_DEFINITION&&(e[a.name.value]=!a.repeatable);const i=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let l;if(a.kind===d.SCHEMA_DEFINITION||a.kind===d.SCHEMA_EXTENSION)l=i;else if(Sr(a)||di(a)){const u=a.name.value;l=o[u],l===void 0&&(o[u]=l=Object.create(null))}else l=Object.create(null);for(const u of a.directives){const c=u.name.value;e[c]&&(l[c]?t.reportError(new v(`The directive "@${c}" can only be used once at this location.`,{nodes:[l[c],u]})):l[c]=u)}}}}function al(t){const e=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return e[r]?t.reportError(new v(`There can be only one fragment named "${r}".`,{nodes:[e[r],n.name]})):e[r]=n.name,!1}}}function ll(t){const e=[];let n=Object.create(null);return{ObjectValue:{enter(){e.push(n),n=Object.create(null)},leave(){const r=e.pop();r||Ce(),n=r}},ObjectField(r){const s=r.name.value;n[s]?t.reportError(new v(`There can be only one input field named "${s}".`,{nodes:[n[s],r.name]})):n[s]=r.name}}}function ul(t){const e=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(e[r.value]?t.reportError(new v(`There can be only one operation named "${r.value}".`,{nodes:[e[r.value],r]})):e[r.value]=r),!1},FragmentDefinition:()=>!1}}function cl(t){return{OperationDefinition(e){var n;const r=(n=e.variableDefinitions)!==null&&n!==void 0?n:[],s=bi(r,i=>i.variable.name.value);for(const[i,o]of s)o.length>1&&t.reportError(new v(`There can be only one variable named "$${i}".`,{nodes:o.map(a=>a.variable.name)}))}}}function pl(t){let e={};return{OperationDefinition:{enter(){e={}}},VariableDefinition(n){e[n.variable.name.value]=n}
5,ListValue(n){const r=zs(t.getParentInputType());if(!se(r))return Ge(t,n),!1},ObjectValue(n){const r=Ee(t.getInputType());if(!ue(r))return Ge(t,n),!1;const s=zt(n.fields,i=>i.name.value);for(const i of Object.values(r.getFields()))if(!s[i.name]&&Ws(i)){const o=N(i.type);t.reportError(new v(`Field "${r.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:n}))}r.isOneOf&&fl(t,n,r,s,e)},ObjectField(n){const r=Ee(t.getParentInputType());if(!t.getInputType()&&ue(r)){const s=xt(n.name.value,Object.keys(r.getFields()));t.reportError(new v(`Field "${n.name.value}" is not defined by type "${r.name}".`+nt(s),{nodes:n}))}},NullValue(n){const r=t.getInputType();L(r)&&t.reportError(new v(`Expected value of type "${N(r)}", found ${X(n)}.`,{nodes:n}))},EnumValue:n=>Ge(t,n),IntValue:n=>Ge(t,n),FloatValue:n=>Ge(t,n),StringValue:n=>Ge(t,n),BooleanValue:n=>Ge(t,n)}}function Ge(t,e){const n=t.getInputType();if(!n)return;const r=Ee(n);if(!Le(r)){const s=N(n);t.reportError(new v(`Expected value of type "${s}", found ${X(e)}.`,{nodes:e}));return}try{if(r.parseLiteral(e,void 0)===void 0){const s=N(n);t.reportError(new v(`Expected value of type "${s}", found ${X(e)}.`,{nodes:e}))}}catch(s){const i=N(n);s instanceof v?t.reportError(s):t.reportError(new v(`Expected value of type "${i}", found ${X(e)}; `+s.message,{nodes:e,originalError:s}))}}function fl(t,e,n,r,s){var i;const o=Object.keys(r);if(o.length!==1){t.reportError(new v(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[e]}));return}const a=(i=r[o[0]])===null||i===void 0?void 0:i.value,l=!a||a.kind===d.NULL,u=a?.kind===d.VARIABLE;if(l){t.reportError(new v(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[e]}));return}if(u){const c=a.name.value;s[c].type.kind!==d.NON_NULL_TYPE&&t.reportError(new v(`Variable "${c}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[e]}))}}function dl(t){return{VariableDefinition(e){const n=pe(t.getSchema(),e.type);if(n!==void 0&&!Ie(n)){const r=e.variable.name.value,s=X(e.type);t.reportError(new v(`Variable "$${r}" cannot be non-input type "${s}".`,{nodes:e.type}))}}}}function hl(t){let e=Object.create(null);return{OperationDefinition:{enter(){e=Object.create(null)},leave(n){const r=t.getRecursiveVariableUsages(n);for(const{node:s,type:i,defaultValue:o,parentType:a}of r){const l=s.name.value,u=e[l];if(u&&i){const c=t.getSchema(),f=pe(c,u.type);if(f&&!gl(c,f,u.defaultValue,i,o)){const p=N(f),h=N(i);t.reportError(new v(`Variable "$${l}" of type "${p}" used in position expecting type "${h}".`,{nodes:[u,s]}))}ue(a)&&a.isOneOf&&Po(f)&&t.reportError(new v(`Variable "$${l}" is of type "${f}" but must be non-nullable to be used for OneOf Input Object "${a}".`,{nodes:[u,s]}))}}}},VariableDefinition(n){e[n.variable.name.value]=n}}}function gl(t,e,n,r,s){if(L(r)&&!L(e)){if(!(n!=null&&n.kind!==d.NULL)&&s===void 0)return!1;const i=r.ofType;return bt(t,e,i)}return bt(t,e,r)}const ml=Object.freeze([Ra]),vi=Object.freeze([ya,ul,Aa,sl,Na,Ea,dl,Ja,ba,al,_a,Da,Ha,Fa,cl,$a,Pa,xa,ol,wa,il,pl,Wa,hl,La,ll,...ml]);class yl{constructor(e,n){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===d.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[e]}getFragmentSpreads(e){let n=this._fragmentSpreads.get(e);if(!n){n=[];const r=[e];let s;for(;s=r.pop();)for(const i of s.selections)i.kind===d.FRAGMENT_SPREAD?n.push(i):i.selectionSet&&r.push(i.selectionSet);this._fragmentSpreads.set(e,n)}return n}getRecursivelyReferencedFragments(e){let n=this._recursivelyReferencedFragments.get(e);if(!n){n=[];const r=Object.create(null),s=[e.selectionSet];let i;for(;i=s.pop();)for(const o of this.getFragmentSpreads(i)){const a=o.name.value;if(r[a]!==!0){r[a]=!0;const l=this.getFragment(a);l&&(n.push(l),s.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(e,n)}return n}}class bl extends yl{constructor(e,n,r,s){super(n,s),this._schema=e,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let n=this._variableUsages.get(e);if(!n){const r=[],s=new pi(this._schema);Ys(e,fi(s,{VariableDefinition:()=>!1,Variable(i){r.push({node:i,type:s.getInputType(),defaultValue:s.getDefaultValue(),parentType:s.getParentInputType()})}})),n=r,this._variableUsages.set(e,n)}return n}getRecursiveVariableUsages(e){let n=this._recursiveVariableUsages.get(e);if(!n){n=this.getVariableUsages(e);for(const r of this.getRecursivelyReferencedFragments(e))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(e,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function vl(t,e,n=vi,r,s=new pi(t)){var i;const o=(i=r?.maxErrors)!==null&&i!==void 0?i:100;e||Xe(!1,"Must provide document."),ci(t);const a=Object.freeze({}),l=[],u=new bl(t,e,s,f=>{if(l.length>=o)throw l.push(new v("Too many validation errors, error limit reached. Validation aborted.")),a;l.push(f)}),c=jo(n.map(f=>f(u)));try{Ys(e,fi(s,c))}catch(f){if(f!==a)throw f}return l}function Tl(t){return t instanceof Error?t:new El(t)}
5class El extends Error{constructor(e){super("Unexpected error value: "+N(e)),this.name="NonErrorThrown",this.thrownValue=e}}function ae(t,e,n){var r;const s=Tl(t);return wl(s)?s:new v(s.message,{nodes:(r=s.nodes)!==null&&r!==void 0?r:e,source:s.source,positions:s.positions,path:n,originalError:s})}function wl(t){return Array.isArray(t.path)}const Xr=function(t,e,n,r){if(je(t)&&typeof t.__typename=="string")return t.__typename;const s=n.schema.getPossibleTypes(r),i=[];for(let o=0;o<s.length;o++){const a=s[o];if(a.isTypeOf){const l=a.isTypeOf(t,e,n);if(Ho(l))i[o]=l;else if(l)return a.name}}if(i.length)return Promise.all(i).then(o=>{for(let a=0;a<o.length;a++)if(o[a])return s[a].name})},gn=function(t,e,n,r){if(je(t)||typeof t=="function"){const s=t[r.fieldName];return typeof s=="function"?t[r.fieldName](e,n,r):s}};function kr(t,e){let n=null;for(const s of t.definitions)if(s.kind===d.OPERATION_DEFINITION){var r;if(e==null){if(n)return null;n=s}else if(((r=s.name)===null||r===void 0?void 0:r.value)===e)return s}return n}function Ol(t){const e=t.toConfig(),n=Mo(er(e.types),p=>p.name,f);return new xr({...e,types:Object.values(n),directives:er(e.directives).map(o),query:i(e.query),mutation:i(e.mutation),subscription:i(e.subscription)});function r(p){return se(p)?new ne(r(p.ofType)):L(p)?new D(r(p.ofType)):s(p)}function s(p){return n[p.name]}function i(p){return p&&s(p)}function o(p){const h=p.toConfig();return new $e({...h,locations:Ti(h.locations,m=>m),args:a(h.args)})}function a(p){return sn(p,h=>({...h,type:r(h.type)}))}function l(p){return sn(p,h=>({...h,type:r(h.type),args:h.args&&a(h.args)}))}function u(p){return sn(p,h=>({...h,type:r(h.type)}))}function c(p){return er(p).map(s)}function f(p){if(Qs(p)||li(p))return p;if(W(p)){const h=p.toConfig();return new de({...h,interfaces:()=>c(h.interfaces),fields:()=>l(h.fields)})}if(re(p)){const h=p.toConfig();return new pt({...h,interfaces:()=>c(h.interfaces),fields:()=>l(h.fields)})}if(Et(p)){const h=p.toConfig();return new Pt({...h,types:()=>c(h.types)})}if(wt(p)){const h=p.toConfig();return new Wt({...h,values:sn(h.values,m=>m)})}if(ue(p)){const h=p.toConfig();return new hn({...h,fields:()=>u(h.fields)})}Ce(!1,"Unexpected type: "+N(p))}}function sn(t,e){const n=Object.create(null);for(const r of Object.keys(t).sort(Dn))n[r]=e(t[r]);return n}function er(t){return Ti(t,e=>e.name)}
5function Ti(t,e){return t.slice().sort((n,r)=>{const s=e(n),i=e(r);return Dn(s,i)})}const Un="@whatwg-node/promise-helpers/FakePromise";function In(t){return t?.then!=null}function xl(t){const e=t;return e&&e.then&&e.catch&&e.finally}function oe(t,e,n,r){let s=Te().then(t).then(e,n);return kl(s)}function Te(t){return t&&xl(t)?t:In(t)?{then:(e,n)=>Te(t.then(e,n)),catch:e=>Te(t.then(n=>n,e)),finally:e=>Te(e?Nl(t,e):t),[Symbol.toStringTag]:"Promise"}:{then(e){if(e)try{return Te(e(t))}catch(n){return vt(n)}return this},catch(){return this},finally(e){if(e)try{return Te(e()).then(()=>t,()=>t)}catch(n){return vt(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:t,[Symbol.for(Un)]:"resolved"}}function He(t,e,n){if(t?.length===0)return;const r=t[Symbol.iterator]();let s=0;function i(){const{done:o,value:a}=r.next();if(o)return;let l=!1;function u(){l=!0}return oe(function(){return e(a,u,s++)},function(c){if(c&&n?.push(c),!l)return i()})}return i()}function vt(t){return{then(e,n){if(n)try{return Te(n(t))}catch(r){return vt(r)}return this},catch(e){if(e)try{return Te(e(t))}catch(n){return vt(n)}return this},finally(e){if(e)try{e()}catch(n){return vt(n)}return this},__fakeRejectError:t,[Symbol.toStringTag]:"Promise",[Symbol.for(Un)]:"rejected"}}function Zr(t,e,n,r){Symbol.asyncIterator in t&&(t=t[Symbol.asyncIterator]());let s,i;typeof t.return=="function"&&(s=t.return,i=l=>{const u=()=>{throw l};return s.call(t).then(u,u)});function o(l){return l.done?l:oe(()=>l.value,u=>oe(()=>e(u),Il,i))}let a;return{next(){return t.next().then(o,a)},return(){return s?s.call(t).then(o,a):Te({value:void 0,done:!0})},throw(l){return typeof t.throw=="function"?t.throw(l).then(o,a):i?i(l):vt(l)},[Symbol.asyncIterator](){return this}}}function Il(t){return{value:t,done:!1}}function Sl(t){return t?.[Symbol.for(Un)]==="resolved"}function _l(t){return t?.[Symbol.for(Un)]==="rejected"}function Nl(t,e){return"finally"in t?t.finally(e):t.then(n=>{const r=e();return In(r)?r.then(()=>n):n},n=>{const r=e();if(In(r))return r.then(()=>{throw n});throw n})}function kl(t){if(Sl(t))return t.__fakePromiseValue;if(_l(t))throw t.__fakeRejectError;return t}function Ar(t,e){const n={...e,...t};for(const r of Object.keys(n))r in t&&r in e&&(n[r]=(s,i)=>t[r](s,()=>e[r](s,i)));return n}const Sn=t=>({fn(e,n){return e?(...r)=>{let s;return e(t,()=>{s=n(...r)}),s}:n},asyncFn(e,n){return e?(...r)=>{let s;return oe(()=>e(t,()=>(s=n(...r),In(s)?s.then(()=>{}):void 0)),()=>s)}:n}}),Al=new WeakMap,tr=Symbol("ENVELOP_IS_INTROSPECTION");function Cl(t){return(typeof t=="string"?t:t.body).indexOf("__schema")!==-1}function Rl(t){return t.length===1?t[0]:{schema:t[0],document:t[1],rootValue:t[2],contextValue:t[3],variableValues:t[4],operationName:t[5],fieldResolver:t[6],subscribeFieldResolver:t[7]}}const Fl=t=>(...e)=>t(Rl(e));function $l(t){return t.length===1?t[0]:{schema:t[0],document:t[1],rootValue:t[2],contextValue:t[3],variableValues:t[4],operationName:t[5],fieldResolver:t[6],typeResolver:t[7]}}const Dl=t=>(...e)=>t($l(e));function Se(t){return typeof t=="object"&&t!=null&&typeof t[Symbol.asyncIterator]=="function"}function es(t,e){if(Se(t.result))return{onNext:e};e({args:t.args,result:t.result,setResult:t.setResult})}function ts(t,e){const n=t[Symbol.asyncIterator]();let r=!1;const s={[Symbol.asyncIterator](){return s},next(){return n.next().then(i=>(i.done&&r===!1&&(r=!0,e()),i))},return(){const i=n.return?.();return r===!1&&(r=!0,e()),i||Te({done:!0,value:void 0})},throw(i){const o=n.throw?.();if(o)return o;throw i}};return s}function Pl(t,e){const n=t[Symbol.asyncIterator](),r={[Symbol.asyncIterator](){return r},next(){return n.next().catch(s=>(e(s),{done:!0,value:void 0}))},return(){return n.return?.()||Te({done:!0,value:void 0})},throw(s){const i=n.throw?.();if(i)return i;throw s}};return r}function on(t){throw Error(`No \`${t}\` function found! Register it using "useEngine" plugin.`)}function jl({plugins:t}){let e=null,n=!1;const r=()=>on("parse"),s=()=>on("validate"),i=()=>on("execute"),o=()=>on("subscribe");let a;const l=(E,S=-1)=>{if(e!==E&&(e=E,n))for(const[I,O]of t.entries())I!==S&&O.onSchemaChange&&O.onSchemaChange({schema:e,replaceSchema:P=>{l(P,I)}})},u=[];for(let E=0;E<t.length;E++){const S=t[E],I=[];S.onPluginInit?.({plugins:t,addPlugin:O=>{I.push(O)},setSchema:O=>l(O,E),registerContextErrorHandler:O=>u.push(O)}),I.length&&t.splice(E+1,0,...I)}const c={init:[],parse:[],validate:[],subscribe:[],execute:[],context:[]};for(const{onContextBuilding:E,onExecute:S,onParse:I,onSubscribe:O,onValidate:P,onEnveloped:g,instrumentation:y}of t)g&&c.init.push(g),E&&c.context.push(E),S&&c.execute.push(S),I&&c.parse.push(I),O&&c.subscribe.push(O),P&&c.validate.push(P),y&&(a=a?Ar(a,y):y);const f=E=>
5{for(const[S,I]of c.init.entries())I({context:E,extendContext:O=>{E&&Object.assign(E,O)},setSchema:O=>l(O,S)})},p=c.parse.length?E=>(S,I)=>{let O=null,P=r;const g=E,y=[];for(const b of c.parse){const _=b({context:g,extendContext:R=>{Object.assign(g,R)},params:{source:S,options:I},parseFn:P,setParseFn:R=>{P=R},setParsedDocument:R=>{O=R}});_&&y.push(_)}if(O===null)try{O=P(S,I)}catch(b){O=b}for(const b of y)b({context:g,extendContext:_=>{Object.assign(g,_)},replaceParseResult:_=>{O=_},result:O});if(O===null)throw new Error("Failed to parse document.");if(O instanceof Error)throw O;return Al.set(O,S.toString()),O}:()=>r,h=c.validate.length?E=>(S,I,O,P,g)=>{let y=O?[...O]:void 0,b=s,_=null;const R=E,j=[];for(const G of c.validate){const Y=G({context:R,extendContext:M=>{Object.assign(R,M)},params:{schema:S,documentAST:I,rules:y,typeInfo:P,options:g},validateFn:b,addValidationRule:M=>{y||(y=[]),y.push(M)},setValidationFn:M=>{b=M},setResult:M=>{_=M}});Y&&j.push(Y)}if(_||(_=b(S,I,y,P,g)),!_)return;const q=_.length===0;for(const G of j)G({valid:q,result:_,context:R,extendContext:Y=>{Object.assign(R,Y)},setResult:Y=>{_=Y}});return _}:()=>s,m=c.context.length?E=>S=>{const I=[],O=E;S&&Object.assign(O,S);let P=!1;return oe(()=>He(c.context,(g,y)=>g({context:O,extendContext:b=>{Object.assign(O,b)},breakContextBuilding:()=>{P=!0,y()}}),I),()=>P?O:oe(()=>He(I,g=>g({context:O,extendContext(y){Object.assign(O,y)}})),()=>O),g=>{let y=g;for(const b of u)b({context:O,error:y,setError:_=>{y=_}});throw y})}:E=>S=>(S&&Object.assign(E,S),E),w=c.subscribe.length,k=Fl(w?E=>{let S=o;const I=[],O=E.contextValue||{};let P;return oe(()=>He(c.subscribe,(g,y)=>g({subscribeFn:S,setSubscribeFn:b=>{S=b},context:O,extendContext:b=>{Object.assign(O,b)},args:E,setResultAndStopExecution:b=>{P=b,y()}}),I),()=>{const g=[],y=[];for(const{onSubscribeResult:b,onSubscribeError:_}of I)b&&g.push(b),_&&y.push(_);return oe(()=>P||S(E),b=>{const _=[],R=[];for(const j of g){const q=j({args:E,result:b,setResult:G=>{b=G}});q&&(q.onNext&&_.push(q.onNext),q.onEnd&&R.push(q.onEnd))}return _.length&&Se(b)&&(b=Zr(b,j=>oe(()=>He(_,q=>q({args:E,result:j,setResult:G=>j=G})),()=>j))),R.length&&Se(b)&&(b=ts(b,()=>{for(const j of R)j()})),y.length&&Se(b)&&(b=Pl(b,j=>{let q=j;for(const G of y)G({error:q,setError:Y=>{q=Y}});throw q})),b})})}:o),T=c.execute.length,$=Dl(T?E=>{let S=i,I;const O=[],P=[],g=E.contextValue||{};return oe(()=>He(c.execute,(y,b)=>y({executeFn:S,setExecuteFn:_=>{S=_},setResultAndStopExecution:_=>{I=_,b()},context:g,extendContext:_=>{if(typeof _=="object")Object.assign(g,_);else throw new Error(`Invalid context extension provided! Expected "object", got: "${JSON.stringify(_)}" (${typeof _})`)},args:E}
5),O),()=>oe(()=>I||S({...E,contextValue:g}),y=>oe(()=>He(O,b=>b.onExecuteDone?.({args:E,result:y,setResult:_=>{y=_}}),P),()=>{const b=[],_=[];for(const{onNext:R,onEnd:j}of P)R&&b.push(R),j&&_.push(j);return b.length&&Se(y)&&(y=Zr(y,R=>oe(()=>He(b,j=>j({args:E,result:R,setResult:q=>{R=q}})),()=>R))),_.length&&Se(y)&&(y=ts(y,()=>{for(const R of _)R()})),y})))}:i);if(n=!0,e)for(const[E,S]of t.entries())S.onSchemaChange?.({schema:e,replaceSchema:I=>l(I,E)});return{getCurrentSchema(){return e},init:f,parse:p,validate:h,execute:$,subscribe:k,contextFactory:m,instrumentation:a}}function Ll(t){return t!=null}function Ul(t){const e=t.plugins.filter(Ll),n=jl({plugins:e}),r=n.instrumentation,s=(i={})=>{const o=Sn({context:i}),a=n;return o.fn(r?.init,n.init)(i),{parse:o.fn(r?.parse,a.parse(i)),validate:o.fn(r?.validate,a.validate(i)),contextFactory:o.fn(r?.context,a.contextFactory(i)),execute:o.asyncFn(r?.execute,a.execute),subscribe:o.asyncFn(r?.subscribe,a.subscribe),schema:a.getCurrentSchema()}};return s._plugins=e,s}const ns={logFn:console.log},Ml=(t=ns)=>{const e={DEFAULT_OPTIONS:ns,...t};return{onParse({extendContext:n,params:r}){e.skipIntrospection&&Cl(r.source)&&n({[tr]:!0})},onExecute({args:n}){if(!n.contextValue[tr])return e.logFn("execute-start",{args:n}),{onExecuteDone:({result:r})=>{e.logFn("execute-end",{args:n,result:r})}}},onSubscribe({args:n}){if(!n.contextValue[tr])return e.logFn("subscribe-start",{args:n}),{onSubscribeResult:({result:r})=>{e.logFn("subscribe-end",{args:n,result:r})}}}}},ql="Unexpected error.";function Vl(t){return t instanceof Error&&t.name==="GraphQLError"}function Ei(t){return Vl(t)?t.originalError!=null?Ei(t.originalError):!0:!1}function Bl(t,e,n){const r=new Error(t);if(r.name="GraphQLError",n){const s=e instanceof Error?{message:e.message,stack:e.stack}:{message:String(e)};Object.defineProperty(r,"extensions",{get(){return s}})}return Object.defineProperty(r,"toJSON",{value(){return{message:r.message,extensions:r.extensions}}}),r}const Gl=t=>(e,n)=>Ei(e)?e:Bl(n,e,t),Hl=globalThis.process?.env?.NODE_ENV==="development",Ql=Gl(Hl),Wl=(t,e)=>({result:n,setResult:r})=>{n.errors!=null&&r({...n,errors:n.errors.map(s=>t(s,e))})};function zl(t){const e=t?.maskError??Ql,n=t?.errorMessage||ql,r=Wl(e,n);return{onPluginInit(s){s.registerContextErrorHandler(({error:i,setError:o})=>{o(e(i,n))})},onExecute(){return{onExecuteDone(s){return es(s,r)}}},onSubscribe(){return{onSubscribeResult(s){return es(s,r)},onSubscribeError({error:s,setError:i}){i(e(s,n))}}}}}const Yl=t=>({onContextBuilding({context:e,extendContext:n}){return oe(()=>t(e),r=>n(r))}}),Jl=t=>({onExecute:({setExecuteFn:e})=>{t.execute&&e(t.execute)},onParse:({setParseFn:e})=>{t.parse&&e(t.parse)},onValidate:({setValidationFn:e,addValidationRule:n})=>{t.validate&&e(t.validate),t.specifiedRules?.map(n)},onSubscribe:({setSubscribeFn:e})=>{t.subscribe&&e(t.subscribe)}});class Mn extends v{constructor(e,n){super(e,n),this.name="PothosError"}}class U extends Mn{constructor(e,n){super(e,n),this.name="PothosSchemaError"}}const rs=Symbol.for("Pothos.contextCache");function Kl(t){const e=new WeakMap,n=(r,...s)=>{const i=r[rs]||r;if(e.has(i))return e.get(i);const o=t(r,...s);return e.set(i,o),o};return n.delete=r=>{const s=r[rs]||r;e.delete(s)},n}function _t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Nt=new WeakMap;class Xl{onTypeConfig(e){return e}onOutputFieldConfig(e){return e}onInputFieldConfig(e){return e}onEnumValueConfig(e){return e}beforeBuild(){}afterBuild(e){return e}wrapResolve(e,n){return e}wrapSubscribe(e,n){return e}wrapResolveType(e,n){return e}wrapIsTypeOf(e,n){return e}runUnique(e,n){if(Nt.has(this.builder)||Nt.set(this.builder,new Map),!Nt.get(this.builder).has(e)){const r=n();return Nt.get(this.builder).set(e,r),r}return Nt.get(this.builder).get(e)}createRequestData(e){throw new Mn("createRequestData not implemented")}requestData(e){return this.requestDataMap(e)}constructor(e,n){_t(this,"name",void 0),_t(this,"builder",void 0),_t(this,"buildCache",void 0),_t(this,"options",void 0),_t(this,"requestDataMap",Kl(r=>this.createRequestData(r))),this.name=n,this.builder=e.builder,this.buildCache=e,this.options=e.options}}function Zl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class eu extends Xl{onTypeConfig(e){return this.plugins.reduceRight((n,r)=>n===null?n:r.onTypeConfig(n),e)}onInputFieldConfig(e){return this.plugins.reduceRight((n,r)=>n===null?n:r.onInputFieldConfig(n),e)}onOutputFieldConfig(e){return this.plugins.reduceRight((n,r)=>n===null?n:r.onOutputFieldConfig(n),e)}onEnumValueConfig(e){return this.plugins.reduceRight((n,r)=>n===null?n:r.onEnumValueConfig(n),e)}beforeBuild(){for(const e of this.plugins)e.beforeBuild()}afterBuild(e){return this.plugins.reduceRight((n,r)=>r.afterBuild(n),e)}wrapResolve(e,n){const r=this.plugins.reduceRight((s,i)=>i.wrapResolve(s,n),e);
5if(n.argMappers.length){const s=n.argMappers;return(i,o,a,l)=>{const u=s.reduce((c,f)=>f(c,a,l),o);return r(i,u,a,l)}}return r}wrapSubscribe(e,n){const r=this.plugins.reduceRight((i,o)=>o.wrapSubscribe(i,n),e);if(!r||!n.argMappers.length)return r;const s=n.argMappers;return(i,o,a,l)=>{const u=s.reduce((c,f)=>f(c,a,l),o);return r(i,u,a,l)}}wrapResolveType(e,n){return this.plugins.reduceRight((r,s)=>s.wrapResolveType(r,n),e)}wrapIsTypeOf(e,n){return this.plugins.reduceRight((r,s)=>s.wrapIsTypeOf(r,n),e)}constructor(e,n){super(e,"PothosMergedPlugin"),Zl(this,"plugins",void 0),this.plugins=n}}const It=Symbol.for("Pothos.outputShapeKey"),en=Symbol.for("Pothos.parentShapeKey"),qn=Symbol.for("Pothos.inputShapeKey"),wi=Symbol.for("Pothos.inputFieldShapeKey"),tu=Symbol.for("Pothos.outputFieldShapeKey"),_n=Symbol.for("Pothos.typeBrandKey");function at(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ee{toString(){return`${this.kind}Ref<${this.name}>`}associate(e){if(this.association&&typeof this.associate!="string")throw new U(`${this} is already associated with ${this.association}`);this.association=e}onConfig(e){this.configCallbacks.add(e),this.currentConfig&&e(this.currentConfig)}updateConfig(e){if(typeof e=="function"){this.onceOnConfig(n=>{this.updateConfig(e(n))});return}this.currentConfig=e;for(const n of this.configCallbacks){if(this.currentConfig!==e)break;n(e)}}prepareForBuild(){this.preparedForBuild=!0}onceOnConfig(e){const n=r=>{this.configCallbacks.delete(n),e(r)};this.onConfig(n)}constructor(e,n,r){at(this,"kind",void 0),at(this,"name",void 0),at(this,"association",null),at(this,"configCallbacks",new Set),at(this,"preparedForBuild",!1),at(this,"currentConfig",void 0),this.kind=e,this.name=n,this.currentConfig=r??null}}function lt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let nu=It,ru=en,su=qn;class Oi extends ee{constructor(e,n){super("Scalar",e,n),lt(this,"kind","Scalar"),lt(this,"$inferType",void 0),lt(this,"$inferInput",void 0),lt(this,nu,void 0),lt(this,ru,void 0),lt(this,su,void 0)}}function iu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ou extends Oi{constructor(e){super(e.name),iu(this,"type",void 0),this.type=e}}function kt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let au=qn;class xi extends ee{constructor(e,n){super("InputList",`InputList<${String(e)}>`),kt(this,"kind","InputList"),kt(this,au,void 0),kt(this,"$inferInput",void 0),kt(this,"listType",void 0),kt(this,"required",void 0),this.listType=e,this.required=n}}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let lu=It,uu=en;class Ii extends ee{constructor(e,n){super("List",`List<${String(e)}>`),ut(this,"kind","List"),ut(this,"$inferType",void 0),ut(this,lu,void 0),ut(this,uu,void 0),ut(this,"listType",void 0),ut(this,"nullable",void 0),this.listType=e,this.nullable=n}}function cu(t){const e={};if(Array.isArray(t))for(const n of t)e[String(n)]={pothosOptions:{}};else for(const[n,r]of Object.entries(t))r&&typeof r=="object"?e[n]={...r,pothosOptions:r}:typeof r=="string"&&(e[r]={pothosOptions:{}});return e}function pu(t,e){const n={};for(const r of Object.keys(t).filter(s=>typeof t[t[s]]!="number"))n[r]={value:t[r],pothosOptions:{},...e?.[r]};return n}function hr(t,e,n){const r=typeof n=="object"?n.items:!1,s=typeof n=="object"?n.list:!!n;if(Array.isArray(t))return{kind:"List",type:hr(t[0],e,r),nullable:s};if(t instanceof Ii)return{kind:"List",type:hr(t.listType,e,t.nullable),nullable:s};const i=e.getOutputTypeRef(t),o=i instanceof ee?i.kind:e.getTypeConfig(i).graphqlKind,a=i instanceof ee?i.name:e.getTypeConfig(i).name;if(o!=="InputObject"&&o!=="List"&&o!=="InputList")return{kind:o,ref:i,nullable:s};throw new U(`Expected input param ${a} to be an output type but got ${o}`)}function Nn(t,e,n){const r=typeof n=="object"?n.items:!0,s=typeof n=="object"?n.list:!!n;if(Array.isArray(t))return{kind:"List",type:Nn(t[0],e,r),required:s};if(t instanceof xi)return{kind:"List",type:Nn(t.listType,e,t.required),required:s};const i=e.getInputTypeRef(t),o=i instanceof ee?i.kind:e.getTypeConfig(i).graphqlKind,a=i instanceof ee?i.name:e.getTypeConfig(i).name;if(o==="InputObject"||o==="Enum"||o==="Scalar")return{kind:o,ref:i,required:s};throw new U(`Expected input param ${a} to be an InputObject, Enum, or Scalar but got ${o}`)}function fu(t){throw new TypeError(`Unexpected value: ${t}`)}function du(t){return!!(t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function")}function ke(t){if(t===void 0)throw new U(`Received undefined as a type ref.
6
7This is often caused by a circular import
8If this ref is imported from a file that re-exports it (like index.ts)
9you may be able to resolve this by importing it directly from the file that defines it.
10`)}function ss(t){if(!(!t||typeof t=="function")){if(!Array.isArray(t))throw new U("interfaces must be an array or function");for(const e of t)if(e===void 0)throw new U(`Received undefined in list of interfaces.
11
12This is often caused by a circular import
13If this ref is imported from a file that re-exports it (like index.ts)
14you may be able to resolve this by importing it directly from the file that defines it.
15
16Alternatively you can define interfaces with a function that will be lazily evaluated,
17which may resolver issues with circular dependencies:
18
19Example:
20builder.objectType('MyObject', {
21  interface: () => [Interface1, Interface2],
22  ...
23});
24`)}}function hu(t){return typeof t=="object"&&t!==null&&_n in t?t[_n]:null}function ye(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class gu{getTypeConfig(e,n){const r=this.configStore.getTypeConfig(e,n);return this.typeConfigs.has(r.name)||this.typeConfigs.set(r.name,this.plugin.onTypeConfig(r)),this.typeConfigs.get(r.name)}getInputTypeFieldConfigs(e){const n=this.getTypeConfig(e,"InputObject"),r=this.t
24ypes.get(n.name);if(!r)throw new U(`Input type ${n.name} has not been built yet`);const s=r.getFields(),i={};for(const a of Object.keys(s)){var o;i[a]=(o=s[a].extensions)===null||o===void 0?void 0:o.pothosConfig}return i}getImplementers(e){if(this.implementers.has(e.name))return this.implementers.get(e.name);const n=[...this.configStore.typeConfigs.values()].filter(r=>r.kind==="Object"&&r.interfaces.find(s=>this.configStore.getTypeConfig(s).name===e.name));return this.implementers.set(e.name,n),n}buildAll(){this.configStore.prepareForBuild();for(const e of this.configStore.typeConfigs.values())(e.kind==="Enum"||e.kind==="Scalar")&&this.buildTypeFromConfig(e);for(const e of this.configStore.typeConfigs.values())e.kind==="InputObject"&&this.buildTypeFromConfig(e);for(const e of this.types.values())e instanceof hn&&e.getFields();for(const e of this.configStore.typeConfigs.values())e.kind==="Interface"&&this.buildTypeFromConfig(e);for(const e of this.configStore.typeConfigs.values())e.kind==="Object"&&this.buildTypeFromConfig(e);for(const e of this.configStore.typeConfigs.values())e.kind==="Union"&&this.buildTypeFromConfig(e);for(const e of this.configStore.typeConfigs.values())(e.kind==="Query"||e.kind==="Mutation"||e.kind==="Subscription")&&this.buildTypeFromConfig(e);for(const e of this.types.values())e instanceof de||e instanceof pt?e.getFields():e instanceof Pt&&e.getTypes()}buildTypeFromConfig(e){const n=this.getTypeConfig(e.name),{name:r}=n;switch(this.typeConfigs.set(r,n),n.kind){case"Enum":this.addType(r,this.buildEnum(n));break;case"InputObject":this.addType(r,this.buildInputObject(n));break;case"Interface":this.addType(r,this.buildInterface(n));break;case"Scalar":this.addType(r,this.buildScalar(n));break;case"Union":this.addType(r,this.buildUnion(n));break;case"Object":case"Query":case"Mutation":case"Subscription":this.addType(r,this.buildObject(n));break;default:fu(n)}}addType(e,n){if(this.types.has(e))throw new U(`reference or name has already been used to create another type (${n.name})`);this.types.set(e,n)}buildOutputTypeParam(e){return e.kind==="List"?e.nullable?new ne(this.buildOutputTypeParam(e.type)):new D(new ne(this.buildOutputTypeParam(e.type))):e.nullable?this.getOutputType(e.ref):new D(this.getOutputType(e.ref))}buildInputTypeParam(e){return e.kind==="List"?e.required?new D(new ne(this.buildInputTypeParam(e.type))):new ne(this.buildInputTypeParam(e.type)):e.required?new D(this.getInputType(e.ref)):this.getInputType(e.ref)}buildFields(e){const n={};for(const[i,o]of e){this.outputFieldConfigs.has(o)||this.outputFieldConfigs.set(o,this.plugin.onOutputFieldConfig(o));const a=this.outputFieldConfigs.get(o);if(!a)continue;const l={...a},u=new Map;for(const m of Object.keys(l.args))u.set(m,l.args[m]);const c=this.buildInputFields(u),f={};for(const m of Object.keys(l.args))f[m]=this.inputFieldConfigs.get(l.args[m]);l.args=f;var r;const p=this.plugin.wrapResolve((r=l.resolve)!==null&&r!==void 0?r:gn,l),h=this.plugin.wrapSubscribe(l.subscribe,l);var s;n[i]={...l,type:this.buildOutputTypeParam(l.type),args:c,extensions:{...l.extensions,pothosResolveWrapped:p!==((s=l.resolve)!==null&&s!==void 0?s:gn),pothosSubscribeWrapped:h!==l.subscribe,pothosOptions:l.pothosOptions,pothosConfig:l,pothosArgMappers:l.argMappers},resolve:p===gn?void 0:p,subscribe:h}}return n}buildInputFields(e){const n={};for(const[r,s]of e){this.inputFieldConfigs.has(s)||this.inputFieldConfigs.set(s,this.plugin.onInputFieldConfig(s));const i=this.inputFieldConfigs.get(s);i&&(n[r]={...i,type:this.buildInputTypeParam(i.type),extensions:{...i.extensions,pothosOptions:i.pothosOptions,pothosConfig:i}})}return n}getInterfaceFields(e){const n=e.getInterfaces().reduce((i,o)=>Object.assign(i,this.getFields(o)),{}),r=this.configStore.getFields(e.name,"Interface"),s=this.buildFields(r);return{...n,...s}}getObjectFields(e){const n=e.getInterfaces().reduce((s,i)=>Object.assign(s,this.getFields(i)),{}),r=this.buildFields(this.configStore.getFields(e.name,"Object"));return{...n,...r}}getRootFields(e){return this.buildFields(this.configStore.getFields(e.name,"Object"))}getFields(e){if(e instanceof de){const n=this.configStore.getTypeConfig(e.name);return n.kind==="Query"||n.kind==="Mutation"||n.kind==="Subscription"?this.getRootFields(e):this.getObjectFields(e)}if(e instanceof pt)return this.getInterfaceFields(e);throw new U(`Type ${e.name} does not have fields to resolve`)}getInputFields(e){return this.buildInputFields(this.configStore.getFields(e.name,"InputObject"))}getType(e){if(e instanceof ou)return e.type;const n=this.configStore.getTypeConfig(e);return this.types.get(n.name)||(this.buildTypeFromConfig(n),this.types.get(n.name))}getOutputType(e){const n=this.getType(e);if(n instanceof hn)throw new U(`Expected ${String(e)} to be an output type but it was defined as an InputObject`);return n}getInputType(e){const n=this.getType(e);if(!n)throw new U(`Missing implementation of for type ${String(e)}`);
24if(n instanceof de)throw new U(`Expected ${n.name} to be an input type but it was defined as a GraphQLObjectType`);if(n instanceof pt)throw new U(`Expected ${n.name} to be an input type but it was defined as a GraphQLInterfaceType`);if(n instanceof Pt)throw new U(`Expected ${String(e)} to be an input type but it was defined as an GraphQLUnionType`);return n}getTypeOfKind(e,n){const r=this.getType(e);switch(n){case"Object":case"Query":case"Mutation":case"Subscription":if(r instanceof de)return r;break;case"Interface":if(r instanceof pt)return r;break;case"Union":if(r instanceof Pt)return r;break;case"Enum":if(r instanceof Wt)return r;break;case"Scalar":if(r instanceof Pe)return r;break;case"InputObject":if(r instanceof Pe)return r;break}throw new U(`Expected ${String(e)} to be of type ${n}`)}buildObject(e){var n;const r=new de({...e,extensions:{...e.extensions,pothosOptions:e.pothosOptions,pothosConfig:e},fields:()=>this.getFields(r),isTypeOf:e.kind==="Object"?this.plugin.wrapIsTypeOf((n=e.isTypeOf)!==null&&n!==void 0?n:void 0,e):void 0,interfaces:e.kind==="Object"?()=>e.interfaces.map(s=>this.getTypeOfKind(s,"Interface")):void 0});return r}buildInterface(e){const n=(s,i,o)=>{const a=hu(s);if(a)return typeof a=="string"?a:this.getTypeConfig(a).name;var l;return((l=e.resolveType)!==null&&l!==void 0?l:Xr)(s,i,o,r)},r=new pt({...e,extensions:{...e.extensions,pothosOptions:e.pothosOptions,pothosConfig:e},interfaces:()=>e.interfaces.map(s=>this.getTypeOfKind(s,"Interface")),fields:()=>this.getFields(r),resolveType:this.plugin.wrapResolveType(n,e)});return r}buildUnion(e){const n=(r,s,i,o)=>{if(typeof r=="object"&&r!==null&&_n in r){const u=r[_n];return typeof u=="string"?u:this.getTypeConfig(u).name}if(!e.resolveType)return Xr(r,s,i,o);const a=e.resolveType(r,s,i,o),l=u=>{if(typeof u=="string"||!u)return u;if(u instanceof de)return u.name;try{return this.configStore.getTypeConfig(u).name}catch{}return u};return du(a)?a.then(l):l(a)};return new Pt({...e,extensions:{...e.extensions,pothosOptions:e.pothosOptions,pothosConfig:e},types:()=>e.types.map(r=>this.getTypeOfKind(r,"Object")),resolveType:this.plugin.wrapResolveType(n,e)})}buildInputObject(e){const n=new hn({...e,extensions:{...e.extensions,pothosOptions:e.pothosOptions,pothosConfig:e},fields:()=>this.getInputFields(n)});return n}buildScalar(e){return e.name==="ID"?jn:e.name==="Int"?Pn:e.name==="Float"?Tr:e.name==="Boolean"?Z:e.name==="String"?V:new Pe({...e,extensions:{...e.extensions,pothosOptions:e.pothosOptions,pothosConfig:e}})}buildEnum(e){const n={},r=typeof e.values=="function"?e.values():e.values;for(const s of Object.keys(e.values)){const i=r[s];this.enumValueConfigs.has(i)||this.enumValueConfigs.set(i,this.plugin.onEnumValueConfig(i)),this.enumValueConfigs.get(i)&&(n[s]=this.enumValueConfigs.get(i))}return new Wt({...e,values:n,extensions:{...e.extensions,pothosOptions:e.pothosOptions,pothosConfig:e}})}constructor(e,n){ye(this,"types",new Map),ye(this,"builder",void 0),ye(this,"plugin",void 0),ye(this,"options",void 0),ye(this,"configStore",void 0),ye(this,"pluginList",void 0),ye(this,"implementers",new Map),ye(this,"typeConfigs",new Map),ye(this,"enumValueConfigs",new Map),ye(this,"outputFieldConfigs",new Map),ye(this,"inputFieldConfigs",new Map),this.builder=e,this.configStore=e.configStore,this.options=n;const r={};var s;this.pluginList=((s=e.options.plugins)!==null&&s!==void 0?s:[]).map(i=>{const o=this.builder.constructor.plugins[i];if(!o)throw new Mn(`No plugin named ${i} was registered`);return r[i]=new o(this,i),r[i]}),this.plugin=new eu(this,this.pluginList)}}function ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let mu=qn;class kn extends ee{addFields(e){this.fields.add(e);for(const n of this.fieldCbs)for(const[r,s]of Object.entries(e()))s&&n(r,s)}onField(e){this.fieldCbs.add(e);for(const n of this.fields)for(const[r,s]of Object.entries(n()))s&&e(r,s)}constructor(e){super("InputObject",e),ft(this,"kind","InputObject"),ft(this,"$inferInput",void 0),ft(this,mu,void 0),ft(this,"fields",new Set),ft(this,"fieldCbs",new Set)}}class yu extends kn{implement(e){return this.builder.inputType(this,e),this}constructor(e,n){super(n),ft(this,"builder",void 0),this.builder=e}}function nr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Si extends ee{addFields(e){for(const n of this.fieldCbs)for(const[r,s]of Object.entries(e()))s&&n(r,s);this.fields.add(e)}addInterfaces(e){Array.isArray(e)&&e.length===0||(this.preparedForBuild?this.updateConfig(n=>({...n,interfaces:[...n.interfaces,...typeof e=="function"?e():e]})):this.interfaces.push(()=>Array.isArray(e)?e:e()))}onField(e){this.fieldCbs.add(e);for(const n of this.fields)for(const[r,s]of Object.entries(n()))s&&e(r,s)}prepareForBuild(){this.preparedForBuild||(super.prepareForBuild(),this.interfaces.length>0&&this.updateConfig(e=>{var n;return{...e,interfaces:[...(n=e.interfaces)!==null&&n!==void 0?n:[],...this.interfaces.flatMap(r=>r())]}}))}constructor(...e){super(...e),nr(this,"fields",new Set),nr(this,"fieldCbs",new Set),nr(this,"interfaces",[])}}function Ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let bu=It,vu=en;class An extends Si{constructor(e,n){super("Interface",e,n),Ut(this,"kind","Interface"),Ut(this,"$inferType",void 0),Ut(this,bu,void 0),Ut(this,vu,void 0)}}class Tu extends An{implement(e){return this.builder.interfaceType(this,e)}constructor(e,n){super(n),Ut(this,"builder",void 0),this.builder=e}}function Mt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let Eu=It,wu=en;class st extends Si{constructor(e,n){super("Object",e,n),Mt(this,"kind","Object"),Mt(this,"$inferType",void 0),Mt(this,Eu,void 0),Mt(this,wu,void 0)}}class Ou extends st{implement(e){return this.builder.objectType(this,e)}constructor(e,n){super(n),Mt(this,"builder",void 0),this.builder=e}}function xu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class _i extends st{constructor(...e){super(...e),xu(this,"kind","Object")}}class Ni extends st{}class ki extends st{}function Ae(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Iu{addFields(e,n){this.onTypeConfig(e,(r,s)=>{if(!(s instanceof An||s instanceof st||s instanceof Ni||s instanceof _i||s instanceof ki))throw new U(`Can not add fields to ${s} because it is not an object`);s.addFields(n)})}addInputFields(e,n){this.onTypeConfig(e,(r,s)=>{if(!(s instanceof kn))throw new U(`Can not add fields to ${s} because it is not an input object`);s.addFields(n)})}associateParamWithRef(e,n){const r=this.resolveParamAssociations(n);this.paramAssociations.set(e,r);var s;const i=(s=this.pendingTypeConfigResolutions.get(e))!==null&&s!==void 0?s:[];if(i.length>0)if(typeof r=="string"&&this.typeConfigs.has(r))for(const o of i){const a=this.typeConfigs.get(r);o(a,this.implementors.get(a.name))}else for(const o of i)this.onTypeConfig(r,o);this.pendingTypeConfigResolutions.delete(e)}onTypeConfig(e,n){const r=this.resolveParamAssociations(e);if(typeof r=="string"&&this.typeConfigs.has(r)){const s=this.typeConfigs.get(r);n(s,this.implementors.get(s.name))}else this.pendingTypeConfigResolutions.has(r)||this.pendingTypeConfigResolutions.set(r,[]),this.pendingTypeConfigResolutions.get(r).push(n)}onTypeConfigOfKind(e,n,r){this.onTypeConfig(e,s=>{if(s.kind!==n)throw new U(`Expected ${this.describeRef(e)} to be of kind ${n} but it is of kind ${s.kind}`);r(s)})}addTypeRef(e){this.refs.has(e)||(this.pending||e.prepareForBuild(),this.refs.add(e),e.onConfig(n=>{const r=this.implementors.get(n.name);if(r&&r!==e)throw new U(`Duplicate typename: Another type with name ${n.name} already exists.`);if(r||(this.implementors.set(n.name,e),this.associateParamWithRef(e,n.name),(e instanceof st||e instanceof An||e instanceof kn)&&(this.fields.has(n.name)||this.fields.set(n.name,new Map),this.onPrepare(()=>{e.onField((s,i)=>{const o=this.fields.get(n.name);if(o.has(s))throw new U(`Duplicate field ${s} on ${n.name}`);var a;o.set(s,i.getConfig(s,(a=this.typeConfigs.get(n.name))!==null&&a!==void 0?a:n))})}))),this.typeConfigs.set(n.name,n),this.pendingTypeConfigResolutions.has(n.name)){const s=this.pendingTypeConfigResolutions.get(n.name);for(const i of s)i(n,e)}this.pendingTypeConfigResolutions.delete(n.name)}))}subscribeToFields(e){}
24hasImplementation(e){return this.typeConfigs.has(e)}hasConfig(e){const n=this.resolveParamAssociations(e);return!(typeof n!="string"||!this.typeConfigs.has(n))}getTypeConfig(e,n){const r=this.resolveParamAssociations(e);if(typeof r!="string"||!this.typeConfigs.has(r))throw new U(`${this.describeRef(e)} has not been implemented`);const s=this.typeConfigs.get(r);if(n&&s.graphqlKind!==n)throw new U(`Expected ref to resolve to a ${n} type, but got ${s.kind}`);return s}getInputTypeRef(e){const n=this.resolveParamAssociations(e);if(e instanceof ee){if(e.kind!=="InputObject"&&e.kind!=="Enum"&&e.kind!=="Scalar")throw new U(`Expected ${this.describeRef(e)} to be an input type but got ${e.kind}`);return e}if(typeof n=="string"&&this.typeConfigs.has(n)){const r=this.implementors.get(n);if(r instanceof ee){if(r.kind!=="InputObject"&&r.kind!=="Enum"&&r.kind!=="Scalar")throw new U(`Expected ${this.describeRef(r)} to be an input type but got ${r.kind}`);return r}}throw new U(`${this.describeRef(e)} has not been implemented`)}getOutputTypeRef(e){const n=this.resolveParamAssociations(e);if(e instanceof ee){if(e.kind==="InputObject"||e.kind==="InputList")throw new U(`Expected ${e.name} to be an output type but got ${e.kind}`);return e}if(typeof n=="string"&&this.typeConfigs.has(n)){const r=this.implementors.get(n);if(r instanceof ee){if(r.kind==="InputObject"||r.kind==="InputList")throw new U(`Expected ${r.name} to be an output type but got ${r.kind}`);return r}}throw new U(`${this.describeRef(e)} has not been implemented`)}getFields(e,n){const r=this.getTypeConfig(e);this.fields.has(e)||this.fields.set(e,new Map);const s=this.fields.get(e);if(n&&r.graphqlKind!==n)throw new U(`Expected ${e} to be a ${n} type, but found ${r.graphqlKind}`);return s}prepareForBuild(){this.pending=!1;for(const n of this.refs)n.prepareForBuild();const{pendingActions:e}=this;this.pendingActions=[];for(const n of e)n();if(this.pendingTypeConfigResolutions.size>0)throw new U(`Missing implementations for some references (${[...this.pendingTypeConfigResolutions.keys()].map(n=>this.describeRef(n)).join(", ")}).`)}onPrepare(e){this.pending?this.pendingActions.push(e):e()}resolveParamAssociations(e){let n=this.paramAssociations.get(e);for(;n&&this.paramAssociations.has(n);)n=this.paramAssociations.get(n);return n??e}describeRef(e){return typeof e=="string"?e:e&&e.toString!=={}.toString?String(e):typeof e=="function"&&e.name!==(()=>{}).name?`function ${e.name}`:"<unnamed ref or enum>"}constructor(e){Ae(this,"typeConfigs",new Map),Ae(this,"fields",new Map),Ae(this,"refs",new Set),Ae(this,"implementors",new Map),Ae(this,"pendingActions",[]),Ae(this,"paramAssociations",new Map),Ae(this,"pendingTypeConfigResolutions",new Map),Ae(this,"pending",!0),Ae(this,"builder",void 0),this.builder=e}}function Qe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let Su=wi;class _u{onConfig(e){this.pendingActions.push(e)}updateConfig(e){this.pendingActions.push(e)}getConfig(e,n,r){const s=this.pendingActions.reduce((i,o)=>{var a;return(a=o(i))!==null&&a!==void 0?a:i},this.initConfig(e,n,r));for(const i of this.onUseCallbacks)this.onUseCallbacks.delete(i),i(s);return s}onFirstUse(e){this.onUseCallbacks.add(e)}constructor(e){Qe(this,"kind","Arg"),Qe(this,"fieldName",void 0),Qe(this,"$inferInput",void 0),Qe(this,Su,void 0),Qe(this,"pendingActions",[]),Qe(this,"initConfig",void 0),Qe(this,"onUseCallbacks",new Set),this.initConfig=e}}function We(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let Nu=wi;class ku{updateConfig(e){this.pendingActions.push(e)}getConfig(e,n){const r=this.pendingActions.reduce((s,i)=>{var o;return(o=i(s))!==null&&o!==void 0?o:s},this.initConfig(e,n));for(const s of this.onUseCallbacks)this.onUseCallbacks.delete(s),s(r);return r}onFirstUse(e){this.onUseCallbacks.add(e)}constructor(e){We(this,"kind","InputObject"),We(this,"fieldName",void 0),We(this,"$inferInput",void 0),We(this,Nu,void 0),We(this,"pendingActions",[]),We(this,"initConfig",void 0),We(this,"onUseCallbacks",new Set),this.initConfig=e}}function fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class gr{argBuilder(){const e=this.field.bind(this),n=Object.keys(Object.getPrototypeOf(this)).filter(r=>typeof this[r]=="function"&&Function.prototype[r]===void 0);for(const r of[...Object.keys(this),...n])e[r]=typeof this[r]=="function"?this[r].bind(this):this[r];return e}field(e){return this.kind==="Arg"?new _u((n,r,s)=>{const i=e;var o,a;return{name:n,parentField:r,kind:this.kind,graphqlKind:this.kind,parentType:s.name,type:Nn(i.type,this.builder.configStore,(o=i.required)!==null&&o!==void 0?o:this.builder.defaultInputFieldRequiredness),pothosOptions:i,description:i.description,deprecationReason:i.deprecationReason,defaultValue:i.defaultValue,extensions:(a=i.extensions)!==null&&a!==void 0?a:{}}}):new ku((n,r)=>{const s=e;var i,o;return{name:n,parentField:void 0,kind:this.kind,graphqlKind:this.kind,parentType:r.name,type:Nn(s.type,this.builder.configStore,(i=s.required)!==null&&i!==void 0?i:this.builder.defaultInputFieldRequiredness),pothosOptions:s,description:s.description,deprecationReason:s.deprecationReason,defaultValue:s.defaultValue,extensions:(o=s.extensions)!==null&&o!==void 0?o:{}}})}helper(e){return(...n)=>{const[r={}]=n;return this.field({...r,type:e})}}constructor(e,n){fe(this,"kind",void 0),fe(this,"builder",void 0),fe(this,"boolean",this.helper("Boolean")),fe(this,"float",this.helper("Float")),fe(this,"id",this.helper("ID")),fe(this,"int",this.helper("Int")),fe(this,"string",this.helper("String")),fe(this,"booleanList",this.helper(["Boolean"])),fe(this,"floatList",this.helper(["Float"])),fe(this,"idList",this.helper(["ID"])),fe(this,"intList",this.helper(["Int"])),fe(this,"stringList",this.helper(["String"])),fe(this,"listRef",(r,s)=>{var i;return new xi(r,(i=s?.required)!==null&&i!==void 0?i:!0)}),this.builder=e,this.kind=n}}function ze(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let Au=tu;class Cu{updateConfig(e){this.pendingActions.push(e)}getConfig(e,n){const r=this.pendingActions.reduce((s,i)=>{var o;return(o=i(s))!==null&&o!==void 0?o:s},this.initConfig(e,n));for(const s of this.onUseCallbacks)this.onUseCallbacks.delete(s),s(r);return r}onFirstUse(e){this.onUseCallbacks.add(e)}constructor(e,n){ze(this,"kind",void 0),ze(this,"fieldName",void 0),ze(this,"$inferType",void 0),ze(this,Au,void 0),ze(this,"pendingActions",[]),ze(this,"initConfig",void 0),ze(this,"onUseCallbacks",new Set),this.kind=e,this.initConfig=n}}function rr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ru{createField(e){return new Cu(this.kind,(n,r)=>{var s;const i={};if(e.args)for(const[u,c]of Object.entries(e.args))i[u]=c.getConfig(u,n,r);let{resolve:o}=e;((s=e.extensions)===null||s===void 0?void 0:s.pothosExposedField)===n&&(o=gn);const{subscribe:a}=e;var l;return{kind:this.kind,graphqlKind:r.graphqlKind,parentType:r.name,name:n,args:i,argMappers:[],type:hr(e.type,this.builder.configStore,(l=e.nullable)!==null&&l!==void 0?l:this.builder.defaultFieldNullability),pothosOptions:e,extensions:{pothosOriginalResolve:o,pothosOriginalSubscribe:a,...e.extensions},description:e.description,deprecationReason:e.deprecationReason,resolve:o,subscribe:a}})}
24exposeField(e,{extensions:n,...r}){return this.createField({...r,extensions:{pothosExposedField:e,...n},resolve:s=>s[e]})}constructor(e,n,r){rr(this,"kind",void 0),rr(this,"graphqlKind",void 0),rr(this,"builder",void 0),this.builder=e,this.kind=n,this.graphqlKind=r}}function Fu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Vn extends Ru{boolean(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:"Boolean"})}float(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:"Float"})}id(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:"ID"})}int(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:"Int"})}string(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:"String"})}booleanList(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:["Boolean"]})}floatList(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:["Float"]})}idList(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:["ID"]})}intList(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:["Int"]})}stringList(...e){const[n={}]=e;return this.createField({resolve:void 0,...n,type:["String"]})}field(e){return this.createField(e)}listRef(e,n){var r;return new Ii(e,(r=n?.nullable)!==null&&r!==void 0?r:!1)}constructor(...e){super(...e),Fu(this,"arg",new gr(this.builder,"Arg").argBuilder())}}
24class Ai extends Vn{exposeBoolean(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:"Boolean"})}exposeFloat(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:"Float"})}exposeID(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:"ID"})}exposeInt(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:"Int"})}exposeString(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:"String"})}exposeBooleanList(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:["Boolean"]})}exposeFloatList(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:["Float"]})}exposeIDList(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:["ID"]})}exposeIntList(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:["Int"]})}exposeStringList(e,...n){const[r={}]=n;return this.exposeField(e,{...r,type:["String"]})}expose(e,...n){const[r={}]=n;return this.exposeField(e,r)}}class an extends Ai{constructor(e){super(e,"Interface","Interface")}}class ln extends Vn{constructor(e){super(e,"Mutation","Object")}}class un extends Ai{constructor(e){super(e,"Object","Object")}}class cn extends Vn{constructor(e){super(e,"Query","Object")}}class pn extends Vn{constructor(e){super(e,"Subscription","Object")}}function At(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let $u=It,Du=qn;class Pu extends ee{constructor(e,n){super("Enum",e,n),At(this,"kind","Enum"),At(this,"$inferType",void 0),At(this,"$inferInput",void 0),At(this,$u,void 0),At(this,Du,void 0)}}function Ct(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let ju=It,Lu=en;class Uu extends ee{addTypes(e){Array.isArray(e)&&e.length===0||(this.preparedForBuild?this.updateConfig(n=>({...n,types:[...n.types,...typeof e=="function"?e():e]})):this.types.push(()=>Array.isArray(e)?e:e()))}prepareForBuild(){this.preparedForBuild||(super.prepareForBuild(),this.types.length>0&&this.updateConfig(e=>({...e,types:[...e.types,...this.types.flatMap(n=>n())]})))}constructor(e,n){super("Union",e,n),Ct(this,"kind","Union"),Ct(this,"$inferType",void 0),Ct(this,ju,void 0),Ct(this,Lu,void 0),Ct(this,"types",[])}}function be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let Bn=class dt{static registerPlugin(e,n,r){if(!dt.allowPluginReRegistration&&dt.plugins[e])throw new Mn(`Received multiple implementations for plugin ${e}`);dt.plugins[e]=n,r&&dt.optionNormalizers.set(e,r)}objectType(e,n,r){ke(e),ss(n.interfaces);var s;const i=typeof e=="string"?e:(s=n.name)!==null&&s!==void 0?s:e.name,o=e instanceof ee?e:new st(i);return o.updateConfig({kind:"Object",graphqlKind:"Object",name:i,interfaces:[],description:n.description,extensions:n.extensions,isTypeOf:n.isTypeOf,pothosOptions:n}),n.interfaces&&o.addInterfaces(n.interfaces),o!==e&&typeof e!="string"&&this.configStore.associateParamWithRef(e,o),r&&o.addFields(()=>r(new un(this))),n.fields&&o.addFields(()=>{const a=new un(this);return n.fields(a)}),this.configStore.addTypeRef(o),o}objectFields(e,n){ke(e),this.configStore.addFields(e,()=>n(new un(this)))}objectField(e,n,r){ke(e),this.configStore.addFields(e,()=>({[n]:r(new un(this))}))}queryType(...e){const[n={},r]=e;var s;return this.queryRef.updateConfig({kind:"Query",graphqlKind:"Object",name:(s=n.name)!==null&&s!==void 0?s:"Query",description:n.description,pothosOptions:n,extensions:n.extensions}),n.name&&(this.queryRef.name=n.name),this.configStore.addTypeRef(this.queryRef),r&&this.queryRef.addFields(()=>r(new cn(this))),n.fields&&this.queryRef.addFields(()=>n.fields(new cn(this))),this.queryRef}queryFields(e){this.configStore.addFields(this.queryRef,()=>e(new cn(this)))}queryField(e,n){this.configStore.addFields(this.queryRef,()=>({[e]:n(new cn(this))}))}mutationType(...e){const[n={},r]=e;var s;return this.mutationRef.updateConfig({kind:"Mutation",graphqlKind:"Object",name:(s=n.name)!==null&&s!==void 0?s:"Mutation",description:n.description,pothosOptions:n,extensions:n.extensions}),this.configStore.addTypeRef(this.mutationRef),n.name&&(this.mutationRef.name=n.name),r&&this.configStore.addFields(this.mutationRef,()=>r(new ln(this))),n.fields&&this.configStore.addFields(this.mutationRef,()=>n.fields(new ln(this))),this.mutationRef}mutationFields(e){this.configStore.addFields(this.mutationRef,()=>e(new ln(this)))}mutationField(e,n){this.configStore.addFields(this.mutationRef,()=>({[e]:n(new ln(this))}))}subscriptionType(...e){const[n={},r]=e;var s;return this.subscriptionRef.updateConfig({kind:"Subscription",graphqlKind:"Object",name:(s=n.name)!==null&&s!==void 0?s:"Subscription",description:n.description,pothosOptions:n,extensions:n.extensions}),this.configStore.addTypeRef(this.subscriptionRef),n.name&&(this.subscriptionRef.name=n.name),r&&this.configStore.addFields(this.subscriptionRef,()=>r(new pn(this))),n.fields&&this.configStore.addFields(this.subscriptionRef,()=>n.fields(new pn(this))),this.subscriptionRef}subscriptionFields(e){this.configStore.addFields(this.subscriptionRef,()=>e(new pn(this)))}subscriptionField(e,n){this.configStore.addFields(this.subscriptionRef,()=>({[e]:n(new pn(this))}))}args(e){return e(new gr(this,"Arg"))}interfaceType(e,n,r){ke(e),ss(n.interfaces);var s;const i=typeof e=="string"?e:(s=n.name)!==null&&s!==void 0?s:e.name,o=e instanceof ee?e:new An(i),a=o.name;return o.updateConfig({kind:"Interface",graphqlKind:"Interface",name:a,interfaces:[],description:n.description,pothosOptions:n,extensions:n.extensions,resolveType:n.resolveType}),this.configStore.addTypeRef(o),n.interfaces&&o.addInterfaces(n.interfaces),o!==e&&typeof e!="string"&&this.configStore.associateParamWithRef(e,o),r&&this.configStore.addFields(o,()=>r(new an(this))),n.fields&&this.configStore.addFields(o,()=>n.fields(new an(this))),o}interfaceFields(e,n){ke(e),this.configStore.addFields(e,()=>n(new an(this)))}interfaceField(e,n,r){ke(e),this.configStore.addFields(e,()=>({[n]:r(new an(this))}))}
24unionType(e,n){const r=new Uu(e,{kind:"Union",graphqlKind:"Union",name:e,types:[],description:n.description,resolveType:n.resolveType,pothosOptions:n,extensions:n.extensions});if(Array.isArray(n.types))for(const s of n.types)ke(s);return this.configStore.addTypeRef(r),r.addTypes(n.types),r}enumType(e,n){ke(e);const r=typeof e=="string"?e:n.name,s=typeof e=="object"?pu(e,n?.values):cu(n.values),i=new Pu(r,{kind:"Enum",graphqlKind:"Enum",name:r,values:s,description:n.description,pothosOptions:n,extensions:n.extensions});return this.configStore.addTypeRef(i),typeof e!="string"&&this.configStore.associateParamWithRef(e,i),i}scalarType(e,n){const r=new Oi(e,{kind:"Scalar",graphqlKind:"Scalar",name:e,description:n.description,parseLiteral:n.parseLiteral,parseValue:n.parseValue,serialize:n.serialize,pothosOptions:n,extensions:n.extensions});return this.configStore.addTypeRef(r),r}addScalarType(e,n,...r){const[s={}]=r,i=n.toConfig();return this.scalarType(e,{...i,...s,extensions:{...i.extensions,...s.extensions}})}inputType(e,n){ke(e);const r=typeof e=="string"?e:e.name,s=typeof e=="string"?new kn(r):e;return s.updateConfig({kind:"InputObject",graphqlKind:"InputObject",name:r,isOneOf:n.isOneOf,description:n.description,pothosOptions:n,extensions:n.extensions}),this.configStore.addTypeRef(s),e!==s&&typeof e!="string"&&this.configStore.associateParamWithRef(e,s),this.configStore.addInputFields(s,()=>n.fields(new gr(this,"InputObject"))),s}inputRef(e){return new yu(this,e)}objectRef(e){return new Ou(this,e)}interfaceRef(e){return new Tu(this,e)}toSchema(...e){const[n={}]=e,{directives:r,extensions:s}=n,i=[jn,Pn,Tr,V,Z];for(const h of i)this.configStore.hasImplementation(h.name)||this.addScalarType(h.name,h);const o=new gu(this,n);o.plugin.beforeBuild(),o.buildAll();const a=[...o.types.values()],l=this.configStore.hasConfig(this.queryRef)?this.configStore.getTypeConfig(this.queryRef).name:"Query",u=this.configStore.hasConfig(this.mutationRef)?this.configStore.getTypeConfig(this.mutationRef).name:"Mutation",c=this.configStore.hasConfig(this.subscriptionRef)?this.configStore.getTypeConfig(this.subscriptionRef).name:"Subscription",f=new xr({query:o.types.get(l),mutation:o.types.get(u),subscription:o.types.get(c),extensions:s??{},directives:r,types:a}),p=o.plugin.afterBuild(f);return n.sortSchema===!1?p:Ol(p)}constructor(e){be(this,"$inferSchemaTypes",void 0),be(this,"queryRef",new Ni("Query")),be(this,"mutationRef",new _i("Mutation")),be(this,"subscriptionRef",new ki("Subscription")),be(this,"configStore",void 0),be(this,"options",void 0),be(this,"defaultFieldNullability",void 0),be(this,"defaultInputFieldRequiredness",void 0),this.options=[...dt.optionNormalizers.values()].reduce((s,i)=>e.defaults&&typeof i[e.defaults]=="function"?Object.assign(s,i[e.defaults](s)):s,e),this.configStore=new Iu(this);var n;this.defaultFieldNullability=(n=e.defaultFieldNullability)!==null&&n!==void 0?n:e.defaults!=="v3";var r;this.defaultInputFieldRequiredness=(r=e.defaultInputFieldRequiredness)!==null&&r!==void 0?r:!1}};be(Bn,"plugins",{});be(Bn,"optionNormalizers",new Map);be(Bn,"allowPluginReRegistration",!1);const Mu=Bn,Me={red:"\x1B[31m",yellow:"\x1B[33m",magenta:"\x1B[35m",cyan:"\x1B[36m",reset:"\x1B[0m"},is=Me.yellow+"WARN"+Me.reset,os=Me.cyan+"INFO"+Me.reset,as=Me.red+"ERR"+Me.reset,ls=Me.magenta+"DEBUG"+Me.reset,Rt={debug:0,info:1,warn:2,error:3,silent:4},fn=()=>{},Gn=t=>(...e)=>console.log(t,...e),qu=console.debug?(...t)=>console.debug(ls,...t):Gn(ls),Vu=console.info?(...t)=>console.info(os,...t):Gn(os),Bu=console.warn?(...t)=>console.warn(is,...t):Gn(is),Gu=console.error?(...t)=>console.error(as,...t):Gn(as),sr=(t=globalThis.process?.env.DEBUG==="1"?"debug":"info")=>{const e=Rt[t];return{debug:e>Rt.debug?fn:qu,info:e>Rt.info?fn:Vu,warn:e>Rt.warn?fn:Bu,error:e>Rt.error?fn:Gu}},Hn=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function B(t){return t?.then!=null}function Hu(t){const e=t;return e&&e.then&&e.catch&&e.finally}function F(t,e,n,r){let s=Q().then(t).then(e,n);return Cr(s)}function Q(t){return t&&Hu(t)?t:B(t)?{then:(e,n)=>Q(t.then(e,n)),catch:e=>Q(t.then(n=>n,e)),finally:e=>Q(e?zu(t,e):t),[Symbol.toStringTag]:"Promise"}:{then(e){if(e)try{return Q(e(t))}catch(n){return Tt(n)}return this},catch(){return this},finally(e){if(e)try{return Q(e()).then(()=>t,()=>t)}catch(n){return Tt(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:t,[Hn]:"resolved"}}function Ci(){if(Promise.withResolvers)return Promise.withResolvers();let t,e;return{promise:new Promise(function(n,r){t=n,e=r}),get resolve(){return t},get reject(){return e}}}function et(t,e,n){if(t?.length===0)return;const r=t[Symbol.iterator]();let s=0;function i(){const{done:o,value:a}=r.next();if(o)return;let l=!1;function u(){l=!0}return F(function(){return e(a,u,s++)},function(c){if(c&&n?.push(c),!l)return i()})}return i()}function Tt(t){return{then(e,n){if(n)try{return Q(n(t))}catch(r){return Tt(r)}return this},catch(e){if(e)try{return Q(e(t))}catch(n){return Tt(n)}return this},finally(e){if(e)try{e()}catch(n){return Tt(n)}return this},__fakeRejectError:t,[Symbol.toStringTag]:"Promise",[Hn]:"rejected"}}function Ri(t,e,n,r){Symbol.asyncIterator in t&&(t=t[Symbol.asyncIterator]());let s,i,o;typeof t.return=="function"&&(s=t.return,i=u=>{const c=()=>{throw u};return s.call(t).then(c,c)});function a(u){return u.done?u:F(()=>u.value,c=>F(()=>e(c),us,i))}let l;if(n){let u;const c=n;l=f=>(u||=F(()=>f,p=>F(()=>c(p),us,i)),u)}return{next(){return t.next().then(a,l)},return(){const u=s?s.call(t).then(a,l):Q({value:void 0,done:!0});return o?u.then(o):u},throw(u){return typeof t.throw=="function"?t.throw(u).then(a,l):i?i(u):Tt(u)},[Symbol.asyncIterator](){return this}}}function us(t){return{value:t,done:!1}}function Qu(t){return t?.[Hn]==="resolved"}function Wu(t){return t?.[Hn]==="rejected"}function zu(t,e){return"finally"in t?t.finally(e):t.then(n=>{const r=e();return B(r)?r.then(()=>n):n},n=>{const r=e();if(B(r))return r.then(()=>{throw n});throw n})}function Cr(t){if(Qu(t))return t.__fakePromiseValue;if(Wu(t))throw t.__fakeRejectError;return t}const Yu='<!doctype html><html lang=en><head><meta charset=utf-8><title>__TITLE__</title><link rel=icon href=https://raw.githubusercontent.com/graphql-hive/graphql-yoga/main/website/public/favicon.ico><link crossorigin rel=stylesheet href=https://unpkg.com/@graphql-yoga/[email protected]/dist/graphiql.css></head><body id=body class=no-focus-outline><noscript>You need to enable JavaScript to run this app.</noscript><div id=root></div><script type=module>import{renderYogaGraphiQL}from"https://unpkg.com/@graphql-yoga/[email protected]/dist/yoga-graphiql.es.js";renderYogaGraphiQL(root,__OPTS__)<\/script></body></html>';function Ju({headers:t,method:e}){return e==="GET"&&!!t?.get("accept")?.includes("text/html")}const Ku=t=>Yu.replace("__TITLE__",t?.title||"Yoga GraphiQL").replace("__OPTS__",JSON.stringify(t??{}));function Xu(t){const e=t.logger??console;let n;typeof t?.options=="function"?n=t?.options:typeof t?.options=="object"?n=()=>t?.options:t?.options===!1?n=()=>!1:n=()=>({});const r=t?.render??Ku;let s;const i=({URLPattern:o})=>(s||=new o({pathname:t.graphqlEndpoint}),s);return{onRequest({request:o,serverContext:a,fetchAPI:l,endResponse:u,url:c}){if(Ju(o)&&(o.url.endsWith(t.graphqlEndpoint)||o.url.endsWith(`${t.graphqlEndpoint}/`)||c.pathname===t.graphqlEndpoint||c.pathname===`${t.graphqlEndpoint}/`||i(l).test(c)))return e.debug("Rendering GraphiQL"),F(()=>n(o,a),f=>{if(f)return F(()=>r({...f===!0?{}:f}),p=>{const h=new l.Response(p,{headers:{"Content-Type":"text/html"},status:200});u(h)})})}}}const Zu=t=>{if(t==null)return{};if(ui(t))return{onPluginInit({setSchema:n}){n(t)}};if("then"in t){let n;return{onRequestParse(){return{onRequestParseDone(){if(!n)return F(()=>t,r=>{n=r})}}},onEnveloped({setSchema:r}){if(!n)throw new Error("You provide a promise of a schema but it hasn't been resolved yet. Make sure you use this plugin with GraphQL Yoga.");r(n)}}}const e=new WeakMap;return{onRequestParse({request:n,serverContext:r}){return{onRequestParseDone(){return F(()=>t({...r,request:n}),s=>{e.set(n,s)})}}},onEnveloped({setSchema:n,context:r}){if(r?.request==null)throw new Error("Request object is not available in the context. Make sure you use this plugin with GraphQL Yoga.");const s=e.get(r.request);if(s==null)throw new Error("No schema found for this request. Make sure you use this plugin with GraphQL Yoga.");n(s)}}},Fi=3;function ce(t){return Qn(t,[])}function Qn(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return ec(t,e);default:return String(t)}}function cs(t){return(t.name="GraphQLError")?t.toString():`${t.name}: ${t.message};
25 ${t.stack}`}function ec(t,e){if(t===null)return"null";if(t instanceof Error)return t.name==="AggregateError"?cs(t)+`
26`+ps(t.errors,e):cs(t);if(e.includes(t))return"[Circular]";const n=[...e,t];if(tc(t)){const r=t.toJSON();if(r!==t)return typeof r=="string"?r:Qn(r,n)}else if(Array.isArray(t))return ps(t,n);return nc(t,n)}function tc(t){return typeof t.toJSON=="function"}function nc(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>Fi?"["+rc(t)+"]":"{ "+n.map(([r,s])=>r+": "+Qn(s,e)).join(", ")+" }"}function ps(t,e){if(t.length===0)return"[]";if(e.length>Fi)return"[Array]";const n=t.length,r=[];for(let s=0;s<n;++s)r.push(Qn(t[s],e));return"["+r.join(", ")+"]"}function rc(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");
26if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const sc=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function ic(t){return t!=null&&typeof t=="object"&&Object.keys(t).every(e=>sc.includes(e))}function C(t,e){return e?.originalError&&!(e.originalError instanceof Error)&&ic(e.originalError)&&(e.originalError=C(e.originalError.message,e.originalError)),Js.major>=17?new v(t,e):new v(t,e?.nodes,e?.source,e?.positions,e?.path,e?.originalError,e?.extensions)}function oc(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t}function $i(t){return typeof t=="object"&&t!==null}function ac(t,e,n){let r=n;for(const s of t)r=F(()=>r,i=>e(i,s));return r}function Di(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Pi(t,e,n={}){const r={},s=(e.arguments??[]).reduce((i,o)=>({...i,[o.name.value]:o}),{});for(const{name:i,type:o,defaultValue:a}of t.args){const l=s[i];if(!l){if(a!==void 0)r[i]=a;else if(L(o))throw C(`Argument "${i}" of required type "${ce(o)}" was not provided.`,{nodes:[e]});continue}const u=l.value;let c=u.kind===d.NULL;if(u.kind===d.VARIABLE){const p=u.name.value;if(n==null||!Di(n,p)){if(a!==void 0)r[i]=a;else if(L(o))throw C(`Argument "${i}" of required type "${ce(o)}" was provided the variable "$${p}" which was not provided a runtime value.`,{nodes:[u]});continue}c=n[p]==null}if(c&&L(o))throw C(`Argument "${i}" of non-null type "${ce(o)}" must not be null.`,{nodes:[u]});const f=Ze(u,o,n);if(f===void 0)throw C(`Argument "${i}" has invalid value ${X(u)}.`,{nodes:[u]});r[i]=f}return r}function ji(t){const e=new WeakMap;return function(n){const r=e.get(n);if(r===void 0){const s=t(n);return e.set(n,s),s}return r}}function lc(t){const e=new WeakMap;return function(n,r,s){let i=e.get(n);if(!i){i=new WeakMap,e.set(n,i);const l=new WeakMap;i.set(r,l);const u=t(n,r,s);return l.set(s,u),u}let o=i.get(r);if(!o){o=new WeakMap,i.set(r,o);const l=t(n,r,s);return o.set(s,l),l}const a=o.get(s);if(a===void 0){const l=t(n,r,s);return o.set(s,l),l}return a}}function uc(t){const e=new WeakMap;return function(n,r,s,i,o){let a=e.get(n);if(!a){a=new WeakMap,e.set(n,a);const p=new WeakMap;a.set(r,p);const h=new WeakMap;p.set(s,h);const m=new WeakMap;h.set(i,m);const w=t(n,r,s,i,o);return m.set(o,w),w}let l=a.get(r);if(!l){l=new WeakMap,a.set(r,l);const p=new WeakMap;l.set(s,p);const h=new WeakMap;p.set(i,h);const m=t(n,r,s,i,o);return h.set(o,m),m}let u=l.get(s);if(!u){u=new WeakMap,l.set(s,u);const p=new WeakMap;u.set(i,p);const h=t(n,r,s,i,o);return p.set(o,h),h}let c=u.get(i);if(!c){c=new WeakMap,u.set(i,c);const p=t(n,r,s,i,o);return c.set(o,p),p}const f=c.get(o);if(f===void 0){const p=t(n,r,s,i,o);return c.set(o,p),p}return f}}function cc(t,e,n){const r=pc(t).get(e);if(r==null)throw C(`Schema is not configured to execute ${e} operation.`,{nodes:n});return r}const pc=ji(function(t){const e=new Map,n=t.getQueryType();n&&e.set("query",n);const r=t.getMutationType();r&&e.set("mutation",r);const s=t.getSubscriptionType();return s&&e.set("subscription",s),e});class Cn extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(e,n){const r=this.get(e);r===void 0?this.set(e,[n]):r.push(n)}}const fc=new $e({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[A.FRAGMENT_SPREAD,A.INLINE_FRAGMENT],args:{if:{type:new D(Z),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:V,description:"Unique name"}}}),dc=new $e({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[A.FIELD],args:{if:{type:new D(Z),description:"Stream when true or undefined.",defaultValue:!0},label:{type:V,description:"Unique name"},initialCount:{defaultValue:0,type:Pn,description:"Number of items to return immediately"}}});function mt(t,e,n,r,s,i,o,a){for(const l of s.selections)switch(l.kind){case d.FIELD:{if(!ir(n,l))continue;i.add(hc(l),l);break}case d.INLINE_FRAGMENT:{if(!ir(n,l)||!fs(t,l,r))continue;const u=ds(n,l);if(u){const c=new Cn;mt(t,e,n,r,l.selectionSet,c,o,a),o.push({label:u.label,fields:c})}else mt(t,e,n,r,l.selectionSet,i,o,a);break}case d.FRAGMENT_SPREAD:{const u=l.name.value;if(!ir(n,l))continue;const c=ds(n,l);if(a.has(u)&&!c)continue;const f=e[u];if(!f||!fs(t,f,r))continue;if(c||a.add(u),c){const p=new Cn;mt(t,e,n,r,f.selectionSet,p,o,a),o.push({label:c.label,fields:p})}else mt(t,e,n,r,f.selectionSet,i,o,a);break}}}function Li(t,e,n,r,s){const i=new Cn,o=[];return mt(t,e,n,r,s,i,o,new Set),{fields:i,patches:o}}function ir(t,e){return!(Ot(wr,e,t)?.if===!0||Ot(Er,e,t)?.if===!1)}function fs(t,e,n){const r=e.typeCondition;if(!r)return!0;const s=pe(t,r);return s===n?!0:Re(s)?t.getPossibleTypes(s).includes(n):!1}function hc(t){return t.alias?t.alias.value:t.name.value}function ds(t,e){const n=Ot(fc,e,t);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}const gc=uc(function(t,e,n,r,s){const i=new Cn,o=new Set,a=[],l={fields:i,patches:a};for(const u of s)u.selectionSet&&mt(t,e,n,r,u.selectionSet,i,a,o);return l});function Wn(t){return t?.[Symbol.asyncIterator]!=null}function St(t,e,n){return{prev:t,key:e,typename:n}}function te(t){const e=[];let n=t;for(;n;)e.push(n.key),n=n.prev;return e.reverse()}function mc(t){return t.map(e=>typeof e=="number"?"["+e.toString()+"]":"."+e).join("")}
26class yc extends Error{error;suppressed;constructor(e,n,r){super(r),this.error=e,this.suppressed=n,this.name="SuppressedError",Error.captureStackTrace(this,this.constructor)}}const ie={get dispose(){return Symbol.dispose||Symbol.for("dispose")},get asyncDispose(){return Symbol.asyncDispose||Symbol.for("asyncDispose")}};function bc(t){return t?.[ie.dispose]!=null}function vc(t){return t?.[ie.asyncDispose]!=null}const Tc=globalThis.SuppressedError||yc;class Rr{callbacks=[];get disposed(){return this.callbacks.length===0}use(e){return vc(e)?this.callbacks.push(()=>e[ie.asyncDispose]()):bc(e)&&this.callbacks.push(()=>e[ie.dispose]()),e}adopt(e,n){return n&&this.callbacks.push(()=>n(e)),e}defer(e){e&&this.callbacks.push(e)}move(){const e=new Rr;return e.callbacks=this.callbacks,this.callbacks=[],e}disposeAsync(){return this[ie.asyncDispose]()}_error;_iterateCallbacks(){const e=this.callbacks.pop();if(e)return F(e,()=>this._iterateCallbacks(),n=>(this._error=this._error?new Tc(n,this._error):n,this._iterateCallbacks()))}[ie.asyncDispose](){const e=this._iterateCallbacks();if(e?.then)return e.then(()=>{if(this._error){const n=this._error;throw this._error=void 0,n}});if(this._error){const n=this._error;throw this._error=void 0,n}}[Symbol.toStringTag]="AsyncDisposableStack"}const Ec=globalThis.AsyncDisposableStack||Rr;function _e(t){if(t instanceof Error)return t;if(typeof t=="object"&&t!=null&&"message"in t&&typeof t.message=="string"){let e;"cause"in t&&(e={cause:t.cause});const n=new Error(t.message,e);return"stack"in t&&typeof t.stack=="string"&&(n.stack=t.stack),"name"in t&&typeof t.name=="string"&&(n.name=t.name),n}return new Error(String(t))}function wc(t){const e=t[Symbol.asyncIterator]();let n,r,s=!1;async function i(){if(s)return{value:void 0,done:!0};try{if(!n){if(r)return await r,await i();let l;r=new Promise(c=>{l=c});const u=await e.next();return u.done?(s=!0,await i()):(n=u.value[Symbol.asyncIterator](),r=void 0,l(),await i())}const o=n,a=await n.next();return a.done?(n===o&&(n=void 0),await i()):a}catch(o){throw s=!0,o}}return{next:i,async return(){return s=!0,await Promise.all([n?.return?.(),e.return?.()]),{value:void 0,done:!0}},async throw(o){throw s=!0,await Promise.all([n?.throw?.(o),e.throw?.(o)]),o},[Symbol.asyncIterator](){return this},async[ie.asyncDispose](){s=!0,await Promise.all([n?.[ie.asyncDispose]?.(),e?.[ie.asyncDispose]?.()])}}}function hs(t,e){if(!t)throw new Error(e??"Unexpected invariant triggered.")}function gs(t,e,n){e?.throwIfAborted();const r=Object.create(null),s=[];for(const o in t){const a=F(()=>t[o],l=>{r[o]=l});B(a)&&s.push(a)}if(!s.length)return r;const i=s.length===1?s[0]:Promise.all(s);return n?Promise.race([n,i]).then(()=>r):i.then(()=>r)}function Oc(t,e,n,r){const s=[],i=r?.maxErrors;try{const o=xc(t,e,n,a=>{if(i!=null&&s.length>=i)throw C("Too many errors processing variables, error limit reached. Execution aborted.");s.push(a)});if(s.length===0)return{coerced:o}}catch(o){s.push(o)}return{errors:s}}function xc(t,e,n,r){const s={};for(const i of e){const o=i.variable.name.value,a=pe(t,i.type);if(!Ie(a)){const u=X(i.type);r(C(`Variable "$${o}" expected value of type "${u}" which cannot be used as an input type.`,{nodes:i.type}));continue}if(!Di(n,o)){if(i.defaultValue)s[o]=Ze(i.defaultValue,a);else if(L(a)){const u=ce(a);r(C(`Variable "$${o}" of required type "${u}" was not provided.`,{nodes:i}))}continue}const l=n[o];if(l===null&&L(a)){const u=ce(a);r(C(`Variable "$${o}" of non-null type "${u}" must not be null.`,{nodes:i}));continue}s[o]=Xa(l,a,(u,c,f)=>{let p=`Variable "$${o}" got invalid value `+ce(c);u.length>0&&(p+=` at "${o}${mc(u)}"`),r(C(p+"; "+f.message,{nodes:i,originalError:f}))})}return s}const Ic=lc((t,e,n)=>gc(t.schema,t.fragments,t.variableValues,e,n));function Sc(t){const e=Mi(t);return"schema"in e?Ui(e):{errors:e.map(n=>(Object.defineProperty(n,"extensions",{value:{...n.extensions,http:{...n.extensions?.http||{},status:400}}}),n))}}function Ui(t){return t.signal?.throwIfAborted(),F(()=>kc(t),e=>{const n=ms(e,t.errors);return t.subsequentPayloads.size>0?{initialResult:{...n,hasNext:!0},subsequentResults:Qc(t)}:n},e=>(t.signal?.throwIfAborted(),e.errors?t.errors.push(...e.errors):t.errors.push(e),ms(null,t.errors)))}function ms(t,e){return e.length===0?{data:t}:{errors:e,data:t}}const _c=ji(function(t){const e=Object.create(null);for(const n of t.definitions)n.kind===d.FRAGMENT_DEFINITION&&(e[n.name.value]=n);return e});function Mi(t){const{schema:e,document:n,rootValue:r,contextValue:s,variableValues:i,operationName:o,fieldResolver:a,typeResolver:l,subscribeFieldResolver:u,signal:c}=t;c?.throwIfAborted(),ci(e);const f=_c(n);let p;for(const T of n.definitions)switch(T.kind){case d.OPERATION_DEFINITION:if(o==null){if(p!==void 0)return[C("Must provide operation name if query contains multiple operations.",{extensions:{code:"OPERATION_RESOLUTION_FAILURE"}})];p=T}else T.name?.value===o&&(p=T);break}if(p==null)return o!=null?[C(`Unknown operation named "${o}".`,{extensions:{code:"OPERATION_RESOLUTION_FAILURE"}})]:[C("Must provide an operation.",{extensions:{code:"OPERATION_RESOLUTION_FAILURE"}})];const h=p.variableDefinitions??[],m=Oc(e,h,i??{},{maxErrors:50});if(m.errors)return m.errors;c?.throwIfAborted();let w,k;if(c){const T=new Set,$=Ci();k=$.promise;const E=()=>{$.reject(c.reason),c.removeEventListener("abort",E)};c.addEventListener("abort",E,{once:!0}
26),k.catch(()=>{for(const S of T)S();T.clear()}),w=S=>{T.add(S)}}return{schema:e,fragments:f,rootValue:r,contextValue:s,operation:p,variableValues:m.coerced,fieldResolver:a??Ts,typeResolver:l??Pc,subscribeFieldResolver:u??Ts,subsequentPayloads:new Set,errors:[],signal:c,onSignalAbort:w,signalPromise:k}}function Nc(t,e){return{...t,rootValue:e,subsequentPayloads:new Set,errors:[]}}function kc(t){const{operation:e,schema:n,fragments:r,variableValues:s,rootValue:i}=t,o=cc(n,e.operation,[e]);o==null&&C(`Schema is not configured to execute ${e.operation} operation.`,{nodes:e});const{fields:a,patches:l}=Li(n,r,s,o,e.selectionSet),u=void 0;let c;e.operation==="mutation"?c=Ac(t,o,i,u,a):c=Fr(t,o,i,u,a);for(const f of l){const{label:p,fields:h}=f;Qi(t,o,i,h,p,u)}return c}function Ac(t,e,n,r,s){return ac(s,(i,[o,a])=>{const l=St(r,o,e.name);return t.signal?.throwIfAborted(),F(()=>qi(t,e,n,a,l),u=>(u===void 0||(i[o]=u),i))},Object.create(null))}function Fr(t,e,n,r,s,i){const o=Object.create(null);let a=!1;try{for(const[l,u]of s){t.signal?.throwIfAborted();const c=St(r,l,e.name),f=qi(t,e,n,u,c,i);f!==void 0&&(o[l]=f,B(f)&&(a=!0))}}catch(l){if(l!==t.signal?.reason&&a)return F(()=>gs(o,t.signal),()=>{throw l},()=>{throw l});throw l}return a?gs(o,t.signal,t.signalPromise):o}function qi(t,e,n,r,s,i){const o=i?.errors??t.errors,a=zi(t.schema,e,r[0]);if(!a)return;const l=a.type,u=a.resolve??t.fieldResolver,c=Vi(t,a,r,e,s);try{t.signal?.throwIfAborted();const f=Pi(a,r[0],t.variableValues),p=t.contextValue,h=u(n,f,p,c);let m;return B(h)?m=h.then(w=>qe(t,l,r,c,s,w,i)):m=qe(t,l,r,c,s,h,i),B(m)?m.then(void 0,w=>{if(w instanceof AggregateError){let $;for(let E of w.errors){E=_e(E);const S=ae(E,r,te(s));$=me(S,l,o),le(t,s,i)}return $}w=_e(w);const k=ae(w,r,te(s)),T=me(k,l,o);return le(t,s,i),T}):m}catch(f){if(f instanceof AggregateError){let w;for(let k of f.errors){k=_e(k);const T=ae(k,r,te(s));w=me(T,l,o),le(t,s,i)}return w}const p=_e(f),h=ae(p,r,te(s)),m=me(h,l,o);return le(t,s,i),m}}function Vi(t,e,n,r,s){return{fieldName:e.name,fieldNodes:n,returnType:e.type,parentType:r,path:s,schema:t.schema,fragments:t.fragments,rootValue:t.rootValue,operation:t.operation,variableValues:t.variableValues,signal:t.signal}}const Cc="CRITICAL_ERROR";function me(t,e,n){if(L(e)||t.extensions?.[Cc])throw t;return n.push(t),null}function qe(t,e,n,r,s,i,o){if(i instanceof Error)throw i;if(L(e)){const a=qe(t,e.ofType,n,r,s,i,o);if(a===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return a}if(i==null)return null;if(se(e))return Fc(t,e,n,r,s,i,o);if(Le(e))return $c(e,i);if(Re(e))return Dc(t,e,n,r,s,i,o);if(W(e))return mr(t,e,n,r,s,i,o);console.assert(!1,"Cannot complete value of unexpected output type: "+ce(e))}function Bi(t,e,n){if(typeof n.key=="number")return;const r=Ot(dc,e[0],t.variableValues);if(r&&r.if!==!1)return hs(typeof r.initialCount=="number","initialCount must be a number"),hs(r.initialCount>=0,"initialCount must be a positive integer"),{initialCount:r.initialCount,label:typeof r.label=="string"?r.label:void 0}}async function Rc(t,e,n,r,s,i,o){t.signal?.throwIfAborted(),i.return&&t.onSignalAbort?.(()=>{i.return?.()});const a=o?.errors??t.errors,l=Bi(t,n,s);let u=!1;const c=[];let f=0;for(;;){if(l&&typeof l.initialCount=="number"&&f>=l.initialCount){Gc(f,i,t,n,r,e,s,l.label,o);break}const p=St(s,f,void 0);let h;try{if(h=await i.next(),h.done)break}catch(m){const w=_e(m),k=ae(w,n,te(p));c.push(me(k,e,a));break}Gi(h.value,c,a,t,e,n,r,p,o)&&(u=!0),f+=1}return u?Promise.all(c):c}function Fc(t,e,n,r,s,i,o){const a=e.ofType,l=o?.errors??t.errors;if(Wn(i)){const m=i[Symbol.asyncIterator]();return Rc(t,a,n,r,s,m,o)}if(!oc(i))throw C(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const u=Bi(t,n,s);let c=!1,f=o;const p=[];let h=0;for(const m of i){const w=St(s,h,void 0);if(u&&typeof u.initialCount=="number"&&h>=u.initialCount){f=Vc(s,w,m,t,n,r,a,u.label,f),h++;continue}Gi(m,p,l,t,a,n,r,w,o)&&(c=!0),h++}return c?Promise.all(p):p}function Gi(t,e,n,r,s,i,o,a,l){try{let u;if(B(t)?u=t.then(c=>qe(r,s,i,o,a,c,l)):u=qe(r,s,i,o,a,t,l),B(u))return e.push(u.then(void 0,c=>{c=_e(c);const f=ae(c,i,te(a)),p=me(f,s,n);return le(r,a,l),p})),!0;e.push(u)}catch(u){const c=_e(u),f=ae(c,i,te(a)),p=me(f,s,n);le(r,a,l),e.push(p)}return!1}function $c(t,e){let n;try{n=t.serialize(e)}catch(r){throw r instanceof v?new Error(r.message):r}if(n==null)throw new Error(`Expected \`${ce(t)}.serialize(${ce(e)})\` to return non-nullable value, returned: ${ce(n)}`);return n}function Dc(t,e,n,r,s,i,o){const a=e.resolveType??t.typeResolver,l=t.contextValue,u=a(i,l,r,e);return B(u)?u.then(c=>mr(t,ys(c,t,e,n,r,i),n,r,s,i,o)):mr(t,ys(u,t,e,n,r,i),n,r,s,i,o)}function ys(t,e,n,r,s,i){if(t==null)throw C(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${s.parentType.name}.${s.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,{nodes:r});if(W(t)){if(Js.major>=16)throw C("Support for returning GraphQLObjectType from resolveType was removed in [email protected] please return type name instead.");t=t.name}if(typeof t!="string")throw C(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${s.parentType.name}.${s.fieldName}" with value ${ce(i)}, received "${ce(t)}".`);const o=e.schema.getType(t);if(o==null)throw C(`Abstract type "${n.name}" was resolved to a type "${t}" that does not exist inside the schema.`,{nodes:r});
26if(!W(o))throw C(`Abstract type "${n.name}" was resolved to a non-object type "${t}".`,{nodes:r});if(!e.schema.isSubType(n,o))throw C(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function mr(t,e,n,r,s,i,o){if(e.isTypeOf){const a=e.isTypeOf(i,t.contextValue,r);if(B(a))return a.then(l=>{if(!l)throw bs(e,i,n);return vs(t,e,n,s,i,o)});if(!a)throw bs(e,i,n)}return vs(t,e,n,s,i,o)}function bs(t,e,n){return C(`Expected value of type "${t.name}" but got: ${ce(e)}.`,{nodes:n})}function vs(t,e,n,r,s,i){const{fields:o,patches:a}=Ic(t,e,n),l=Fr(t,e,s,r,o,i);for(const u of a){const{label:c,fields:f}=u;Qi(t,e,s,f,c,r,i)}return l}const Pc=function(t,e,n,r){if($i(t)&&typeof t.__typename=="string")return t.__typename;const s=n.schema.getPossibleTypes(r),i=[];for(let o=0;o<s.length;o++){const a=s[o];if(a.isTypeOf){const l=a.isTypeOf(t,e,n);if(B(l))i[o]=l;else if(l)return a.name}}if(i.length)return Promise.all(i).then(o=>{for(let a=0;a<o.length;a++)if(o[a])return s[a].name})},Ts=function(t,e,n,r){if($i(t)||typeof t=="function"){const s=t[r.fieldName];return typeof s=="function"?t[r.fieldName](e,n,r):s}};function jc(t){const e=Mi(t);if(!("schema"in e)){for(const r of e){const s=r.extensions||={},i=s.http||={};i.status=400,r.extensions.code="BAD_USER_INPUT"}return{errors:e}}const n=Mc(e);return B(n)?n.then(r=>Es(e,r)):Es(e,n)}function Lc(t){return t?.initialResult}function Hi(t){const e=t.subsequentResults;let n=!1,r=!1;return{[Symbol.asyncIterator](){return this},next(){return r?Q({value:void 0,done:r}):n?e.next():(n=!0,Q({value:t.initialResult,done:r}))},return(){return r=!0,e.return()},throw(s){return r=!0,e.throw(s)},[ie.asyncDispose](){return r=!0,e?.[ie.asyncDispose]?.()}}}async function*Uc(t){"initialResult"in t?yield*Hi(t):yield t}function Es(t,e){return Wn(e)?wc(Ri(e,n=>F(()=>Ui(Nc(t,n)),Uc),n=>{throw n instanceof AggregateError?new AggregateError(n.errors.map(r=>ws(r,t.operation)),n.message):ws(n,t.operation)})):e}function ws(t,e){return C(t.message,{originalError:t,nodes:[e]})}function Mc(t){try{const e=qc(t);return B(e)?e.then(void 0,n=>({errors:[n]})):e}catch(e){return{errors:[e]}}}function qc(t){const{schema:e,fragments:n,operation:r,variableValues:s,rootValue:i}=t,o=e.getSubscriptionType();if(o==null)throw C("Schema is not configured to execute subscription operation.",{nodes:r});const{fields:a}=Li(e,n,s,o,r.selectionSet),[l,u]=[...a.entries()][0],c=u[0].name.value,f=zi(e,o,u[0]);if(!f)throw C(`The subscription field "${c}" is not defined.`,{nodes:u});const p=St(void 0,l,o.name),h=Vi(t,f,u,o,p);try{const m=Pi(f,u[0],s),w=t.contextValue,k=(f.subscribe??t.subscribeFieldResolver)(i,m,w,h);return B(k)?k.then(T=>Os(T,t.signal,t.onSignalAbort)).then(void 0,T=>{throw ae(T,u,te(p))}):Os(k,t.signal,t.onSignalAbort)}catch(m){throw ae(m,u,te(p))}}function Os(t,e,n){if(e?.throwIfAborted(),t instanceof Error)throw t;if(!Wn(t))throw C(`Subscription field must return Async Iterable. Received: ${ce(t)}.`);return n?{[Symbol.asyncIterator](){const r=t[Symbol.asyncIterator]();return r.return&&n?.(()=>{r.return?.()}),r}}:t}function Qi(t,e,n,r,s,i,o){const a=new Wc({label:s,path:i,parentContext:o,exeContext:t});let l;try{l=Fr(t,e,n,i,r,a),B(l)&&(l=l.then(null,u=>(a.errors.push(u),null)))}catch(u){a.errors.push(u),l=null}a.addData(l)}function Vc(t,e,n,r,s,i,o,a,l){const u=new Wi({label:a,path:e,parentContext:l,exeContext:r});let c;try{try{B(n)?c=n.then(p=>qe(r,o,s,i,e,p,u)):c=qe(r,o,s,i,e,n,u),B(c)&&(c=c.then(void 0,p=>{p=_e(p);const h=ae(p,s,te(e)),m=me(h,o,u.errors);return le(r,e,u),m}))}catch(p){const h=_e(p),m=ae(h,s,te(e));c=me(m,o,u.errors),le(r,e,u)}}catch(p){return u.errors.push(p),le(r,t,u),u.addItems(null),u}let f;return B(c)?f=c.then(p=>[p],p=>(u.errors.push(p),le(r,t,u),null)):f=[c],u.addItems(f),u}async function Bc(t,e,n,r,s,i,o){let a;try{const{value:u,done:c}=await t.next();if(c)return i.setIsCompletedIterator(),{done:c,value:void 0};a=u}catch(u){const c=_e(u),f=ae(c,n,te(o));return{done:!0,value:me(f,s,i.errors)}}let l;try{return l=qe(e,s,n,r,o,a,i),B(l)&&(l=l.then(void 0,u=>{const c=ae(u,n,te(o)),f=me(c,s,i.errors);return le(e,o,i),f})),{done:!1,value:l}}catch(u){const c=ae(u,n,te(o)),f=me(c,s,i.errors);return le(e,o,i),{done:!1,value:f}}}async function Gc(t,e,n,r,s,i,o,a,l){let u=t,c=l??void 0;for(;;){const f=St(o,u,void 0),p=new Wi({label:a,path:f,parentContext:c,iterator:e,exeContext:n});let h;try{h=await Bc(e,n,r,s,i,p,f)}catch(T){p.errors.push(T),le(n,o,p),p.addItems(null),e?.return&&e.return().catch(()=>{});return}const{done:m,value:w}=h;let k;if(B(w)?k=w.then(T=>[T],T=>(p.errors.push(T),le(n,o,p),null)):k=[w],p.addItems(k),m)break;c=p,u++}}function le(t,e,n){const r=te(e);t.subsequentPayloads.forEach(s=>{if(s!==n){for(let i=0;i<r.length;i++)if(s.path[i]!==r[i])return;$r(s)&&s.iterator?.return&&s.iterator.return().catch(()=>{}),t.subsequentPayloads.delete(s)}})}function Hc(t){const e=[];for(const n of t.subsequentPayloads){const r={};if(n.isCompleted){if(t.subsequentPayloads.delete(n),$r(n)){const s=n.items;if(n.isCompletedIterator)continue;r.items=s}else{const s=n.data;r.data=s??null}r.path=n.path,n.label&&(r.label=n.label),n.errors.length>0&&(r.errors=n.errors),e.push(r)}}return e}function Qc(t){let e=!1;async function n(){if(e)return{value:void 0,done:!0};const s=Array.from(t.subsequentPayloads).map(a=>a.promise);if(t.signalPromise?await Promise.race([t.signalPromise,...s]):await Promise.race(s),e)return{value:void 0,done:!0};const i=Hc(t),o=t.subsequentPayloads.size>0;return!i.length&&o?n():(o||(e=!0),{value:i.length?{incremental:i,hasNext:o}:{hasNext:o},done:!1})}function r(){const s=[];return t.subsequentPayloads.forEach(i=>
26{$r(i)&&i.iterator?.return&&s.push(i.iterator.return())}),Promise.all(s)}return{[Symbol.asyncIterator](){return this},next:n,async return(){return await r(),e=!0,{value:void 0,done:!0}},async throw(s){throw await r(),e=!0,s},async[ie.asyncDispose](){await r(),e=!0}}}class Wc{type;errors;label;path;promise;data;parentContext;isCompleted;_exeContext;_resolve;constructor(e){this.type="defer",this.label=e.label,this.path=te(e.path),this.parentContext=e.parentContext,this.errors=[],this._exeContext=e.exeContext,this._exeContext.subsequentPayloads.add(this),this.isCompleted=!1,this.data=null,this.promise=new Promise(n=>{this._resolve=r=>{n(r)}}).then(n=>{this.data=n,this.isCompleted=!0})}addData(e){const n=this.parentContext?.promise;if(n){this._resolve?.(n.then(()=>e));return}this._resolve?.(e)}}class Wi{type;errors;label;path;items;promise;parentContext;iterator;isCompletedIterator;isCompleted;_exeContext;_resolve;constructor(e){this.type="stream",this.items=null,this.label=e.label,this.path=te(e.path),this.parentContext=e.parentContext,this.iterator=e.iterator,this.errors=[],this._exeContext=e.exeContext,this._exeContext.subsequentPayloads.add(this),this.isCompleted=!1,this.items=null,this.promise=new Promise(n=>{this._resolve=r=>{n(r)}}).then(n=>{this.items=n,this.isCompleted=!0})}addItems(e){const n=this.parentContext?.promise;if(n){this._resolve?.(n.then(()=>e));return}this._resolve?.(e)}setIsCompletedIterator(){this.isCompletedIterator=!0}}function $r(t){return t.type==="stream"}function zi(t,e,n){const r=n.name.value;return r===vn.name&&t.getQueryType()===e?vn:r===Tn.name&&t.getQueryType()===e?Tn:r===En.name?En:e.getFields()[r]}function xs(t){const e=kr(t.document,t.operationName);
26if(e==null)throw new Error("Must provide an operation.");return e.operation==="subscription"?jc(t):F(()=>Sc(t),n=>Lc(n)?Hi(n):n)}var H={},Is;function zc(){return Is||(Is=1,H.fetch=globalThis.fetch,H.Headers=globalThis.Headers,H.Request=globalThis.Request,H.Response=globalThis.Response,H.FormData=globalThis.FormData,H.ReadableStream=globalThis.ReadableStream,H.WritableStream=globalThis.WritableStream,H.TransformStream=globalThis.TransformStream,H.CompressionStream=globalThis.CompressionStream,H.DecompressionStream=globalThis.DecompressionStream,H.TextDecoderStream=globalThis.TextDecoderStream,H.TextEncoderStream=globalThis.TextEncoderStream,H.Blob=globalThis.Blob,H.File=globalThis.File,H.crypto=globalThis.crypto,H.btoa=globalThis.btoa,H.TextEncoder=globalThis.TextEncoder,H.TextDecoder=globalThis.TextDecoder,H.URLPattern=globalThis.URLPattern,H.URL=globalThis.URL,H.URLSearchParams=globalThis.URLSearchParams,H.createFetch=()=>globalThis),H}var zn=zc();const Yc=Oo(zn),Yi=Go({__proto__:null,default:Yc},[zn]);function Ji(t){return t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function"}function Jc(t){return t.socket?.localPort?t.socket?.localPort:(t.headers?.[":authority"]||t.headers?.host)?.split(":")?.[1]||80}function Kc(t){if(t.headers?.[":authority"])return t.headers?.[":authority"];if(t.headers?.host)return t.headers?.host;const e=Jc(t);if(t.hostname)return t.hostname+":"+e;const n=t.socket?.localAddress;return n&&!n?.includes("::")&&!n?.includes("ffff")?`${n}:${e}`:"localhost"}function Xc(t){const e=Kc(t),n=t.protocol||(t.socket?.encrypted?"https":"http"),r=t.originalUrl||t.url||"/graphql";return`${n}://${e}${r}`}function Zc(t){const e=t[Symbol.toStringTag];return!!(typeof t=="string"||e==="Uint8Array"||e==="Blob"||e==="FormData"||e==="URLSearchParams"||Ji(t))}function Ss(t,e,n,r){const s=t.raw||t.req||t;let i=Xc(s);if(t.query){const u=new e.URL(i);for(const c in t.query)u.searchParams.set(c,t.query[c]);i=u.toString()}let o=t.headers;if(t.headers?.[":method"]){o={};for(const u in t.headers)u.startsWith(":")||(o[u]=t.headers[u])}const a=r?Xi():new AbortController;if(n?.once){const u=()=>{a.signal.aborted||(Object.defineProperty(s,"aborted",{value:!0}),a.abort(n.errored??void 0))};n.once("error",u),n.once("close",u),n.once("finish",()=>{n.removeListener("close",u)})}if(t.method==="GET"||t.method==="HEAD")return new e.Request(i,{method:t.method,headers:o,signal:a.signal});const l=t.body;if(l!=null&&Object.keys(l).length>0){if(Zc(l))return new e.Request(i,{method:t.method||"GET",headers:o,body:l,signal:a.signal});const u=new e.Request(i,{method:t.method||"GET",headers:o,signal:a.signal});return u.headers.get("content-type")?.includes("json")||u.headers.set("content-type","application/json; charset=utf-8"),new Proxy(u,{get:(c,f,p)=>{switch(f){case"json":return()=>Q(l);case"text":return()=>Q(JSON.stringify(l));default:return globalThis.Bun?Reflect.get(c,f):Reflect.get(c,f,p)}}})}return new e.Request(i,{method:t.method,headers:o,signal:a.signal,body:s,duplex:"half"})}function Ki(t){return t.read!=null}function ep(t){return Ki(t)}function _s(t){return t!=null&&t.setHeader!=null&&t.end!=null&&t.once!=null&&t.write!=null}function tp(t){return t!=null&&t.getReader!=null}function np(t){return t!=null&&t.request!=null&&t.respondWith!=null}function rp(t){t?.socket?.setTimeout?.(0),t?.socket?.setNoDelay?.(!0),t?.socket?.setKeepAlive?.(!0)}function Je(t){t.end(null,null,null)}function sp(t,e){let n=!1;const r=()=>{n=!0};t.once("error",r),t.once("close",r),t.once("finish",()=>{t.removeListener("close",r),t.removeListener("error",r)});const s=e[Symbol.asyncIterator](),i=()=>s.next().then(({done:o,value:a})=>{if(!(n||o))return F(()=>Bt(a,t),()=>n?Je(t):i())});return i()}function Bt(t,e){if(!e.write(t))return new Promise(n=>e.once("drain",n))}function ip(t,e,n,r){if(e.closed||e.destroyed||e.writableEnded)return;if(!t){e.statusCode=404,Je(e);return}if(r&&t.headers?.headersInit&&!Array.isArray(t.headers.headersInit)&&!t.headers.headersInit.get&&!t.headers._map&&!t.headers._setCookies?.length)e.writeHead(t.status,t.statusText,t.headers.headersInit);else{if(e.setHeaders)e.setHeaders(t.headers);else{let o=!1;
26t.headers.forEach((a,l)=>{if(l==="set-cookie"){if(o)return;o=!0;const u=t.headers.getSetCookie?.();if(u){e.setHeader("set-cookie",u);return}}e.setHeader(l,a)})}e.writeHead(t.status,t.statusText)}if(t.bodyType==="String")return F(()=>Bt(t.bodyInit,e),()=>Je(e));const s=t._buffer;if(s)return F(()=>Bt(s,e),()=>Je(e));const i=t.body;if(i==null){Je(e);return}if(i[Symbol.toStringTag]==="Uint8Array")return F(()=>Bt(i,e),()=>Je(e));if(rp(n),Ki(i)){e.once("close",()=>{i.destroy()}),i.pipe(e,{end:!0});return}if(tp(i))return op(n,e,i);if(Ji(i))return sp(e,i)}function op(t,e,n){const r=n.getReader();t?.once?.("error",i=>{r.cancel(i)});function s(){return r.read().then(({done:i,value:o})=>i?Je(e):F(()=>Bt(o,e),s))}return s()}function ap(t){return t!=null&&typeof t=="object"&&("body"in t||"cache"in t||"credentials"in t||"headers"in t||"integrity"in t||"keepalive"in t||"method"in t||"mode"in t||"redirect"in t||"referrer"in t||"referrerPolicy"in t||"signal"in t||"window"in t)}function ht(...t){const[e,...n]=t.filter(r=>r!=null&&typeof r=="object");return n.forEach(r=>{const s=Object.getOwnPropertyNames(r).reduce((i,o)=>(Object.getOwnPropertyDescriptor(r,o)&&(i[o]=Object.getOwnPropertyDescriptor(r,o)),i),{});Object.getOwnPropertySymbols(r).forEach(i=>{const o=Object.getOwnPropertyDescriptor(r,i);o?.enumerable&&(s[i]=o)}),Object.defineProperties(e,s)}),e}function Ns(t,e){return new e(t.stack||t.message||t.toString(),{status:t.status||500})}function ks(t,e){return t==null?e==null?{}:{waitUntil:e}:ht(Object.create(t),{waitUntil:e},t)}function As(t,e){if(e?.aborted)throw e.reason;if(B(t)&&e){let n=function(){r.reject(e.reason)};const r=Ci();return e.addEventListener("abort",n,{once:!0}),t.then(function(s){r.resolve(s)}).catch(function(s){r.reject(s)}).finally(()=>{e.removeEventListener("abort",n)}),r.promise}return t}const lp=["SIGINT","exit","SIGTERM"],mn=new Set;let Cs=!1;function up(){if(!Cs){Cs=!0;for(const t of lp)globalThis.process.once(t,function(){return Promise.allSettled([...mn].map(e=>!e.disposed&&e.disposeAsync()))})}}function cp(t){globalThis.process&&(up(),mn.has(t)||(mn.add(t),t.defer(()=>{mn.delete(t)})))}class pp extends EventTarget{aborted=!1;_onabort=null;_reason;constructor(){super();const e=globalThis.process?.getBuiltinModule?.("node:events");e?.kMaxEventTargetListeners&&(this[e.kMaxEventTargetListeners]=0)}throwIfAborted(){if(this._nativeCtrl?.signal?.throwIfAborted)return this._nativeCtrl.signal.throwIfAborted();if(this.aborted)throw this._reason}_nativeCtrl;ensureNativeCtrl(){if(!this._nativeCtrl){const e=this.aborted;this._nativeCtrl=new AbortController,e&&this._nativeCtrl.abort(this._reason)}return this._nativeCtrl}abort(e){if(this._nativeCtrl?.abort)return this._nativeCtrl?.abort(e);this._reason=e||new DOMException("This operation was aborted","AbortError"),this.aborted=!0,this.dispatchEvent(new Event("abort"))}get signal(){return this._nativeCtrl?.signal?this._nativeCtrl.signal:this}get reason(){return this._nativeCtrl?.signal?this._nativeCtrl.signal.reason:this._reason}get onabort(){return this._onabort?this._onabort:this._onabort}set onabort(e){if(this._nativeCtrl?.signal){this._nativeCtrl.signal.onabort=e;return}this._onabort&&this.removeEventListener("abort",this._onabort),this._onabort=e,e&&this.addEventListener("abort",e)}}function Xi(){return globalThis.Bun||globalThis.Deno?new AbortController:new Proxy(new pp,{get(t,e,n){if(e.toString().includes("kDependantSignals")){const r=t.ensureNativeCtrl();return Reflect.get(r.signal,e,r.signal)}return Reflect.get(t,e,n)},set(t,e,n,r){if(e.toString().includes("kDependantSignals")){const s=t.ensureNativeCtrl();return Reflect.set(s.signal,e,n,s.signal)}return Reflect.set(t,e,n,r)},getPrototypeOf(){return AbortSignal.prototype}})}function fp(t){return!!t.onData}function dp({req:t,res:e,fetchAPI:n,controller:r}){const s=t.getMethod();let i;const o=[],a=[I=>{o.push(I)}],l=I=>{for(const O of a)O(I)};let u=!1;const c=[()=>{u=!0}],f=()=>{for(const I of c)I()};e.onData(function(I,O){l(Buffer.from(Buffer.from(I,0,I.byteLength))),O&&f()});let p;if(s!=="get"&&s!=="head"){i="half",r.signal.addEventListener("abort",()=>{f()},{once:!0});let I;p=()=>(I||(I=new n.ReadableStream({start(O){for(const P of o)O.enqueue(P);if(u){O.close();return}a.push(P=>{O.enqueue(P)}),c.push(()=>
26{if(r.signal.reason){O.error(r.signal.reason);return}O.desiredSize&&O.close()})}})),I)}const h=new n.Headers;t.forEach((I,O)=>{h.append(I,O)});let m=`http://localhost${t.getUrl()}`;const w=t.getQuery();w&&(m+=`?${w}`);let k;function T(){return p?u?E():p():null}const $=new n.Request(m,{method:s,headers:h,get body(){return T()},signal:r.signal,duplex:i});function E(){return k||(k=o.length===1?o[0]:Buffer.concat(o)),k}function S(){return u?Q(E()):new Promise((I,O)=>{try{c.push(()=>{I(E())})}catch(P){O(P)}})}return Object.defineProperties($,{body:{get(){return T()},configurable:!0,enumerable:!0},json:{value(){return S().then(I=>I.toString("utf8")).then(I=>JSON.parse(I))},configurable:!0,enumerable:!0},text:{value(){return S().then(I=>I.toString("utf8"))},configurable:!0,enumerable:!0},arrayBuffer:{value(){return S()},configurable:!0,enumerable:!0}}),$}function hp(t,e){return new e.WritableStream({write(n){t.cork(()=>{t.write(n)})},close(){t.cork(()=>{t.end()})}})}function gp(t,e,n,r){if(!e){t.writeStatus("404 Not Found"),t.end();return}const s=e._buffer;if(!n.signal.aborted&&(t.cork(()=>{t.writeStatus(`${e.status} ${e.statusText}`);for(const[i,o]of e.headers)if(i!=="content-length"){if(i==="set-cookie"){const a=e.headers.getSetCookie?.();if(a){for(const l of a)t.writeHeader(i,l);continue}}t.writeHeader(i,o)}s?t.end(s):e.body||t.end()}),!(s||!e.body)))return n.signal.addEventListener("abort",()=>{e.body?.locked||e.body?.cancel(n.signal.reason)},{once:!0}),e.body.pipeTo(hp(t,r),{signal:n.signal}).catch(i=>{if(!n.signal.aborted)throw i})}function mp(t){try{return!!t?.request}catch{return!1}}const yp={};function bp(t,e){const n=e?.__useSingleWriteHead==null?!0:e.__useSingleWriteHead,r={...Yi,...e?.fetchAPI},s=e?.__useCustomAbortCtrl==null?r.Request!==globalThis.Request:e.__useCustomAbortCtrl,i=typeof t=="function"?t:t.handle,o=[],a=[];let l;const u=new Set;let c;function f(){return c||(c=new Ec,e?.disposeOnProcessTerminate&&cp(c),c.defer(()=>{if(u.size>0)return Promise.allSettled(u).then(()=>{u.clear()},()=>{u.clear()})})),c}function p(g){B(g)&&(f(),u.add(g),g.then(()=>{u.delete(g)},y=>{console.error(`Unexpected error while waiting: ${y.message||y}`),u.delete(g)}))}if(e?.plugins!=null)for(const g of e.plugins){g.instrumentation&&(l=l?Ar(l,g.instrumentation):g.instrumentation),g.onRequest&&o.push(g.onRequest),g.onResponse&&a.push(g.onResponse);const y=g[ie.dispose];y&&f().defer(y);const b=g[ie.asyncDispose];b&&f().defer(b),g.onDispose&&f().defer(g.onDispose)}let h=o.length>0||a.length>0?function(g,y){let b=i,_;if(o.length===0)return q();let R=g.parsedUrl||new Proxy(yp,{get(G,Y,M){return R=new r.URL(g.url,"http://localhost"),Reflect.get(R,Y,R)}});function j(G){return a.length===0?G:F(()=>et(a,Y=>Y({request:g,response:G,serverContext:y,setResponse(M){G=M},fetchAPI:r})),()=>G)}function q(){return _?j(_):F(()=>b(g,y),j)}return F(()=>et(o,(G,Y)=>G({request:g,setRequest(M){g=M},serverContext:y,fetchAPI:r,url:R,requestHandler:b,setRequestHandler(
26M){b=M},endResponse(M){_=M,M&&Y()}})),q)}:i;if(l?.request){const g=h;h=(y,b)=>Sn({request:y}).asyncFn(l.request,g)(y,b)}function m(g,...y){const b=y.length>1?ht(...y):y[0]||{};b.waitUntil||(b.waitUntil=p);const _=Ss(g,r,void 0,s);return h(_,b)}function w(g,y,...b){const _=y.raw||y,R=b.length>1?ht(...b):b[0]||{};R.waitUntil||(R.waitUntil=p);const j=Ss(g,r,_,s);return h(j,R)}function k(g,y,...b){const _={req:g,res:y,waitUntil:p};return Cr(Q().then(()=>w(g,y,_,...b)).catch(R=>Ns(R,r.Response)).then(R=>ip(R,y,g,n)).catch(R=>console.error(`Unexpected error while handling request: ${R.message||R}`)))}function T(g,y,...b){const _={res:g,req:y,waitUntil:p},R=b.filter(M=>M!=null).length>0?ht(_,...b):_,j=s?Xi():new AbortController,q=g.end.bind(g);let G=!1;g.end=function(M){return G=!0,q(M)},g.onAborted.bind(g)(function(){j.abort()}),g.onAborted=function(M){j.signal.addEventListener("abort",M,{once:!0})};const Y=dp({req:y,res:g,fetchAPI:r,controller:j});return F(()=>F(()=>h(Y,R),M=>M,M=>Ns(M,r.Response)),M=>{if(!j.signal.aborted&&!G)return F(()=>gp(g,M,j,r),nn=>nn,nn=>{console.error(`Unexpected error while handling request: ${nn.message||nn}`)})})}function $(g,...y){if(!g.respondWith||!g.request)throw new TypeError(`Expected FetchEvent, got ${g}`);const b=y.filter(j=>j!=null),_=b.length>0?ht({},g,...b):ks(g),R=h(g.request,_);g.respondWith(R)}function E(g,...y){const b=y.filter(R=>R!=null),_=b.length>1?ht({},...b):ks(b[0],b[0]==null||b[0].waitUntil==null?p:void 0);return h(g,_)}const S=(g,...y)=>{if(typeof g=="string"||"href"in g){const[_,...R]=y;if(ap(_)){const q=new r.Request(g,_),G=E(q,...R),Y=_.signal;return Y?As(G,Y):G}const j=new r.Request(g);return E(j,...y)}const b=E(g,...y);return As(b,g.signal)},I=(g,...y)=>{const[b,..._]=y;if(ep(g)){if(!_s(b))throw new TypeError(`Expected ServerResponse, got ${b}`);return k(g,b,..._)}if(fp(g))return T(g,b,..._);if(_s(b))throw new TypeError("Got Node response without Node request");return mp(g)?np(g)?$(g,...y):E(g.request,g,...y):S(g,...y)},O={handleRequest:E,fetch:S,handleNodeRequest:m,handleNodeRequestAndResponse:w,requestListener:k,handleEvent:$,handleUWS:T,handle:I,get disposableStack(){return f()},[ie.asyncDispose](){return c&&!c.disposed?c.disposeAsync():Q()},dispose(){return c&&!c.disposed?c.disposeAsync():Q()},waitUntil:p},P=new Proxy(I,{has:(g,y)=>y in O||y in I||t&&y in t,get:(g,y)=>{if(globalThis.Deno||y===Symbol.asyncDispose||y===Symbol.dispose){const R=Reflect.get(O,y,O);if(R)return R}const b=O[y];if(b)return b.bind?b.bind(O):b;const _=I[y];if(_)return _.bind?_.bind(I):_;if(t){const R=t[y];if(R)return R.bind?function(...j){const q=t[y](...j);return q===t?P:q}:R}},apply(g,y,b){return I(...b)}});return P}function vp(t,e){const n=t.headers.get("origin");if(e===!1||n==null)return null;const r={};if(e.origin==null||e.origin.length===0||e.origin.includes("*")?(r["Access-Control-Allow-Origin"]=n,r.Vary="Origin"):typeof e.origin=="string"?r["Access-Control-Allow-Origin"]=e.origin:Array.isArray(e.origin)&&(e.origin.length===1?r["Access-Control-Allow-Origin"]=e.origin[0]:e.origin.includes(n)?(r["Access-Control-Allow-Origin"]=n,r.Vary="Origin"):r["Access-Control-Allow-Origin"]="null"),e.methods?.length)r["Access-Control-Allow-Methods"]=e.methods.join(", ");else{const s=t.headers.get("access-control-request-method");s&&(r["Access-Control-Allow-Methods"]=s)}if(e.allowedHeaders?.length)r["Access-Control-Allow-Headers"]=e.allowedHeaders.join(", ");else{const s=t.headers.get("access-control-request-headers");s&&(r["Access-Control-Allow-Headers"]=s,r.Vary?r.Vary+=", Access-Control-Request-Headers":r.Vary="Access-Control-Request-Headers")}return e.credentials!=null?e.credentials===!0&&(r["Access-Control-Allow-Credentials"]="true"):r["Access-Control-Allow-Origin"]!=="*"&&(r["Access-Control-Allow-Credentials"]="true"),e.exposedHeaders&&(r["Access-Control-Expose-Headers"]=e.exposedHeaders.join(", ")),e.maxAge&&(r["Access-Control-Max-Age"]=e.maxAge.toString()),r}function Tp(t,e,n){return F(()=>e(t,n),r=>vp(t,r))}function Ep(t){let e=()=>({});if(t!=null)if(typeof t=="function")e=t;else if(typeof t=="object"){const n={...t};e=()=>n}else t===!1&&(e=()=>!1);return{onRequest({request:n,fetchAPI:r,endResponse:s}){if(n.method.toUpperCase()==="OPTIONS"){const i=new r.Response(null,{status:204,headers:{"Content-Length":"0"}});s(i)}},onResponse({request:n,serverContext:r,response:s}){return F(()=>Tp(n,e,r),i=>
26{if(i!=null)for(const o in i)s.headers.set(o,i[o])})}}}function wp(t){return t!=null&&typeof t=="object"&&"errors"in t}function Op(t){return t!=null&&typeof t.toString=="function"}function it(t){return t instanceof v}function Dr(t){return t instanceof v?t.originalError!=null?Dr(t.originalError):!0:!1}function Zi(t){return typeof t=="object"&&t?.constructor?.name==="DOMException"&&(t.name==="AbortError"||t.name==="TimeoutError")}function yn(t,e,n){const r=new Set;if(wp(t))for(const s of t.errors){const i=yn(s,e,n);for(const o of i)r.add(o)}else if(Zi(t))n.debug("Request aborted");else if(e){const s=e.maskError(t,e.errorMessage,e.isDev);s!==t&&n.error(t),r.add(it(s)?s:C(s.message,{originalError:s}))}else it(t)?r.add(t):t instanceof Error?r.add(C(t.message,{originalError:t})):typeof t=="string"?r.add(C(t,{extensions:{code:"INTERNAL_SERVER_ERROR",unexpected:!0}})):Op(t)?r.add(C(t.toString(),{extensions:{code:"INTERNAL_SERVER_ERROR",unexpected:!0}})):(n.error(t),r.add(C("Unexpected error.",{extensions:{http:{unexpected:!0}}})));return Array.from(r)}function Pr(t,e={},n=!1){let r,s=!1;if("extensions"in t&&t.extensions?.http&&(t.extensions.http.headers&&Object.assign(e,t.extensions.http.headers),t.extensions.http.status&&(r=t.extensions.http.status)),"errors"in t&&t.errors?.length)for(const i of t.errors)if(i.extensions?.http){if(i.extensions.http.headers&&Object.assign(e,i.extensions.http.headers),n&&i.extensions.http.spec)continue;i.extensions.http.status&&(!r||i.extensions.http.status>r)&&(r=i.extensions.http.status)}else(!Dr(i)||i.extensions?.unexpected)&&(s=!0);else r||=200;return r||(s&&!("data"in t)?r=500:r=200),{status:r,headers:e}}function xp(t){return Array.isArray(t)&&t.length>0&&t.some(it)}function eo(t){const e=t.get("operationName")||void 0,n=t.get("query")||void 0,r=t.get("variables")||void 0,s=t.get("extensions")||void 0;return{operationName:e,query:n,variables:r?JSON.parse(r):void 0,extensions:s?JSON.parse(s):void 0}}function Ip(t){const e=new zn.URLSearchParams(t);return eo(e)}function Yt(t,e){let n=t.headers.get("content-type");return n=n?.split(",")[0]||null,n===e||!!n?.startsWith(`${e};`)}function Sp(t){return t.method==="GET"}function _p(t){const e=t.url.substring(t.url.indexOf("?")+1),n=new zn.URLSearchParams(e);return eo(n)}function Np(t){return t.method==="POST"&&Yt(t,"application/x-www-form-urlencoded")}function kp(t){return t.text().then(Ip)}function Ap(t){return t.method==="POST"&&Yt(t,"application/graphql")}function Cp(t){return t.text().then(e=>({query:e}))}function Rp(t){return t.method==="POST"&&(Yt(t,"application/json")||Yt(t,"application/graphql+json"))}function Fp(t){return F(()=>t.json(),e=>{if(e==null)throw C(`POST body is expected to be object but received ${e}`,{extensions:{http:{status:400},code:"BAD_REQUEST"}});const n=typeof e;if(n!=="object")throw C(`POST body is expected to be object but received ${n}`,{extensions:{http:{status:400},code:"BAD_REQUEST"}});return e},e=>{if(e instanceof v)throw e;const n={http:{spec:!0,status:400},code:"BAD_REQUEST"};throw e instanceof Error&&(n.originalError={name:e.name,message:e.message}),C("POST body sent invalid JSON.",{extensions:n})})}function $p(t,e,n){e.split&&(e=e.split("."));for(var r=0,s=e.length,i=t,o,a;r<s&&(a=""+e[r++],!(a==="__proto__"||a==="constructor"||a==="prototype"));)i=i[a]=r===s?n:typeof(o=i[a])==typeof e?o:e[r]*0!==0||~(""+e[r]).indexOf(".")?{}:[]}function Dp(t){return t.method==="POST"&&Yt(t,"multipart/form-data")}function Pp(t){return F(()=>t.formData(),e=>{const n=e.get("operations");if(!n)throw C('Missing multipart form field "operations"');if(typeof n!="string")throw C('Multipart form field "operations" must be a string');let r;try{r=JSON.parse(n)}catch{throw C('Multipart form field "operations" must be a valid JSON string')}const s=e.get("map");if(s!=null){if(typeof s!="string")throw C('Multipart form field "map" must be a string');let i;try{i=JSON.parse(s)}catch{throw C('Multipart form field "map" must be a valid JSON string')}for(const o in i){const a=e.get(o),l=i[o];for(const u of l)$p(r,u,a)}}return r},e=>{throw e instanceof Error&&e.message.startsWith("File size limit exceeded: ")?C(e.message,{extensions:{http:{status:413}}}):e})}const jp=new Set(["query","variables","operationName","extensions"]);function Lp(t,e){if(t==null||typeof t!="object")throw C('Invalid "params" in the request body',{extensions:{http:{spec:!0,status:400},code:"BAD_REQUEST"}});for(const n in t)if(t[n]!=null&&!jp.has(n)){if(e?.includes(n))continue;throw C(`Unexpected parameter "${n}" in the request body.`,{extensions:{http:{status:400},code:"BAD_REQUEST"}})}}function Up(t,e){if(!qp(t))throw C(`Expected params to be an object but given ${qt(t)}.`,{extensions:{http:{status:400,headers:{Allow:"GET, POST"}},code:"BAD_REQUEST"}});if(Lp(t,e),t.query==null)throw C("Must provide query string.",{extensions:{http:{spec:!0,status:400,headers:{Allow:"GET, POST"}},code:"BAD_REQUEST"}});const n=qt(t.query);
26if(n!=="string")throw C(`Expected "query" param to be a string, but given ${n}.`,{extensions:{http:{status:400,headers:{Allow:"GET, POST"}},code:"BAD_REQUEST"}});const r=qt(t.variables);if(!["object","null","undefined"].includes(r))throw C(`Expected "variables" param to be empty or an object, but given ${r}.`,{extensions:{http:{status:400,headers:{Allow:"GET, POST"}},code:"BAD_REQUEST"}});const s=qt(t.extensions);if(!["object","null","undefined"].includes(s))throw C(`Expected "extensions" param to be empty or an object, but given ${s}.`,{extensions:{http:{status:400,headers:{Allow:"GET, POST"}},code:"BAD_REQUEST"}});return t}function Mp(t){return{onParams({params:e}){Up(e,t)}}}function qt(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function qp(t){return qt(t)==="object"}function Vp(t){return t==="GET"||t==="POST"}function Bp(){return{onRequestParse({request:t}){if(!Vp(t.method))throw C("GraphQL only supports GET and POST requests.",{extensions:{http:{status:405,headers:{Allow:"GET, POST"}},code:"BAD_REQUEST"}})}}}function Gp(){return{onValidate(){return({valid:t,result:e})=>{if(!t)for(const n of e)n.extensions||={},n.extensions.code||="GRAPHQL_VALIDATION_FAILED",n.extensions.http||={},n.extensions.http.spec=n.extensions.http.spec==null?!0:n.extensions.http.spec,n.extensions.http.status||=400}}}}function Hp(t){return{onRequestParse(){return{onRequestParseDone({requestParserResult:e}){if(Array.isArray(e)){if(!t)throw C("Batching is not supported.",{extensions:{http:{status:400},code:"BAD_REQUEST"}});if(e.length>t)throw C(`Batching is limited to ${t} operations per request.`,{extensions:{http:{status:413},code:"BAD_REQUEST"}})}}}}}}function Qp(t,e,n){const r=e?kr(e,n)??void 0:void 0;if(!r)throw C("Could not determine what operation to execute.",{extensions:{code:"OPERATION_RESOLUTION_FAILURE",http:{status:400}}});if(r.operation==="mutation"&&t==="GET")throw C("Can only perform a mutation operation from a POST request.",{extensions:{http:{status:405,headers:{Allow:"POST"}},code:"BAD_REQUEST"}})}function Wp(){return{onParse(){return({result:t,context:{request:e,params:{operationName:n}={}}})=>{if(e)if(t instanceof Error){if(t instanceof v){const r=t.extensions||={};r.code||="GRAPHQL_PARSE_FAILED";const s=r.http||={};s.spec||=!0,s.status||=400}}else Qp(e.method,t,n)}}}}function zp({id:t=Date.now().toString(),logger:e=console,endpoint:n="/health"}={}){return{onRequest({endResponse:r,fetchAPI:s,request:i}){if(i.url.endsWith(n)){e.debug("Responding Health Check");const o=new s.Response(null,{status:200,headers:{"x-yoga-id":t}});r(o)}}}}const ct=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,to=new Set,yr=typeof process=="object"&&process?process:{},no=(t,e,n,r)=>{typeof yr.emitWarning=="function"?yr.emitWarning(t,e,n,r):console.error(`[${n}] ${e}: ${t}`)};let Rn=globalThis.AbortController,Rs=globalThis.AbortSignal;if(typeof Rn>"u"){Rs=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,r){this._onabort.push(r)}},Rn=class{constructor(){e()}signal=new Rs;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const r of this.signal._onabort)r(n);this.signal.onabort?.(n)}}};let t=yr.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const e=()=>{t&&(t=!1,no("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const Yp=t=>!to.has(t),De=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),ro=t=>De(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?bn:null:null;class bn extends Array{constructor(e){super(e),this.fill(0)}}class yt{heap;length;static#l=!1;static create(e){const n=ro(e);if(!n)return[];yt.#l=!0;const r=new yt(e,n);return yt.#l=!1,r}constructor(e,n){if(!yt.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class jr{#l;#p;#g;#m;#A;#C;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#y;#r;#n;#e;#u;#f;#a;#i;#b;#o;#v;#T;#d;#E;#S;#c;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#d,sizes:e.#v,keyM
26ap:e.#r,keyList:e.#n,valList:e.#e,next:e.#u,prev:e.#f,get head(){return e.#a},get tail(){return e.#i},free:e.#b,isBackgroundFetch:n=>e.#t(n),backgroundFetch:(n,r,s,i)=>e.#$(n,r,s,i),moveToTail:n=>e.#k(n),indexes:n=>e.#w(n),rindexes:n=>e.#O(n),isStale:n=>e.#h(n)}}get max(){return this.#l}get maxSize(){return this.#p}get calculatedSize(){return this.#y}get size(){return this.#s}get fetchMethod(){return this.#A}get memoMethod(){return this.#C}get dispose(){return this.#g}get disposeAfter(){return this.#m}constructor(e){const{max:n=0,ttl:r,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,disposeAfter:c,noDisposeOnSet:f,noUpdateTTL:p,maxSize:h=0,maxEntrySize:m=0,sizeCalculation:w,fetchMethod:k,memoMethod:T,noDeleteOnFetchRejection:$,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:I,ignoreFetchAbort:O}=e;if(n!==0&&!De(n))throw new TypeError("max option must be a nonnegative integer");const P=n?ro(n):Array;if(!P)throw new Error("invalid max value: "+n);if(this.#l=n,this.#p=h,this.maxEntrySize=m||this.#p,this.sizeCalculation=w,this.sizeCalculation){if(!this.#p&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#C=T,k!==void 0&&typeof k!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#A=k,this.#S=!!k,this.#r=new Map,this.#n=new Array(n).fill(void 0),this.#e=new Array(n).fill(void 0),this.#u=new P(n),this.#f=new P(n),this.#a=0,this.#i=0,this.#b=yt.create(n),this.#s=0,this.#y=0,typeof u=="function"&&(this.#g=u),typeof c=="function"?(this.#m=c,this.#o=[]):(this.#m=void 0,this.#o=void 0),this.#E=!!this.#g,this.#c=!!this.#m,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!$,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!O,this.maxEntrySize!==0){if(this.#p!==0&&!De(this.#p))throw new TypeError("maxSize must be a positive integer if specified");if(!De(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#q()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=De(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=r||0,this.ttl){if(!De(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D()}if(this.#l===0&&this.ttl===0&&this.#p===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#p){const g="LRU_CACHE_UNBOUNDED";Yp(g)&&(to.add(g),no("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",g,jr))}}getRemainingTTL(e){return this.#r.has(e)?1/0:0}#D(){const e=new bn(this.#l),n=new bn(this.#l);this.#d=e,this.#T=n,this.#P=(i,o,a=ct.now())=>{if(n[i]=o!==0?a:0,e[i]=o,o!==0&&this.ttlAutopurge){const l=setTimeout(()=>{this.#h(i)&&this.#x(this.#n[i],"expire")},o+1);l.unref&&l.unref()}},this.#_=i=>{n[i]=e[i]!==0?ct.now():0},this.#I=(i,o)=>{if(e[o]){const a=e[o],l=n[o];if(!a||!l)return;i.ttl=a,i.start=l,i.now=r||s();const u=i.now-l;i.remainingTTL=a-u}};let r=0;const s=()=>{const i=ct.now();if(this.ttlResolution>0){r=i;const o=setTimeout(()=>r=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{const o=this.#r.get(i);if(o===void 0)return 0;const a=e[o],l=n[o];if(!a||!l)return 1/0;const u=(r||s())-l;return a-u},this.#h=i=>{const o=n[i],a=e[i];return!!a&&!!o&&(r||s())-o>a}}#_=()=>{};#I=()=>{};#P=()=>{};#h=()=>!1;#q(){const e=new bn(this.#l);this.#y=0,this.#v=e,this.#N=n=>{this.#y-=e[n],e[n]=0},this.#j=(n,r,s,i)=>{if(this.#t(r))return 0;if(!De(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(r,n),!De(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#R=(n,r,s)=>{if(e[n]=r,this.#p){const i=this.#p-e[n];for(;this.#y>i;)this.#F(!0)}this.#y+=e[n],s&&(s.entrySize=r,s.totalCalculatedSize=this.#y)}}#N=e=>{};#R=(e,n,r)=>{};
26#j=(e,n,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:e=this.allowStale}={}){if(this.#s)for(let n=this.#i;!(!this.#L(n)||((e||!this.#h(n))&&(yield n),n===this.#a));)n=this.#f[n]}*#O({allowStale:e=this.allowStale}={}){if(this.#s)for(let n=this.#a;!(!this.#L(n)||((e||!this.#h(n))&&(yield n),n===this.#i));)n=this.#u[n]}#L(e){return e!==void 0&&this.#r.get(this.#n[e])===e}*entries(){for(const e of this.#w())this.#e[e]!==void 0&&this.#n[e]!==void 0&&!this.#t(this.#e[e])&&(yield[this.#n[e],this.#e[e]])}*rentries(){for(const e of this.#O())this.#e[e]!==void 0&&this.#n[e]!==void 0&&!this.#t(this.#e[e])&&(yield[this.#n[e],this.#e[e]])}*keys(){for(const e of this.#w()){const n=this.#n[e];n!==void 0&&!this.#t(this.#e[e])&&(yield n)}}*rkeys(){for(const e of this.#O()){const n=this.#n[e];n!==void 0&&!this.#t(this.#e[e])&&(yield n)}}*values(){for(const e of this.#w())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(const e of this.#O())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,n={}){for(const r of this.#w()){const s=this.#e[r],i=this.#t(s)?s.__staleWhileFetching:s;if(i!==void 0&&e(i,this.#n[r],this))return this.get(this.#n[r],n)}}forEach(e,n=this){for(const r of this.#w()){const s=this.#e[r],i=this.#t(s)?s.__staleWhileFetching:s;i!==void 0&&e.call(n,i,this.#n[r],this)}}rforEach(e,n=this){for(const r of this.#O()){const s=this.#e[r],i=this.#t(s)?s.__staleWhileFetching:s;i!==void 0&&e.call(n,i,this.#n[r],this)}}purgeStale(){let e=!1;for(const n of this.#O({allowStale:!0}))this.#h(n)&&(this.#x(this.#n[n],"expire"),e=!0);return e}info(e){const n=this.#r.get(e);if(n===void 0)return;const r=this.#e[n],s=this.#t(r)?r.__staleWhileFetching:r;if(s===void 0)return;const i={value:s};if(this.#d&&this.#T){const o=this.#d[n],a=this.#T[n];if(o&&a){const l=o-(ct.now()-a);i.ttl=l,i.start=Date.now()}}return this.#v&&(i.size=this.#v[n]),i}dump(){const e=[];for(const n of this.#w({allowStale:!0})){const r=this.#n[n],s=this.#e[n],i=this.#t(s)?s.__staleWhileFetching:s;if(i===void 0||r===void 0)continue;const o={value:i};if(this.#d&&this.#T){o.ttl=this.#d[n];const a=ct.now()-this.#T[n];o.start=Math.floor(Date.now()-a)}this.#v&&(o.size=this.#v[n]),e.unshift([r,o])}return e}load(e){this.clear();for(const[n,r]of e){if(r.start){const s=Date.now()-r.start;r.start=ct.now()-s}this.set(n,r.value,r)}}set(e,n,r={}){if(n===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=r;let{noUpdateTTL:u=this.noUpdateTTL}=r;const c=this.#j(e,n,r.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#x(e,"set"),this;let f=this.#s===0?void 0:this.#r.get(e);if(f===void 0)f=this.#s===0?this.#i:this.#b.length!==0?this.#b.pop():this.#s===this.#l?this.#F(!1):this.#s,this.#n[f]=e,this.#e[f]=n,this.#r.set(e,f),this.#u[this.#i]=f,this.#f[f]=this.#i,this.#i=f,this.#s++,this.#R(f,c,l),l&&(l.set="add"),u=!1;else{this.#k(f);const p=this.#e[f];if(n!==p){if(this.#S&&this.#t(p)){p.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:h}=p;h!==void 0&&!o&&(this.#E&&this.#g?.(h,e,"set"),this.#c&&this.#o?.push([h,e,"set"]))}else o||(this.#E&&this.#g?.(p,e,"set"),this.#c&&this.#o?.push([p,e,"set"]));if(this.#N(f),this.#R(f,c,l),this.#e[f]=n,l){l.set="replace";const h=p&&this.#t(p)?p.__staleWhileFetching:p;h!==void 0&&(l.oldValue=h)}}else l&&(l.set="update")}if(s!==0&&!this.#d&&this.#D(),this.#d&&(u||this.#P(f,s,i),l&&this.#I(l,f)),!o&&this.#c&&this.#o){const p=this.#o;let h;for(;h=p?.shift();)this.#m?.(...h)}return this}pop(){try{for(;this.#s;){const e=this.#e[this.#a];if(this.#F(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#c&&this.#o){const e=this.#o;let n;for(;n=e?.shift();)this.#m?.(...n)}}}#F(e){const n=this.#a,r=this.#n[n],s=this.#e[n];return this.#S&&this.#t(s)?s.__abortController.abort(new Error("evicted")):(this.#E||this.#c)&&(this.#E&&this.#g?.(s,r,"evict"),this.#c&&this.#o?.push([s,r,"evict"])),this.#N(n),e&&(this.#n[n]=void 0,this.#e[n]=void 0,this.#b.push(n)),this.#s===1?(this.#a=this.#i=0,this.#b.length=0):this.#a=this.#u[n],this.#r.delete(r),this.#s--,n}has(e,n={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=n,i=this.#r.get(e);if(i!==void 0){const o=this.#e[i];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#h(i))s&&(s.has="stale",this.#I(s,i));else return r&&this.#_(i),s&&(s.has="hit",this.#I(s,i)),!0}else s&&(s.has="miss");return!1}peek(e,n={}){const{allowStale:r=this.allowStale}=n,s=this.#r.get(e);if(s===void 0||!r&&this.#h(s))return;const i=this.#e[s];return this.#t(i)?i.__staleWhileFetching:i}#$(e,n,r,s){const i=n===void 0?void 0:this.#e[n];if(this.#t(i))return i;const o=new Rn,{signal:a}=r;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const l={signal:o.signal,options:r,context:s},u=(w,k=!1)=>{const{aborted:T}=o.signal,$=r.ignoreFetchAbort&&w!==void 0;if(r.status&&(T&&!k?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,$&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),T&&!$&&!k)return f(o.signal.reason);const E=h;return this.#e[n]===h&&(w===void 0?E.__staleWhileFetching?this.#e[n]=E.__staleWhileFetching:this.#x(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,w,l.options))),w},c=w=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=w),f(w)),f=w=>{const{aborted:k}=o.signal,T=k&&r.allowStaleOnFetchAbort,$=T||r.allowStaleOnFetchRejection,E=$||r.noDeleteOnFetchRejection,S=h;if(this.#e[n]===h&&(!E||S.__staleWhileFetching===void 0?this.#x(e,"fetch"):T||(this.#e[n]=S.__staleWhileFetching)),$)return r.status&&S.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw w},p=(w,k)=>{const T=this.#A?.(e,i,l);T&&T instanceof Promise&&T.then($=>w($===void 0?void 0:$),k),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(w(void 0),r.allowStaleOnFetchAbort&&(w=$=>u($,!0)))})};
26r.status&&(r.status.fetchDispatched=!0);const h=new Promise(p).then(u,c),m=Object.assign(h,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return n===void 0?(this.set(e,m,{...l.options,status:void 0}),n=this.#r.get(e)):this.#e[n]=m,m}#t(e){if(!this.#S)return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Rn}async fetch(e,n={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:w,forceRefresh:k=!1,status:T,signal:$}=n;if(!this.#S)return T&&(T.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:T});const E={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:T,signal:$};let S=this.#r.get(e);if(S===void 0){T&&(T.fetch="miss");const I=this.#$(e,S,E,w);return I.__returned=I}else{const I=this.#e[S];if(this.#t(I)){const y=r&&I.__staleWhileFetching!==void 0;return T&&(T.fetch="inflight",y&&(T.returnedStale=!0)),y?I.__staleWhileFetching:I.__returned=I}const O=this.#h(S);if(!k&&!O)return T&&(T.fetch="hit"),this.#k(S),s&&this.#_(S),T&&this.#I(T,S),I;const P=this.#$(e,S,E,w),g=P.__staleWhileFetching!==void 0&&r;return T&&(T.fetch=O?"stale":"refresh",g&&O&&(T.returnedStale=!0)),g?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,n={}){const r=await this.fetch(e,n);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,n={}){const r=this.#C;if(!r)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:i,...o}=n,a=this.get(e,o);if(!i&&a!==void 0)return a;const l=r(e,a,{options:o,context:s});return this.set(e,l,o),l}get(e,n={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=n,a=this.#r.get(e);if(a!==void 0){const l=this.#e[a],u=this.#t(l);return o&&this.#I(o,a),this.#h(a)?(o&&(o.get="stale"),u?(o&&r&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),r?l.__staleWhileFetching:void 0):(i||this.#x(e,"expire"),o&&r&&(o.returnedStale=!0),r?l:void 0)):(o&&(o.get="hit"),u?l.__staleWhileFetching:(this.#k(a),s&&this.#_(a),l))}else o&&(o.get="miss")}#U(e,n){this.#f[n]=e,this.#u[e]=n}#k(e){e!==this.#i&&(e===this.#a?this.#a=this.#u[e]:this.#U(this.#f[e],this.#u[e]),this.#U(this.#i,e),this.#i=e)}delete(e){return this.#x(e,"delete")}#x(e,n){let r=!1;if(this.#s!==0){const s=this.#r.get(e);if(s!==void 0)if(r=!0,this.#s===1)this.#M(n);else{this.#N(s);const i=this.#e[s];if(this.#t(i)?i.__abortController.abort(new Error("deleted")):(this.#E||this.#c)&&(this.#E&&this.#g?.(i,e,n),this.#c&&this.#o?.push([i,e,n])),this.#r.delete(e),this.#n[s]=void 0,this.#e[s]=void 0,s===this.#i)this.#i=this.#f[s];else if(s===this.#a)this.#a=this.#u[s];else{const o=this.#f[s];this.#u[o]=this.#u[s];const a=this.#u[s];this.#f[a]=this.#f[s]}this.#s--,this.#b.push(s)}}if(this.#c&&this.#o?.length){const s=this.#o;let i;for(;i=s?.shift();)this.#m?.(...i)}return r}clear(){return this.#M("delete")}#M(e){for(const n of this.#O({allowStale:!0})){const r=this.#e[n];if(this.#t(r))r.__abortController.abort(new Error("deleted"));else{const s=this.#n[n];this.#E&&this.#g?.(r,s,e),this.#c&&this.#o?.push([r,s,e])}}if(this.#r.clear(),this.#e.fill(void 0),this.#n.fill(void 0),this.#d&&this.#T&&(this.#d.fill(0),this.#T.fill(0)),this.#v&&this.#v.fill(0),this.#a=0,this.#i=0,this.#b.length=0,this.#y=0,this.#s=0,this.#c&&this.#o){const n=this.#o;let r;for(;r=n?.shift();)this.#m?.(...r)}}}const Jp=1024,Kp=36e5;function or({max:t=Jp,ttl:e=Kp}={}){return new jr({max:t,ttl:e})}
26function Xp({documentCache:t=or(),errorCache:e=or(),validationCache:n=!0}){const r=or();return{onParse({params:s,setParsedDocument:i}){const o=s.source.toString(),a=t.get(o);if(a){i(a);return}const l=e.get(o);if(l)throw l;return({result:u})=>{u!=null&&(u instanceof Error?e.set(o,u):t.set(o,u))}},onValidate({params:{schema:s,documentAST:i,rules:o},setResult:a}){if(s!=null&&n!==!1){const l=o?.map(p=>p.name).join(",")||"";let u=r.get(l);u||(u=new WeakMap,r.set(l,u));let c=u.get(s);c||(c=new WeakMap,u.set(s,c));const f=c.get(i);if(f){a(f);return}return({result:p})=>{p!=null&&c?.set(i,p)}}}}}const Zp=()=>!0;function Ft(t){const e=t.match||Zp;return{onRequestParse({request:n,setRequestParser:r}){e(n)&&r(t.parse)}}}function ef(t){const e=(t.headers.get("accept")||"*/*").replace(/\s/g,"").toLowerCase().split(","),n=[];for(const r of e){const[s,...i]=r.split(";");s===void 0||(i?.find(o=>o.includes("charset="))||"charset=utf-8")!=="charset=utf-8"||n.push(s)}return n.reverse()}function tf(t,e){const[n,r]=t.split("/"),[s,i]=e.split("/");return(s==="*"||s===n)&&(i==="*"||i===r)}function Lr(t){if(Array.isArray(t))return`[${t.map(n=>{const r=Fs(n);return(n.stringify||JSON.stringify)(r)}).join(",")}]`;const e=Fs(t);return(t.stringify||JSON.stringify)(e)}function Fs(t){if(t.errors?.length||t.extensions?.http){const e={...t};if(e.errors&&=e.errors.map(so),e.extensions){const{http:n,...r}=t.extensions;e.extensions=Object.keys(r).length?r:void 0}return e}return t}function so(t){if(it(t)){const e="toJSON"in t&&typeof t.toJSON=="function"?t.toJSON():Object(t),{http:n,unexpected:r,...s}=e.extensions||{};return C(t.message,{nodes:t.nodes,source:t.source,positions:t.positions,path:t.path,originalError:so(t.originalError||void 0),extensions:Object.keys(s).length?s:void 0})}return t}function nf(t,e){const n=Pr(t,{Connection:"keep-alive","Content-Type":'multipart/mixed; boundary="-"',"Transfer-Encoding":"chunked"});let r;const s=new e.TextEncoder,i=new e.ReadableStream({start(o){if(Se(t))r=t[Symbol.asyncIterator]();else{let a=!1;r={next:()=>a?Q({done:!0,value:null}):(a=!0,Q({done:!1,value:t}))}}o.enqueue(s.encode(`\r
27`)),o.enqueue(s.encode("---"))},pull(o){return F(()=>r.next(),({done:a,value:l})=>{if(l!=null){o.enqueue(s.encode(`\r
28`)),o.enqueue(s.encode("Content-Type: application/json; charset=utf-8")),o.enqueue(s.encode(`\r
29`));const u=Lr(l),c=s.encode(u);o.enqueue(s.encode("Content-Length: "+c.byteLength)),o.enqueue(s.encode(`\r
30`)),o.enqueue(s.encode(`\r
31`)),o.enqueue(c),o.enqueue(s.encode(`\r
32`)),o.enqueue(s.encode("---"))}a&&(o.enqueue(s.encode(`--\r
33`)),o.close())},a=>{o.error(a)})},cancel(o){if(r.return)return F(()=>r.return?.(o),()=>{})}});return new e.Response(i,n)}function rf(t,e,n){if(Wn(t))return new e.Response(null,{status:406,statusText:"Not Acceptable",headers:{accept:"application/json; charset=utf-8, application/graphql-response+json; charset=utf-8"}});const r={"Content-Type":n+"; charset=utf-8"},s=Pr(t,r,n==="application/json"&&!Array.isArray(t)&&xp(t.errors)&&t.errors.some(o=>!o.extensions?.originalError||it(o.extensions.originalError))),i=Lr(t);return new e.Response(i,s)}function sf(){return function(t,e){let n=12e3;globalThis.process?.env?.NODE_ENV==="test"&&(n=300);const r=Pr(t,{"Content-Type":"text/event-stream",Connection:"keep-alive","Cache-Control":"no-cache","Content-Encoding":"none"},!0);let s,i;const o=new e.TextEncoder,a=new e.ReadableStream({start(l){if(l.enqueue(o.encode(`:
34
35`)),i=setInterval(()=>{if(!l.desiredSize){clearInterval(i);return}l.enqueue(o.encode(`:
36
37`))},n),Se(t))s=t[Symbol.asyncIterator]();else{let u=!1;s={next:()=>u?Q({done:!0,value:null}):(u=!0,Q({done:!1,value:t}))}}},pull(l){return F(()=>s.next(),u=>{if(u.value!=null){l.enqueue(o.encode(`event: next
38`));const c=Lr(u.value);l.enqueue(o.encode(`data: ${c}
39
40`))}u.done&&(l.enqueue(o.encode(`event: complete
41`)),l.enqueue(o.encode(`data:
42
43`)),clearInterval(i),l.close())},u=>{l.error(u)})},cancel(l){if(clearInterval(i),s.return)return F(()=>s.return?.(l),()=>{})}});return new e.Response(a,r)}}const of={mediaTypes:["multipart/mixed"],asyncIterables:!0,processResult:nf};function af(){return{mediaTypes:["text/event-stream"],asyncIterables:!0,processResult:sf()}}const $s={mediaTypes:["application/graphql-response+json","application/json"],asyncIterables:!1,processResult:rf};function lf(){const t=new WeakMap,e=af(),n=[e,of,$s],r=[e,$s];return{onSubscribe({args:{contextValue:s}}){s.request&&t.set(s.request,!0)},onResultProcess({request:s,result:i,acceptableMediaTypes:o,setResultProcessor:a}){const l=t.get(s)?r:n,u=ef(s),c=Se(i);for(const f of l)for(const p of u)if(!(c&&!f.asyncIterables))for(const h of f.mediaTypes)o.push(h),tf(h,p)&&a(f.processResult,h)}}}const uf=`<!doctype html><html lang=en><head><meta charset=utf-8><title>Welcome to GraphQL Yoga</title><link rel=icon href=https://raw.githubusercontent.com/graphql-hive/graphql-yoga/main/website/public/favicon.ico><style>body,html{padding:0;margin:0;height:100%;font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',sans-serif;color:#fff;background-color:#000}main>section.hero{display:flex;height:90vh;justify-content:center;align-items:center;flex-direction:column}.logo{display:flex;align-items:center}.buttons{margin-top:24px}h1{font-size:80px}h2{color:#888;max-width:50%;margin-top:0;text-align:center}a{color:#fff;text-decoration:none;margin-left:10px;margin-right:10px;font-weight:700;transition:color .3s ease;padding:4px;overflow:visible}a.graphiql:hover{color:rgba(255,0,255,.7)}a.docs:hover{color:rgba(28,200,238,.7)}a.tutorial:hover{color:rgba(125,85,245,.7)}svg{margin-right:24px}.not-what-your-looking-for{margin-top:5vh}.not-what-your-looking-for>*{margin-left:auto;margin-right:auto}.not-what-your-looking-for>p{text-align:center}.not-what-your-looking-for>h2{color:#464646}.not-what-your-looking-for>p{max-width:600px;line-height:1.3em}.not-what-your-looking-for>pre{max-width:300px}</style></head><body id=body><main><section class=hero><div class=logo><div><svg xmlns=http://www.w3.org/2000/svg viewBox="-0.41 0.445 472.812 499.811" height=150><defs><linearGradient id=paint0_linear_1677_11483 x1=16 y1=14 x2=87.2132 y2=44.5982 gradientUnits=userSpaceOnUse gradientTransform="matrix(8.139854, 0, 0, 8.139854, -130.346407, -113.25101)"><stop stop-color=#7433FF />
43<stop offset=1 stop-color=#FFA3FD /></linearGradient><linearGradient id=paint1_linear_1677_11483 x1=16 y1=14 x2=87.2132 y2=44.5982 gradientUnits=userSpaceOnUse gradientTransform="matrix(8.139854, 0, 0, 8.139854, -130.346407, -113.25101)"><stop stop-color=#7433FF /><stop offset=1 stop-color=#FFA3FD /></linearGradient><linearGradient id=paint2_linear_1677_11483 x1=16 y1=14 x2=87.2132 y2=44.5982 gradientUnits=userSpaceOnUse gradientTransform="matrix(8.139854, 0, 0, 8.139854, -130.346407, -113.25101)"><stop stop-color=#7433FF /><stop offset=1 stop-color=#FFA3FD /></linearGradient><linearGradient id=paint3_linear_1677_11483 x1=16 y1=14 x2=87.2132 y2=44.5982 gradientUnits=userSpaceOnUse><stop stop-color=#7433FF /><stop offset=1 stop-color=#FFA3FD /></linearGradient><linearGradient id=paint4_linear_1677_11483 x1=16 y1=14 x2=87.2132 y2=44.5982 gradientUnits=userSpaceOnUse><stop stop-color=#7433FF /><stop offset=1 stop-color=#FFA3FD /></linearGradient><linearGradient id=paint5_linear_1677_11483 x1=16 y1=14 x2=87.2132 y2=44.5982 gradientUnits=userSpaceOnUse><stop stop-color=#7433FF /><stop offset=1 stop-color=#FFA3FD /></linearGradient><filter id=filter0_f_1677_11483 x=23 y=-25 width=100 height=100 filterUnits=userSpaceOnUse color-interpolation-filters=sRGB><feFlood flood-opacity=0 result=BackgroundImageFix /><feBlend mode=normal in=SourceGraphic in2=BackgroundImageFix result=shape /><feGaussianBlur stdDeviation=12 result=effect1_foregroundBlur_1677_11483 /></filter><filter id=filter1_f_1677_11483 x=-24 y=19 width=100 height=100 filterUnits=userSpaceOnUse color-interpolation-filters=sRGB><feFlood flood-opacity=0 result=BackgroundImageFix /><feBlend mode=normal in=SourceGraphic in2=BackgroundImageFix result=shape /><feGaussianBlur stdDeviation=12 result=effect1_foregroundBlur_1677_11483 /></filter><linearGradient id=paint6_linear_1677_11483 x1=30 y1=28 x2=66.1645 y2=44.4363 gradientUnits=userSpaceOnUse gradientTransform="matrix(8.139854, 0, 0, 8.139854, -130.346407, -113.25101)"><stop stop-color=#7433FF /><stop offset=1 stop-color=#FFA3FD /></linearGradient><filter id=filter2_f_1677_11483 x=-12 y=-44 width=100 height=100 filterUnits=userSpaceOnUse color-interpolation-filters=sRGB><feFlood flood-opacity=0 result=BackgroundImageFix /><feBlend mode=normal in=SourceGraphic in2=BackgroundImageFix result=shape /><feGaussianBlur stdDeviation=12 result=effect1_foregroundBlur_1677_11483 /></filter><filter id=filter3_f_1677_11483 x=13 y=19 width=100 height=100 filterUnits=userSpaceOnUse color-interpolation-filters=sRGB><feFlood flood-opacity=0 result=BackgroundImageFix /><feBlend mode=normal in=SourceGraphic in2=BackgroundImageFix result=shape /><feGaussianBlur stdDeviation=12 result=effect1_foregroundBlur_1677_11483 /></filter></defs><mask id=mask0_1677_11483 style=mask-type:alpha maskUnits=userSpaceOnUse x=16 y=14 width=58 height=62><path d="M21 25.3501C21.7279 25.3501 22.4195 25.5056 23.0433 25.7853L42.1439 14.8C43.0439 14.3 44.1439 14 45.1439 14C46.2439 14 47.2439 14.3 48.1439 14.8L64.5439 24.3C63.3439 25.1 62.4439 26.3 61.8439 27.7L45.9438 18.5C45.6439 18.3 45.344 18.3 45.0441 18.3C44.7441 18.3 44.4439 18.4 44.1439 18.5L25.8225 29.0251C25.9382 29.4471 26 29.8914 26 30.3501C26 33.1115 23.7614 35.3501 21 35.3501C18.2386 35.3501 16 33.1115 16 30.3501C16 27.5887 18.2386 25.3501 21 25.3501Z" fill=url(#paint3_linear_1677_11483) /><path d="M67.2438 35.0329C65.3487 34.3219 64 32.4934 64 30.35C64 27.5886 66.2386 25.35 69 25.35C71.7614 25.35 74 27.5886 74 30.35C74 32.1825 73.0142 33.7848 71.5439 34.6554V55.2C71.5439 57.4 70.3439 59.4 68.5439 60.5L52.1439 69.9C52.1439 68.4 51.6438 66.9 50.7438 65.8L66.3439 56.8C66.9439 56.5 67.2438 55.9 67.2438 55.2V35.0329Z" fill=url(#paint4_linear_1677_11483) /><path d="M49.8439 69.1055C49.9458 69.5034 50 69.9204 50 70.3501C50 73.1115 47.7614 75.3501 45 75.3501C42.5102 75.3501 40.4454 73.5302 40.0633 71.1481L21.8439 60.6C19.9439 59.5 18.8439 57.5 18.8439 55.3V36.8C19.5439 37 20.3439 37.2 21.0439 37.2C21.7439 37.2 22.4439 37.1 23.0439 36.9V55.3C23.0439 56 23.4438 56.6 23.9438 56.9L41.3263 66.9583C42.2398 65.9694 43.5476 65.3501 45 65.3501C47.3291 65.3501 49.2862 66.9426 49.8419 69.0981L49.8436 69.0997L49.8439 69.1055Z" fill=url(#paint5_linear_1677_11483) /></mask><mask id=mask1_1677_11483 style=mask-type:alpha maskUnits=userSpaceOnUse x=30 y=28 width=30 height=30><path fill-rule=evenodd clip-rule=evenodd d="M49.3945 32.3945C49.3945 34.7088 47.5796 38.5469 45 38.5469C42.4271 38.5469 40.6055 34.7112 40.6055 32.3945C40.6055 29.9714 42.5769 28 45 28C47.4231 28 49.3945 29.9714 49.3945 32.3945ZM35.332 49.0433V48.2148C35.332 42.8117 37.8535 41.0004 39.8796 39.545L39.8801 39.5447C40.3928 39.1767 40.8604 38.8404 41.2488 38.4742C42.3293 39.6642 43.626 40.3047 45 40.3047C46.3752 40.3047 47.6725 39.6642 48.7529 38.4754C49.1408 38.841 49.6078 39.1773 50.1199 39.5447L50.1204 39.545C52.1465 41.0004 54.668 42.8117 54.668 48.2148V49.0433L53.8406 49.092C49.9848 49.3185 46.8646 46.9002 45 43.5777C43.1159 46.935 39.9847 49.318 36.1594 49.092L35.332 49.0433ZM58.1463 51.0747L58.1463 51.0746C57.0179 50.891 50.0128 49.7507 45.0007 55.693C40.0116 49.7553 33.1965 50.8592 31.9095 51.0677L31.9095 51.0677C31.7906 51.087 31.7189 51.0986 31.7002 51.0963C31.7005 51.0969 31.7011 51.1045 31.7023 51.1187C31.726 51.4003 31.9682 54.2745 34.0566 56.2422L30 58H60L55.8956 56.2422C57.8537 54.4764 58.1396 52.2685 58.2508 51.4092V51.4091C58.2697 51.2628 58.2836 51.1556 58.2998 51.0963C58.2881 51.0977 58.2356 51.0892 58.1463 51.0747ZM40.4836 50.104C42.3956 49.3212 43.6746 48.1737 45 46.61C46.332 48.1841 47.6159 49.3259 49.5164 50.104C49.5356 50.1425 49.5557 50.1805 49.5756 50.2182C49.5793 50.2253 49.583 50.2323 49.5867 50.2393C48.0911 50.8127 46.4264 51.825 45.0047 53.1444C43.5906 51.8221 41.9673 50.8196 40.4256 50.2153C40.4455 50.1784 40.4648 50.1415 40.4836 50.104Z" fill=black /></mask><path d="M 40.59 93.095 C 46.517 93.095 52.14 94.365 57.22 96.635 L 212.7 7.22 C 220.025 3.149 228.978 0.706 237.12 0.706 C 246.073 0.706 254.213 3.149 261.54 7.22 L 395.032 84.547 C 385.264 91.059 377.939 100.827 373.055 112.224 L 243.631 37.338 C 241.19 35.71 238.747 35.71 236.305 35.71 C 233.863 35.71 231.42 36.523 228.978 37.338 L 79.84 123.009 C 80.786 126.443 81.29 130.058 81.29 133.793 C 81.29 156.269 63.065 174.493 40.59 174.493 C 18.116 174.493 -0.
43109 156.269 -0.109 133.793 C -0.109 111.32 18.116 93.095 40.59 93.095 Z" fill=url(#paint0_linear_1677_11483) /><path d="M 417.01 171.913 C 401.585 166.126 390.603 151.238 390.603 133.793 C 390.603 111.32 408.83 93.095 431.303 93.095 C 453.777 93.095 472.001 111.32 472.001 133.793 C 472.001 148.706 463.976 161.755 452.011 168.835 L 452.011 336.07 C 452.011 353.977 442.243 370.258 427.591 379.21 L 294.098 455.726 C 294.098 443.516 290.029 431.306 282.703 422.353 L 409.683 349.093 C 414.568 346.651 417.01 341.767 417.01 336.07 L 417.01 171.913 Z" fill=url(#paint1_linear_1677_11483) /><path d="M 275.376 449.253 C 276.206 452.495 276.646 455.889 276.646 459.389 C 276.646 481.863 258.422 500.087 235.947 500.087 C 215.679 500.087 198.87 485.272 195.761 465.883 L 47.46 380.025 C 31.995 371.071 23.041 354.792 23.041 336.884 L 23.041 186.296 C 28.738 187.923 35.25 189.553 40.948 189.553 C 46.646 189.553 52.345 188.738 57.228 187.111 L 57.228 336.884 C 57.228 342.582 60.485 347.465 64.554 349.908 L 206.042 431.777 C 213.481 423.728 224.127 418.689 235.947 418.689 C 254.905 418.689 270.833 431.656 275.36 449.196 L 275.376 449.214 L 275.376 449.253 Z" fill=url(#paint2_linear_1677_11483) /><g mask=url(#mask0_1677_11483) transform="matrix(8.139854, 0, 0, 8.139854, -130.346375, -113.251038)"><g filter=url(#filter0_f_1677_11483)><circle cx=73 cy=25 r=26 fill=#ED2E7E /></g><g filter=url(#filter1_f_1677_11483)><circle cx=26 cy=69 r=26 fill=#1CC8EE /></g></g><path fill-rule=evenodd clip-rule=evenodd d="M 271.713 150.431 C 271.713 169.275 256.948 200.517 235.947 200.517 C 215.003 200.517 200.172 169.292 200.172 150.431 C 200.172 130.708 216.225 114.666 235.947 114.666 C 255.67 114.666 271.713 130.708 271.713 150.431 Z M 157.251 285.952 L 157.251 279.212 C 157.251 235.233 177.771 220.485 194.27 208.641 C 198.447 205.644 202.247 202.901 205.414 199.923 C 214.204 209.608 224.763 214.826 235.947 214.826 C 247.138 214.826 257.697 209.608 266.496 199.931 C 269.653 202.911 273.456 205.644 277.622 208.641 C 294.114 220.485 314.642 235.233 314.642 279.212 L 314.642 285.952 L 307.912 286.351 C 276.525 288.191 251.128 268.509 235.947 241.468 C 220.611 268.795 195.126 288.191 163.981 286.351 L 157.251 285.952 Z M 342.953 302.492 C 333.771 300.994 276.751 291.715 235.955 340.082 C 195.345 291.749 139.865 300.734 129.389 302.436 C 128.428 302.59 127.841 302.688 127.687 302.665 C 127.687 302.673 127.695 302.729 127.702 302.85 C 127.897 305.138 129.867 328.532 146.872 344.55 L 113.849 358.862 L 358.044 358.8
4362 L 324.639 344.55 C 340.576 330.177 342.905 312.202 343.807 305.212 C 343.962 304.022 344.077 303.153 344.206 302.665 C 344.108 302.68 343.686 302.606 342.953 302.492 Z M 199.188 294.59 C 214.751 288.215 225.161 278.879 235.947 266.15 C 246.788 278.96 257.241 288.255 272.707 294.59 C 272.869 294.898 273.031 295.207 273.196 295.518 C 273.219 295.574 273.252 295.631 273.285 295.688 C 261.107 300.361 247.555 308.598 235.989 319.334 C 224.477 308.573 211.258 300.417 198.715 295.493 C 198.87 295.191 199.033 294.891 199.188 294.59 Z" fill=url(#paint6_linear_1677_11483) /><g mask=url(#mask1_1677_11483) transform="matrix(8.139854, 0, 0, 8.139854, -130.346375, -113.251038)"><g filter=url(#filter2_f_1677_11483)><circle cx=38 cy=6 r=26 fill=#ED2E7E /></g><g filter=url(#filter3_f_1677_11483)><circle cx=63 cy=69 r=26 fill=#1CC8EE /></g></g></svg></div><h1>GraphQL Yoga</h1><p>Version: 5.13.5</p></div><h2>The batteries-included cross-platform GraphQL Server.</h2><div class=buttons><a href=https://www.the-guild.dev/graphql/yoga-server/docs class=docs>Read the Docs</a> <a href=https://www.the-guild.dev/graphql/yoga-server/tutorial/basic class=tutorial>Start the Tutorial </a><a href=__GRAPHIQL_LINK__ class=graphiql>Visit GraphiQL</a></div></section><section class=not-what-your-looking-for><h2>Not the page you are looking for? 👀</h2><p>This page is shown be default whenever a 404 is hit.<br>You can disable this by behavior via the <code>landingPage</code> option.</p><pre>
44          <code>
45import { createYoga } from 'graphql-yoga';
46
47const yoga = createYoga({
48  landingPage: false
49})
50          </code>
51        </pre><p>If you expected this page to be the GraphQL route, you need to configure Yoga. Currently, the GraphQL route is configured to be on <code>__GRAPHIQL_LINK__</code>.</p><pre>
52          <code>
53import { createYoga } from 'graphql-yoga';
54
55const yoga = createYoga({
56  graphqlEndpoint: '__REQUEST_PATH__',
57})
58          </code>
59        </pre></section></main></body></html>`,cf=function(t){return new t.fetchAPI.Response(uf.replace(/__GRAPHIQL_LINK__/g,t.graphqlEndpoint).replace(/__REQUEST_PATH__/g,t.url.pathname),{status:200,statusText:"OK",headers:{"Content-Type":"text/html"}})};function pf(t){let e;function n({URLPattern:s}){return e||=new s({pathname:t.graphqlEndpoint}),e}const r=t.landingPageRenderer||cf;return{onRequest({request:s,fetchAPI:i,endResponse:o,url:a}){if(!s.url.endsWith(t.graphqlEndpoint)&&!s.url.endsWith(`${t.graphqlEndpoint}/`)&&a.pathname!==t.graphqlEndpoint&&a.pathname!==`${t.graphqlEndpoint}/`&&!n(i).test(a)){if(t.showLandingPage===!0&&s.method==="GET"&&s.headers?.get("accept")?.includes("text/html")){const l=r({request:s,fetchAPI:i,url:a,graphqlEndpoint:t.graphqlEndpoint,get urlPattern(){return n(i)}});if(B(l))return l.then(o);o(l);return}o(new i.Response("",{status:404,statusText:"Not Found"}))}}}}function ar({request:t,result:e,fetchAPI:n,onResultProcessHooks:r,serverContext:s}){let i;const o=[];let a="*/*";return F(()=>et(r,l=>l({request:t,acceptableMediaTypes:o,result:e,setResult(u){e=u},resultProcessor:i,setResultProcessor(u,c){i=u,a=c},serverContext:s})),()=>i?i(e,n,a):new n.Response(null,{status:406,statusText:"Not Acceptable",headers:{accept:o.join("; charset=utf-8, ")}}))}function ff({params:t,enveloped:e}){const n=e.parse(t.query),r=e.validate(e.schema,n);return r.length>0?{errors:r}:F(()=>e.contextFactory(),s=>{const i={schema:e.schema,document:n,contextValue:s,variableValues:t.variables,operationName:t.operationName};return(kr(n,t.operationName)?.operation==="subscription"?e.subscribe:e.execute)(i)})}function Ds(t){return it(t)?t.toJSON():t instanceof Error?{message:t.message,stack:t.stack,cause:t.cause}:t}const df=(t,e,n=globalThis.process?.env?.NODE_ENV==="development")=>{if(Dr(t))return t;const r={code:"INTERNAL_SERVER_ERROR",unexpected:!0},s={extensions:r};return it(t)?(s.nodes=t.nodes,s.source=t.source,s.positions=t.positions,s.path=t.path,n&&t.originalError&&(r.originalError=Ds(t.originalError)),t.extensions?.http&&(r.http=t.extensions.http)):n&&(r.originalError=Ds(t)),C(e,s)};class hf{getEnveloped;logger;graphqlEndpoint;fetchAPI;plugins;instrumentation;onRequestParseHooks;onParamsHooks;onExecutionResultHooks;onResultProcessHooks;maskedErrorsOpts;id;version="5.13.5";constructor(e){if(this.id=e?.id??"yoga",this.fetchAPI={...Yi},e?.fetchAPI)for(const l in e.fetchAPI)e.fetchAPI[l]&&(this.fetchAPI[l]=e.fetchAPI[l]);const n=e?.logging==null?!0:e.logging;this.logger=typeof n=="boolean"?n===!0?sr():sr("silent"):typeof n=="string"?sr(n):n;const r=typeof e?.maskedErrors=="object"&&e.maskedErrors.maskError||df,s=new WeakSet;this.maskedErrorsOpts=e?.maskedErrors===!1?null:{errorMessage:"Unexpected error.",...typeof e?.maskedErrors=="object"?e.maskedErrors:{},maskError:(l,u)=>{if(s.has(l))return l;const c=r(l,u,this.maskedErrorsOpts?.isDev);return c!==l&&this.logger.error(l),s.add(c),c}};const i=this.maskedErrorsOpts==null?null:this.maskedErrorsOpts;let o=0;e?.batching&&(typeof e.batching=="boolean"?o=10:o=e.batching.limit??10),this.graphqlEndpoint=e?.graphqlEndpoint||"/graphql";const a=this.graphqlEndpoint;this.plugins=[Jl({parse:Qo,validate:vl,execute:xs,subscribe:xs,specifiedRules:vi}),!!e?.schema&&Zu(e.schema),e?.context!=null&&Yl(l=>e?.context?typeof e.context=="function"?e.context(l):e.context:{}),zp({id:this.id,logger:this.logger,endpoint:e?.healthCheckEndpoint}),e?.cors!==!1&&Ep(e?.cors),e?.graphiql!==!1&&Xu({graphqlEndpoint:a,options:e?.graphiql,render:e?.renderGraphiQL,logger:this.logger}),Ft({match:Sp,parse:_p}),Ft({match:Rp,parse:Fp}),e?.multipart!==!1&&Ft({match:Dp,parse:Pp}
59),Ft({match:Ap,parse:Cp}),Ft({match:Np,parse:kp}),lf(),...e?.plugins??[],{onPluginInit({addPlugin:l}){e?.parserAndValidationCache!==!1&&l(Xp(!e?.parserAndValidationCache||e?.parserAndValidationCache===!0?{}:e?.parserAndValidationCache)),l(Hp(o)),l(Mp(e?.extraParamNames));const u=!!(e?.landingPage??!0);l(pf({graphqlEndpoint:a,showLandingPage:u,landingPageRenderer:typeof e?.landingPage=="function"?e.landingPage:void 0})),l(Bp()),l(Wp()),i&&(l({onSubscribe(){return{onSubscribeError({error:c}){if(Zi(c))throw c}}}}),l(zl(i))),l(Gp())}}],this.getEnveloped=Ul({plugins:this.plugins}),this.plugins=this.getEnveloped._plugins,this.onRequestParseHooks=[],this.onParamsHooks=[],this.onExecutionResultHooks=[],this.onResultProcessHooks=[];for(const l of this.plugins)l&&(l.onYogaInit&&l.onYogaInit({yoga:this}),l.onRequestParse&&this.onRequestParseHooks.push(l.onRequestParse),l.onParams&&this.onParamsHooks.push(l.onParams),l.onExecutionResult&&this.onExecutionResultHooks.push(l.onExecutionResult),l.onResultProcess&&this.onResultProcessHooks.push(l.onResultProcess),l.instrumentation&&(this.instrumentation=this.instrumentation?Ar(this.instrumentation,l.instrumentation):l.instrumentation))}handleParams=({request:e,context:n,params:r})=>{const s=n.request===e?{params:r}:{request:e,params:r};Object.assign(n,s);const i=this.getEnveloped(n);return this.logger.debug("Processing GraphQL Parameters"),F(()=>F(()=>ff({params:r,enveloped:i}),o=>(this.logger.debug("Processing GraphQL Parameters done."),o),o=>({errors:yn(o,this.maskedErrorsOpts,this.logger)})),o=>(Se(o)&&(o=Ri(o,a=>a,a=>{if(a.name==="AbortError")throw this.logger.debug("Request aborted"),a;return{errors:yn(a,this.maskedErrorsOpts,this.logger)}})),o))};getResultForParams=({params:e,request:n},r)=>{let s,i=this.handleParams;return F(()=>et(this.onParamsHooks,o=>o({params:e,request:n,setParams(a){e=a},paramsHandler:i,setParamsHandler(a){i=a},setResult(a){s=a},fetchAPI:this.fetchAPI,context:r})),()=>F(()=>s||i({request:n,params:e,context:r}),o=>F(()=>et(this.onExecutionResultHooks,a=>a({result:o,setResult(l){o=l},request:n,context:r})),()=>o)))};parseRequest=(e,n)=>{let r=new Proxy({},{get:(o,a,l)=>(r=new this.fetchAPI.URL(e.url,"http://localhost"),Reflect.get(r,a,r))}),s;const i=[];return F(()=>et(this.onRequestParseHooks,o=>F(()=>o({request:e,url:r,requestParser:s,serverContext:n,setRequestParser(a){s=a}}),a=>a?.onRequestParseDone),i),()=>(this.logger.debug("Parsing request to extract GraphQL parameters"),s?F(()=>s(e),o=>F(()=>et(i,a=>a({requestParserResult:o,setRequestParserResult(l){o=l}})),()=>({requestParserResult:o}))):{response:new this.fetchAPI.Response(null,{status:415,statusText:"Unsupported Media Type"})}))};handle=(e,n)=>{const r=this.instrumentation&&Sn({request:e}),s=this.instrumentation?.requestParse?r.asyncFn(this.instrumentation?.requestParse,this.parseRequest):this.parseRequest;return Cr(Q().then(()=>s(e,n)).then(({response:i,requestParserResult:o})=>{if(i)return i;const a=this.instrumentation?.operation?(l,u)=>Sn({context:u,request:l.request}).asyncFn(this.instrumentation?.operation,this.getResultForParams)(l,u):this.getResultForParams;return F(()=>Array.isArray(o)?Promise.all(o.map(l=>a({params:l,request:e},Object.create(n)))):a({params:o,request:e},n),l=>(this.instrumentation?.resultProcess?r.asyncFn(this.instrumentation.resultProcess,ar):ar)({request:e,result:l,fetchAPI:this.fetchAPI,onResultProcessHooks:this.onResultProcessHooks,serverContext:n}))}).catch(i=>{const o={errors:yn(i,this.maskedErrorsOpts,this.logger)};return ar({request:e,result:o,fetchAPI:this.fetchAPI,onResultProcessHooks:this.onResultProcessHooks,serverContext:n})}))}}function gf(t){const e=new hf(t);return bp(e,{fetchAPI:e.fetchAPI,plugins:e.plugins,disposeOnProcessTerminate:t.disposeOnProcessTerminate})}/*!
60 * allof-merge v0.6.6
61 * Copyright (C) 2012-2024 Damir Yusipov
62 * Date: Sat, 17 Feb 2024 19:27:36 GMT
63 */function Jt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]])}return n}function mf(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]])}return n}const yf=(t={},e,n,r)=>{const s=`/${e}`,i=typeof t["/**"]=="function"?t["/**"]({key:e,path:n,value:r}):t["/**"],o=typeof t["/*"]=="function"?t["/*"]({key:e,path:n,value:r}):t["/*"];let a={};if(s in t)a=t[s];else if(!i&&!o)return;return a=typeof a=="function"?a({key:e,path:n,value:r}):a,o&&(a=Object.assign(Object.assign({}
63,o),a)),i?Object.assign(Object.assign({"/**":t["/**"]},i),a):a},io=t=>{const e={},n=t.reduce((r,s)=>(Object.keys(s).forEach(i=>r.add(i)),r),new Set);for(const r of n.keys()){const s=t.filter(i=>r in i);if(s.length!==1){if(r.charAt(0)!=="/")throw new Error(`Cannot merge rules. Duplicate key: ${r}. Rules should not have same Rule key`);e[r]=(i,o)=>{const a=s.map(l=>typeof l[r]=="function"?l[r](i,o):l[r]);return io(a)}}else e[r]=s[0][r]}return e},Fe=t=>typeof t=="object"&&t!==null,lr=t=>Array.isArray(t),bf=(t,e,n={})=>{var r,s;e=lr(e)?e:[e];const i=lr(n.rules)?io(n.rules):n.rules,o=[{data:t,state:n.state,path:[],keys:[],keyIndex:-1,rules:i}];for(;o.length>0;){const a=o[o.length-1];if(a.keyIndex>=a.keys.length){for(;!((r=a.hooks)===null||r===void 0)&&r.length;)a.hooks.pop()();o.pop();continue}const l=a.keys[a.keyIndex++],[u,c,f]=o.length>1?[a.data[l],[...a.path,l],yf(a.rules,l,[...a.path,l],a.data[l])]:[a.data,a.path,i];let p={value:u,path:c,key:l,state:a.state,rules:f};const h=[];for(const m of e){if(!m||typeof m!="function")continue;const w=(s=m(p))!==null&&s!==void 0?s:{},{terminate:k,done:T,exitHook:$}=w,E=mf(w,["terminate","done","exitHook"]);if(k)return;if($&&h.push($),p=Object.assign(Object.assign({},p),E),T){p=null;break}}if(p&&Fe(p.value)){const m=lr(p.value)?[...p.value.keys()]:Object.keys(p.value);o.push({hooks:h,state:p.state,data:p.value,path:c,keys:m,keyIndex:0,rules:p.rules})}else for(;h.length;)h.pop()()}},vf=()=>{const t=new WeakMap;let e;return[({value:n})=>{e=n},({value:n,path:r,key:s,state:i})=>{if(s=r.length?s:"#",Fe(e)&&Fe(n)){if(t.has(e))return i.node[s]=t.get(e),{done:!0};const o=Array.isArray(n)?[]:{};i.node[s]=o,t.set(e,o)}else i.node[s]=n;return{value:n,state:Object.assign(Object.assign({},i),{node:i.node[s]})}}]};class oo extends Map{add(e,n){const r=this.get(e);return r?r.push(n):this.set(e,[n]),this}}const Tf=(t,e)=>{const n={};for(const r of e)r in t&&(n[r]=t[r],delete t[r]);return n},ao=(t,e)=>{if(Array.isArray(t)&&Array.isArray(e))return[...t,...e];if(Fe(t)&&Fe(e)){const n=Object.assign({},t);for(const r of Object.keys(e))n[r]=ao(n[r],e[r]);return n}return e},br=t=>t&&t.$ref&&typeof t.$ref=="string",Ef=t=>t&&t.anyOf&&Array.isArray(t.anyOf),wf=t=>t&&t.oneOf&&Array.isArray(t.oneOf),lo=(t,e="")=>{const[n=e,r]=t.split("#"),s=r&&r!=="/"?r:"";return{filePath:n,pointer:s,normalized:Of(n,s),jsonPath:co(s)}},Of=(t,e)=>t?`${t}${e?"#"+e:""}`:e?`#${e}`:"#",uo=(t,e,n=[e])=>{if(!Fe(t))return;let r=t;const s=co(e);for(const i of s)if(Array.isArray(r)&&r.length>+i)r=r[+i];else if(Fe(r)&&i in r)r=r[i];else{if(!br(r))return;{const o=lo(r.$ref);r=o.filePath||n.includes(o.pointer)?void 0:uo(t,o.pointer,[...n,o.pointer])}}return r},Fn={slash:/\//g,tilde:/~/g,escapedSlash:/~1/g,escapedTilde:/~0/g},co=t=>t.split("/").map(e=>decodeURIComponent(e.replace(Fn.escapedSlash,"/").replace(Fn.escapedTilde,"~"))).slice(1),Ur=t=>t.length?"/"+t.map(e=>encodeURIComponent(String(e).replace(Fn.tilde,"~0").replace(Fn.slash,"~1"))).join("/"):"",xf=(t,e)=>JSON.stringify(t)==JSON.stringify(e),If=t=>{let e=1;for(;t*e%1!=0;)e*=10;return e};function Sf(t){const e=t.reduce((n,r)=>Math.max(n,If(r)),0);return t.reduce((n,r)=>Math.round(n*e*r*e/po(n*e,r*e))/e)}function po(t,e){return e===0?t:po(e,t%e)}const fo=t=>{if(t.length===0)return[[]];const e=t[0],n=t.slice(1),r=fo(n),s=[];for(const i of e)for(const o of r)s.push([i,...o]);return s},_f=t=>{const e=[];for(const n of t){if(!("properties"in n))continue;const r=new Set(Object.keys(n.properties)),s=new oo;for(const o of r.values())for(const a of t)if(!(a==n||a.properties&&o in a.properties))if("patternProperties"in a&&a.patternProperties)for(const l of Object.keys(a.patternProperties))new RegExp(l).test(o)||r.delete(o);else"additionalProperties"in a&&(a.additionalProperties===!1?r.delete(o):typeof a.additionalProperties=="object"&&s.add(o,a.additionalProperties));if(!r.size)continue;const i={};for(const o of r.values())s.has(o)?i[o]={allOf:[n.properties[o],...s.get(o)]}:i[o]=n.properties[o];e.push(i)}return e},Nf=t=>{const e=[];for(const n of t){if(!("patternProperties"in n))continue;const r=new Set(Object.keys(n.patternProperties));for(const i of t)if(i!=n&&"additionalProperties"in i&&!i.additionalProperties)for(const o of r.values())i.patternProperties&&o in i.patternProperties||r.delete(o);if(!r.size)continue;const s={};for(const i of r.values())s[i]=n.patternProperties[i];e.push(s)}return e},Ps=t=>{const e={},n=Mr(t);for(const[r,s]of Object.entries(n))s.includes(!1)?e[r]=!1:e[r]=s.length>1?{allOf:s}:s[0];return e},kf=(t,e)=>!!t.reduce((n,r)=>n&&r===!0,!0)||tn(t,e),Af=()=>"Could not merge values, they are probably incompatible",Cf=t=>`Merge rule not found for key: ${t}`,Mr=t=>{const e={};for(const n of t)for(const r of Object.keys(n))Array.isArray(e[r])?e[r].push(n[r]):e[r]=[n[r]];return e},tn=(t,e)=>{if(t.includes(!1))return!1;const n={},r=Mr(t);"properties"in r&&(r.properties=_f(t)),"patternProperties"in r&&(r.patternProperties=Nf(t));for(let[s,i]of Object.entries(r)){if(!i.length)continue;const o=e.mergeRules;let a=`/${s}`in o?o[`/${s}`]:o["/?"];a=a&&!("$"in a)&&"/"in a?a["/"]:a,a=typeof a=="function"?a():a;const l=a&&"$"in a?a.$:void 0;if(!l)throw new Error(Cf(s));const u=i.length>1?l(i,Object.assign(Object.assign({},e),{allOfItems:t})):i[0];u===void 0?e.mergeError(i):n[s]=u}return Object.keys(n).length?n:void 0},xe=t=>t[t.length-1],Ye=t=>t.reduce((e,n)=>e||n,!1),$t=t=>Math.min(...t),Dt=t=>Math.max(...t),Rf=t=>t.length>1?t.reduce((e,n)=>`${e}(?=${n})`,""):t[0],ho=([t,...e])=>e.reduce((n,r)=>n.filter(s=>r.includes(s)),t),Ff=([t,...e])=>e.find(n=>!xf(n,t))?void 0:t,ge=([t,...e])=>e.reduce((n,r)=>ao(n,r),t),Gt=t=>fo(t).map(e=>({allOf:e})),$f=t=>({anyOf:t}),Df=t=>Sf(t),Pf=(t,e)=>{const n=t.map(s=>s.map(i=>JSON.stringify(i))),r=ho(n).map(s=>JSON.parse(s)).sort();return r.length||e.mergeError(t),r},jf=(t,e)=>{const n=t.map(s=>Array.isArray(s)?s:[s]),r=ho(n);return r.length===1?r[0]:r.length?r:void 0},go=t=>{const e=new Set;for(const n of t)for(const r of n)e.add(r);return Array.from(e).sort()},Lf=(t,e)=>{const n={},r=Mr(t);for(const[s,i]of Object.entries(r))if(i.reduce((o,a)=>o&&Array.isArray(a),!0))n[s]=go(i);else{const o=i.map(a=>Array.isArray(a)?{required:a}:a);n[s]=o.length>1?{allOf:o}:o[0]}return n},mo=(t,e)=>{if(!t.reduce((l,u)=>Array.isArray(u)||l,!1))return tn(t,e);const n=[];let r=1/0,s=0;const i=new oo;for(const l of e.allOfItems)"additionalItems"in l&&l.additionalItems&&"items"in l&&Array.isArray(l.items)&&i.add(l.items.length,l.additionalItems),"items"in l&&(n.push(l.items),Array.isArray(l.items)&&(s=Math.max(s,l.items.length),"additionalItems"in l&&l.additionalItems===!1&&(r=Math.min(r,l.items.length))));const o=Math.min(s,r),a=[...Array(o)].map(()=>({allOf:[]}));for(const l of n)if(Array.isArray(l))for(let u=0;u<o;u++){const c=[];for(let f=0;f<=u;f++)i.has(f)&&c.push(...i.get(f));u<l.length?a[u].allOf.push(c.length?Object.assign(Object.assign({},l[u]),{allOf:c}):l[u]):a[u].allOf.push(!c.length||{allOf:c})}else a.forEach(({allOf:u})=>u.push(l));return a},Uf=(t,e)=>{const n=[],r=[];for(const s of e.allOfItems)"items"in s&&!Array.isArray(s.items)&&r.push(s.items),"additionalItems"in s&&"items"in s&&Array.isArray(s.items)&&n.push(s.additionalItems);
63return r.length&&n.forEach(s=>s.allOf=r),tn(n,e)},J=(t="draft-06",e={})=>Object.assign(Object.assign(Object.assign(Object.assign({"/maximum":{$:$t},"/exclusiveMaximum":{$:Ye},"/minimum":{$:Dt},"/exclusiveMinimum":{$:Ye},"/maxLength":{$:$t},"/minLength":{$:Dt},"/maxItems":{$:$t},"/minItems":{$:Dt},"/uniqueItems":{$:Ye},"/maxProperties":{$:$t},"/minProperties":{$:Dt},"/required":{$:go},"/multipleOf":{$:Df},"/enum":{$:Pf},"/type":{$:jf},"/allOf":{"/*":()=>J(t,e),$:Gt},"/not":{$:$f},"/oneOf":{"/*":()=>J(t,e),$:Gt,sibling:["definitions","$defs","$id","$schema"]},"/anyOf":{"/*":()=>J(t,e),$:Gt,sibling:["definitions","$defs","$id","$schema"]},"/properties":{"/*":()=>J(t,e),$:Ps},"/items":()=>Object.assign(Object.assign({},J(t,e)),{$:mo,"/*":({key:n})=>typeof n=="number"?J(t,e):{}}),"/additionalProperties":()=>Object.assign(Object.assign({},J(t,e)),{$:kf}),"/additionalItems":()=>Object.assign(Object.assign({},J(t,e)),{$:Uf}),"/patternProperties":{"/*":()=>J(t,e),$:Ps},"/pattern":{$:Rf},"/readOnly":{$:Ye},"/writeOnly":{$:Ye},"/example":{$:ge},"/examples":{$:ge},"/deprecated":{$:Ye}},t!=="draft-04"?{"/propertyNames":()=>J(t,e),"/contains":()=>J(t,e),"/dependencies":{"/*":()=>J(t,e),$:Lf},"/const":{$:Ff},"/exclusiveMaximum":{$:$t},"/exclusiveMinimum":{$:Dt},"/$defs":{"/*":()=>J(t,e),$:ge}}:{}),{"/definitions":{"/*":()=>J(t,e),$:ge},"/xml":{$:ge},"/externalDocs":{$:xe},"/description":{$:xe},"/title":{$:xe},"/format":{$:xe},"/default":{$:xe},"/?":{$:xe}}),e),{$:tn}),Ht=t=>J(t,{"/discriminator":{$:ge},"/oneOf":{"/*":()=>Ht(t),$:Gt,sibling:["discriminator"]},"/anyOf":{"/*":()=>Ht(t),$:Gt,sibling:["discriminator"]}}),Yn=t=>t==="3.0.x"?Object.assign(Object.assign({},Ht("draft-04")),{"/items":({key:e})=>Object.assign(Object.assign({},Ht("draft-04")),{$:mo})}):Ht("draft-06"),tt=t=>({"/*":{"/schema":Yn(t)}}),js=t=>({"/content":{"/*":{"/schema":Yn(t),"/encoding":{"/headers":tt(t)}}}}),Ls=t=>({"/*":{"/headers":tt(t),"/content":{"/*":{"/schema":Yn(t),"/encoding":{"/headers":tt(t)}}}}}),Mf=(t="3.0.x")=>({"/paths":{"/*":{"/*":{"/parameters":tt(t),"/requestBody":js(t),"/responses":Ls(t)},"/parameters":tt(t)}},"/components":{"/schemas":{"/*":Yn(t)},"/responses":Ls(t),"/parameters":tt(t),"/requestBodies":{"/*":js(t)},"/headers":tt(t)}}),Ke=J("draft-06",{"/args":()=>Ke,"/nullable":{$:Ye},"/specifiedByURL":{$:xe},"/values":{$:ge,"/*":{$:ge,"/description":{$:xe},"/deprecated":{$:xe,"/reason":{$:xe}}}},"/interfaces":{$:ge,"/*":{$:ge}},"/directives":{$:ge,"/*":()=>Object.assign(Object.assign({},Ke),{"/meta":{$:ge}})}}),qf={"/queries":{"/*":()=>Ke},"/mutations":{"/*":()=>Ke},"/subscriptions":{"/*":()=>Ke},"/components":{"/*":{"/*":Ke},"/directives":{"/*":{"/args":()=>Ke}}}},Us=(t,e,n)=>{const r=n.sibling||[],s=t,i=e,o=s[i],a=Jt(s,[typeof i=="symbol"?i:i+""]),l=Tf(a,r);return Object.keys(a).length?Object.assign({[e]:o.map(u=>({allOf:[a,u]}))},l):t},yo=(t,e,n,r)=>{const s=[],i=Ur(e),o=[],a={pointer:i,data:"",refs:[]};for(const u of t)if(br(u)&&!o.includes(u.$ref)){a.data===""&&(a.data=JSON.stringify(t));const{$ref:c}=u,f=Jt(u,["$ref"]),{filePath:p,normalized:h,pointer:m}=lo(c),w=r.find(T=>T.refs.includes(u.$ref)&&T.data===a.data&&m!==T.pointer);if(w)return{allOfItems:[{$ref:"#"+w.pointer}],brokenRefs:o};a.refs.push(h);const k=p?void 0:uo(n,m);k===void 0?(o.push(h),s.push(u)):s.push(k),Object.keys(f).length&&s.push(f)}else s.push(u);a.refs.length&&r.push(a);const l=bo(s);return l.find(u=>br(u)&&!o.includes(u.$ref))?yo(l,e,n,r):{allOfItems:l,brokenRefs:o}},bo=t=>{const e=[];for(const n of t)if(Fe(n))if(n.allOf&&Array.isArray(n.allOf)){const{allOf:r}=n,s=Jt(n,["allOf"]),i=Object.keys(s).length?[...r,s]:r;e.push(...bo(i))}else e.push(n);return e},Vf=t=>{if(typeof t!="object"||!t)return J();if("openapi"in t&&typeof t.openapi=="string"&&/3.+/.test(t.openapi)){const e=t.openapi.startsWith("3.1")?"3.1.x":"3.0.x";return Mf(e)}return"graphapi"in t&&typeof t.graphapi=="string"?qf:J()},Bf=(t,e)=>{var n;const r=(n=void 0)!==null&&n!==void 0?n:Vf(t);return((s,i=[],o={})=>{var a;i=Array.isArray(i)?i:[i];const l={"#":void 0},u=Object.assign({state:Object.assign(Object.assign({},(a=o.state)!==null&&a!==void 0?a:{}),{root:l,node:l})},o.rules?{rules:o.rules}:{}),[c,f]=vf();return bf(s,[c,...i,f],u),l["#"]})(t,Gf(e),{rules:r})},Gf=t=>{const e=new Map;let n;const r=[];return({value:s,key:i,path:o,rules:a,state:l})=>{o.length||(n=s);const u=T=>{var $;const E=Hf(o);E?e.set(...E):($=void 0)===null||$===void 0||$.call(t,Af(),o,T)},c=()=>{const{node:T}=l,$=Ur(o);if(e.has($)){const E=e.get($),S=T[i];Array.isArray(S)&&(S.length<2&&u(s?.allOf||[]),S.splice(E,1))}};if(!Fe(s)||Array.isArray(s))return{exitHook:c};if(!(T=>!!T&&T["/allOf"]&&"$"in T["/allOf"])(a))return{exitHook:c};const{allOf:f}=s,p=Jt(s,["allOf"]),h=[];if(Array.isArray(f)&&h.push(...f),h.length)Object.keys(p).length&&h.push(p);else{const{$ref:T}=p;Jt(p,["$ref"])}if(!h.length)return{value:p,exitHook:c};const{allOfItems:m,brokenRefs:w}=yo(h,o,n,r);
63if(w.length)return w.forEach(T=>{var $;return($=void 0)===null||$===void 0?void 0:$.call(t,"Cannot resolve $ref",o,T)}),{value:{allOf:m},exitHook:c};if(m.length<2)return{value:m.length?m[0]:{},exitHook:c};const k=tn(m,{allOfItems:m,mergeRules:a,mergeError:u});return t?.mergeCombinarySibling&&Ef(k)?{value:Us(k,"anyOf",a["/anyOf"]),exitHook:c}:t?.mergeCombinarySibling&&wf(k)?{value:Us(k,"oneOf",a["/oneOf"]),exitHook:c}:{value:k,exitHook:c}}},Hf=t=>{for(let e=t.length-2;e>=0;e--)if(t[e]==="anyOf"||t[e]==="oneOf"){const n=t.slice(0,e+1);return[Ur(n),t[e+1]]}};var gt=Lo(),Ms={},qs;function Qf(){return qs||(qs=1,(function(t){t.__esModule=!0,t.OpenAPIV2=t.OpenAPIV3=void 0,(function(e){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch",n.TRACE="trace"})(e.HttpMethods||(e.HttpMethods={}))})(t.OpenAPIV3||(t.OpenAPIV3={})),(function(e){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch"})(e.HttpMethods||(e.HttpMethods={}))})(t.OpenAPIV2||(t.OpenAPIV2={}))})(Ms)),Ms}var Wf=Qf();const ur=new Map,zf=(t,e)=>{ur.has(t)||ur.set(t,new Map);const n=ur.get(t);if(n.has(e))return n.get(e);const r=e.split("/").slice(1);let s=t;for(const i of r)(!s||typeof s!="object")&&(s=null),s=s[i]??null;return n.set(e,s),s},cr=new Map,Yf=t=>t!==null&&typeof t=="object",Jf=async(t,e=[])=>{if(cr.has(t))return cr.get(t);const n=structuredClone(t),r=new Set,s=async(o,a)=>{if(Yf(o)){if(r.has(o))return qo;if(r.add(o),Array.isArray(o))for(let l=0;l<o.length;l++)o[l]=await s(o[l]);else{if("$ref"in o&&typeof o.$ref=="string"){o.__$ref=o.$ref;for(const u of e){const c=await u(o.$ref);if(c)return await s(c)}const l=await zf(n,o.$ref);return await s(l)}for(const l in o)o[l]=await s(o[l])}r.delete(o)}return o},i=await s(n);return cr.set(t,i),i},Kf=t=>(t.openapi?.startsWith("3.0")&&(t.openapi="3.1.1"),t=Oe(t,e=>(typeof e.type<"u"&&e.nullable===!0&&(e.type=["null",e.type],delete e.nullable),e)),t=Oe(t,e=>(e.exclusiveMinimum===!0?(e.exclusiveMinimum=e.minimum,delete e.minimum):e.exclusiveMinimum===!1&&delete e.exclusiveMinimum,e.exclusiveMaximum===!0?(e.exclusiveMaximum=e.maximum,delete e.maximum):e.exclusiveMaximum===!1&&delete e.exclusiveMaximum,e)),t=Oe(t,(e,n)=>(e.example!==void 0&&(Xf(n??[])?e.examples=[e.example]:e.examples={default:{value:e.example}},delete e.example),e)),t=Oe(t,(e,n)=>{if(e.type==="object"&&e.properties!==void 0&&n?.slice(0,-1)?.some((r,s)=>r==="content"&&n?.[s+1]==="multipart/form-data")){const r=Object.entries(e.properties);for(const[,s]of r)typeof s=="object"&&s.type==="string"&&s.format==="binary"&&(s.contentMediaType="application/octet-stream",delete s.format)}return e}),t=Oe(t,(e,n)=>n?.includes("content")&&n.includes("application/octet-stream")?{}:e.type==="string"&&e.format==="binary"?{type:"string",contentMediaType:"application/octet-stream"}:e),t=Oe(t,e=>{if(!(e.type==="string"&&e.format==="binary"))return e}),t=Oe(t,e=>e.type==="string"&&e.format==="base64"?{type:"string",contentEncoding:"base64"}:e),t=Oe(t,(e,n)=>e.type==="string"&&e.format==="byte"?{type:"string",contentEncoding:"base64",contentMediaType:n?.slice(0,-1)?.find((r,s)=>n?.[s-1]==="content")}:e),t);function Xf(t){return[["components","schemas"],"properties","items","allOf","anyOf","oneOf","not","additionalProperties"].some(e=>Array.isArray(e)?e.every((n,r)=>t[r]===n):t.includes(e))||t.includes("schema")||t.some(e=>e.endsWith("Schema"))}const Zf=Object.values(Wf.OpenAPIV3.HttpMethods),ed=async t=>{if(typeof t=="string"){if(t.trim().startsWith("{"))try{return JSON.parse(t)}catch(n){throw new gt.GraphQLError("Invalid JSON schema",{originalError:n})}if(t.includes("://")){let n;try{n=await fetch(t,{cache:"force-cache"})}catch(s){throw new gt.GraphQLError("Failed to fetch schema",{originalError:s})}if(!n.ok)throw new gt.GraphQLError(`Failed to fetch schema: ${n.statusText}`);const r=await n.text();try{return r.trim().startsWith("{")?JSON.parse(r):(await Vr(async()=>{const{parse:s}=await import("./index-DmNq2fbN-Wnz-YQFi.js");return{parse:s}},[],import.meta.url)).parse(r)}
63catch(s){throw new gt.GraphQLError("Fetched invalid schema",{originalError:s})}}const e=(await Vr(async()=>{const{parse:n}=await import("./index-DmNq2fbN-Wnz-YQFi.js");return{parse:n}},[],import.meta.url)).parse(t);if(typeof e=="object")return e}if(typeof t=="object")return t;throw new gt.GraphQLError("Unsupported schema input: "+t)},td=async t=>{const e=await ed(t);if(!e.openapi)throw new gt.GraphQLError("OpenAPI version is not defined");const n=await Jf(e),r=Kf(n);return Bf(r)},nd=(t,e)=>{const n=e.summary||e.operationId||`${e.method}-${e.path}`;return t(n)},z=new Mu({defaultFieldNullability:!1}),$n=z.addScalarType("JSON",Fo),Ve=z.addScalarType("JSONObject",$o),qr=z.addScalarType("JSONSchema",Do),ot=t=>Object.fromEntries(Object.entries(t).filter(([e])=>e.startsWith("x-"))),Vs=(t,e)=>{const n=t.tags??[],r=new Set(Object.values(t.paths??{}).flatMap(i=>Object.values(i??{})).flatMap(i=>i.tags??[])),s=Object.values(t.paths??{}).some(i=>Object.values(i??{}).some(o=>!o.tags?.length));return[...n.filter(i=>r.has(i.name)).map(i=>({...i,slug:e[i.name]})),...[...r].filter(i=>!n.some(o=>o.name===i)).map(i=>({name:i,slug:e[i]})),...s?[{name:void 0,slug:void 0}]:[]]},rd=(t,e=[])=>{const n=Bo(),r=Array.from(new Set([...t.flatMap(s=>s.tags??[]),...e.map(s=>s.name)]));return{operations:Object.fromEntries(t.map(s=>[vr(s),nd(n,s)])),tags:Object.fromEntries(r.map(s=>[s,n(s)]))}},vr=t=>[t.path,t.method,t.operationId,t.summary].filter(Boolean).join("-"),Bs=t=>Object.entries(t??{}).flatMap(([e,n])=>Zf.flatMap(r=>{if(!n?.[r])return[];const s=n[r],i=n.parameters??[],o=s.parameters??[],a=[...i.filter(l=>!o.some(u=>u.name===l.name&&u.in===l.in)),...o];return{...s,method:r,path:e,parameters:a,tags:s.tags??[]}})),Qt=z.objectRef("SchemaTag");Qt.implement({fields:t=>({name:t.exposeString("name",{nullable:!0}),slug:t.exposeString("slug",{nullable:!0}),isUntagged:t.field({type:"Boolean",resolve:e=>!e.name}),description:t.exposeString("description",{nullable:!0}),operations:t.field({type:[Eo],resolve:(e,n,r)=>{const s=r.tags.map(i=>i.name);return r.operations.filter(i=>e.name?i.tags?.includes(e.name):i.tags?.length===0||i.tags?.every(o=>!s.includes(o))).map(i=>({...i,parentTag:e.name}))}}),prev:t.field({type:Qt,nullable:!0,resolve:(e,n,r)=>{const s=r.tags.findIndex(i=>i.slug===e.slug);return r.tags[s-1]}}),next:t.field({type:Qt,nullable:!0,resolve:(e,n,r)=>{const s=r.tags.findIndex(i=>i.slug===e.slug);return r.tags[s+1]}}),extensions:t.field({type:Ve,resolve:e=>ot(e),nullable:!0})})});const sd=z.objectRef("Server").implement({fields:t=>({url:t.exposeString("url"),description:t.exposeString("description",{nullable:!0})})}),id=z.objectRef("PathItem").implement({fields:t=>({path:t.exposeString("path"),methods:t.exposeStringList("methods")})}),od=z.objectRef("TagItem").implement({fields:t=>({name:t.exposeString("name"),description:t.exposeString("description",{nullable:!0}),extensions:t.field({type:Ve,resolve:e=>ot(e),nullable:!0})})}),ad=z.objectRef("EncodingItem").implement({fields:t=>({name:t.exposeString("name"),contentType:t.exposeString("contentType",{nullable:!0}),headers:t.expose("headers",{type:Ve,nullable:!0}),style:t.exposeString("style",{nullable:!0}),explode:t.exposeBoolean("explode",{nullable:!0}),allowReserved:t.exposeBoolean("allowReserved",{nullable:!0})})}),vo=z.objectRef("ExampleItem").implement({fields:t=>({name:t.exposeString("name"),summary:t.exposeString("summary",{nullable:!0}),description:t.exposeString("description",{nullable:!0}),value:t.expose("value",{type:$n,nullable:!0}),externalValue:t.exposeString("externalValue",{nullable:!0})})}),ld=z.enumType("ParameterIn",{values:["query","header","path","cookie"]}),ud=z.objectRef("ParameterItem").implement({fields:t=>({name:t.exposeString("name"),in:t.field({type:ld,resolve:e=>e.in}),description:t.exposeString("description",{nullable:!0}),required:t.exposeBoolean("required",{nullable:!0}),deprecated:t.exposeBoolean("deprecated",{nullable:!0}),allowEmptyValue:t.exposeBoolean("allowEmptyValue",{nullable:!0}),style:t.exposeString("style",{nullable:!0}),explode:t.exposeBoolean("explode",{nullable:!0}),allowReserved:t.exposeBoolean("allowReserved",{nullable:!0}),examples:t.field({type:[vo],resolve:e=>Object.entries(e.examples??{}).map(([n,r])=>({name:n,...typeof r=="string"?{value:r}:r})),nullable:!0}),schema:t.expose("schema",{type:qr,nullable:!0}),extensions:t.field({type:Ve,resolve:e=>ot(e),nullable:!0})})}),To=z.objectRef("MediaTypeObject").implement({fields:t=>({mediaType:t.exposeString("mediaType"),schema:t.expose("schema",{type:qr,nullable:!0}),examples:t.expose("examples",{type:[vo],nullable:!0}),encoding:t.expose("encoding",{type:[ad],nullable:!0})})}),cd=z.objectRef("RequestBodyObject").implement({fields:t=>({description:t.exposeString("description",{nullable:!0}),content:t.expose("content",{type:[To],nullable:!0}),required:t.exposeBoolean("required",{nullable:!0})})}),pd=z.objectRef("ResponseItem").implement({fields:t=>({statusCode:t.exposeString("statusCode"),description:t.exposeString("description",{nullable:!0}),content:t.expose("content",{type:[To],nullable:!0}),headers:t.expose("headers",{type:$n,nullable:!0}),links:t.expose("links",{type:$n,nullable:!0}),extensions:t.field({type:Ve,resolve:e=>ot(e),nullable:!0})})}),Eo=z.objectRef("OperationItem").implement({fields:t=>({slug:t.field({type:"String",resolve:(e,n,r)=>{const s=r.slugs.operations[vr(e)];if(!s)throw new Error(`No slug found for operation: ${vr(e)}`);return s}}),path:t.exposeString("path"),method:t.exposeString("method"),operationId:t.exposeString("operationId",{nullable:!0}),summary:t.exposeString("summary",{nullable:!0}),description:t.exposeString("description",{nullable:!0}),contentTypes:t.stringList({resolve:e=>Object.keys(e.requestBody?.content??{})}),parameters:t.expose("parameters",{type:[ud],nullable:!0}),requestBody:t.field({type:cd,resolve:e=>({description:e.requestBody?.description,required:e.requestBody?.required,
63content:Object.entries(e.requestBody?.content??{}).map(([n,r])=>({mediaType:n,schema:r.schema,examples:r.examples?Object.entries(r.examples).map(([s,i])=>({name:s,...typeof i=="string"?{value:i}:i})):[],encoding:Object.entries(r.encoding??{}).map(([s,i])=>({name:s,...i}))}))}),nullable:!0}),responses:t.field({type:[pd],resolve:e=>Object.entries(e.responses??{}).map(([n,r])=>({statusCode:n,description:r.description,content:Object.entries(r.content??{}).map(([s,{schema:i,examples:o}])=>({mediaType:s,schema:i,examples:o?Object.entries(o).map(([a,l])=>({name:a,...typeof l=="string"?{value:l}:l})):[]})),headers:r.headers,links:r.links}))}),tags:t.field({type:[od],resolve:(e,n,r)=>e.tags?.map(s=>({name:s,description:r.schema.tags?.find(i=>i.name===s)?.description})),nullable:!0}),deprecated:t.exposeBoolean("deprecated",{nullable:!0}),extensions:t.field({type:Ve,resolve:e=>ot(e),nullable:!0})})}),fd=z.objectRef("SchemaItem").implement({fields:t=>({name:t.exposeString("name"),schema:t.expose("schema",{type:qr}),extensions:t.expose("extensions",{type:Ve,nullable:!0})})}),wo=z.objectRef("Components");wo.implement({fields:t=>
63({schemas:t.field({type:[fd],resolve:e=>Object.entries(e.schemas??{}).map(([n,r])=>({name:n,schema:r,extensions:ot(r)})),nullable:!0})})});const dd=z.objectRef("Schema").implement({fields:t=>({openapi:t.string({resolve:e=>e.openapi}),url:t.string({resolve:e=>e.servers?.at(0)?.url,nullable:!0}),servers:t.field({type:[sd],resolve:e=>e.servers??[]}),title:t.string({resolve:e=>e.info.title}),version:t.string({resolve:e=>e.info.version}),description:t.string({resolve:e=>e.info.description,nullable:!0}),summary:t.string({resolve:e=>e.info.summary,nullable:!0}),paths:t.field({type:[id],resolve:e=>Object.entries(e.paths??{}).map(([n,r])=>({path:n,methods:Object.keys(r)}))}),tag:t.field({type:Qt,args:{slug:t.arg.string(),name:t.arg.string(),untagged:t.arg.boolean()},nullable:!0,resolve:(e,n,r)=>{if(n.untagged)return r.tags.find(s=>s.name===void 0);if(n.slug)return r.tags.find(s=>s.slug===n.slug);if(n.name)return r.tags.find(s=>s.name===n.name)}}),tags:t.field({type:[Qt],resolve:(e,n,r)=>r.tags}),operations:t.field({type:[Eo],args:{path:t.arg.string(),method:t.arg.string(),operationId:t.arg.string(),tag:t.arg.string(),untagged:t.arg.boolean()},resolve:(e,n,r)=>r.operations.filter(s=>(!n.operationId||s.operationId===n.operationId)&&(!n.path||s.path===n.path)&&(!n.method||s.method===n.method)&&(!n.tag||s.tags?.some(i=>n.tag?.includes(i)))&&(!n.untagged||(s.tags??[]).length===0))}),components:t.field({type:wo,resolve:e=>e.components,nullable:!0}),extensions:t.field({type:Ve,resolve:e=>ot(e),nullable:!0})})}),hd=z.enumType("SchemaType",{values:["url","file","raw"]});z.queryType({fields:t=>
63({schema:t.field({type:dd,args:{type:t.arg({type:hd,required:!0}),input:t.arg({type:$n,required:!0})},resolve:async(e,n,r)=>{if(n.type==="file"&&typeof n.input=="string"){const s=r.schemaImports?.[n.input];if(!s)throw new Error(`No schema loader found for path: ${n.input}`);const{schema:i,slugs:o}=await s();r.schema=i,r.operations=Bs(i.paths),r.slugs=o,r.tags=Vs(i,r.slugs.tags)}else r.schema=await td(n.input),r.operations=Bs(r.schema.paths),r.slugs=rd(r.operations),r.tags=Vs(r.schema,r.slugs.tags);return r.schema}})})});const gd=z.toSchema(),md=t=>gf({schema:gd,batching:!0,...t}),Td=t=>md({context:{schemaImports:t.schemaImports},plugins:[Ml({logFn:(e,{args:n})=>{}})]});export{Td as createServer};
64//# sourceMappingURL=createServer-DN5AJLcN-4XjWRHxm.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.