UNPKG

altair-static

Version:

Static package for altair graphql client

15 lines (12 loc) 148 kB
!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]="e180a1ea-25a0-50d5-89b4-6da985286cdb")}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=Ga(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 Gt(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(Gt(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){Gt(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){Gt(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]=Gr(s);return rt(e,{type:2,path:t.map(f=>f.toString()),argumentList:u},p).then(qe)},construct(a,o){Gt(r);let[s,c]=Gr(o);return rt(e,{type:3,path:t.map(u=>u.toString()),argumentList:s},c).then(qe)}});return i}function Pa(e){return Array.prototype.concat.apply([],e)}function Gr(e){let t=e.map(Dn);return[t.map(n=>n[0]),Pa(t.map(n=>n[1]))]}var Kr=new WeakMap;function Ga(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 Ge(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 Pe(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(Pe(e)||Ge(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 Ge(e)?e:e.split(".")}function wn(e){return Ge(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&&(Pe(u)||Wr(u)||Ja(u)))n.push(qa(u));else if(Ge(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,Pe(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,Pe(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();Pe(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(Ge(o)){let s=[],c=[{nestedArrIndex:-1,value:o}];for(;c.length;){let{nestedArrIndex:u,value:p}=c.pop();if(Ne(p))if(Pe(p)&&!Ln(p)){let f={v:p,i:u,n:this.norm.get(p)};s.push(f)}else Ge(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}}},Pn=[];function vo(...e){Pn.push(...e)}function Gn(e,t){for(let n=0,r=Pn.length;n<r;n+=1){let i=Pn[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=>!Ge(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(!Pe(u))throw new Error(Ha(c));let p={keyId:wn(c),pattern:u};return n&&(p.searcher=Gn(u,t)),p}let s={children:[],operator:a[0]};return a.forEach(c=>{let u=i[c];Ge(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=Pe(t)?Pe(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=Gn(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=Gn(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(Ge(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=Po(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 Po(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,Go(o))}var u=e.line,p=1+a-e.lineStart;return new z(v.EOF,i,i,u,p,t)}function Go(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.parseNam