vendor: 4,347 bytes, lines 1-7
1import{b7 as X,b8 as U,b9 as Z,ba as ue,bb as pe,bc as ee,bd as V,be as c,bf as w,bg as he,bh as Y,U as de,bi as fe,f as me,as as b,c as Ee,w as A,a1 as D,o as xe,a as N,E as I,H as R,q as T,Z as Ne}from"./BEQDRGZu.js";import{_ as Te}from"./Ca8KkiQ2.js";import{_ as _e}from"./DhdH1CH2.js";import{_ as Ae}from"./3zVmSKFU.js";import"./B2qp9yab.js";import"./Cy9PVPad.js";import"./BklSmU-l.js";import"./BlBZjcFB.js";import"./DKkg-gxU.js";import"./DziMDypV.js";import"./VrsXLEEP.js";import"./KQBnKoFq.js";import"./C-Bc27Er.js";import"./DXuHrUS6.js";import"./Cds-sYxm.js";import"./BDeqDCRD.js";import"./BXn9_Wi1.js";import"./DZtHvcg4.js";function Ie(t){return typeof t=="object"&&t!==null}function ke(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const ye=/\r\n|[\n\r]/g;function q(t,e){let n=0,i=1;for(const s of t.body.matchAll(ye)){if(typeof s.index=="number"||ke(!1),s.index>=e)break;n=s.index+s[0].length,i+=1}return{line:i,column:e+1-n}}function ve(t){return te(t.source,q(t.source,t.start))}function te(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,s=e.line-1,r=t.locationOffset.line-1,o=e.line+r,l=e.line===1?n:0,h=e.column+l,E=`${t.name}:${o}:${h} 2`,u=i.split(/\r\n|[\n\r]/g),_=u[s];if(_.length>120){const x=Math.floor(h/80),O=h%80,m=[];for(let p=0;p<_.length;p+=80)m.push(_.slice(p,p+80));return E+z([[`${o} |`,m[0]],...m.slice(1,x+1).map(p=>["|",p]),["|","^".padStart(O)],["|",m[x+1]]])}return E+z([[`${o-1} |`,u[s-1]],[`${o} |`,_],["|","^".padStart(h)],[`${o+1} |`,u[s+1]]])}function z(t){const e=t.filter(([i,s])=>s!==void 0),n=Math.max(...e.map(([i])=>i.length));return e.map(([i,s])=>i.padStart(n)+(s?" "+s:"")).join(` 3`)}function Ce(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Q extends Error{constructor(e,...n){var i,s,r;const{nodes:o,source:l,positions:h,path:E,originalError:u,extensions:_}=Ce(n);super(e),this.name="GraphQLError",this.path=E??void 0,this.originalError=u??void 0,this.nodes=H(Array.isArray(o)?o:o?[o]:void 0);const x=H((i=this.nodes)===null||i===void 0?void 0:i.map(m=>m.loc).filter(m=>m!=null));this.source=l??(x==null||(s=x[0])===null||s===void 0?void 0:s.source),this.positions=h??(x==null?void 0:x.map(m=>m.start)),this.locations=h&&l?h.map(m=>q(l,m)):x==null?void 0:x.map(m=>q(m.source,m.start));const O=Ie(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(r=_??O)!==null&&r!==void 0?r:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Q):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=` 4 5`+ve(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=` 6 7`+te(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function H(t){return t===void 0||t.length===0?void 0:t}function f(t,e,n){return new Q(`Syntax Error: ${n}`,{source:t,positions:[e]})}var j;(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"})(j||(j={}));var a;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}
7",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(a||(a={}));class Oe{constructor(e){const n=new X(a.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==a.EOF)do if(e.next)e=e.next;else{const n=be(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===a.COMMENT);return e}}function ge(t){return t===a.BANG||t===a.DOLLAR||t===a.AMP||t===a.PAREN_L||t===a.PAREN_R||t===a.SPREAD||t===a.COLON||t===a.EQUALS||t===a.AT||t===a.BRACKET_L||t===a.BRACKET_R||t===a.BRACE_L||t===a.PIPE||t===a.BRACE_R}function C(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function M(t,e){return ne(t.charCodeAt(e))&&se(t.charCodeAt(e+1))}function ne(t){return t>=55296&&t<=56319}function se(t){return t>=56320&&t<=57343}function k(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return a.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function d(t,e,n,i,s){const r=t.line,o=1+n-t.lineStart;return new X(e,n,i,r,o,s)}function be(t,e){const n=t.source.body,i=n.length;let s=e;for(;s<i;){const r=n.charCodeAt(s);switch(r){case 65279:case 9:case 32:case 44:++s;continue;case 10:++s,++t.line,t.lineStart=s;continue;case 13:n.charCodeAt(s+1)===10?s+=2:++s,++t.line,t.lineStart=s;continue;case 35:return De(t,s);case 33:return d(t,a.BANG,s,s+1);case 36:return d(t,a.DOLLAR,s,s+1);case 38:return d(t,a.AMP,s,s+1);case 40:return d(t,a.PAREN_L,s,s+1);case 41:return d(t,a.PAREN_R,s,s+1);case 46:if(n.charCodeAt(s+1)===46&&n.charCodeAt(s+2)===46)return d(t,a.SPREAD,s,s+3);break;case 58:return d(t,a.COLON,s,s+1);case 61:return d(t,a.EQUALS,s,s+1);case 64:return d(t,a.AT,s,s+1);case 91:return d(t,a.BRACKET_L,s,s+1);case 93:return d(t,a.BRACKET_R,s,s+1);case 123:return d(t,a.BRACE_L,s,s+1);case 124:return d(t,a.PIPE,s,s+1);case 125:return d(t,a.BRACE_R,s,s+1);case 34:return n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34?Pe(t,s):Se(t,s)}if(U(r)||r===45)return Re(t,s,r);if(Z(r))return Ue(t,s);throw f(t.source,s,r===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:C(r)||M(n,s)?`Unexpected character: ${k(t,s)}.`:`Invalid character: ${k(t,s)}.`)}return d(t,a.EOF,i,i)}function De(t,e){const n=t.source.body,i=n.length;let s=e+1;for(;s<i;){const r=n.charCodeAt(s);if(r===10||r===13)break;if(C(r))++s;else if(M(n,s))s+=2;else break}return d(t,a.COMMENT,e,s,n.slice(e+1,s))}function Re(t,e,n){const i=t.source.body;let s=e,r=n,o=!1;if(r===45&&(r=i.charCodeAt(++s)),r===48){if(r=i.charCodeAt(++s),U(r))throw f(t.source,s,`Invalid number, unexpected digit after 0: ${k(t,s)}.`)}else s=$(t,s,r),r=i.charCodeAt(s);if(r===46&&(o=!0,r=i.charCodeAt(++s),s=$(t,s,r),r=i.charCodeAt(s)),(r===69||r===101)&&(o=!0,r=i.charCodeAt(++s),(r===43||r===45)&&(r=i.charCodeAt(++s)),s=$(t,s,r),r=i.charCodeAt(s)),r===46||Z(r))throw f(t.source,s,`Invalid number, expected digit but got: ${k(t,s)}.`);return d(t,o?a.FLOAT:a.INT,e,s,i.slice(e,s))}function $(t,e,n){if(!U(n))throw f(t.source,e,`Invalid number, expected digit but got: ${k(t,e)}.`);const i=t.source.body;let s=e+1;for(;U(i.charCodeAt(s));)++s;return s}function Se(t,e){const n=t.source.body,i=n.length;let s=e+1,r=s,o="";for(;s<i;){const l=n.charCodeAt(s);if(l===34)return o+=n.slice(r,s),d(t,a.STRING,e,s+1,o);if(l===92){o+=n.slice(r,s);const h=n.charCodeAt(s+1)===117?n.charCodeAt(s+2)===123?Le(t,s):we(t,s):Fe(t,s);o+=h.value,s+=h.size,r=s;continue}if(l===10||l===13)break;if(C(l))++s;else if(M(n,s))s+=2;else throw f(t.source,s,`Invalid character within String: ${k(t,s)}.`)}throw f(t.source,s,"Unterminated string.")}function Le(t,e){const n=t.source.body;let i=0,s=3;for(;s<12;){const r=n.charCodeAt(e+s++);if(r===125){if(s<5||!C(i))break;return{value:String.fromCodePoint(i),size:s}}if(i=i<<4|L(r),i<0)break}throw f(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+s)}".`)}function we(t,e){const n=t.source.body,i=J(n,e+2);if(C(i))return{value:String.fromCodePoint(i),size:6};
vendor: 16,384 bytes, lines 7-20
7if(ne(i)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const s=J(n,e+8);if(se(s))return{value:String.fromCodePoint(i,s),size:12}}throw f(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function J(t,e){return L(t.charCodeAt(e))<<12|L(t.charCodeAt(e+1))<<8|L(t.charCodeAt(e+2))<<4|L(t.charCodeAt(e+3))}function L(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function Fe(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` 8`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw f(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function Pe(t,e){const n=t.source.body,i=n.length;let s=t.lineStart,r=e+3,o=r,l="";const h=[];for(;r<i;){const E=n.charCodeAt(r);if(E===34&&n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34){l+=n.slice(o,r),h.push(l);const u=d(t,a.BLOCK_STRING,e,r+3,ue(h).join(` 9`));return t.line+=h.length-1,t.lineStart=s,u}if(E===92&&n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34&&n.charCodeAt(r+3)===34){l+=n.slice(o,r),o=r+1,r+=4;continue}if(E===10||E===13){l+=n.slice(o,r),h.push(l),E===13&&n.charCodeAt(r+1)===10?r+=2:++r,l="",o=r,s=r;continue}if(C(E))++r;else if(M(n,r))r+=2;else throw f(t.source,r,`Invalid character within String: ${k(t,r)}.`)}throw f(t.source,r,"Unterminated string.")}function Ue(t,e){const n=t.source.body,i=n.length;let s=e+1;for(;s<i;){const r=n.charCodeAt(s);if(pe(r))++s;else break}return d(t,a.NAME,e,s,n.slice(e,s))}const Be=globalThis.process&&!0,Me=Be?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const s=n.prototype[Symbol.toStringTag],r=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(s===r){const o=ee(e);throw new Error(`Cannot use ${s} "${o}" from another module or realm. 10 11Ensure that there is only one instance of "graphql" in the node_modules 12directory. If different versions of "graphql" are the dependencies of other 13relied on modules, use "resolutions" to ensure only one version is installed. 14 15https://yarnpkg.com/en/docs/selective-version-resolutions 16 17Duplicate "graphql" modules cannot be used at the same time since different 18versions may have different capabilities and behavior. The data from one 19version used in the function from another could produce confusing and 20spurious results.`)}}return!1};class ie{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||V(!1,`Body must be a string. Received: ${ee(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||V(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||V(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Ve(t){return Me(t,ie)}function $e(t,e){return new Ge(t,e).parseDocument()}class Ge{constructor(e,n={}){const i=Ve(e)?e:new ie(e);this._lexer=new Oe(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(a.NAME);return this.node(e,{kind:c.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(a.SOF,this.parseDefinition,a.EOF)})}parseDefinition(){if(this.peek(a.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===a.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 f(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(a.BRACE_L))return this.node(e,{kind:c.OPERATION_DEFINITION,operation:w.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(a.NAME)&&(i=this.parseName()),this.node(e,{kind:c.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(a.NAME);switch(e.value){case"query":return w.QUERY;case"mutation":return w.MUTATION;case"subscription":return w.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(a.PAREN_L,this.parseVariableDefinition,a.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(a.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(a.DOLLAR),this.node(e,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(a.BRACE_L,this.parseSelection,a.BRACE_R)})}parseSelection(){return this.peek(a.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,s;return this.expectOptionalToken(a.COLON)?(i=n,s=this.parseName()):s=n,this.node(e,{kind:c.FIELD,alias:i,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(a.PAREN_L,n,a.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(a.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(a.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(a.NAME)?this.node(e,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:c.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:c.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:c.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 a.BRACKET_L:return this.parseList(e);case a.BRACE_L:return this.parseObject(e);case a.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case a.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case a.STRING:case a.BLOCK_STRING:return this.parseStringLiteral();case a.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case a.DOLLAR:if(e)if(this.expectToken(a.DOLLAR),this._lexer.token.kind===a.NAME){const i=this._lexer.token.value;throw f(this._lexer.source,n.start,`Unexpected variable "$${i}" 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:c.STRING,value:e.value,block:e.kind===a.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(a.BRACKET_L,n,a.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(a.BRACE_L,n,a.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(a.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(a.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(a.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(a.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(a.BRACKET_R),n=this.node(e,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(e,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(a.STRING)||this.peek(a.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),s=this.many(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);return this.node(e,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:s})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(a.COLON);const i=this.parseNamedType();return this.node(e,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),s=this.parseConstDirectives();return this.node(e,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:s})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),s=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:s,directives:r,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(a.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseFieldDefinition,a.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),s=this.parseArgumentDefs();this.expectToken(a.COLON);const r=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:s,type:r,directives:o})}parseArgumentDefs(){return this.optionalMany(a.PAREN_L,this.parseInputValueDef,a.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(a.COLON);const s=this.parseTypeReference();let r;this.expectOptionalToken(a.EQUALS)&&(r=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:s,defaultValue:r,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),s=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:s,directives:r,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),s=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(e,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:s,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(a.EQUALS)?this.delimitedMany(a.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),s=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(e,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:s,values:r})}parseEnumValuesDefinition(){return this.optionalMany(a.BRACE_L,this.parseEnumValueDefinition,a.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),s=this.parseConstDirectives();return this.node(e,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:s})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw f(this._lexer.source,this._lexer.token.start,`${F(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 i=this.parseName(),s=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(e,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:s,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseInputValueDef,a.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===a.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(i.length===0&&s.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:s,fields:r})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(i.length===0&&s.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:s,fields:r})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();if(i.length===0&&s.length===0)throw this.unexpected();return this.node(e,{ki
vendor: 3,703 bytes, lines 20-22
20nd:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:s})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();if(i.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:s})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();if(i.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:s})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(a.AT);const i=this.parseName(),s=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:s,repeatable:r,locations:o})}parseDirectiveLocations(){return this.delimitedMany(a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(j,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new he(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 f(this._lexer.source,n.start,`Expected ${re(e)}, found ${F(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===a.NAME&&n.value===e)this.advanceLexer();else throw f(this._lexer.source,n.start,`Expected "${e}", found ${F(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===a.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e??this._lexer.token;return f(this._lexer.source,n.start,`Unexpected ${F(n)}.`)}any(e,n,i){this.expectToken(e);const s=[];for(;!this.expectOptionalToken(i);)s.push(n.call(this));return s}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(i));return s}return[]}many(e,n,i){this.expectToken(e);const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(i));return s}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==a.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw f(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function F(t){const e=t.value;return re(t.kind)+(e!=null?` "${e}"`:"")}function re(t){return ge(t)?`"${t}"`:t}var P=new Map,K=new Map,ae=!0,B=!1;function oe(t){return t.replace(/[\s,]+/g," ").trim()}function qe(t){return oe(t.source.body.substring(t.start,t.end))}function je(t){var e=new Set,n=[];return t.definitions.forEach(function(i){if(i.kind==="FragmentDefinition"){var s=i.name.value,r=qe(i.loc),o=K.get(s);o&&!o.has(r)?ae&&console.warn("Warning: fragment with name "+s+` already exists. 21graphql-tag enforces all fragment names across your application to be unique; read more about 22this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||K.set(s,o=new Set),o.add(r),e.has(r)||(e.add(r),n.push(i))}else n.push(i)}),Y(Y({},t),{definitions:n})}function Ke(t){var e=new Set(t.definitions);
22e.forEach(function(i){i.loc&&delete i.loc,Object.keys(i).forEach(function(s){var r=i[s];r&&typeof r=="object"&&e.add(r)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function Qe(t){var e=oe(t);if(!P.has(e)){var n=$e(t,{experimentalFragmentVariables:B,allowLegacyFragmentVariables:B});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");P.set(e,Ke(je(n)))}return P.get(e)}function y(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var i=t[0];return e.forEach(function(s,r){s&&s.kind==="Document"?i+=s.loc.source.body:i+=s,i+=t[r+1]}),Qe(i)}function Ye(){P.clear(),K.clear()}function ze(){ae=!1}function He(){B=!0}function Je(){B=!1}var S={gql:y,resetCaches:Ye,disableFragmentWarnings:ze,enableExperimentalFragmentVariables:He,disableExperimentalFragmentVariables:Je};(function(t){t.gql=S.gql,t.resetCaches=S.resetCaches,t.disableFragmentWarnings=S.disableFragmentWarnings,t.enableExperimentalFragmentVariables=S.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=S.disableExperimentalFragmentVariables})(y||(y={}));y.default=y;function G(t){return async e=>{var i;return await de({method:"GET",path:`/todos/${(i=t==null?void 0:t.params)==null?void 0:i.id}`,...t},e)}}const We=y` 23 query($id: ID!) { 24 user(id: $id) { 25 id 26 username 27 email 28 } 29 } 30`;function W(t){return async e=>await fe({...t,gql:We},e)}y` 31 mutation ( 32 $input: CreatePostInput! 33 ) { 34 createPost(input: $input) { 35 id 36 title 37 body 38 } 39 } 40`;const Xe={class:""},Ze={class:""},et={class:""},tt={class:""},_t=me({__name:"api",async setup(t){let e,n;const{request:i,data:s}=([e,n]=b(()=>D(G,{id:"1"})),e=await e,n(),e),{request:r,data:o}=([e,n]=b(()=>D(W,{id:"1"})),e=await e,n(),e),{request:l,data:h}=([e,n]=b(()=>D(G,{id:"1"},{init:!0,initPayload:{params:{id:2}}})),e=await e,n(),e),{request:E,data:u}=([e,n]=b(()=>D(W,{id:"1"},{init:!0,initPayload:{gqlVariables:{id:2}}})),e=await e,n(),e),{startPolling:_,stopPolling:x,data:O}=([e,n]=b(()=>D(G,{id:"1"},{initPayload:{params:{id:2}}})),e=await e,n(),e);return(m,p)=>{const v=Ne,g=Te,ce=_e,le=Ae;return xe(),Ee(le,{type:"feature"},{default:A(()=>[N(ce,{title:"api"},{default:A(()=>[N(g,{title:"restful åºæ¬ä½¿ç¨"},{default:A(()=>[I("div",Xe,R(T(s)),1),N(v,{label:"RESTFUL API REQUEST",onClick:p[
400]||(p[0]=()=>T(i)({params:{id:3}}))})]),_:1}),N(g,{title:"graphql åºæ¬ä½¿ç¨"},{default:A(()=>[I("div",Ze,R(T(o)),1),N(v,{label:"GRAPHQL API REQUEST",onClick:p[1]||(p[1]=()=>T(r)({gqlVariables:{id:3}}))})]),_:1}),N(g,{title:"restful åå§åå³ call api"},{default:A(()=>[I("div",et,R(T(h)),1),N(v,{label:"GRAPHQL API REQUEST",onClick:p[2]||(p[2]=()=>T(l)({params:{id:3}}))})]),_:1}),N(g,{title:"graphql åå§åå³ call api"},{default:A(()=>[I("div",tt,R(T(u)),1),N(v,{label:"GRAPHQL API REQUEST",onClick:p[3]||(p[3]=()=>T(E)({gqlVariables:{id:3}}))})]),_:1}),N(g,{title:"輪詢"},{desc:A(()=>p[6]||(p[6]=[I("p",null,"- å¯éé第ä¸ååæ¸çµ¦ç¼apiç忏",-1),I("p",null,"- å¯éé第äºååæ¸èª¿æ´è¼ªè©¢ééæéåé¯èª¤å¤å°æ¬¡å¾é¡¯ç¤ºé¯èª¤",-1),I("p",null,"- è¥æ³ç´æ¥éå§è¼ªè©¢ï¼useRequest 第ä¸å忏ç initPolling è¨çº true",-1)])),default:A(()=>[I("div",null,R(T(O)),1),N(v,{label:"éå§è¼ªè©¢",onClick:p[4]||(p[4]=()=>T(_)({params:{id:5}}))}),N(v,{label:"åæ¢è¼ªè©¢",onClick:p[5]||(p[5]=()=>T(x)())})]),_:1})]),_:1})]),_:1})}}});
40export{_t as default};
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.