altair-static
Version:
Static package for altair graphql client
43 lines • 146 kB
JavaScript
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9db4c5f-7a02-57d0-9707-c7b5b3c2a5cd")}catch(e){}}();
var jr=Symbol("Comlink.proxy"),Ra=Symbol("Comlink.endpoint"),ka=Symbol("Comlink.releaseProxy"),bn=Symbol("Comlink.thrown"),Qr=e=>typeof e=="object"&&e!==null||typeof e=="function",Ma={canHandle:e=>Qr(e)&&e[jr],serialize(e){let{port1:t,port2:n}=new MessageChannel;return jt(e,t),[n,[n]]},deserialize(e){return e.start(),Ua(e)}},Ca={canHandle:e=>Qr(e)&&bn in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},Br=new Map([["proxy",Ma],["throw",Ca]]);function jt(e,t=self){t.addEventListener("message",function n(r){if(!r||!r.data)return;let{id:i,type:a,path:o}=Object.assign({path:[]},r.data),s=(r.data.argumentList||[]).map(qe),c;try{let u=o.slice(0,-1).reduce((f,d)=>f[d],e),p=o.reduce((f,d)=>f[d],e);switch(a){case 0:c=p;break;case 1:u[o.slice(-1)[0]]=qe(r.data.value),c=!0;break;case 2:c=p.apply(u,s);break;case 3:{let f=new p(...s);c=ja(f)}break;case 4:{let{port1:f,port2:d}=new MessageChannel;jt(e,d),c=Pa(f,[f])}break;case 5:c=void 0;break}}catch(u){c={value:u,[bn]:0}}Promise.resolve(c).catch(u=>({value:u,[bn]:0})).then(u=>{let[p,f]=Dn(u);t.postMessage(Object.assign(Object.assign({},p),{id:i}),f),a===5&&(t.removeEventListener("message",n),Yr(t))})}),t.start&&t.start()}function Va(e){return e.constructor.name==="MessagePort"}function Yr(e){Va(e)&&e.close()}function Ua(e,t){return xn(e,[],t)}function Pt(e){if(e)throw new Error("Proxy has been released and is not useable")}function xn(e,t=[],n=function(){}){let r=!1,i=new Proxy(n,{get(a,o){if(Pt(r),o===ka)return()=>rt(e,{type:5,path:t.map(s=>s.toString())}).then(()=>{Yr(e),r=!0});if(o==="then"){if(t.length===0)return{then:()=>i};let s=rt(e,{type:0,path:t.map(c=>c.toString())}).then(qe);return s.then.bind(s)}return xn(e,[...t,o])},set(a,o,s){Pt(r);let[c,u]=Dn(s);return rt(e,{type:1,path:[...t,o].map(p=>p.toString()),value:c},u).then(qe)},apply(a,o,s){Pt(r);let c=t[t.length-1];if(c===Ra)return rt(e,{type:4}).then(qe);if(c==="bind")return xn(e,t.slice(0,-1));let[u,p]=Pr(s);return rt(e,{type:2,path:t.map(f=>f.toString()),argumentList:u},p).then(qe)},construct(a,o){Pt(r);let[s,c]=Pr(o);return rt(e,{type:3,path:t.map(u=>u.toString()),argumentList:s},c).then(qe)}});return i}function Ga(e){return Array.prototype.concat.apply([],e)}function Pr(e){let t=e.map(Dn);return[t.map(n=>n[0]),Ga(t.map(n=>n[1]))]}var Kr=new WeakMap;function Pa(e,t){return Kr.set(e,t),e}function ja(e){return Object.assign(e,{[jr]:!0})}function Dn(e){for(let[t,n]of Br)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:3,name:t,value:r},i]}return[{type:0,value:e},Kr.get(e)||[]]}function qe(e){switch(e.type){case 3:return Br.get(e.name).deserialize(e.value);case 0:return e.value}}function rt(e,t,n){return new Promise(r=>{let i=Qa();e.addEventListener("message",function a(o){!o.data||!o.data.id||o.data.id!==i||(e.removeEventListener("message",a),r(o.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:i},t),n)})}function Qa(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function Pe(e){return Array.isArray?Array.isArray(e):Zr(e)==="[object Array]"}var Ya=1/0;function Ka(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-Ya?"-0":t}function qa(e){return e==null?"":Ka(e)}function Ge(e){return typeof e=="string"}function Wr(e){return typeof e=="number"}function Ja(e){return e===!0||e===!1||Xa(e)&&Zr(e)=="[object Boolean]"}function $r(e){return typeof e=="object"}function Xa(e){return $r(e)&&e!==null}function Ne(e){return e!=null}function Ln(e){return!e.trim().length}function Zr(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var za="Incorrect 'index' type",Ha=e=>`Invalid value for key ${e}`,Wa=e=>`Pattern length exceeds max of ${e}.`,$a=e=>`Missing ${e} property in key`,Za=e=>`Property 'weight' in key '${e}' must be a positive integer`,qr=Object.prototype.hasOwnProperty,An=class{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let i=ei(r);n+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function ei(e){let t=null,n=null,r=null,i=1;if(Ge(e)||Pe(e))r=e,t=Jr(e),n=wn(e);else{if(!qr.call(e,"name"))throw new Error($a("name"));let a=e.name;if(r=a,qr.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(Za(a));t=Jr(a),n=wn(a)}return{path:t,id:n,weight:i,src:r}}function Jr(e){return Pe(e)?e:e.split(".")}function wn(e){return Pe(e)?e.join("."):e}function eo(e,t){let n=[],r=!1,i=(a,o,s)=>{if(Ne(a))if(!o[s])n.push(a);else{let c=o[s],u=a[c];if(!Ne(u))return;if(s===o.length-1&&(Ge(u)||Wr(u)||Ja(u)))n.push(qa(u));else if(Pe(u)){r=!0;for(let p=0,f=u.length;p<f;p+=1)i(u[p],o,s+1)}else o.length&&i(u,o,s+1)}};return i(e,Ge(t)?t.split("."):t,0),r?n:n[0]}var to={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},no={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ro={location:0,threshold:.6,distance:100},io={useExtendedSearch:!1,getFn:eo,ignoreLocation:!1,ignoreFieldNorm:!1},w={...no,...to,...ro,...io},ao=/[^ ]+/g;function oo(e=3){let t=new Map,n=Math.pow(10,e);return{get(r){let i=r.match(ao).length;if(t.has(i))return t.get(i);let a=1/Math.sqrt(i),o=parseFloat(Math.round(a*n)/n);return t.set(i,o),o},clear(){t.clear()}}}var It=class{constructor({getFn:t=w.getFn}={}){this.norm=oo(3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ge(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){let n=this.size();Ge(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Ne(t)||Ln(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((i,a)=>{let o=this.getFn(t,i.path);if(Ne(o)){if(Pe(o)){let s=[],c=[{nestedArrIndex:-1,value:o}];for(;c.length;){let{nestedArrIndex:u,value:p}=c.pop();if(Ne(p))if(Ge(p)&&!Ln(p)){let f={v:p,i:u,n:this.norm.get(p)};s.push(f)}else Pe(p)&&p.forEach((f,d)=>{c.push({nestedArrIndex:d,value:f})})}r.$[a]=s}else if(!Ln(o)){let s={v:o,n:this.norm.get(o)};r.$[a]=s}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};function ti(e,t,{getFn:n=w.getFn}={}){let r=new It({getFn:n});return r.setKeys(e.map(ei)),r.setSources(t),r.create(),r}function so(e,{getFn:t=w.getFn}={}){let{keys:n,records:r}=e,i=new It({getFn:t});return i.setKeys(n),i.setIndexRecords(r),i}function Qt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=w.distance,ignoreLocation:a=w.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function co(e=[],t=w.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let s=e[a];s&&r===-1?r=a:!s&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var Je=32;function uo(e,t,n,{location:r=w.location,distance:i=w.distance,threshold:a=w.threshold,findAllMatches:o=w.findAllMatches,minMatchCharLength:s=w.minMatchCharLength,includeMatches:c=w.includeMatches,ignoreLocation:u=w.ignoreLocation}={}){if(t.length>Je)throw new Error(Wa(Je));let p=t.length,f=e.length,d=Math.max(0,Math.min(r,f)),h=a,m=d,g=s>1||c,N=g?Array(f):[],I;for(;(I=e.indexOf(t,m))>-1;){let C=Qt(t,{currentLocation:I,expectedLocation:d,distance:i,ignoreLocation:u});if(h=Math.min(C,h),m=I+p,g){let J=0;for(;J<p;)N[I+J]=1,J+=1}}m=-1;let L=[],F=1,M=p+f,Q=1<<p-1;for(let C=0;C<p;C+=1){let J=0,ee=M;for(;J<ee;)Qt(t,{errors:C,currentLocation:d+ee,expectedLocation:d,distance:i,ignoreLocation:u})<=h?J=ee:M=ee,ee=Math.floor((M-J)/2+J);M=ee;let Se=Math.max(1,d-ee+1),Le=o?f:Math.min(d+ee,f)+p,Be=Array(Le+2);Be[Le+1]=(1<<C)-1;for(let Ee=Le;Ee>=Se;Ee-=1){let nt=Ee-1,Ct=n[e.charAt(nt)];if(g&&(N[nt]=+!!Ct),Be[Ee]=(Be[Ee+1]<<1|1)&Ct,C&&(Be[Ee]|=(L[Ee+1]|L[Ee])<<1|1|L[Ee+1]),Be[Ee]&Q&&(F=Qt(t,{errors:C,currentLocation:nt,expectedLocation:d,distance:i,ignoreLocation:u}),F<=h)){if(h=F,m=nt,m<=d)break;Se=Math.max(1,2*d-m)}}if(Qt(t,{errors:C+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:u})>h)break;L=Be}let B={isMatch:m>=0,score:Math.max(.001,F)};if(g){let C=co(N,s);C.length?c&&(B.indices=C):B.isMatch=!1}return B}function po(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var Bt=class{constructor(t,{location:n=w.location,threshold:r=w.threshold,distance:i=w.distance,includeMatches:a=w.includeMatches,findAllMatches:o=w.findAllMatches,minMatchCharLength:s=w.minMatchCharLength,isCaseSensitive:c=w.isCaseSensitive,ignoreLocation:u=w.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:i,includeMatches:a,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:c,ignoreLocation:u},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;let p=(d,h)=>{this.chunks.push({pattern:d,alphabet:po(d),startIndex:h})},f=this.pattern.length;if(f>Je){let d=0,h=f%Je,m=f-h;for(;d<m;)p(this.pattern.substr(d,Je),d),d+=Je;if(h){let g=f-Je;p(this.pattern.substr(g),g)}}else p(this.pattern,0)}searchIn(t){let{isCaseSensitive:n,includeMatches:r}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let m={isMatch:!0,score:0};return r&&(m.indices=[[0,t.length-1]]),m}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:u}=this.options,p=[],f=0,d=!1;this.chunks.forEach(({pattern:m,alphabet:g,startIndex:N})=>{let{isMatch:I,score:L,indices:F}=uo(t,m,g,{location:i+N,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:u});I&&(d=!0),f+=L,I&&F&&(p=[...p,...F])});let h={isMatch:d,score:d?f/this.chunks.length:1};return d&&r&&(h.indices=p),h}},Me=class{constructor(t){this.pattern=t}static isMultiMatch(t){return Xr(t,this.multiRegex)}static isSingleMatch(t){return Xr(t,this.singleRegex)}search(){}};function Xr(e,t){let n=e.match(t);return n?n[1]:null}var _n=class extends Me{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){let n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},Fn=class extends Me{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){let r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}},Rn=class extends Me{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){let n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},kn=class extends Me{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){let n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},Mn=class extends Me{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){let n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},Cn=class extends Me{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){let n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},Yt=class extends Me{constructor(t,{location:n=w.location,threshold:r=w.threshold,distance:i=w.distance,includeMatches:a=w.includeMatches,findAllMatches:o=w.findAllMatches,minMatchCharLength:s=w.minMatchCharLength,isCaseSensitive:c=w.isCaseSensitive,ignoreLocation:u=w.ignoreLocation}={}){super(t),this._bitapSearch=new Bt(t,{location:n,threshold:r,distance:i,includeMatches:a,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:c,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}},Kt=class extends Me{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r,i=[],a=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}},Vn=[_n,Kt,Rn,kn,Cn,Mn,Fn,Yt],zr=Vn.length,lo=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/,fo="|";function mo(e,t={}){return e.split(fo).map(n=>{let r=n.trim().split(lo).filter(a=>a&&!!a.trim()),i=[];for(let a=0,o=r.length;a<o;a+=1){let s=r[a],c=!1,u=-1;for(;!c&&++u<zr;){let p=Vn[u],f=p.isMultiMatch(s);f&&(i.push(new p(f,t)),c=!0)}if(!c)for(u=-1;++u<zr;){let p=Vn[u],f=p.isSingleMatch(s);if(f){i.push(new p(f,t));break}}}return i})}var ho=new Set([Yt.type,Kt.type]),Un=class{constructor(t,{isCaseSensitive:n=w.isCaseSensitive,includeMatches:r=w.includeMatches,minMatchCharLength:i=w.minMatchCharLength,ignoreLocation:a=w.ignoreLocation,findAllMatches:o=w.findAllMatches,location:s=w.location,threshold:c=w.threshold,distance:u=w.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=mo(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){let n=this.query;if(!n)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let a=0,o=[],s=0;for(let c=0,u=n.length;c<u;c+=1){let p=n[c];o.length=0,a=0;for(let f=0,d=p.length;f<d;f+=1){let h=p[f],{isMatch:m,indices:g,score:N}=h.search(t);if(m){if(a+=1,s+=N,r){let I=h.constructor.type;ho.has(I)?o=[...o,...g]:o.push(g)}}else{s=0,a=0,o.length=0;break}}if(a){let f={isMatch:!0,score:s/a};return r&&(f.indices=o),f}}return{isMatch:!1,score:1}}},Gn=[];function vo(...e){Gn.push(...e)}function Pn(e,t){for(let n=0,r=Gn.length;n<r;n+=1){let i=Gn[n];if(i.condition(e,t))return new i(e,t)}return new Bt(e,t)}var Ot={AND:"$and",OR:"$or"},jn={PATH:"$path",PATTERN:"$val"},Qn=e=>!!(e[Ot.AND]||e[Ot.OR]),yo=e=>!!e[jn.PATH],To=e=>!Pe(e)&&$r(e)&&!Qn(e),Hr=e=>({[Ot.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function ni(e,t,{auto:n=!0}={}){let r=i=>{let a=Object.keys(i),o=yo(i);if(!o&&a.length>1&&!Qn(i))return r(Hr(i));if(To(i)){let c=o?i[jn.PATH]:a[0],u=o?i[jn.PATTERN]:i[c];if(!Ge(u))throw new Error(Ha(c));let p={keyId:wn(c),pattern:u};return n&&(p.searcher=Pn(u,t)),p}let s={children:[],operator:a[0]};return a.forEach(c=>{let u=i[c];Pe(u)&&u.forEach(p=>{s.children.push(r(p))})}),s};return Qn(e)||(e=Hr(e)),r(e)}function go(e,{ignoreFieldNorm:t=w.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:i,norm:a,score:o})=>{let s=i?i.weight:null;r*=Math.pow(o===0&&s?Number.EPSILON:o,(s||1)*(t?1:a))}),n.score=r})}function Eo(e,t){let n=e.matches;t.matches=[],Ne(n)&&n.forEach(r=>{if(!Ne(r.indices)||!r.indices.length)return;let{indices:i,value:a}=r,o={indices:i,value:a};r.key&&(o.key=r.key.src),r.idx>-1&&(o.refIndex=r.idx),t.matches.push(o)})}function No(e,t){t.score=e.score}function Io(e,t,{includeMatches:n=w.includeMatches,includeScore:r=w.includeScore}={}){let i=[];return n&&i.push(Eo),r&&i.push(No),e.map(a=>{let{idx:o}=a,s={item:t[o],refIndex:o};return i.length&&i.forEach(c=>{c(a,s)}),s})}var Ye=class{constructor(t,n={},r){this.options={...w,...n},this.options.useExtendedSearch,this._keyStore=new An(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof It))throw new Error(za);this._myIndex=n||ti(this.options.keys,this._docs,{getFn:this.options.getFn})}add(t){Ne(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){let n=[];for(let r=0,i=this._docs.length;r<i;r+=1){let a=this._docs[r];t(a,r)&&(this.removeAt(r),r-=1,i-=1,n.push(a))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){let{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options,c=Ge(t)?Ge(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return go(c,{ignoreFieldNorm:s}),a&&c.sort(o),Wr(n)&&n>-1&&(c=c.slice(0,n)),Io(c,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(t){let n=Pn(t,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:a,i:o,n:s})=>{if(!Ne(a))return;let{isMatch:c,score:u,indices:p}=n.searchIn(a);c&&i.push({item:a,idx:o,matches:[{score:u,value:a,norm:s,indices:p}]})}),i}_searchLogical(t){let n=ni(t,this.options),r=(s,c,u)=>{if(!s.children){let{keyId:p,searcher:f}=s,d=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(c,p),searcher:f});return d&&d.length?[{idx:u,item:c,matches:d}]:[]}switch(s.operator){case Ot.AND:{let p=[];for(let f=0,d=s.children.length;f<d;f+=1){let h=s.children[f],m=r(h,c,u);if(m.length)p.push(...m);else return[]}return p}case Ot.OR:{let p=[];for(let f=0,d=s.children.length;f<d;f+=1){let h=s.children[f],m=r(h,c,u);if(m.length){p.push(...m);break}}return p}}},i=this._myIndex.records,a={},o=[];return i.forEach(({$:s,i:c})=>{if(Ne(s)){let u=r(n,s,c);u.length&&(a[c]||(a[c]={idx:c,item:s,matches:[]},o.push(a[c])),u.forEach(({matches:p})=>{a[c].matches.push(...p)}))}}),o}_searchObjectList(t){let n=Pn(t,this.options),{keys:r,records:i}=this._myIndex,a=[];return i.forEach(({$:o,i:s})=>{if(!Ne(o))return;let c=[];r.forEach((u,p)=>{c.push(...this._findMatches({key:u,value:o[p],searcher:n}))}),c.length&&a.push({idx:s,item:o,matches:c})}),a}_findMatches({key:t,value:n,searcher:r}){if(!Ne(n))return[];let i=[];if(Pe(n))n.forEach(({v:a,i:o,n:s})=>{if(!Ne(a))return;let{isMatch:c,score:u,indices:p}=r.searchIn(a);c&&i.push({score:u,key:t,value:a,idx:o,norm:s,indices:p})});else{let{v:a,n:o}=n,{isMatch:s,score:c,indices:u}=r.searchIn(a);s&&i.push({score:c,key:t,value:a,norm:o,indices:u})}return i}};Ye.version="6.4.6";Ye.createIndex=ti;Ye.parseIndex=so;Ye.config=w;Ye.parseQuery=ni;vo(Un);var ri=Ye;var l=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function qt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qt=function(n){return typeof n}:qt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qt(e)}function ve(e){return qt(e)=="object"&&e!==null}var Jt=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",Lc=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator",te=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function it(e,t){for(var n=/\r\n|[\n\r]/g,r=1,i=t+1,a;(a=n.exec(e.body))&&a.index<t;)r+=1,i=t+1-(a.index+a[0].length);return{line:r,column:i}}function Bn(e){return zt(e.source,it(e.source,e.start))}function zt(e,t){var n=e.locationOffset.column-1,r=Xt(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=t.line===1?n:0,c=t.column+s,u="".concat(e.name,":").concat(o,":").concat(c,`
`),p=r.split(/\r\n|[\n\r]/g),f=p[i];if(f.length>120){for(var d=Math.floor(c/80),h=c%80,m=[],g=0;g<f.length;g+=80)m.push(f.slice(g,g+80));return u+ii([["".concat(o),m[0]]].concat(m.slice(1,d+1).map(function(N){return["",N]}),[[" ",Xt(h-1)+"^"],["",m[d+1]]]))}return u+ii([["".concat(o-1),p[i-1]],["".concat(o),f],["",Xt(c-1)+"^"],["".concat(o+1),p[i+1]]])}function ii(e){var t=e.filter(function(r){var i=r[0],a=r[1];return a!==void 0}),n=Math.max.apply(Math,t.map(function(r){var i=r[0];return i.length}));return t.map(function(r){var i=r[0],a=r[1];return Oo(n,i)+(a?" | "+a:" |")}).join(`
`)}function Xt(e){return Array(e+1).join(" ")}function Oo(e,t){return Xt(e-t.length)+t}function Ht(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ht=function(n){return typeof n}:Ht=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ht(e)}function So(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ai(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bo(e,t,n){return t&&ai(e.prototype,t),n&&ai(e,n),e}function xo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bt(e,t)}function Do(e){var t=si();return function(){var r=xt(e),i;if(t){var a=xt(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return oi(this,i)}}function oi(e,t){return t&&(Ht(t)==="object"||typeof t=="function")?t:St(e)}function St(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yn(e){var t=typeof Map=="function"?new Map:void 0;return Yn=function(r){if(r===null||!Lo(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return Wt(r,arguments,xt(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),bt(i,r)},Yn(e)}function Wt(e,t,n){return si()?Wt=Reflect.construct:Wt=function(i,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(i,s),u=new c;return o&&bt(u,o.prototype),u},Wt.apply(null,arguments)}function si(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Lo(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function bt(e,t){return bt=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},bt(e,t)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xt(e)}var y=(function(e){xo(n,e);var t=Do(n);function n(r,i,a,o,s,c,u){var p,f,d,h,m;So(this,n),m=t.call(this,r);var g=Array.isArray(i)?i.length!==0?i:void 0:i?[i]:void 0,N=a;if(!N&&g){var I;N=(I=g[0].loc)===null||I===void 0?void 0:I.source}var L=o;!L&&g&&(L=g.reduce(function(B,C){return C.loc&&B.push(C.loc.start),B},[])),L&&L.length===0&&(L=void 0);var F;o&&a?F=o.map(function(B){return it(a,B)}):g&&(F=g.reduce(function(B,C){return C.loc&&B.push(it(C.loc.source,C.loc.start)),B},[]));var M=u;if(M==null&&c!=null){var Q=c.extensions;ve(Q)&&(M=Q)}return Object.defineProperties(St(m),{name:{value:"GraphQLError"},message:{value:r,enumerable:!0,writable:!0},locations:{value:(p=F)!==null&&p!==void 0?p:void 0,enumerable:F!=null},path:{value:s??void 0,enumerable:s!=null},nodes:{value:g??void 0},source:{value:(f=N)!==null&&f!==void 0?f:void 0},positions:{value:(d=L)!==null&&d!==void 0?d:void 0},originalError:{value:c},extensions:{value:(h=M)!==null&&h!==void 0?h:void 0,enumerable:M!=null}}),c!=null&&c.stack?(Object.defineProperty(St(m),"stack",{value:c.stack,writable:!0,configurable:!0}),oi(m)):(Error.captureStackTrace?Error.captureStackTrace(St(m),n):Object.defineProperty(St(m),"stack",{value:Error().stack,writable:!0,configurable:!0}),m)}return bo(n,[{key:"toString",value:function(){return Ao(this)}},{key:te,get:function(){return"Object"}}]),n})(Yn(Error));function Ao(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+=`
`+Bn(i.loc))}else if(e.source&&e.locations)for(var a=0,o=e.locations;a<o.length;a++){var s=o[a];t+=`
`+zt(e.source,s)}return t}function Z(e,t){var n=!!e;if(!n)throw new Error(t??"Unexpected invariant triggered.")}function le(e,t,n){return new y("Syntax Error: ".concat(n),void 0,e,[t])}var wo=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,Dt=wo;function fe(e){var t=e.prototype.toJSON;typeof t=="function"||Z(0),e.prototype.inspect=t,Dt&&(e.prototype[Dt]=t)}var $t=(function(){function e(n,r,i){this.start=n.start,this.end=r.end,this.startToken=n,this.endToken=r,this.source=i}var t=e.prototype;return t.toJSON=function(){return{start:this.start,end:this.end}},e})();fe($t);var z=(function(){function e(n,r,i,a,o,s,c){this.kind=n,this.start=r,this.end=i,this.line=a,this.column=o,this.value=c,this.prev=s,this.next=null}var t=e.prototype;return t.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e})();fe(z);function Kn(e){return e!=null&&typeof e.kind=="string"}var v=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Zt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zt=function(n){return typeof n}:Zt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zt(e)}var _o=10,ci=2;function E(e){return en(e,[])}function en(e,t){switch(Zt(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":Fo(e,t);default:return String(e)}}function Fo(e,t){if(t.indexOf(e)!==-1)return"[Circular]";var n=[].concat(t,[e]),r=Mo(e);if(r!==void 0){var i=r.call(e);if(i!==e)return typeof i=="string"?i:en(i,n)}else if(Array.isArray(e))return ko(e,n);return Ro(e,n)}function Ro(e,t){var n=Object.keys(e);if(n.length===0)return"{}";if(t.length>ci)return"["+Co(e)+"]";var r=n.map(function(i){var a=en(e[i],t);return i+": "+a});return"{ "+r.join(", ")+" }"}function ko(e,t){if(e.length===0)return"[]";if(t.length>ci)return"[Array]";for(var n=Math.min(_o,e.length),r=e.length-n,i=[],a=0;a<n;++a)i.push(en(e[a],t));return r===1?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function Mo(e){var t=e[String(Dt)];if(typeof t=="function")return t;if(typeof e.inspect=="function")return e.inspect}function Co(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){var n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}function _(e,t){var n=!!e;if(!n)throw new Error(t)}var Ie=function(t,n){return t instanceof n};function ui(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vo(e,t,n){return t&&ui(e.prototype,t),n&&ui(e,n),e}var tn=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof t=="string"||_(0,"Body must be a string. Received: ".concat(E(t),".")),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||_(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||_(0,"column in locationOffset is 1-indexed and must be positive.")}return Vo(e,[{key:te,get:function(){return"Source"}}]),e})();function pi(e){return Ie(e,tn)}var D=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function nn(e){var t=e.split(/\r\n|[\n\r]/g),n=Uo(e);if(n!==0)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var i=0;i<t.length&&li(t[i]);)++i;for(var a=t.length;a>i&&li(t[a-1]);)--a;return t.slice(i,a).join(`
`)}function li(e){for(var t=0;t<e.length;++t)if(e[t]!==" "&&e[t]!==" ")return!1;return!0}function Uo(e){for(var t,n=!0,r=!0,i=0,a=null,o=0;o<e.length;++o)switch(e.charCodeAt(o)){case 13:e.charCodeAt(o+1)===10&&++o;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(a===null||i<a)&&(a=i),r=!1}return(t=a)!==null&&t!==void 0?t:0}function fi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=e.indexOf(`
`)===-1,i=e[0]===" "||e[0]===" ",a=e[e.length-1]==='"',o=e[e.length-1]==="\\",s=!r||a||o||n,c="";return s&&!(r&&i)&&(c+=`
`+t),c+=t?e.replace(/\n/g,`
`+t):e,s&&(c+=`
`),'"""'+c.replace(/"""/g,'\\"""')+'"""'}var Jn=(function(){function e(n){var r=new z(v.SOF,0,0,0,0,null);this.source=n,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){this.lastToken=this.token;var r=this.token=this.lookahead();return r},t.lookahead=function(){var r=this.token;if(r.kind!==v.EOF)do{var i;r=(i=r.next)!==null&&i!==void 0?i:r.next=Go(this,r)}while(r.kind===v.COMMENT);return r},e})();function di(e){return e===v.BANG||e===v.DOLLAR||e===v.AMP||e===v.PAREN_L||e===v.PAREN_R||e===v.SPREAD||e===v.COLON||e===v.EQUALS||e===v.AT||e===v.BRACKET_L||e===v.BRACKET_R||e===v.BRACE_L||e===v.PIPE||e===v.BRACE_R}function Xe(e){return isNaN(e)?v.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Go(e,t){for(var n=e.source,r=n.body,i=r.length,a=t.end;a<i;){var o=r.charCodeAt(a),s=e.line,c=1+a-e.lineStart;switch(o){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:r.charCodeAt(a+1)===10?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new z(v.BANG,a,a+1,s,c,t);case 35:return jo(n,a,s,c,t);case 36:return new z(v.DOLLAR,a,a+1,s,c,t);case 38:return new z(v.AMP,a,a+1,s,c,t);case 40:return new z(v.PAREN_L,a,a+1,s,c,t);case 41:return new z(v.PAREN_R,a,a+1,s,c,t);case 46:if(r.charCodeAt(a+1)===46&&r.charCodeAt(a+2)===46)return new z(v.SPREAD,a,a+3,s,c,t);break;case 58:return new z(v.COLON,a,a+1,s,c,t);case 61:return new z(v.EQUALS,a,a+1,s,c,t);case 64:return new z(v.AT,a,a+1,s,c,t);case 91:return new z(v.BRACKET_L,a,a+1,s,c,t);case 93:return new z(v.BRACKET_R,a,a+1,s,c,t);case 123:return new z(v.BRACE_L,a,a+1,s,c,t);case 124:return new z(v.PIPE,a,a+1,s,c,t);case 125:return new z(v.BRACE_R,a,a+1,s,c,t);case 34:return r.charCodeAt(a+1)===34&&r.charCodeAt(a+2)===34?Yo(n,a,s,c,t,e):Bo(n,a,s,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Qo(n,a,o,s,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return qo(n,a,s,c,t)}throw le(n,a,Po(o))}var u=e.line,p=1+a-e.lineStart;return new z(v.EOF,i,i,u,p,t)}function Po(e){return e<32&&e!==9&&e!==10&&e!==13?"Cannot contain the invalid character ".concat(Xe(e),"."):e===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(Xe(e),".")}function jo(e,t,n,r,i){var a=e.body,o,s=t;do o=a.charCodeAt(++s);while(!isNaN(o)&&(o>31||o===9));return new z(v.COMMENT,t,s,n,r,i,a.slice(t+1,s))}function Qo(e,t,n,r,i,a){var o=e.body,s=n,c=t,u=!1;if(s===45&&(s=o.charCodeAt(++c)),s===48){if(s=o.charCodeAt(++c),s>=48&&s<=57)throw le(e,c,"Invalid number, unexpected digit after 0: ".concat(Xe(s),"."))}else c=qn(e,c,s),s=o.charCodeAt(c);if(s===46&&(u=!0,s=o.charCodeAt(++c),c=qn(e,c,s),s=o.charCodeAt(c)),(s===69||s===101)&&(u=!0,s=o.charCodeAt(++c),(s===43||s===45)&&(s=o.charCodeAt(++c)),c=qn(e,c,s),s=o.charCodeAt(c)),s===46||Jo(s))throw le(e,c,"Invalid number, expected digit but got: ".concat(Xe(s),"."));return new z(u?v.FLOAT:v.INT,t,c,r,i,a,o.slice(t,c))}function qn(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do a=r.charCodeAt(++i);while(a>=48&&a<=57);return i}throw le(e,i,"Invalid number, expected digit but got: ".concat(Xe(a),"."))}function Bo(e,t,n,r,i){for(var a=e.body,o=t+1,s=o,c=0,u="";o<a.length&&!isNaN(c=a.charCodeAt(o))&&c!==10&&c!==13;){if(c===34)return u+=a.slice(s,o),new z(v.STRING,t,o+1,n,r,i,u);if(c<32&&c!==9)throw le(e,o,"Invalid character within String: ".concat(Xe(c),"."));if(++o,c===92){switch(u+=a.slice(s,o-1),c=a.charCodeAt(o),c){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
`;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:{var p=Ko(a.charCodeAt(o+1),a.charCodeAt(o+2),a.charCodeAt(o+3),a.charCodeAt(o+4));if(p<0){var f=a.slice(o+1,o+5);throw le(e,o,"Invalid character escape sequence: \\u".concat(f,"."))}u+=String.fromCharCode(p),o+=4;break}default:throw le(e,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(c),"."))}++o,s=o}}throw le(e,o,"Unterminated string.")}function Yo(e,t,n,r,i,a){for(var o=e.body,s=t+3,c=s,u=0,p="";s<o.length&&!isNaN(u=o.charCodeAt(s));){if(u===34&&o.charCodeAt(s+1)===34&&o.charCodeAt(s+2)===34)return p+=o.slice(c,s),new z(v.BLOCK_STRING,t,s+3,n,r,i,nn(p));if(u<32&&u!==9&&u!==10&&u!==13)throw le(e,s,"Invalid character within String: ".concat(Xe(u),"."));u===10?(++s,++a.line,a.lineStart=s):u===13?(o.charCodeAt(s+1)===10?s+=2:++s,++a.line,a.lineStart=s):u===92&&o.charCodeAt(s+1)===34&&o.charCodeAt(s+2)===34&&o.charCodeAt(s+3)===34?(p+=o.slice(c,s)+'"""',s+=4,c=s):++s}throw le(e,s,"Unterminated string.")}function Ko(e,t,n,r){return rn(e)<<12|rn(t)<<8|rn(n)<<4|rn(r)}function rn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function qo(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,c=0;s!==o&&!isNaN(c=a.charCodeAt(s))&&(c===95||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new z(v.NAME,t,s,n,r,i,a.slice(t,s))}function Jo(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function zn(e,t){var n=new Xo(e,t);return n.parseDocument()}var Xo=(function(){function e(n,r){var i=pi(n)?n:new tn(n);this._lexer=new Jn(i),this._options=r}var t=e.prototype;return t.parseName=function(){var r=this.expectToken(v.NAME);return{kind:l.NAME,value:r.value,loc:this.loc(r)}},t.parseDocument=function(){var r=this._lexer.token;return{kind:l.DOCUMENT,definitions:this.many(v.SOF,this.parseDefinition,v.EOF),loc:this.loc(r)}},t.parseDefinition=function(){if(this.peek(v.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(v.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(v.BRACE_L))return{kind:l.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var i=this.parseOperationType(),a;return this.peek(v.NAME)&&(a=this.parseName()),{kind:l.OPERATION_DEFINITION,operation:i,name:a,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},t.parseOperationType=function(){var r=this.expectToken(v.NAME);switch(r.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(r)},t.parseVariableDefinitions=function(){return this.optionalMany(v.PAREN_L,this.parseVariableDefinition,v.PAREN_R)},t.parseVariableDefinition=function(){var r=this._lexer.token;return{kind:l.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(v.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(v.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(r)}},t.parseVariable=function(){var r=this._lexer.token;return this.expectToken(v.DOLLAR),{kind:l.VARIABLE,name:this.parseName(),loc:this.loc(r)}},t.parseSelectionSet=function(){var r=this._lexer.token;return{kind:l.SELECTION_SET,selections:this.many(v.BRACE_L,this.parseSelection,v.BRACE_R),loc:this.loc(r)}},t.parseSelection=function(){return this.peek(v.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var r=this._lexer.token,i=this.parseName(),a,o;return this.expectOptionalToken(v.COLON)?(a=i,o=this.parseName()):o=i,{kind:l.FIELD,alias:a,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(v.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(r){var i=r?this.parseConstArgument:this.parseArgument;return this.optionalMany(v.PAREN_L,i,v.PAREN_R)},t.parseArgument=function(){var r=this._lexer.token,i=this.parseName();return this.expectToken(v.COLON),{kind:l.ARGUMENT,name:i,value:this.parseValueLiteral(!1),loc:this.loc(r)}},t.parseConstArgument=function(){var r=this._lexer.token;return{kind:l.ARGUMENT,name:this.parseName(),value:(this.expectToken(v.COLON),this.parseValueLiteral(!0)),loc:this.loc(r)}},t.parseFragment=function(){var r=this._lexer.token;this.expectToken(v.SPREAD);var i=this.expectOptionalKeyword("on");return!i&&this.peek(v.NAME)?{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(r)}:{kind:l.INLINE_FRAGMENT,typeCondition:i?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},t.parseFragmentDefinition=function(){var r,i=this._lexer.token;return this.expectKeyword("fragment"),((r=this._options)===null||r===void 0?void 0:r.experimentalFragmentVariables)===!0?{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}:{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}},t.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(r){var i=this._lexer.token;switch(i.kind){case v.BRACKET_L:return this.parseList(r);case v.BRACE_L:return this.parseObject(r);case v.INT:return this._lexer.advance(),{kind:l.INT,value:i.value,loc:this.loc(i)};case v.FLOAT:return this._lexer.advance(),{kind:l.FLOAT,value:i.value,loc:this.loc(i)};case v.STRING:case v.BLOCK_STRING:return this.parseStringLiteral();case v.NAME:switch(this._lexer.advance(),i.value){case"true":return{kind:l.BOOLEAN,value:!0,loc:this.loc(i)};case"false":return{kind:l.BOOLEAN,value:!1,loc:this.loc(i)};case"null":return{kind:l.NULL,loc:this.loc(i)};default:return{kind:l.ENUM,value:i.value,loc:this.loc(i)}}case v.DOLLAR:if(!r)return this.parseVariable();break}throw this.unexpected()},t.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:l.STRING,value:r.value,block:r.kind===v.BLOCK_STRING,loc:this.loc(r)}},t.parseList=function(r){var i=this,a=this._lexer.token,o=function(){return i.parseValueLiteral(r)};return{kind:l.LIST,values:this.any(v.BRACKET_L,o,v.BRACKET_R),loc:this.loc(a)}},t.parseObject=function(r){var i=this,a=this._lexer.token,o=function(){return i.parseObjectField(r)};return{kind:l.OBJECT,fields:this.any(v.BRACE_L,o,v.BRACE_R),loc:this.loc(a)}},t.parseObjectField=function(r){var i=this._lexer.token,a=this.parseName();return this.expectToken(v.COLON),{kind:l.OBJECT_FIELD,name:a,value:this.parseValueLiteral(r),loc:this.loc(i)}},t.parseDirectives=function(r){for(var i=[];this.peek(v.AT);)i.push(this.parseDirective(r));return i},t.parseDirective=function(r){var i=this._lexer.token;return this.expectToken(v.AT),{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(i)}},t.parseTypeReference=function(){var r=this._lexer.token,i;return this.expectOptionalToken(v.BRACKET_L)?(i=this.parseTypeReference(),this.expectToken(v.BRACKET_R),i={kind:l.LIST_TYPE,type:i,loc:this.loc(r)}):i=this.parseNamedType(),this.expectOptionalToken(v.BANG)?{kind:l.NON_NULL_TYPE,type:i,loc:this.loc(r)}:i},t.parseNamedType=function(){var r=this._lexer.token;return{kind:l.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},t.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===v.NAME)switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(r)},t.peekDescription=function(){return this.peek(v.STRING)||this.peek(v.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("schema");var a=this.parseDirectives(!0),o=this.many(v.BRACE_L,this.parseOperationTypeDefinition,v.BRACE_R);return{kind:l.SCHEMA_DEFINITION,description:i,directives:a,operationTypes:o,loc:this.loc(r)}},t.parseOperationTypeDefinition=function(){var r=this._lexer.token,i=this.parseOperationType();this.expectToken(v.COLON);var a=this.parseNamedType();return{kind:l.OPERATION_TYPE_DEFINITION,operation:i,type:a,loc:this.loc(r)}},t.parseScalarTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("scalar");var a=this.parseName(),o=this.parseDirectives(!0);return{kind:l.SCALAR_TYPE_DEFINITION,description:i,name:a,directives:o,loc:this.loc(r)}},t.parseObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("type");var a=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:l.OBJECT_TYPE_DEFINITION,description:i,name:a,interfaces:o,directives:s,fields:c,loc:this.loc(r)}},t.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return[];if(((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLImplementsInterfaces)===!0){var i=[];this.expectOptionalToken(v.AMP);do i.push(this.parseNamedType());while(this.expectOptionalToken(v.AMP)||this.peek(v.NAME));return i}return this.delimitedMany(v.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var r;return((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLEmptyFields)===!0&&this.peek(v.BRACE_L)&&this._lexer.lookahead().kind===v.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(v.BRACE_L,this.parseFieldDefinition,v.BRACE_R)},t.parseFieldDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),a=this.parseName(),o=this.parseArgumentDefs();this.expectToken(v.COLON);var s=this.parseTypeReference(),c=this.parseDirectives(!0);return{kind:l.FIELD_DEFINITION,description:i,name:a,arguments:o,type:s,directives:c,loc:this.loc(r)}},t.parseArgumentDefs=function(){return this.optionalMany(v.PAREN_L,this.parseInputValueDef,v.PAREN_R)},t.parseInputValueDef=function(){var r=this._lexer.token,i=this.parseDescription(),a=this.parseName();this.expectToken(v.COLON);var o=this.parseTypeReference(),s;this.expectOptionalToken(v.EQUALS)&&(s=this.parseValueLiteral(!0));var c=this.parseDirectives(!0);return{kind:l.INPUT_VALUE_DEFINITION,description:i,name:a,type:o,defaultValue:s,directives:c,loc:this.loc(r)}},t.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("interface");var a=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:l.INTERFACE_TYPE_DEFINITION,description:i,name:a,interfaces:o,directives:s,fields:c,loc:this.loc(r)}},t.parseUnionTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("union");var a=this.parseName(),o=this.parseDirectives(!0),s=this.parseUnionMemberTypes();return{kind:l.UNION_TYPE_DEFINITION,description:i,name:a,directives:o,types:s,loc:this.loc(r)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(v.EQUALS)?this.delimitedMany(v.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("enum");var a=this.parseName(),o=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();return{kind:l.ENUM_TYPE_DEFINITION,description:i,name:a,directives:o,values:s,loc:this.loc(r)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(v.BRACE_L,this.parseEnumValueDefinition,v.BRACE_R)},t.parseEnumValueDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),a=this.parseName(),o=this.parseDirectives(!0);return{kind:l.ENUM_VALUE_DEFINITION,description:i,name:a,directives:o,loc:this.loc(r)}},t.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("input");var a=this.parseName(),o=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();return{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:i,name:a,directives:o,fields:s,loc:this.loc(r)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(v.BRACE_L,this.parseInputValueDef,v.BRACE_R)},t.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===v.NAME)switch(r.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(r)},t.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var i=this.parseDirectives(!0),a=this.optionalMany(v.BRACE_L,this.parseOperationTypeDefinition,v.BRACE_R);if(i.length===0&&a.length===0)throw this.unexpected();return{kind:l.SCHEMA_EXTENSION,directives:i,operationTypes:a,loc:this.loc(r)}},t.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var i=this.parseName(),a=this.parseDirectives(!0);if(a.length===0)throw this.unexpected();return{kind:l.SCALAR_TYPE_EXTENSION,name:i,directives:a,loc:this.loc(r)}},t.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var i=this.parseName(),a=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(a.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:l.OBJECT_TYPE_EXTENSION,name:i,interfaces:a,directives:o,fields:s,loc:this.loc(r)}},t.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var i=this.parseName(),a=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(a.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:l.INTERFACE_TYPE_EXTENSION,name:i,interfaces:a,directives:o,fields:s,loc:this.loc(r)}},t.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var i=this.parseName(),a=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(a.length===0&&o.length===0)throw this.unexpected();return{kind:l.UNION_TYPE_EXTENSION,name:i,directives:a,types:o,loc:this.loc(r)}},t.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var i=this.parseName(),a=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(a.length===0&&o.length===0)throw this.unexpected();return{kind:l.ENUM_TYPE_EXTENSION,name:i,directives:a,values:o,loc:this.loc(r)}},t.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var i=this.parseName(),a=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(a.length===0&&o.length===0)throw this.unexpected();return{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:i,directives:a,fields:o,loc:this.loc(r)}},t.parseDirectiveDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("directive"),this.expectToken(v.AT);var a=this.parseName(),o=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var c=this.parseDirectiveLocations();return{kind:l.DIRECTIVE_DEFINITION,description:i,name:a,arguments:o,repeatable:s,locations:c,loc:this.loc(r)}},t.parseDirectiveLocations=function(){return this.delimitedMany(v.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var r=this._lexer.token,i=this.parseName();if(D[i.value]!==void 0)return i;throw this.unexpected(r)},t.loc=function(r){var i;if(((i=this._options)===null||i===void 0?void 0:i.noLocation)!==!0)return new $t(r,this._lexer.lastToken,this._lexer.source)},t.peek=function(r){return this._lexer.token.kind===r},t.expectToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i;throw le(this._lexer.source,i.start,"Expected ".concat(mi(r),", found ").concat(Xn(i),"."))},t.expectOptionalToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i},t.expectKeyword=function(r){var i=this._lexer.token;if(i.kind===v.NAME&&i.value===r)this._lexer.advance();else throw le(this._lexer.source,i.start,'Expected "'.concat(r,'", found ').concat(Xn(i),"."))},t.expectOptionalKeyword=function(r){var i=this._lexer.token;return i.kind===v.NAME&&i.value===r?(this._lexer.advance(),!0):!1},t.unexpected=function(r){var i=r??this._lexer.token;return le(this._lexer.source,i.start,"Unexpected ".concat(Xn(i),"."))},t.any=function(r,i,a){this.expectToken(r);for(var o=[];!this.expectOptionalToken(a);)o.push(i.call(this));return o},t.optionalMany=function(r,i,a){if(this.expectOptionalToken(r)){var o=[];do o.push(i.call(this));while(!this.expectOptionalToken(a));return o}return[]},t.many=function(r,i,a){this.expectToken(r);var o=[];do o.push(i.call(this));while(!this.expectOptionalToken(a));return o},t.delimitedMany=function(r,i){this.expectOptionalToken(r);var a=[];do a.push(i.call(this));while(this.expectOptionalToken(r));return a},e})();function Xn(e){var t=e.value;return mi(e.kind)+(t!=null?' "'.concat(t,'"'):"")}function mi(e){return di(e)?'"'.concat(e,'"'):e}function an(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?an=function(n){return typeof n}:an=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},an(e)}function Hn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(p){return p};if(e==null||an(e)!=="object")return null;if(Array.isArray(e))return e.map(t);var n=e[Jt];if(typeof n=="function"){for(var r=n.call(e),i=[],a,o=0;!(a=r.next()).done;++o)i.push(t(a.value,o));return i}var s=e.length;if(typeof s=="number"&&s>=0&&s%1===0){for(var c=[],u=0;u<s;++u){if(!Object.prototype.hasOwnProperty.call(e,u))return null;c.push(t(e[String(u)],u))}return c}return null}var zo=Array.prototype.find?function(e,t){return Array.prototype.find.call(e,t)}:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t(r))return r}},at=zo;var Ho=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},se=Ho;var Wo=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})},Ae=Wo;function ce(e,t){return e.reduce(function(n,r){return n[t(r)]=r,n},Object.create(null))}function be(e,t){for(var n=Object.create(null),r=0,i=Ae(e);r<i.length;r++){var a=i[r],o=a[0],s=a[1];n[o]=t(s,o)}return n}function ne(e){if(Object.getPrototypeOf(e)===null)return e;for(var t=Object.create(null),n=0,r=Ae(e);n<r.length;n++){var i=r[n],a=i[0],o=i[1];t[a]=o}return t}function ot(e,t,n){return e.reduce(function(r,i){return r[t(i)]=n(i),r},Object.create(null))}var $o=5;function de(e,t){var n=typeof e=="string"?[e,t]:[void 0,e],r=n[0],i=n[1],a=" Did you mean ";r&&(a+=r+" ");var o=i.map(function(u){return'"'.concat(u,'"')});switch(o.length){case 0:return"";case 1:return a+o[0]+"?";case 2:return a+o[0]+" or "+o[1]+"?"}var s=o.slice(0,$o),c=s.pop();return a+s.join(", ")+", or "+c+"?"}function on(e){return e}function Lt(e,t){for(var n=0,r=0;n<e.length&&r<t.length;){var i=e.charCodeAt(n),a=t.charCodeAt(r);if(sn(i)&&sn(a)){var o=0;do++n,o=o*10+i-Wn,i=e.charCodeAt(n);while(sn(i)&&o>0);var s=0;do++r,s=s*10+a-Wn,a=t.charCodeAt(r);while(sn(a)&&s>0);if(o<s)return-1;if(o>s)return 1}else{if(i<a)return-1;if(i>a)return 1;++n,++r}}return e.length-t.length}var Wn=48,Zo=57;function sn(e){return!isNaN(e)&&Wn<=e&&e<=Zo}function ye(e,t){for(var n=Object.create(null),r=new es(e),i=Math.floor(e.length*.4)+1,a=0;a<t.length;a++){var o=t[a],s=r.measure(o,i);s!==void 0&&(n[o]=s)}return Object.keys(n).sort(function(c,u){var p=n[c]-n[u];return p!==0?p:Lt(c,u)})}var es=(function(){function e(n){this._input=n,this._inputLowerCase=n.toLowerCase(),this._inputArray=hi(this._inputLowerCase),this._rows=[new Array(n.length+1).fill(0),new Array(n.length+1).fill(0),new Array(n.length+1).fill(0)]}var t=e.prototype;return t.measure=function(r,i){if(this._input===r)return 0;var a=r.toLowerCase();if(this._inputLowerCase===a)return 1;var o=hi(a),s=this._inputArray;if(o.length<s.length){var c=o;o=s,s=c}var u=o.length,p=s.length;if(!(u-p>i)){for(var f=this._rows,d=0;d<=p;d++)f[0][d]=d;for(var h=1;h<=u;h++){for(var m=f[(h-1)%3],g=f[h%3],N=g[0]=h,I=1;I<=p;I++){var L=o[h-1]===s[I-1]?0:1,F=Math.min(m[I]+1,g[I-1]+1,m[I-1]+L);if(h>1&&I>1&&o[h-1]===s[I-2]&&o[h-2]===s[I-1]){var M=f[(h-2)%3][I-2];F=Math.min(F,M+1)}F<N&&(N=F),g[I]=F}if(N>i)return}var Q=f[u%3][p];return Q<=i?Q:void 0}},e})();function hi(e){for(var t=e.length,n=new Array(t),r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}var ts={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},st=Object.freeze({});function ct(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ts,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],c=void 0,u=void 0,p=void 0,f=[],d=[],h=e;do{o++;var m=o===a.length,g=m&&s.length!==0;if(m){if(u=d.length===0?void 0:f[f.length-1],c=p,p=d.pop(),g){if(i)c=c.slice();else{for(var N={},I=0,L=Object.keys(c);I<L.length;I++){var F=L[I];N[F]=c[F]}c=N}for(var M=0,Q=0;Q<s.length;Q++){var B=s[Q][0],C=s[Q][1];i&&(B-=M),i&&C===null?(c.splice(B,1),M++):c[B]=C}}o=r.index,a=r.keys,s=r.edits,i=r.inArray,r=r.prev}else{if(u=p?i?o:a[o]:void 0,c=p?p[u]:h,c==null)continue;p&&f.push(u)}var J=void 0;if(!Array.isArray(c)){if(!Kn(c))throw new Error("Invalid AST Node: ".concat(E(c),"."));var ee=cn(t,c.kind,m);if(ee){if(J=ee.call(t,c,u,p,f,d),J===st)break;if(J===!1){if(!m){f.pop();continue}}else if(J!==void 0&&(s.push([u,J]),!m))if(Kn(J))c=J;else{f.pop();continue}}}if(J===void 0&&g&&s.push([u,c]),m)f.pop();else{var Se;r={inArray:i,index:o,keys:a,edits:s,prev:r},i=Array.isArray(c),a=i?c:(Se=n[c.kind])!==null&&Se!==void 0?Se:[],o=-1,s=[],p&&d.push(p),p=c}}while(r!==void 0);return s.length!==0&&(h=s[s.length-1][1]),h}function $n(e){var t=new Array(e.length);return{enter:function(r){for(var i=0;i<e.length;i++)if(t[i]==null){var a=cn(e[i],r.kind,!1);if(a){var o=a.apply(e[i],arguments);if(o===!1)t[i]=r;else if(o===st)t[i]=st;else if(o!==void 0)return o}}},leave:function(r){for(var i=0;i<e.length;i++)if(t[i]==null){var a=cn(e[i],r.kind,!0);if(a){var o=a.apply(e[i],arguments);if(o===st)t[i]=st;else if(o!==void 0&&o!==!1)return o}}else t[i]===r&&(t[i]=null)}}}function cn(e,t,n){var r=e[t];if(r){if(!n&&typeof r=="function")return r;var i=n?r.leave:r.enter;if(typeof i=="function")return i}else{var a=n?e.leave:e.enter;if(a){if(typeof a=="function")return a;var o=a[t];if(typeof o=="function")return o}}}function V(e){return ct(e,{leave:rs})}var ns=80,rs={Name:function(t){return t.value},Variable:function(t){return"$"+t.name},Document:function(t){return S(t.definitions,`
`)+`
`},OperationDefinition:function(t){var n=t.operation,r=t.name,i=$("(",S(t.variableDefinitions,", "),")"),a=S(t.directives," "),o=t.selectionSet;return!r&&!a&&!i&&n==="query"?o:S([n,S([r,i]),a,o]," ")},VariableDefinition:function(t){var n=t.variable,r=t.type,i=t.defaultValue,a=t.directives;return n+": "+r+$(" = ",i)+$(" ",S(a," "))},SelectionSet:function(t){var n=t.selections;return _e(n)},Field:function(t){var n=t.alias,r=t.name,i=t.arguments,a=t.directives,o=t.selectionSet,s=$("",n,": ")+r,c=s+$("(",S(i,", "),")");return c.length>ns&&(c=s+$(`(
`,un(S(i,`
`)),`
)`)),S([c,S(a," "),o]," ")},Argument:function(t){var n=t.name,r=t.value;return n+": "+r},FragmentSpread:function(t){var n=t.name,r=t.directives;return"..."+n+$(" ",S(r," "))},InlineFragment:function(t){var n=t.typeCondition,r=t.directives,i=t.selectionSet;return S(["...",$("on ",n),S(r," "),i]," ")},FragmentDefinition:function(t){var n=t.name,r=t.typeCondition,i=t.variableDefinitions,a=t.directives,o=t.selectionSet;return"fragment ".concat(n).concat($("(",S(i,", "),")")," ")+"on ".concat(r," ").concat($("",S(a," ")," "))+o},IntValue:function(t){var n=t.value;return n},FloatValue:function(t){var n=t.value;return n},StringValue:function(t,n){var r=t.value,i=t.block;return i?fi(r,n==="description"?"":" "):JSON.stringify(r)},BooleanValue:function(t){var n=t.value;return n?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){var n=t.value;return n},ListValue:function(t){var n=t.values;return"["+S(n,", ")+"]"},ObjectValue:function(t){var n=t.fields;return"{"+S(n,", ")+"}"},ObjectField:function(t){var n=t.name,r=t.value;return n+": "+r},Directive:function(t){var n=t.name,r=t.arguments;return"@"+n+$("(",S(r,", "),")")},NamedType:function(t){var n=t.name;return n},ListType:function(t){var n=t.type;return"["+n+"]"},NonNullType:function(t){var n=t.type;return n+"!"},SchemaDefinition:we(function(e){var t=e.directives,n=e.operationTypes;return S(["schema",S(t," "),_e(n)]," ")}),OperationTypeDefinition:function(t){var n=t.operation,r=t.type;return n+": "+r},ScalarTypeDefinition:we(function(e){var t=e.name,n=e.directives;return S(["scalar",t,S(n," ")]," ")}),ObjectTypeDefinition:we(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return S(["type",t,$("implements ",S(n," & ")),S(r," "),_e(i)]," ")}),FieldDefinition:we(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(vi(n)?$(`(
`,un(S(n,`
`)),`
)`):$("(",S(n,", "),")"))+": "+r+$(" ",S(i," "))}),InputValueDefinition:we(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return S([t+": "+n,$("= ",r),S(i," ")]," ")}),InterfaceTypeDefinition:we(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return S(["interface",t,$("implements ",S(n," & ")),S(r," "),_e(i)]," ")}),UnionTypeDefinition:we(function(e){var t=e.name,n=e.directives,r=e.types;return S(["union",t,S(n," "),r&&r.length!==0?"= "+S(r," | "):""]," ")}),EnumTypeDefinition:we(function(e){var t=e.name,n=e.directives,r=e.values;return S(["enum",t,S(n," "),_e(r)]," ")}),EnumValueDefinition:we(function(e){var t=e.name,n=e.directives;return S([t,S(n," ")]," ")}),InputObjectTypeDefinition:we(function(e){var t=e.name,n=e.directives,r=e.fields;return S(["input",t,S(n," "),_e(r)]," ")}),DirectiveDefinition:we(function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(vi(n)?$(`(
`,un(S(n,`
`)),`
)`):$("(",S(n,", "),")"))+(r?" repeatable":"")+" on "+S(i," | ")}),SchemaExtension:function(t){var n=t.directives,r=t.operationTypes;return S(["extend schema",S(n," "),_e(r)]," ")},ScalarTypeExtension:function(t){var n=t.name,r=t.directives;return S(["extend scalar",n,S(r," ")]," ")},ObjectTypeExtension:function(t){var n=t.name,r=t.interfaces,i=t.directives,a=t.fields;return S(["extend type",n,$("implements ",S(r," & ")),S(i," "),_e(a)]," ")},InterfaceTypeExtension:function(t){var n=t.name,r=t.interfaces,i=t.directives,a=t.fields;return S(["extend interface",n,$("implements ",S(r," & ")),S(i," "),_e(a)]," ")},UnionTypeExtension:function(t){var n=t.name,r=t.directives,i=t.types;return S(["extend union",n,S(r," "),i&&i.length!==0?"= "+S(i," | "):""]," ")},EnumTypeExtension:function(t){var n=t.name,r=t.directives,i=t.values;return S(["extend enum",n,S(r," "),_e(i)]," ")},InputObjectTypeExtension:function(t){var n=t.name,r=t.directives,i=t.fields;return S(["extend input",n,S(r," "),_e(i)]," ")}};function we(e){return function(t){return S([t.description,e(t)],`
`)}}function S(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(t=e?.filter(function(r){return r}).join(n))!==null&&t!==void 0?t:""}function _e(e){return $(`{
`,un(S(e,`
`)),`
}`)}function $(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return t!=null&&t!==""?e+t+n:""}function un(e){return $(" ",e.replace(/\n/g,`
`))}function is(e){return e.indexOf(`
`)!==-1}function vi(e){return e!=null&&e.some(is)}function ut(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(function(n){return ut(n,t)});case l.OBJECT:return ot(e.fields,function(n){return n.name.value},function(n){return ut(n.value,t)});case l.VARIABLE:return t?.[e.name.value]}Z(0,"Unexpected value node: "+E(e))}function yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t,n){return t&&yi(e.prototype,t),n&&yi(e,n),e}function ft(e){return Fe(e)||K(e)||Y(e)||me(e)||ue(e)||H(e)||W(e)||R(e)}function Zn(e){if(!ft(e))throw new Error("Expected ".concat(E(e)," to be a GraphQL type."));return e}function Fe(e){return Ie(e,Oe)}function K(e){return Ie(e,ie)}function Y(e){return Ie(e,Qe)}function me(e){return Ie(e,ze)}function ue(e){return Ie(e,xe)}function H(e){return Ie(e,He)}function W(e){return Ie(e,X)}function R(e){return Ie(e,A)}function dt(e){return Fe(e)||ue(e)||H(e)||ln(e)&&dt(e.ofType)}function pe(e){return Fe(e)||ue(e)}function je(e){return K(e)||Y(e)||me(e)}function Re(e){return Y(e)||me(e)}function X(e){if(this instanceof X)this.ofType=Zn(e);else return new X(e)}X.prototype.toString=function(){return"["+String(this.ofType)+"]"};X.prototype.toJSON=function(){return this.toString()};Object.defineProperty(X.prototype,te,{get:function(){return"GraphQLList"}});fe(X);function A(e){if(this instanceof A)this.ofType=tr(e);else return new A(e)}A.prototype.toString=function(){return String(this.ofType)+"!"};A.prototype.toJSON=function(){return this.toString()};Object.defineProperty(A.prototype,te,{get:function(){return"GraphQLNonNull"}});fe(A);function ln(e){return W(e)||R(e)}function er(e){return ft(e)&&!R(e)}function tr(e){if(!er(e))throw new Error("Expected ".concat(E(e)," to be a GraphQL nullable type."));return e}function fn(e){if(e)return R(e)?e.ofType:e}function re(e){if(e){for(var t=e;ln(t);)t=t.ofType;return t}}function dn(e){return typeof e=="function"?e():e}function mt(e){return e&&e.length>0?e:void 0}var Oe=(function(){function e(n){var r,i,a,o=(r=n.parseValue)!==null&&r!==void 0?r:on;this.name=n.name,this.description=n.description,this.specifiedByUrl=n.specifiedByUrl,this.serialize=(i=n.serialize)!==null&&i!==void 0?i:on,this.parseValue=o,this.parseLiteral=(a=n.parseLiteral)!==null&&a!==void 0?a:function(s,c){return o(ut(s,c))},this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=mt(n.extensionASTNodes),typeof n.name=="string"||_(0,"Must provide name."),n.specifiedByUrl==null||typeof n.specifiedByUrl=="string"||_(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(E(n.specifiedByUrl),".")),n.serialize==null||typeof n.serialize=="function"||_(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),n.parseLiteral&&(typeof n.parseValue=="function"&&typeof n.parseLiteral=="function"||_(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var r;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},lt(e,[{key:te,get:function(){return"GraphQLScalarType"}}]),e})();fe(Oe);var ie=(function(){function e(n){this.name=n.name,this.description=n.description,this.isTypeOf=n.isTypeOf,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=mt(n.extensionASTNodes),this._fields=gi.bind(void 0,n),this._interfaces=Ti.bind(void 0,n),typeof n.name=="string"||_(0,"Must provide name."),n.isTypeOf==null||typeof n.isTypeOf=="function"||_(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(E(n.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Ei(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},lt(e,[{key:te,get:function(){return"GraphQLObjectType"}}]),e})();fe(ie);function Ti(e){var t,n=(t=dn(e.interfaces))!==null&&t!==void 0?t:[];return Array.isArray(n)||_(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function gi(e){var t=dn(e.fields);return pt(t)||_(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),be(t,function(n,r){var i;pt(n)||_(0,"".concat(e.name,".").concat(r," field config must be an object.")),!("isDeprecated"in n)||_(0,"".concat(e.name,".").concat(r,' should provide "deprecationReason" instead of "isDeprecated".')),n.resolve==null||typeof n.resolve=="function"||_(0,"".concat(e.name,".").concat(r," field resolver must be a function if ")+"provided, but got: ".concat(E(n.resolve),"."));var a=(i=n.args)!==null&&i!==void 0?i:{};pt(a)||_(0,"".concat(e.name,".").concat(r," args must be an object with argument names as keys."));var o=Ae(a).map(function(s){var c=s[0],u=s[1];return{name:c,description:u.description,type:u.type,defaultValue:u.defaultValue,deprecationReason:u.deprecationReason,extensions:u.extensions&&ne(u.extensions),astNode:u.astNode}});return{name:r,description:n.description,type:n.type,args:o,resolve:n.resolve,subscribe:n.subscribe,isDeprecated:n.deprecationReason!=null,deprecationReason:n.deprecationReason,extensions:n.extensions&&ne(n.extensions),astNode:n.astNode}})}function pt(e){return ve(e)&&!Array.isArray(e)}function Ei(e){return be(e,function(t){return{description:t.description,type:t.type,args:nr(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function nr(e){return ot(e,function(t){return t.name},function(t){return{description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function At(e){return R(e.type)&&e.defaultValue===void 0}var Qe=(function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=mt(n.extensionASTNodes),this._fields=gi.bind(void 0,n),this._interfaces=Ti.bind(void 0,n),typeof n.name=="string"||_(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||_(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(E(n.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var r;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Ei(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},lt(e,[{key:te,get:function(){return"GraphQLInterfaceType"}}]),e})();fe(Qe);var ze=(function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=mt(n.extensionASTNodes),this._types=as.bind(void 0,n),typeof n.name=="string"||_(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||_(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(E(n.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},t.toConfig=function(){var r;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},lt(e,[{key:te,get:function(){return"GraphQLUnionType"}}]),e})();fe(ze);function as(e){var t=dn(e.types);return Array.isArray(t)||_(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}var xe=(function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=mt(n.extensionASTNodes),this._values=os(this.name,n.values),this._valueLookup=new Map(this._values.map(function(r){return[r.value,r]})),this._nameLookup=ce(this._values,function(r){return r.name}),typeof n.name=="string"||_(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(r){return this._nameLookup[r]},t.serialize=function(r){var i=this._valueLookup.get(r);if(i===void 0)throw new y('Enum "'.concat(this.name,'" cannot represent value: ').concat(E(r)));return i.name},t.parseValue=function(r){if(typeof r!="string"){var i=E(r);throw new y('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(i,".")+pn(this,i))}var a=this.getValue(r);if(a==null)throw new y('Value "'.concat(r,'" does not exist in "').concat(this.name,'" enum.')+pn(this,r));return a.value},t.parseLiteral=function(r,i){if(r.kind!==l.ENUM){var a=V(r);throw new y('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(a,".")+pn(this,a),r)}var o=this.getValue(r.value);if(o==null){var s=V(r);throw new y('Value "'.concat(s,'" does not exist in "').concat(this.name,'" enum.')+pn(this,s),r)}return o.value},t.toConfig=function(){var r,i=ot(this.getValues(),function(a){return a.name},function(a){return{description:a.description,value:a.value,deprecationReason:a.deprecationReason,extensions:a.extensions,astNode:a.astNode}});return{name:this.name,description:this.description,values:i,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},lt(e,[{key:te,get:function(){return"GraphQLEnumType"}}]),e})();fe(xe);function pn(e,t){var n=e.getValues().map(function(i){return i.name}),r=ye(t,n);return de("the enum value",r)}function os(e,t){return pt(t)||_(0,"".concat(e," values must be an object with value names as keys.")),Ae(t).map(function(n){var r=n[0],i=n[1];return pt(i)||_(0,"".concat(e,".").concat(r,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(E(i),".")),!("isDeprecated"in i)||_(0,"".concat(e,".").concat(r,' should provide "deprecationReason" instead of "isDeprecated".')),{name:r,description:i.description,value:i.value!==void 0?i.value:r,isDeprecated:i.deprecationReason!=null,deprecationReason:i.deprecationReason,extensions:i.extensions&&ne(i.extensions),astNode:i.astNode}})}var He=(function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=mt(n.extensionASTNodes),this._fields=ss.bind(void 0,n),typeof n.name=="string"||_(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var r,i=be(this.getFields(),function(a){return{description:a.description,type:a.type,defaultValue:a.defaultValue,extensions:a.extensions,astNode:a.astNode}});return{name:this.name,description:this.description,fields:i,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},lt(e,[{key:te,get:function(){return"GraphQLInputObjectType"}}]),e})();fe(He);function ss(e){var t=dn(e.fields);return pt(t)||_(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),be(t,function(n,r){return!("resolve"in n)||_(0,"".concat(e.name,".").concat(r," field has a resolve property, but Input Types cannot define resolvers.")),{name:r,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&ne(n.extensions),astNode:n.astNode}})}function ht(e){return R(e.type)&&e.defaultValue===void 0}function We(e,t,n){return t===n?!0:R(n)?R(t)?We(e,t.ofType,n.ofType):!1:R(t)?We(e,t.ofType,n):W(n)?W(t)?We(e,t.ofType,n.ofType):!1:W(t)?!1:Re(n)&&(Y(t)||K(t))&&e.isSubType(n,t)}function mn(e,t,n){return t===n?!0:Re(t)?Re(n)?e.getPossibleTypes(t).some(function(r){return e.isSubType(n,r)}):e.isSubType(t,n):Re(n)?e.isSubType(n,t):!1}var cs=Array.from||function(e,t,n){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r=e[Jt];if(typeof r=="function"){for(var i=r.call(e),a=[],o,s=0;!(o=i.next()).done;++s)if(a.push(t.call(n,o.value,s)),s>9999999)throw new TypeError("Near-infinite iteration.");return a}var c=e.length;if(typeof c=="number"&&c>=0&&c%1===0){for(var u=[],p=0;p<c;++p)Object.prototype.hasOwnProperty.call(e,p)&&u.push(t.call(n,e[p],p));return u}return[]},hn=cs;var us=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},$e=us;var ps=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},wt=ps;var rr=2147483647,ir=-2147483648;function ls(e){var t=Ft(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!wt(n))throw new y("Int cannot represent non-integer value: ".concat(E(t)));if(n>rr||n<ir)throw new y("Int cannot represent non 32-bit signed integer value: "+E(t));return n}function fs(e){if(!wt(e))throw new y("Int cannot represent non-integer value: ".concat(E(e)));if(e>rr||e<ir)throw new y("Int cannot represent non 32-bit signed integer value: ".concat(e));return e}var _t=new Oe({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:ls,parseValue:fs,parseLiteral:function(t){if(t.kind!==l.INT)throw new y("Int cannot represent non-integer value: ".concat(V(t)),t);var n=parseInt(t.value,10);if(n>rr||n<ir)throw new y("Int cannot represent non 32-bit signed integer value: ".concat(t.value),t);return n}});function ds(e){var t=Ft(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!$e(n))throw new y("Float cannot represent non numeric value: ".concat(E(t)));return n}function ms(e){if(!$e(e))throw new y("Float cannot represent non numeric value: ".concat(E(e)));return e}var ar=new Oe({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:ds,parseValue:ms,parseLiteral:function(t){if(t.kind!==l.FLOAT&&t.kind!==l.INT)throw new y("Float cannot represent non numeric value: ".concat(V(t)),t);return parseFloat(t.value)}});function Ft(e){if(ve(e)){if(typeof e.valueOf=="function"){var t=e.valueOf();if(!ve(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function hs(e){var t=Ft(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if($e(t))return t.toString();throw new y("String cannot represent value: ".concat(E(e)))}function vs(e){if(typeof e!="string")throw new y("String cannot represent a non string value: ".concat(E(e)));return e}var q=new Oe({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:hs,parseValue:vs,parseLiteral:function(t){if(t.kind!==l.STRING)throw new y("String cannot represent a non string value: ".concat(V(t)),t);return t.value}});function ys(e){var t=Ft(e);if(typeof t=="boolean")return t;if($e(t))return t!==0;throw new y("Boolean cannot represent a non boolean value: ".concat(E(t)))}function Ts(e){if(typeof e!="boolean")throw new y("Boolean cannot represent a non boolean value: ".concat(E(e)));return e}var ae=new Oe({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:ys,parseValue:Ts,parseLiteral:function(t){if(t.kind!==l.BOOLEAN)throw new y("Boolean cannot represent a non boolean value: ".concat(V(t)),t);return t.value}});function gs(e){var t=Ft(e);if(typeof t=="string")return t;if(wt(t))return String(t);throw new y("ID cannot represent value: ".concat(E(e)))}function Es(e){if(typeof e=="string")return e;if(wt(e))return e.toString();throw new y("ID cannot represent value: ".concat(E(e)))}var Rt=new Oe({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:gs,parseValue:Es,parseLiteral:function(t){if(t.kind!==l.STRING&&t.kind!==l.INT)throw new y("ID cannot represent a non-string and non-integer value: "+V(t),t);return t.value}}),Ze=Object.freeze([q,_t,ar,ae,Rt]);function vn(e){return Ze.some(function(t){var n=t.name;return e.name===n})}function Te(e,t){if(R(t)){var n=Te(e,t.ofType);return n?.kind===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(W(t)){var r=t.ofType,i=Hn(e);if(i!=null){for(var a=[],o=0;o<i.length;o++){var s=i[o],c=Te(s,r);c!=null&&a.push(c)}return{kind:l.LIST,values:a}}return Te(e,r)}if(H(t)){if(!ve(e))return null;for(var u=[],p=0,f=se(t.getFields());p<f.length;p++){var d=f[p],h=Te(e[d.name],d.type);h&&u.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:d.name},value:h})}return{kind:l.OBJECT,fields:u}}if(pe(t)){var m=t.serialize(e);if(m==null)return null;if(typeof m=="boolean")return{kind:l.BOOLEAN,value:m};if(typeof m=="number"&&$e(m)){var g=String(m);return Ni.test(g)?{kind:l.INT,value:g}:{kind:l.FLOAT,value:g}}if(typeof m=="string")return ue(t)?{kind:l.ENUM,value:m}:t===Rt&&Ni.test(m)?{kind:l.INT,value:m}:{kind:l.STRING,value:m};throw new TypeError("Cannot convert value to AST: ".concat(E(m),"."))}Z(0,"Unexpected input type: "+E(t))}var Ni=/^-?(?:0|[1-9][0-9]*)$/;var kt=new ie({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:function(){return{description:{type:q,resolve:function(n){return n.description}},types:{description:"A list of all types supported by this server.",type:new A(new X(new A(De))),resolve:function(n){return se(n.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new A(De),resolve:function(n){return n.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:De,resolve:function(n){return n.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:De,resolve:function(n){return n.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new A(new X(new A(or))),resolve:function(n){return n.getDirectives()}}}}}),or=new ie({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In 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:function(){return{name:{type:new A(q),resolve:function(n){return n.name}},description:{type:q,resolve:function(n){return n.description}},isRepeatable:{type:new A(ae),resolve:function(n){return n.isRepeatable}},locations:{type:new A(new X(new A(sr))),resolve:function(n){return n.locations}},args:{type:new A(new X(new A(Mt))),resolve:function(n){return n.args}}}}}),sr=new xe({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:D.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:D.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:D.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:D.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:D.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:D.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:D.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:D.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:D.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:D.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:D.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:D.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:D.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:D.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:D.UNION,description:"Location adjacent to a union definition."},ENUM:{value:D.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:D.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:D.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:D.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),De=new ie({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:function(){return{kind:{type:new A(pr),resolve:function(n){if(Fe(n))return oe.SCALAR;if(K(n))return oe.OBJECT;if(Y(n))return oe.INTERFACE;if(me(n))return oe.UNION;if(ue(n))return oe.ENUM;if(H(n))return oe.INPUT_OBJECT;if(W(n))return oe.LIST;if(R(n))return oe.NON_NULL;Z(0,'Unexpected type: "'.concat(E(n),'".'))}},name:{type:q,resolve:function(n){return n.name!==void 0?n.name:void 0}},description:{type:q,resolve:function(n){return n.description!==void 0?n.description:void 0}},specifiedByUrl:{type:q,resolve:function(n){return n.specifiedByUrl!==void 0?n.specifiedByUrl:void 0}},fields:{type:new X(new A(cr)),args:{includeDeprecated:{type:ae,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;if(K(n)||Y(n)){var a=se(n.getFields());return i?a:a.filter(function(o){return o.deprecationReason==null})}}},interfaces:{type:new X(new A(De)),resolve:function(n){if(K(n)||Y(n))return n.getInterfaces()}},possibleTypes:{type:new X(new A(De)),resolve:function(n,r,i,a){var o=a.schema;if(Re(n))return o.getPossibleTypes(n)}},enumValues:{type:new X(new A(ur)),args:{includeDeprecated:{type:ae,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;if(ue(n)){var a=n.getValues();return i?a:a.filter(function(o){return o.deprecationReason==null})}}},inputFields:{type:new X(new A(Mt)),args:{includeDeprecated:{type:ae,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;if(H(n)){var a=se(n.getFields());return i?a:a.filter(function(o){return o.deprecationReason==null})}}},ofType:{type:De,resolve:function(n){return n.ofType!==void 0?n.ofType:void 0}}}}}),cr=new ie({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:function(){return{name:{type:new A(q),resolve:function(n){return n.name}},description:{type:q,resolve:function(n){return n.description}},args:{type:new A(new X(new A(Mt))),args:{includeDeprecated:{type:ae,defaultValue:!1}},resolve:function(n,r){var i=r.includeDeprecated;return i?n.args:n.args.filter(function(a){return a.deprecationReason==null})}},type:{type:new A(De),resolve:function(n){return n.type}},isDeprecated:{type:new A(ae),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:q,resolve:function(n){return n.deprecationReason}}}}}),Mt=new ie({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:function(){return{name:{type:new A(q),resolve:function(n){return n.name}},description:{type:q,resolve:function(n){return n.description}},type:{type:new A(De),resolve:function(n){return n.type}},defaultValue:{type:q,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(n){var r=n.type,i=n.defaultValue,a=Te(i,r);return a?V(a):null}},isDeprecated:{type:new A(ae),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:q,resolve:function(n){return n.deprecationReason}}}}}),ur=new ie({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:function(){return{name:{type:new A(q),resolve:function(n){return n.name}},description:{type:q,resolve:function(n){return n.description}},isDeprecated:{type:new A(ae),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:q,resolve:function(n){return n.deprecationReason}}}}}),oe=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),pr=new xe({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:oe.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:oe.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:oe.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:oe.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:oe.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:oe.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:oe.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:oe.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Ns={name:"__schema",type:new A(kt),description:"Access the current type schema of this server.",args:[],resolve:function(t,n,r,i){var a=i.schema;return a},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Is={name:"__type",type:De,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new A(q),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(t,n,r,i){var a=n.name,o=i.schema;return o.getType(a)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Os={name:"__typename",type:new A(q),description:"The name of the current Object type at runtime.",args:[],resolve:function(t,n,r,i){var a=i.parentType;return a.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},vt=Object.freeze([kt,or,sr,De,cr,Mt,ur,pr]);function lr(e){return vt.some(function(t){var n=t.name;return e.name===n})}function Ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ss(e,t,n){return t&&Ii(e.prototype,t),n&&Ii(e,n),e}function fr(e){return Ie(e,Ce)}var Ce=(function(){function e(n){var r,i;this.name=n.name,this.description=n.description,this.locations=n.locations,this.isRepeatable=(r=n.isRepeatable)!==null&&r!==void 0?r:!1,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,n.name||_(0,"Directive must be named."),Array.isArray(n.locations)||_(0,"@".concat(n.name," locations must be an Array."));var a=(i=n.args)!==null&&i!==void 0?i:{};ve(a)&&!Array.isArray(a)||_(0,"@".concat(n.name," args must be an object with argument names as keys.")),this.args=Ae(a).map(function(o){var s=o[0],c=o[1];return{name:s,description:c.description,type:c.type,defaultValue:c.defaultValue,deprecationReason:c.deprecationReason,extensions:c.extensions&&ne(c.extensions),astNode:c.astNode}})}var t=e.prototype;return t.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:nr(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},t.toString=function(){return"@"+this.name},t.toJSON=function(){return this.toString()},Ss(e,[{key:te,get:function(){return"GraphQLDirective"}}]),e})();fe(Ce);var Oi=new Ce({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[D.FIELD,D.FRAGMENT_SPREAD,D.INLINE_FRAGMENT],args:{if:{type:new A(ae),description:"Included when true."}}}),Si=new Ce({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[D.FIELD,D.FRAGMENT_SPREAD,D.INLINE_FRAGMENT],args:{if:{type:new A(ae),description:"Skipped when true."}}}),bi="No longer supported",yn=new Ce({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[D.FIELD_DEFINITION,D.ARGUMENT_DEFINITION,D.INPUT_FIELD_DEFINITION,D.ENUM_VALUE],args:{reason:{type:q,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:bi}}}),Tn=new Ce({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[D.SCALAR],args:{url:{type:new A(q),description:"The URL that specifies the behaviour of this scalar."}}}),ge=Object.freeze([Oi,Si,yn,Tn]);function xi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bs(e,t,n){return t&&xi(e.prototype,t),n&&xi(e,n),e}var dr=(function(){function e(n){var r;this.__validationErrors=n.assumeValid===!0?[]:void 0,ve(n)||_(0,"Must provide configuration object."),!n.types||Array.isArray(n.types)||_(0,'"types" must be Array if provided but got: '.concat(E(n.types),".")),!n.directives||Array.isArray(n.directives)||_(0,'"directives" must be Array if provided but got: '+"".concat(E(n.directives),".")),this.description=n.description,this.extensions=n.extensions&&ne(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes,this._queryType=n.query,this._mutationType=n.mutation,this._subscriptionType=n.subscription,this._directives=(r=n.directives)!==null&&r!==void 0?r:ge;var i=new Set(n.types);if(n.types!=null)for(var a=0,o=n.types;a<o.length;a++){var s=o[a];i.delete(s),ke(s,i)}this._queryType!=null&&ke(this._queryType,i),this._mutationType!=null&&ke(this._mutationType,i),this._subscriptionType!=null&&ke(this._subscriptionType,i);for(var c=0,u=this._directives;c<u.length;c++){var p=u[c];if(fr(p))for(var f=0,d=p.args;f<d.length;f++){var h=d[f];ke(h.type,i)}}ke(kt,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var m=0,g=hn(i);m<g.length;m++){var N=g[m];if(N!=null){var I=N.name;if(I||_(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[I]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(I,'".'));if(this._typeMap[I]=N,Y(N))for(var L=0,F=N.getInterfaces();L<F.length;L++){var M=F[L];if(Y(M)){var Q=this._implementationsMap[M.name];Q===void 0&&(Q=this._implementationsMap[M.name]={objects:[],interfaces:[]}),Q.interfaces.push(N)}}else if(K(N))for(var B=0,C=N.getInterfaces();B<C.length;B++){var J=C[B];if(Y(J)){var ee=this._implementationsMap[J.name];ee===void 0&&(ee=this._implementationsMap[J.name]={objects:[],interfaces:[]}),ee.objects.push(N)}}}}}var t=e.prototype;return t.getQueryType=function(){return this._queryType},t.getMutationType=function(){return this._mutationType},t.getSubscriptionType=function(){return this._subscriptionType},t.getTypeMap=function(){return this._typeMap},t.getType=function(r){return this.getTypeMap()[r]},t.getPossibleTypes=function(r){return me(r)?r.getTypes():this.getImplementations(r).objects},t.getImplementations=function(r){var i=this._implementationsMap[r.name];return i??{objects:[],interfaces:[]}},t.isPossibleType=function(r,i){return this.isSubType(r,i)},t.isSubType=function(r,i){var a=this._subTypeMap[r.name];if(a===void 0){if(a=Object.create(null),me(r))for(var o=0,s=r.getTypes();o<s.length;o++){var c=s[o];a[c.name]=!0}else{for(var u=this.getImplementations(r),p=0,f=u.objects;p<f.length;p++){var d=f[p];a[d.name]=!0}for(var h=0,m=u.interfaces;h<m.length;h++){var g=m[h];a[g.name]=!0}}this._subTypeMap[r.name]=a}return a[i.name]!==void 0},t.getDirectives=function(){return this._directives},t.getDirective=function(r){return at(this.getDirectives(),function(i){return i.name===r})},t.toConfig=function(){var r;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:se(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(r=this.extensionASTNodes)!==null&&r!==void 0?r:[],assumeValid:this.__validationErrors!==void 0}},bs(e,[{key:te,get:function(){return"GraphQLSchema"}}]),e})();function ke(e,t){var n=re(e);if(!t.has(n)){if(t.add(n),me(n))for(var r=0,i=n.getTypes();r<i.length;r++){var a=i[r];ke(a,t)}else if(K(n)||Y(n)){for(var o=0,s=n.getInterfaces();o<s.length;o++){var c=s[o];ke(c,t)}for(var u=0,p=se(n.getFields());u<p.length;u++){var f=p[u];ke(f.type,t);for(var d=0,h=f.args;d<h.length;d++){var m=h[d];ke(m.type,t)}}}else if(H(n))for(var g=0,N=se(n.getFields());g<N.length;g++){var I=N[g];ke(I.type,t)}}return t}function he(e,t){var n;if(t.kind===l.LIST_TYPE)return n=he(e,t.type),n&&new X(n);if(t.kind===l.NON_NULL_TYPE)return n=he(e,t.type),n&&new A(n);if(t.kind===l.NAMED_TYPE)return e.getType(t.name.value);Z(0,"Unexpected type node: "+E(t))}function Ve(e,t,n){if(e){if(e.kind===l.VARIABLE){var r=e.name.value;if(n==null||n[r]===void 0)return;var i=n[r];return i===null&&R(t)?void 0:i}if(R(t))return e.kind===l.NULL?void 0:Ve(e,t.ofType,n);if(e.kind===l.NULL)return null;if(W(t)){var a=t.ofType;if(e.kind===l.LIST){for(var o=[],s=0,c=e.values;s<c.length;s++){var u=c[s];if(Di(u,n)){if(R(a))return;o.push(null)}else{var p=Ve(u,a,n);if(p===void 0)return;o.push(p)}}return o}var f=Ve(e,a,n);return f===void 0?void 0:[f]}if(H(t)){if(e.kind!==l.OBJECT)return;for(var d=Object.create(null),h=ce(e.fields,function(M){return M.name.value}),m=0,g=se(t.getFields());m<g.length;m++){var N=g[m],I=h[N.name];if(!I||Di(I.value,n)){if(N.defaultValue!==void 0)d[N.name]=N.defaultValue;else if(R(N.type))return;continue}var L=Ve(I.value,N.type,n);if(L===void 0)return;d[N.name]=L}return d}if(pe(t)){var F;try{F=t.parseLiteral(e,n)}catch{return}return F===void 0?void 0:F}Z(0,"Unexpected input type: "+E(t))}}function Di(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function xs(e,t,n){for(var r,i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=ce(a,function(I){return I.name.value}),s=0,c=e.args;s<c.length;s++){var u=c[s],p=u.name,f=u.type,d=o[p];if(!d){if(u.defaultValue!==void 0)i[p]=u.defaultValue;else if(R(f))throw new y('Argument "'.concat(p,'" of required type "').concat(E(f),'" ')+"was not provided.",t);continue}var h=d.value,m=h.kind===l.NULL;if(h.kind===l.VARIABLE){var g=h.name.value;if(n==null||!Ds(n,g)){if(u.defaultValue!==void 0)i[p]=u.defaultValue;else if(R(f))throw new y('Argument "'.concat(p,'" of required type "').concat(E(f),'" ')+'was provided the variable "$'.concat(g,'" which was not provided a runtime value.'),h);continue}m=n[g]==null}if(m&&R(f))throw new y('Argument "'.concat(p,'" of non-null type "').concat(E(f),'" ')+"must not be null.",h);var N=Ve(h,f,n);if(N===void 0)throw new y('Argument "'.concat(p,'" has invalid value ').concat(V(h),"."),h);i[p]=N}return i}function mr(e,t,n){var r=t.directives&&at(t.directives,function(i){return i.name.value===e.name});if(r)return xs(e,r,n)}function Ds(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function hr(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function vr(e){return e.kind===l.SCHEMA_DEFINITION||Ue(e)||e.kind===l.DIRECTIVE_DEFINITION}function Ue(e){return e.kind===l.SCALAR_TYPE_DEFINITION||e.kind===l.OBJECT_TYPE_DEFINITION||e.kind===l.INTERFACE_TYPE_DEFINITION||e.kind===l.UNION_TYPE_DEFINITION||e.kind===l.ENUM_TYPE_DEFINITION||e.kind===l.INPUT_OBJECT_TYPE_DEFINITION}function yr(e){return e.kind===l.SCHEMA_EXTENSION||yt(e)}function yt(e){return e.kind===l.SCALAR_TYPE_EXTENSION||e.kind===l.OBJECT_TYPE_EXTENSION||e.kind===l.INTERFACE_TYPE_EXTENSION||e.kind===l.UNION_TYPE_EXTENSION||e.kind===l.ENUM_TYPE_EXTENSION||e.kind===l.INPUT_OBJECT_TYPE_EXTENSION}function Li(e){return{Document:function(n){for(var r=0,i=n.definitions;r<i.length;r++){var a=i[r];if(!hr(a)){var o=a.kind===l.SCHEMA_DEFINITION||a.kind===l.SCHEMA_EXTENSION?"schema":'"'+a.name.value+'"';e.reportError(new y("The ".concat(o," definition is not executable."),a))}}return!1}}}function Ai(e){var t=Object.create(null);return{OperationDefinition:function(r){var i=r.name;return i&&(t[i.value]?e.reportError(new y('There can be only one operation named "'.concat(i.value,'".'),[t[i.value],i])):t[i.value]=i),!1},FragmentDefinition:function(){return!1}}}function wi(e){var t=0;return{Document:function(r){t=r.definitions.filter(function(i){return i.kind===l.OPERATION_DEFINITION}).length},OperationDefinition:function(r){!r.name&&t>1&&e.reportError(new y("This anonymous operation must be the only defined operation.",r))}}}function _i(e){return{OperationDefinition:function(n){n.operation==="subscription"&&n.selectionSet.selections.length!==1&&e.reportError(new y(n.name?'Subscription "'.concat(n.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",n.selectionSet.selections.slice(1)))}}}function Tr(e){for(var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null),i=0,a=e.getDocument().definitions;i<a.length;i++){var o=a[i];Ue(o)&&(r[o.name.value]=!0)}var s=Object.keys(n).concat(Object.keys(r));return{NamedType:function(u,p,f,d,h){var m=u.name.value;if(!n[m]&&!r[m]){var g,N=(g=h[2])!==null&&g!==void 0?g:f,I=N!=null&&As(N);if(I&&Ls(m))return;var L=ye(m,I?Fi.concat(s):s);e.reportError(new y('Unknown type "'.concat(m,'".')+de(L),u))}}}}var Fi=[].concat(Ze,vt).map(function(e){return e.name});function Ls(e){return Fi.indexOf(e)!==-1}function As(e){return!Array.isArray(e)&&(vr(e)||yr(e))}function Ri(e){return{InlineFragment:function(n){var r=n.typeCondition;if(r){var i=he(e.getSchema(),r);if(i&&!je(i)){var a=V(r);e.reportError(new y('Fragment cannot condition on non composite type "'.concat(a,'".'),r))}}},FragmentDefinition:function(n){var r=he(e.getSchema(),n.typeCondition);if(r&&!je(r)){var i=V(n.typeCondition);e.reportError(new y('Fragment "'.concat(n.name.value,'" cannot condition on non composite type "').concat(i,'".'),n.typeCondition))}}}}function ki(e){return{VariableDefinition:function(n){var r=he(e.getSchema(),n.type);if(r&&!dt(r)){var i=n.variable.name.value,a=V(n.type);e.reportError(new y('Variable "$'.concat(i,'" cannot be non-input type "').concat(a,'".'),n.type))}}}}function Mi(e){return{Field:function(n){var r=e.getType(),i=n.selectionSet;if(r){if(pe(re(r))){if(i){var a=n.name.value,o=E(r);e.reportError(new y('Field "'.concat(a,'" must not have a selection since type "').concat(o,'" has no subfields.'),i))}}else if(!i){var s=n.name.value,c=E(r);e.reportError(new y('Field "'.concat(s,'" of type "').concat(c,'" must have a selection of subfields. Did you mean "').concat(s,' { ... }"?'),n))}}}}}function Ci(e){return{Field:function(n){var r=e.getParentType();if(r){var i=e.getFieldDef();if(!i){var a=e.getSchema(),o=n.name.value,s=de("to use an inline fragment on",ws(a,r,o));s===""&&(s=de(_s(r,o))),e.reportError(new y('Cannot query field "'.concat(o,'" on type "').concat(r.name,'".')+s,n))}}}}}function ws(e,t,n){if(!Re(t))return[];for(var r=new Set,i=Object.create(null),a=0,o=e.getPossibleTypes(t);a<o.length;a++){var s=o[a];if(s.getFields()[n]){r.add(s),i[s.name]=1;for(var c=0,u=s.getInterfaces();c<u.length;c++){var p,f=u[c];f.getFields()[n]&&(r.add(f),i[f.name]=((p=i[f.name])!==null&&p!==void 0?p:0)+1)}}}return hn(r).sort(function(d,h){var m=i[h.name]-i[d.name];return m!==0?m:Y(d)&&e.isSubType(d,h)?-1:Y(h)&&e.isSubType(h,d)?1:Lt(d.name,h.name)}).map(function(d){return d.name})}function _s(e,t){if(K(e)||Y(e)){var n=Object.keys(e.getFields());return ye(t,n)}return[]}function Vi(e){var t=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(r){var i=r.name.value;return t[i]?e.reportError(new y('There can be only one fragment named "'.concat(i,'".'),[t[i],r.name])):t[i]=r.name,!1}}}function Ui(e){return{FragmentSpread:function(n){var r=n.name.value,i=e.getFragment(r);i||e.reportError(new y('Unknown fragment "'.concat(r,'".'),n.name))}}}function Gi(e){var t=[],n=[];return{OperationDefinition:function(i){return t.push(i),!1},FragmentDefinition:function(i){return n.push(i),!1},Document:{leave:function(){for(var i=Object.create(null),a=0;a<t.length;a++)for(var o=t[a],s=0,c=e.getRecursivelyReferencedFragments(o);s<c.length;s++){var u=c[s];i[u.name.value]=!0}for(var p=0;p<n.length;p++){var f=n[p],d=f.name.value;i[d]!==!0&&e.reportError(new y('Fragment "'.concat(d,'" is never used.'),f))}}}}}function Pi(e){return{InlineFragment:function(n){var r=e.getType(),i=e.getParentType();if(je(r)&&je(i)&&!mn(e.getSchema(),r,i)){var a=E(i),o=E(r);e.reportError(new y('Fragment cannot be spread here as objects of type "'.concat(a,'" can never be of type "').concat(o,'".'),n))}},FragmentSpread:function(n){var r=n.name.value,i=Fs(e,r),a=e.getParentType();if(i&&a&&!mn(e.getSchema(),i,a)){var o=E(a),s=E(i);e.reportError(new y('Fragment "'.concat(r,'" cannot be spread here as objects of type "').concat(o,'" can never be of type "').concat(s,'".'),n))}}}}function Fs(e,t){var n=e.getFragment(t);if(n){var r=he(e.getSchema(),n.typeCondition);if(je(r))return r}}function ji(e){var t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(o){return i(o),!1}};function i(a){if(!t[a.name.value]){var o=a.name.value;t[o]=!0;var s=e.getFragmentSpreads(a.selectionSet);if(s.length!==0){r[o]=n.length;for(var c=0;c<s.length;c++){var u=s[c],p=u.name.value,f=r[p];if(n.push(u),f===void 0){var d=e.getFragment(p);d&&i(d)}else{var h=n.slice(f),m=h.slice(0,-1).map(function(g){return'"'+g.name.value+'"'}).join(", ");e.reportError(new y('Cannot spread fragment "'.concat(p,'" within itself')+(m!==""?" via ".concat(m,"."):"."),h))}n.pop()}r[o]=void 0}}}}function Qi(e){var t=Object.create(null);return{OperationDefinition:function(){t=Object.create(null)},VariableDefinition:function(r){var i=r.variable.name.value;t[i]?e.reportError(new y('There can be only one variable named "$'.concat(i,'".'),[t[i],r.variable.name])):t[i]=r.variable.name}}}function Bi(e){var t=Object.create(null);return{OperationDefinition:{enter:function(){t=Object.create(null)},leave:function(r){for(var i=e.getRecursiveVariableUsages(r),a=0;a<i.length;a++){var o=i[a],s=o.node,c=s.name.value;t[c]!==!0&&e.reportError(new y(r.name?'Variable "$'.concat(c,'" is not defined by operation "').concat(r.name.value,'".'):'Variable "$'.concat(c,'" is not defined.'),[s,r]))}}},VariableDefinition:function(r){t[r.variable.name.value]=!0}}}function Yi(e){var t=[];return{OperationDefinition:{enter:function(){t=[]},leave:function(r){for(var i=Object.create(null),a=e.getRecursiveVariableUsages(r),o=0;o<a.length;o++){var s=a[o],c=s.node;i[c.name.value]=!0}for(var u=0,p=t;u<p.length;u++){var f=p[u],d=f.variable.name.value;i[d]!==!0&&e.reportError(new y(r.name?'Variable "$'.concat(d,'" is never used in operation "').concat(r.name.value,'".'):'Variable "$'.concat(d,'" is never used.'),f))}}},VariableDefinition:function(r){t.push(r)}}}function gr(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ge,i=0;i<r.length;i++){var a=r[i];t[a.name]=a.locations}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];c.kind===l.DIRECTIVE_DEFINITION&&(t[c.name.value]=c.locations.map(function(u){return u.value}))}return{Directive:function(p,f,d,h,m){var g=p.name.value,N=t[g];if(!N){e.reportError(new y('Unknown directive "@'.concat(g,'".'),p));return}var I=Rs(m);I&&N.indexOf(I)===-1&&e.reportError(new y('Directive "@'.concat(g,'" may not be used on ').concat(I,"."),p))}}}function Rs(e){var t=e[e.length-1];switch(!Array.isArray(t)||Z(0),t.kind){case l.OPERATION_DEFINITION:return ks(t.operation);case l.FIELD:return D.FIELD;case l.FRAGMENT_SPREAD:return D.FRAGMENT_SPREAD;case l.INLINE_FRAGMENT:return D.INLINE_FRAGMENT;case l.FRAGMENT_DEFINITION:return D.FRAGMENT_DEFINITION;case l.VARIABLE_DEFINITION:return D.VARIABLE_DEFINITION;case l.SCHEMA_DEFINITION:case l.SCHEMA_EXTENSION:return D.SCHEMA;case l.SCALAR_TYPE_DEFINITION:case l.SCALAR_TYPE_EXTENSION:return D.SCALAR;case l.OBJECT_TYPE_DEFINITION:case l.OBJECT_TYPE_EXTENSION:return D.OBJECT;case l.FIELD_DEFINITION:return D.FIELD_DEFINITION;case l.INTERFACE_TYPE_DEFINITION:case l.INTERFACE_TYPE_EXTENSION:return D.INTERFACE;case l.UNION_TYPE_DEFINITION:case l.UNION_TYPE_EXTENSION:return D.UNION;case l.ENUM_TYPE_DEFINITION:case l.ENUM_TYPE_EXTENSION:return D.ENUM;case l.ENUM_VALUE_DEFINITION:return D.ENUM_VALUE;case l.INPUT_OBJECT_TYPE_DEFINITION:case l.INPUT_OBJECT_TYPE_EXTENSION:return D.INPUT_OBJECT;case l.INPUT_VALUE_DEFINITION:{var n=e[e.length-3];return n.kind===l.INPUT_OBJECT_TYPE_DEFINITION?D.INPUT_FIELD_DEFINITION:D.ARGUMENT_DEFINITION}}}function ks(e){switch(e){case"query":return D.QUERY;case"mutation":return D.MUTATION;case"subscription":return D.SUBSCRIPTION}Z(0,"Unexpected operation: "+E(e))}function Er(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ge,i=0;i<r.length;i++){var a=r[i];t[a.name]=!a.isRepeatable}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];c.kind===l.DIRECTIVE_DEFINITION&&(t[c.name.value]=!c.repeatable)}var u=Object.create(null),p=Object.create(null);return{enter:function(d){if(d.directives!=null){var h;if(d.kind===l.SCHEMA_DEFINITION||d.kind===l.SCHEMA_EXTENSION)h=u;else if(Ue(d)||yt(d)){var m=d.name.value;h=p[m],h===void 0&&(p[m]=h=Object.create(null))}else h=Object.create(null);for(var g=0,N=d.directives;g<N.length;g++){var I=N[g],L=I.name.value;t[L]&&(h[L]?e.reportError(new y('The directive "@'.concat(L,'" can only be used once at this location.'),[h[L],I])):h[L]=I)}}}}}function Ki(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ki(Object(n),!0).forEach(function(r){Ms(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ki(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ms(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ji(e){return qi(qi({},Nr(e)),{},{Argument:function(n){var r=e.getArgument(),i=e.getFieldDef(),a=e.getParentType();if(!r&&i&&a){var o=n.name.value,s=i.args.map(function(u){return u.name}),c=ye(o,s);e.reportError(new y('Unknown argument "'.concat(o,'" on field "').concat(a.name,".").concat(i.name,'".')+de(c),n))}}})}function Nr(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ge,i=0;i<r.length;i++){var a=r[i];t[a.name]=a.args.map(function(f){return f.name})}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];if(c.kind===l.DIRECTIVE_DEFINITION){var u,p=(u=c.arguments)!==null&&u!==void 0?u:[];t[c.name.value]=p.map(function(f){return f.name.value})}}return{Directive:function(d){var h=d.name.value,m=t[h];if(d.arguments&&m)for(var g=0,N=d.arguments;g<N.length;g++){var I=N[g],L=I.name.value;if(m.indexOf(L)===-1){var F=ye(L,m);e.reportError(new y('Unknown argument "'.concat(L,'" on directive "@').concat(h,'".')+de(F),I))}}return!1}}}function Ir(e){var t=Object.create(null);return{Field:function(){t=Object.create(null)},Directive:function(){t=Object.create(null)},Argument:function(r){var i=r.name.value;return t[i]?e.reportError(new y('There can be only one argument named "'.concat(i,'".'),[t[i],r.name])):t[i]=r.name,!1}}}function Xi(e){return{ListValue:function(n){var r=fn(e.getParentInputType());if(!W(r))return et(e,n),!1},ObjectValue:function(n){var r=re(e.getInputType());if(!H(r))return et(e,n),!1;for(var i=ce(n.fields,function(p){return p.name.value}),a=0,o=se(r.getFields());a<o.length;a++){var s=o[a],c=i[s.name];if(!c&&ht(s)){var u=E(s.type);e.reportError(new y('Field "'.concat(r.name,".").concat(s.name,'" of required type "').concat(u,'" was not provided.'),n))}}},ObjectField:function(n){var r=re(e.getParentInputType()),i=e.getInputType();if(!i&&H(r)){var a=ye(n.name.value,Object.keys(r.getFields()));e.reportError(new y('Field "'.concat(n.name.value,'" is not defined by type "').concat(r.name,'".')+de(a),n))}},NullValue:function(n){var r=e.getInputType();R(r)&&e.reportError(new y('Expected value of type "'.concat(E(r),'", found ').concat(V(n),"."),n))},EnumValue:function(n){return et(e,n)},IntValue:function(n){return et(e,n)},FloatValue:function(n){return et(e,n)},StringValue:function(n){return et(e,n)},BooleanValue:function(n){return et(e,n)}}}function et(e,t){var n=e.getInputType();if(n){var r=re(n);if(!pe(r)){var i=E(n);e.reportError(new y('Expected value of type "'.concat(i,'", found ').concat(V(t),"."),t));return}try{var a=r.parseLiteral(t,void 0);if(a===void 0){var o=E(n);e.reportError(new y('Expected value of type "'.concat(o,'", found ').concat(V(t),"."),t))}}catch(c){var s=E(n);c instanceof y?e.reportError(c):e.reportError(new y('Expected value of type "'.concat(s,'", found ').concat(V(t),"; ")+c.message,t,void 0,void 0,void 0,c))}}}function zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zi(Object(n),!0).forEach(function(r){Cs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wi(e){return Hi(Hi({},Or(e)),{},{Field:{leave:function(n){var r,i=e.getFieldDef();if(!i)return!1;for(var a=(r=n.arguments)!==null&&r!==void 0?r:[],o=ce(a,function(d){return d.name.value}),s=0,c=i.args;s<c.length;s++){var u=c[s],p=o[u.name];if(!p&&At(u)){var f=E(u.type);e.reportError(new y('Field "'.concat(i.name,'" argument "').concat(u.name,'" of type "').concat(f,'" is required, but it was not provided.'),n))}}}}})}function Or(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ge,i=0;i<r.length;i++){var a=r[i];t[a.name]=ce(a.args.filter(At),function(f){return f.name})}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];if(c.kind===l.DIRECTIVE_DEFINITION){var u,p=(u=c.arguments)!==null&&u!==void 0?u:[];t[c.name.value]=ce(p.filter(Vs),function(f){return f.name.value})}}return{Directive:{leave:function(d){var h=d.name.value,m=t[h];if(m)for(var g,N=(g=d.arguments)!==null&&g!==void 0?g:[],I=ce(N,function(C){return C.name.value}),L=0,F=Object.keys(m);L<F.length;L++){var M=F[L];if(!I[M]){var Q=m[M].type,B=ft(Q)?E(Q):V(Q);e.reportError(new y('Directive "@'.concat(h,'" argument "').concat(M,'" of type "').concat(B,'" is required, but it was not provided.'),d))}}}}}}function Vs(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function $i(e){var t=Object.create(null);return{OperationDefinition:{enter:function(){t=Object.create(null)},leave:function(r){for(var i=e.getRecursiveVariableUsages(r),a=0;a<i.length;a++){var o=i[a],s=o.node,c=o.type,u=o.defaultValue,p=s.name.value,f=t[p];if(f&&c){var d=e.getSchema(),h=he(d,f.type);if(h&&!Us(d,h,f.defaultValue,c,u)){var m=E(h),g=E(c);e.reportError(new y('Variable "$'.concat(p,'" of type "').concat(m,'" used in position expecting type "').concat(g,'".'),[f,s]))}}}}},VariableDefinition:function(r){t[r.variable.name.value]=r}}}function Us(e,t,n,r,i){if(R(r)&&!R(t)){var a=n!=null&&n.kind!==l.NULL,o=i!==void 0;if(!a&&!o)return!1;var s=r.ofType;return We(e,t,s)}return We(e,t,r)}function Zi(e){return Array.isArray(e)?e.map(function(t){var n=t[0],r=t[1];return'subfields "'.concat(n,'" conflict because ')+Zi(r)}).join(" and "):e}function ea(e){var t=new Ks,n=new Map;return{SelectionSet:function(i){for(var a=Gs(e,n,t,e.getParentType(),i),o=0;o<a.length;o++){var s=a[o],c=s[0],u=c[0],p=c[1],f=s[1],d=s[2],h=Zi(p);e.reportError(new y('Fields "'.concat(u,'" conflict because ').concat(h,". Use different aliases on the fields to fetch both if this was intentional."),f.concat(d)))}}}}function Gs(e,t,n,r,i){var a=[],o=Nn(e,t,r,i),s=o[0],c=o[1];if(js(e,a,t,n,s),c.length!==0)for(var u=0;u<c.length;u++){gn(e,a,t,n,!1,s,c[u]);for(var p=u+1;p<c.length;p++)En(e,a,t,n,!1,c[u],c[p])}return a}function gn(e,t,n,r,i,a,o){var s=e.getFragment(o);if(s){var c=br(e,n,s),u=c[0],p=c[1];if(a!==u){xr(e,t,n,r,i,a,u);for(var f=0;f<p.length;f++)gn(e,t,n,r,i,a,p[f])}}}function En(e,t,n,r,i,a,o){if(a!==o&&!r.has(a,o,i)){r.add(a,o,i);var s=e.getFragment(a),c=e.getFragment(o);if(!(!s||!c)){var u=br(e,n,s),p=u[0],f=u[1],d=br(e,n,c),h=d[0],m=d[1];xr(e,t,n,r,i,p,h);for(var g=0;g<m.length;g++)En(e,t,n,r,i,a,m[g]);for(var N=0;N<f.length;N++)En(e,t,n,r,i,f[N],o)}}}function Ps(e,t,n,r,i,a,o,s){var c=[],u=Nn(e,t,i,a),p=u[0],f=u[1],d=Nn(e,t,o,s),h=d[0],m=d[1];if(xr(e,c,t,n,r,p,h),m.length!==0)for(var g=0;g<m.length;g++)gn(e,c,t,n,r,p,m[g]);if(f.length!==0)for(var N=0;N<f.length;N++)gn(e,c,t,n,r,h,f[N]);for(var I=0;I<f.length;I++)for(var L=0;L<m.length;L++)En(e,c,t,n,r,f[I],m[L]);return c}function js(e,t,n,r,i){for(var a=0,o=Ae(i);a<o.length;a++){var s=o[a],c=s[0],u=s[1];if(u.length>1)for(var p=0;p<u.length;p++)for(var f=p+1;f<u.length;f++){var d=ta(e,n,r,!1,c,u[p],u[f]);d&&t.push(d)}}}function xr(e,t,n,r,i,a,o){for(var s=0,c=Object.keys(a);s<c.length;s++){var u=c[s],p=o[u];if(p)for(var f=a[u],d=0;d<f.length;d++)for(var h=0;h<p.length;h++){var m=ta(e,n,r,i,u,f[d],p[h]);m&&t.push(m)}}}function ta(e,t,n,r,i,a,o){var s=a[0],c=a[1],u=a[2],p=o[0],f=o[1],d=o[2],h=r||s!==p&&K(s)&&K(p);if(!h){var m,g,N=c.name.value,I=f.name.value;if(N!==I)return[[i,'"'.concat(N,'" and "').concat(I,'" are different fields')],[c],[f]];var L=(m=c.arguments)!==null&&m!==void 0?m:[],F=(g=f.arguments)!==null&&g!==void 0?g:[];if(!Qs(L,F))return[[i,"they have differing arguments"],[c],[f]]}var M=u?.type,Q=d?.type;if(M&&Q&&Sr(M,Q))return[[i,'they return conflicting types "'.concat(E(M),'" and "').concat(E(Q),'"')],[c],[f]];var B=c.selectionSet,C=f.selectionSet;if(B&&C){var J=Ps(e,t,n,h,re(M),B,re(Q),C);return Ys(J,i,c,f)}}function Qs(e,t){return e.length!==t.length?!1:e.every(function(n){var r=at(t,function(i){return i.name.value===n.name.value});return r?Bs(n.value,r.value):!1})}function Bs(e,t){return V(e)===V(t)}function Sr(e,t){return W(e)?W(t)?Sr(e.ofType,t.ofType):!0:W(t)?!0:R(e)?R(t)?Sr(e.ofType,t.ofType):!0:R(t)?!0:pe(e)||pe(t)?e!==t:!1}function Nn(e,t,n,r){var i=t.get(r);if(!i){var a=Object.create(null),o=Object.create(null);na(e,n,r,a,o),i=[a,Object.keys(o)],t.set(r,i)}return i}function br(e,t,n){var r=t.get(n.selectionSet);if(r)return r;var i=he(e.getSchema(),n.typeCondition);return Nn(e,t,i,n.selectionSet)}function na(e,t,n,r,i){for(var a=0,o=n.selections;a<o.length;a++){var s=o[a];switch(s.kind){case l.FIELD:{var c=s.name.value,u=void 0;(K(t)||Y(t))&&(u=t.getFields()[c]);var p=s.alias?s.alias.value:c;r[p]||(r[p]=[]),r[p].push([t,s,u]);break}case l.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case l.INLINE_FRAGMENT:{var f=s.typeCondition,d=f?he(e.getSchema(),f):t;na(e,d,s.selectionSet,r,i);break}}}}function Ys(e,t,n,r){if(e.length>0)return[[t,e.map(function(i){var a=i[0];return a})],e.reduce(function(i,a){var o=a[1];return i.concat(o)},[n]),e.reduce(function(i,a){var o=a[2];return i.concat(o)},[r])]}var Ks=(function(){function e(){this._data=Object.create(null)}var t=e.prototype;return t.has=function(r,i,a){var o=this._data[r],s=o&&o[i];return s===void 0?!1:a===!1?s===!1:!0},t.add=function(r,i,a){this._pairSetAdd(r,i,a),this._pairSetAdd(i,r,a)},t._pairSetAdd=function(r,i,a){var o=this._data[r];o||(o=Object.create(null),this._data[r]=o),o[i]=a},e})();function Dr(e){var t=[],n=Object.create(null);return{ObjectValue:{enter:function(){t.push(n),n=Object.create(null)},leave:function(){n=t.pop()}},ObjectField:function(i){var a=i.name.value;n[a]?e.reportError(new y('There can be only one input field named "'.concat(a,'".'),[n[a],i.name])):n[a]=i.name}}}function ra(e){var t,n,r,i=e.getSchema(),a=(t=(n=(r=i?.astNode)!==null&&r!==void 0?r:i?.getQueryType())!==null&&n!==void 0?n:i?.getMutationType())!==null&&t!==void 0?t:i?.getSubscriptionType(),o=0;return{SchemaDefinition:function(c){if(a){e.reportError(new y("Cannot define a new schema within a schema extension.",c));return}o>0&&e.reportError(new y("Must provide only one schema definition.",c)),++o}}}function ia(e){var t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(a){for(var o,s=(o=a.operationTypes)!==null&&o!==void 0?o:[],c=0;c<s.length;c++){var u=s[c],p=u.operation,f=n[p];r[p]?e.reportError(new y("Type for ".concat(p," already defined in the schema. It cannot be redefined."),u)):f?e.reportError(new y("There can be only one ".concat(p," type in schema."),[f,u])):n[p]=u}return!1}}function aa(e){var t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){var a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new y('Type "'.concat(a,'" already exists in the schema. It cannot also be defined in this type definition.'),i.name));return}return t[a]?e.reportError(new y('There can be only one type named "'.concat(a,'".'),[t[a],i.name])):t[a]=i.name,!1}}function oa(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o,s=a.name.value;r[s]||(r[s]=Object.create(null));for(var c=(o=a.values)!==null&&o!==void 0?o:[],u=r[s],p=0;p<c.length;p++){var f=c[p],d=f.name.value,h=n[s];ue(h)&&h.getValue(d)?e.reportError(new y('Enum value "'.concat(s,".").concat(d,'" already exists in the schema. It cannot also be defined in this type extension.'),f.name)):u[d]?e.reportError(new y('Enum value "'.concat(s,".").concat(d,'" can only be defined once.'),[u[d],f.name])):u[d]=f.name}return!1}}function sa(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(a){var o,s=a.name.value;r[s]||(r[s]=Object.create(null));for(var c=(o=a.fields)!==null&&o!==void 0?o:[],u=r[s],p=0;p<c.length;p++){var f=c[p],d=f.name.value;qs(n[s],d)?e.reportError(new y('Field "'.concat(s,".").concat(d,'" already exists in the schema. It cannot also be defined in this type extension.'),f.name)):u[d]?e.reportError(new y('Field "'.concat(s,".").concat(d,'" can only be defined once.'),[u[d],f.name])):u[d]=f.name}return!1}}function qs(e,t){return K(e)||Y(e)||H(e)?e.getFields()[t]!=null:!1}function ca(e){var t=Object.create(null),n=e.getSchema();return{DirectiveDefinition:function(i){var a=i.name.value;if(n!=null&&n.getDirective(a)){e.reportError(new y('Directive "@'.concat(a,'" already exists in the schema. It cannot be redefined.'),i.name));return}return t[a]?e.reportError(new y('There can be only one directive named "@'.concat(a,'".'),[t[a],i.name])):t[a]=i.name,!1}}}var Ke;function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e){for(var t=e.getSchema(),n=Object.create(null),r=0,i=e.getDocument().definitions;r<i.length;r++){var a=i[r];Ue(a)&&(n[a.name.value]=a)}return{ScalarTypeExtension:o,ObjectTypeExtension:o,InterfaceTypeExtension:o,UnionTypeExtension:o,EnumTypeExtension:o,InputObjectTypeExtension:o};function o(s){var c=s.name.value,u=n[c],p=t?.getType(c),f;if(u?f=Js[u.kind]:p&&(f=Xs(p)),f){if(f!==s.kind){var d=zs(s.kind);e.reportError(new y("Cannot extend non-".concat(d,' type "').concat(c,'".'),u?[u,s]:s))}}else{var h=Object.keys(n);t&&(h=h.concat(Object.keys(t.getTypeMap())));var m=ye(c,h);e.reportError(new y('Cannot extend type "'.concat(c,'" because it is not defined.')+de(m),s.name))}}}var Js=(Ke={},Tt(Ke,l.SCALAR_TYPE_DEFINITION,l.SCALAR_TYPE_EXTENSION),Tt(Ke,l.OBJECT_TYPE_DEFINITION,l.OBJECT_TYPE_EXTENSION),Tt(Ke,l.INTERFACE_TYPE_DEFINITION,l.INTERFACE_TYPE_EXTENSION),Tt(Ke,l.UNION_TYPE_DEFINITION,l.UNION_TYPE_EXTENSION),Tt(Ke,l.ENUM_TYPE_DEFINITION,l.ENUM_TYPE_EXTENSION),Tt(Ke,l.INPUT_OBJECT_TYPE_DEFINITION,l.INPUT_OBJECT_TYPE_EXTENSION),Ke);function Xs(e){if(Fe(e))return l.SCALAR_TYPE_EXTENSION;if(K(e))return l.OBJECT_TYPE_EXTENSION;if(Y(e))return l.INTERFACE_TYPE_EXTENSION;if(me(e))return l.UNION_TYPE_EXTENSION;if(ue(e))return l.ENUM_TYPE_EXTENSION;if(H(e))return l.INPUT_OBJECT_TYPE_EXTENSION;Z(0,"Unexpected type: "+E(e))}function zs(e){switch(e){case l.SCALAR_TYPE_EXTENSION:return"scalar";case l.OBJECT_TYPE_EXTENSION:return"object";case l.INTERFACE_TYPE_EXTENSION:return"interface";case l.UNION_TYPE_EXTENSION:return"union";case l.ENUM_TYPE_EXTENSION:return"enum";case l.INPUT_OBJECT_TYPE_EXTENSION:return"input object"}Z(0,"Unexpected kind: "+E(e))}var Hs=Object.freeze([Li,Ai,wi,_i,Tr,Ri,ki,Mi,Ci,Vi,Ui,Gi,Pi,ji,Qi,Bi,Yi,gr,Er,Ji,Ir,Xi,Wi,$i,ea,Dr]),pa=Object.freeze([ra,ia,aa,oa,sa,ca,Tr,gr,Er,ua,Nr,Ir,Dr,Or]);function Ws(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var $s=(function(){function e(n,r){this._ast=n,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=r}var t=e.prototype;return t.reportError=function(r){this._onError(r)},t.getDocument=function(){return this._ast},t.getFragment=function(r){var i=this._fragments;return i||(this._fragments=i=this.getDocument().definitions.reduce(function(a,o){return o.kind===l.FRAGMENT_DEFINITION&&(a[o.name.value]=o),a},Object.create(null))),i[r]},t.getFragmentSpreads=function(r){var i=this._fragmentSpreads.get(r);if(!i){i=[];for(var a=[r];a.length!==0;)for(var o=a.pop(),s=0,c=o.selections;s<c.length;s++){var u=c[s];u.kind===l.FRAGMENT_SPREAD?i.push(u):u.selectionSet&&a.push(u.selectionSet)}this._fragmentSpreads.set(r,i)}return i},t.getRecursivelyReferencedFragments=function(r){var i=this._recursivelyReferencedFragments.get(r);if(!i){i=[];for(var a=Object.create(null),o=[r.selectionSet];o.length!==0;)for(var s=o.pop(),c=0,u=this.getFragmentSpreads(s);c<u.length;c++){var p=u[c],f=p.name.value;if(a[f]!==!0){a[f]=!0;var d=this.getFragment(f);d&&(i.push(d),o.push(d.selectionSet))}}this._recursivelyReferencedFragments.set(r,i)}return i},e})(),la=(function(e){Ws(t,e);function t(r,i,a){var o;return o=e.call(this,r,a)||this,o._schema=i,o}var n=t.prototype;return n.getSchema=function(){return this._schema},t})($s);function Zs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pa,r=[],i=new la(e,t,function(o){r.push(o)}),a=n.map(function(o){return o(i)});return ct(e,$n(a)),r}function fa(e){var t=Zs(e);if(t.length!==0)throw new Error(t.map(function(n){return n.message}).join(`
`))}function da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?da(Object(n),!0).forEach(function(r){ec(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ec(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t,n){for(var r,i,a,o,s=[],c=Object.create(null),u=[],p,f=[],d=0,h=t.definitions;d<h.length;d++){var m=h[d];if(m.kind===l.SCHEMA_DEFINITION)p=m;else if(m.kind===l.SCHEMA_EXTENSION)f.push(m);else if(Ue(m))s.push(m);else if(yt(m)){var g=m.name.value,N=c[g];c[g]=N?N.concat([m]):[m]}else m.kind===l.DIRECTIVE_DEFINITION&&u.push(m)}if(Object.keys(c).length===0&&s.length===0&&u.length===0&&f.length===0&&p==null)return e;for(var I=Object.create(null),L=0,F=e.types;L<F.length;L++){var M=F[L];I[M.name]=Ar(M)}for(var Q=0;Q<s.length;Q++){var B,C=s[Q],J=C.name.value;I[J]=(B=ma[J])!==null&&B!==void 0?B:La(C)}var ee=U(U({query:e.query&&Le(e.query),mutation:e.mutation&&Le(e.mutation),subscription:e.subscription&&Le(e.subscription)},p&&Fr([p])),Fr(f));return U(U({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},ee),{},{types:se(I),directives:[].concat(e.directives.map(Be),u.map(Da)),extensions:void 0,astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(f),assumeValid:(o=n?.assumeValid)!==null&&o!==void 0?o:!1});function Se(T){return W(T)?new X(Se(T.ofType)):R(T)?new A(Se(T.ofType)):Le(T)}function Le(T){return I[T.name]}function Be(T){var x=T.toConfig();return new Ce(U(U({},x),{},{args:be(x.args,_r)}))}function Ar(T){if(lr(T)||vn(T))return T;if(Fe(T))return Ct(T);if(K(T))return Sa(T);if(Y(T))return ba(T);if(me(T))return xa(T);if(ue(T))return nt(T);if(H(T))return Ee(T);Z(0,"Unexpected type: "+E(T))}function Ee(T){var x,O=T.toConfig(),b=(x=c[O.name])!==null&&x!==void 0?x:[];return new He(U(U({},O),{},{fields:function(){return U(U({},be(O.fields,function(G){return U(U({},G),{},{type:Se(G.type)})})),kr(b))},extensionASTNodes:O.extensionASTNodes.concat(b)}))}function nt(T){var x,O=T.toConfig(),b=(x=c[T.name])!==null&&x!==void 0?x:[];return new xe(U(U({},O),{},{values:U(U({},O.values),Mr(b)),extensionASTNodes:O.extensionASTNodes.concat(b)}))}function Ct(T){for(var x,O=T.toConfig(),b=(x=c[O.name])!==null&&x!==void 0?x:[],k=O.specifiedByUrl,G=0;G<b.length;G++){var P,j=b[G];k=(P=ha(j))!==null&&P!==void 0?P:k}return new Oe(U(U({},O),{},{specifiedByUrl:k,extensionASTNodes:O.extensionASTNodes.concat(b)}))}function Sa(T){var x,O=T.toConfig(),b=(x=c[O.name])!==null&&x!==void 0?x:[];return new ie(U(U({},O),{},{interfaces:function(){return[].concat(T.getInterfaces().map(Le),Gt(b))},fields:function(){return U(U({},be(O.fields,wr)),Ut(b))},extensionASTNodes:O.extensionASTNodes.concat(b)}))}function ba(T){var x,O=T.toConfig(),b=(x=c[O.name])!==null&&x!==void 0?x:[];return new Qe(U(U({},O),{},{interfaces:function(){return[].concat(T.getInterfaces().map(Le),Gt(b))},fields:function(){return U(U({},be(O.fields,wr)),Ut(b))},extensionASTNodes:O.extensionASTNodes.concat(b)}))}function xa(T){var x,O=T.toConfig(),b=(x=c[O.name])!==null&&x!==void 0?x:[];return new ze(U(U({},O),{},{types:function(){return[].concat(T.getTypes().map(Le),Cr(b))},extensionASTNodes:O.extensionASTNodes.concat(b)}))}function wr(T){return U(U({},T),{},{type:Se(T.type),args:be(T.args,_r)})}function _r(T){return U(U({},T),{},{type:Se(T.type)})}function Fr(T){for(var x={},O=0;O<T.length;O++)for(var b,k=T[O],G=(b=k.operationTypes)!==null&&b!==void 0?b:[],P=0;P<G.length;P++){var j=G[P];x[j.operation]=Vt(j.type)}return x}function Vt(T){var x,O=T.name.value,b=(x=ma[O])!==null&&x!==void 0?x:I[O];if(b===void 0)throw new Error('Unknown type: "'.concat(O,'".'));return b}function gt(T){return T.kind===l.LIST_TYPE?new X(gt(T.type)):T.kind===l.NON_NULL_TYPE?new A(gt(T.type)):Vt(T)}function Da(T){var x=T.locations.map(function(O){var b=O.value;return b});return new Ce({name:T.name.value,description:tt(T,n),locations:x,isRepeatable:T.repeatable,args:Rr(T.arguments),astNode:T})}function Ut(T){for(var x=Object.create(null),O=0;O<T.length;O++)for(var b,k=T[O],G=(b=k.fields)!==null&&b!==void 0?b:[],P=0;P<G.length;P++){var j=G[P];x[j.name.value]={type:gt(j.type),description:tt(j,n),args:Rr(j.arguments),deprecationReason:In(j),astNode:j}}return x}function Rr(T){for(var x=T??[],O=Object.create(null),b=0;b<x.length;b++){var k=x[b],G=gt(k.type);O[k.name.value]={type:G,description:tt(k,n),defaultValue:Ve(k.defaultValue,G),deprecationReason:In(k),astNode:k}}return O}function kr(T){for(var x=Object.create(null),O=0;O<T.length;O++)for(var b,k=T[O],G=(b=k.fields)!==null&&b!==void 0?b:[],P=0;P<G.length;P++){var j=G[P],Et=gt(j.type);x[j.name.value]={type:Et,description:tt(j,n),defaultValue:Ve(j.defaultValue,Et),deprecationReason:In(j),astNode:j}}return x}function Mr(T){for(var x=Object.create(null),O=0;O<T.length;O++)for(var b,k=T[O],G=(b=k.values)!==null&&b!==void 0?b:[],P=0;P<G.length;P++){var j=G[P];x[j.name.value]={description:tt(j,n),deprecationReason:In(j),astNode:j}}return x}function Gt(T){for(var x=[],O=0;O<T.length;O++)for(var b,k=T[O],G=(b=k.interfaces)!==null&&b!==void 0?b:[],P=0;P<G.length;P++){var j=G[P];x.push(Vt(j))}return x}function Cr(T){for(var x=[],O=0;O<T.length;O++)for(var b,k=T[O],G=(b=k.types)!==null&&b!==void 0?b:[],P=0;P<G.length;P++){var j=G[P];x.push(Vt(j))}return x}function La(T){var x,O=T.name.value,b=tt(T,n),k=(x=c[O])!==null&&x!==void 0?x:[];switch(T.kind){case l.OBJECT_TYPE_DEFINITION:{var G=k,P=[T].concat(G);return new ie({name:O,description:b,interfaces:function(){return Gt(P)},fields:function(){return Ut(P)},astNode:T,extensionASTNodes:G})}case l.INTERFACE_TYPE_DEFINITION:{var j=k,Et=[T].concat(j);return new Qe({name:O,description:b,interfaces:function(){return Gt(Et)},fields:function(){return Ut(Et)},astNode:T,extensionASTNodes:j})}case l.ENUM_TYPE_DEFINITION:{var Vr=k,Aa=[T].concat(Vr);return new xe({name:O,description:b,values:Mr(Aa),astNode:T,extensionASTNodes:Vr})}case l.UNION_TYPE_DEFINITION:{var Ur=k,wa=[T].concat(Ur);return new ze({name:O,description:b,types:function(){return Cr(wa)},astNode:T,extensionASTNodes:Ur})}case l.SCALAR_TYPE_DEFINITION:{var _a=k;return new Oe({name:O,description:b,specifiedByUrl:ha(T),astNode:T,extensionASTNodes:_a})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var Gr=k,Fa=[T].concat(Gr);return new He({name:O,description:b,fields:function(){return kr(Fa)},astNode:T,extensionASTNodes:Gr})}}Z(0,"Unexpected type definition node: "+E(T))}}var ma=ce(Ze.concat(vt),function(e){return e.name});function In(e){var t=mr(yn,e);return t?.reason}function ha(e){var t=mr(Tn,e);return t?.url}function tt(e,t){if(e.description)return e.description.value;if(t?.commentDescriptions===!0){var n=tc(e);if(n!==void 0)return nn(`
`+n)}}function tc(e){var t=e.loc;if(t){for(var n=[],r=t.startToken.prev;r!=null&&r.kind===v.COMMENT&&r.next&&r.prev&&r.line+1===r.next.line&&r.line!==r.prev.line;){var i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join(`
`):void 0}}function Lr(e,t){e!=null&&e.kind===l.DOCUMENT||_(0,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&fa(e);var n={description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},r=va(n,e,t);if(r.astNode==null)for(var i=0,a=r.types;i<a.length;i++){var o=a[i];switch(o.name){case"Query":r.query=o;break;case"Mutation":r.mutation=o;break;case"Subscription":r.subscription=o;break}}for(var s=r.directives,c=function(f){var d=ge[f];s.every(function(h){return h.name!==d.name})&&s.push(d)},u=0;u<ge.length;u++)c(u);return new dr(r)}function On(e,t){var n=zn(e,{noLocation:t?.noLocation,allowLegacySDLEmptyFields:t?.allowLegacySDLEmptyFields,allowLegacySDLImplementsInterfaces:t?.allowLegacySDLImplementsInterfaces,experimentalFragmentVariables:t?.experimentalFragmentVariables});return Lr(n,{commentDescriptions:t?.commentDescriptions,assumeValidSDL:t?.assumeValidSDL,assumeValid:t?.assumeValid})}var ya=e=>[e.getQueryType(),e.getMutationType(),e.getSubscriptionType()].filter(Boolean);var Ta=e=>re(e).toString();var ga=async(e,t=2)=>{let n=await import("./chunk-CPMWLSLU.js"),r=await import("./chunk-T3ZAZ4K2.js");return n.format(e,{parser:"graphql",plugins:[r],tabWidth:t})};var Ea=async(e,t,n,{maxDepth:r=2,tabSize:i=2}={})=>{let a=e.getType(n);if(!(a instanceof ie))return{generated:"",metas:[]};let o=a.getFields()[t];if(!o)return{generated:"",metas:[]};let s=Nc(e,a),{node:c,metas:u}=Na(o,{maxDepth:r,currentDepth:0}),p={kind:l.SELECTION_SET,selections:[c]},f={kind:l.DOCUMENT,definitions:[s?Ic(s,p):Oc(a,p)]};return{generated:await ga(V(f),i),metas:u}},Nc=(e,t)=>new Map([[e.getQueryType(),"query"],[e.getMutationType(),"mutation"],[e.getSubscriptionType(),"subscription"]]).get(t),Ic=(e,t)=>({kind:l.OPERATION_DEFINITION,operation:e,name:void 0,variableDefinitions:[],directives:[],selectionSet:t}),Oc=(e,t)=>({kind:l.FRAGMENT_DEFINITION,name:{kind:l.NAME,value:"____"},variableDefinitions:[],directives:[],typeCondition:{kind:l.NAMED_TYPE,name:{kind:l.NAME,value:e.name}},selectionSet:t}),Sc=(e,{maxDepth:t=1,currentDepth:n=0}={})=>{let r=[],i={kind:l.SELECTION_SET,selections:[]};if(!e)return{selectionSet:i,metas:r};let a=re(e);if(!(a instanceof ie||a instanceof Qe))return{selectionSet:i,metas:r};if(pe(e))return{selectionSet:i,metas:r};if(n>=t)return{selectionSet:i,metas:r};let o=a&&a.getFields();return i.selections=Object.entries(o).map(([,s])=>{let{node:c,metas:u}=Na(s,{maxDepth:t,currentDepth:n});return r=[...r,...u],c}),{selectionSet:i,metas:r}},Na=(e,{maxDepth:t=1,currentDepth:n=0}={})=>{let r=e.args.map(s=>({kind:l.ARGUMENT,name:{kind:l.NAME,value:s.name},value:Ia(s.type,s.defaultValue)})),{selectionSet:i,metas:a}=Sc(e.type,{maxDepth:t,currentDepth:n+1});return{node:{kind:l.FIELD,alias:void 0,name:{kind:l.NAME,value:e.name},arguments:r,directives:[],selectionSet:i},metas:[{hasArgs:!!r.length},...a]}},Ia=(e,t,{currentDepth:n=0,maxDepth:r=2}={})=>Oa(e,t,{currentDepth:n,maxDepth:r})??{kind:l.STRING,value:"_____"},Oa=(e,t,{currentDepth:n=0,maxDepth:r=2}={})=>{let i=Te(t,e);if(i)return i;if(R(e)&&(e=e.ofType),W(e))return{kind:l.LIST,values:[Ia(e.ofType,void 0,{currentDepth:n+1,maxDepth:r})]};if(K(e)||H(e)){if(n>=r)return;let o=[];for(let s of Object.values(e.getFields()))if(ht(s)){let c=Oa(s.type,void 0,{currentDepth:n+1,maxDepth:r});c&&o.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:s.name},value:c})}return{kind:l.OBJECT,fields:o}}if(e instanceof xe){let o=e.getValues()[0];return o?Te(o.name,e):void 0}switch(Ta(e)){case"String":return Te("string",q);case"Boolean":return Te(!0,ae);case"Int":return Te(1,_t)}};var Sn=class{constructor(t){this.searchIndex=[];t&&this.updateSchema(t)}updateSchema(t){this.schema=On(t)}generateSearchIndex(){if(!this.schema)return[];let t=[];ya(this.schema).forEach(a=>{t=[...t,...this.getTypeIndices(a,!0,t)]});let r=this.schema.getTypeMap();Object.keys(r).forEach(a=>{/^__/.test(a)||(t=[...t,...this.getTypeIndices(r[a],!1,t)])});let i=this.schema.getDirectives();return t=[...t,...this.getDirectivesIndices(i)],this.searchIndex=t,t}getDirectivesIndices(t){let n=[];return t.forEach(r=>{let i={search:r.name,name:"@"+r.name,description:r.description||"",cat:"directive",highlight:"directive",locations:r.locations,args:r.args?.map(a=>({name:a.name,description:a.description??""}))};n=[...n,i],r.args&&r.args.length&&r.args.forEach(a=>{n=[...n,{...i,search:a.name,highlight:"argument"}]})}),n}getFieldsIndices(t,n,r,i){let a=[];return Object.entries(t).forEach(([,o])=>{let s={search:o.name,name:o.name,description:o.description?o.description:"",args:o.args?.map(c=>({name:c.name,description:c.description??""})),cat:"field",type:n.name,isQuery:r,highlight:"field"};a=[...a,s],o.args&&o.args.length&&o.args.forEach(c=>{a=[...a,{...s,search:c.name,highlight:"argument"}]}),o.type&&(a=[...a,...this.getTypeIndices(o.type,!1,[...i,...a]).filter(c=>!!c)])}),a}getTypeIndices(t,n,r){let i;if(!t.name)return[];if(r.some(o=>o.name===t.name&&o.cat==="type"))return[];t.getFields&&(i=t.getFields());let a=[{search:t.name,name:t.name,cat:"type",description:t.description?t.description:"",isRoot:n,highlight:"type"}];return i?[...a,...this.getFieldsIndices(i,t,n,[...r,...a]).filter(o=>!!o)]:a}searchDocs(t){return this.searchIndex.length?new ri(this.searchIndex,{keys:["search"],threshold:.4}).search(t).map(r=>r.item):[]}async generateQueryV2(t,n,r){if(!this.schema)return;let i=await Ea(this.schema,t,n,{maxDepth:r.addQueryDepthLimit,tabSize:r.tabSize});return{query:i.generated,meta:i.metas.find(a=>a.hasArgs)||{}}}cleanName(t){return t.replace(/[[\]!]/g,"")}};jt(Sn);
//# sourceMappingURL=worker-5NLTLQL6.js.map
//# debugId=f9db4c5f-7a02-57d0-9707-c7b5b3c2a5cd