1import{bs as $u,bt as Vu,bu as ju,bv as us,bw as qu,bx as w,by as R,bz as he,bA as Qu,bB as Uu,bC as A,bD as ke,bE as xt,bF as St,bG as se,bH as Ue,bI as ft,bJ as pi,bK as xu,bL as cs,bM as Jn,bN as ls,bO as fs,bP as Di,bQ as Mn,bR as Ri,bS as Gu,bT as Lr,bU as ds,bV as Bu,bW as Wu,bX as ms,bY as ps,bZ as Er,b_ as zu,b$ as Yu,c0 as hs,c1 as Hu,c2 as Ju,c3 as Ku,c4 as Xu,c5 as Zu,c6 as ec,c7 as tc,c8 as nc,c9 as rc,ca as ic,cb as ac,cc as sc,cd as oc,ce as uc,cf as cc,cg as lc,ch as fc,ci as dc,cj as mc,ck as hi,cl as vs,cm as In,cn as _t,co as vi,cp as ys,cq as gs,cr as pc,cs as hc,ct as vc,cu as yc,cv as gc,cw as bc,cx as _c,cy as Ec,cz as Tc,cA as Nc,cB as Sc,cC as Tr,cD as wc,cE as Oc,cF as Ic,cG as kc,cH as Dc,cI as Rc,cJ as bs,cK as Fc,cL as Ac,cM as Cc,cN as Lc,cO as Mc,cP as Pc,cQ as $c,cR as Vc,cS as yi,cT as jc,cU as qc,cV as Qc,cW as Uc,cX as xc,cY as Gc,cZ as Bc,c_ as Wc,c$ as zc,d0 as Yc,d1 as Hc,d2 as Jc,d3 as Kc,d4 as Xc,d5 as Zc,d6 as el,d7 as tl,d8 as nl,d9 as rl,da as il,db as al,dc as sl,dd as ol,de as ul,df as cl,dg as ll,dh as _s,di as fl,dj as Es,dk as dl,dl as ml,dm as pl,dn as hl,dp as vl,dq as yl,dr as gl,ds as bl,dt as _l,du as El,dv as Tl,dw as Nl,dx as Sl,dy as wl,dz as Ol,dA as Il,dB as kl,dC as Dl,dD as Rl,dE as Fl,dF as Al,dG as Cl,dH as Ll,dI as Ml,dJ as Pl,dK as Ts,dL as $l,dM as Vl,dN as jl,dO as ql,dP as Ql,dQ as Ul,dR as xl,dS as Gl,dT as Bl,dU as Wl,dV as zl,dW as Yl,dX as Hl,dY as Jl,dZ as Kl,d_ as Xl,d$ as Zl,e0 as ef,e1 as tf,e2 as nf,e3 as ai,e4 as rf,e5 as af,e6 as sf,e7 as of,e8 as uf,e9 as cf,ea as lf,eb as ff,ec as df,ed as mf,d as Kt,q as Mr,G as Ns,m as gi,I as Ss,H as ws,al as Os,ee as wr,S as pf,ef as hf,c as Ie,u as je,p as lt,z as et,o as ye,ae as vf,b3 as yf,am as gf,aQ as bf,an as _f,a as fe,n as Pr,k as Oe,F as En,x as Fi,_ as Kn,eg as xe,eh as Ef,ei as Tf,ej as Nf,ek as Sf,el as wf,em as Of,en as If,eo as kf,ep as bi,eq as Df,er as Na,aC as Rf,ay as $r,A as Ff,t as Et,e as Nt,ah as Af,g as Cf,h as nn,es as Lf,w as Qn,Y as Mf,ao as Pf,v as $f,aW as Vf,B as Sa,C as wa,j as jf,J as Oa,aU as qf,a7 as Qf,as as Uf}from"./B5iH8GD1.js";import{b as xf,a as Gf,_ as Bf,d as Wf,c as zf,g as Yf}from"./DQ6XMqQ9.js";import{_ as Hf}from"./Bk6BqeEM.js";import{S as Ge}from"./j5588ckU.js";import{L as Jf}from"./RGuMi1jb.js";import{a as Kf,u as Xf}from"./D-XmqQJv.js";import"./CzTmV0I9.js";import"./i1bFaG5r.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"1.13.69"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ca0d3d01-d7b1-4954-a3f7-fdfd7ea6fab1",e._sentryDebugIdIdentifier="sentry-dbid-ca0d3d01-d7b1-4954-a3f7-fdfd7ea6fab1")}catch{}})();var _i=globalThis.__DEV__!==!1;const Zf=Object.freeze(Object.defineProperty({__proto__:null,DEV:_i,InvariantError:$u,__DEV__:_i,global:Vu,invariant:ju,maybe:us,newInvariantError:qu},Symbol.toStringTag,{value:"Module"})),ed="16.13.2",td=Object.freeze({major:16,minor:13,patch:2,preReleaseTag:null});function dt(e){return typeof e?.then=="function"}const nd=5;function Yt(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const a=r.map(f=>`"${f}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}const s=a.slice(0,nd),u=s.pop();return i+s.join(", ")+", or "+u+"?"}function Ia(e){return e}function Ht(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function rn(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function $t(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function Xn(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),a=t.charCodeAt(r);if(dr(i)&&dr(a)){let s=0;do++n,s=s*10+i-Ei,i=e.charCodeAt(n);while(dr(i)&&s>0);let u=0;do++r,u=u*10+a-Ei,a=t.charCodeAt(r);while(dr(a)&&u>0);if(s<u)return-1;if(s>u)return 1}else{if(i<a)return-1;if(i>a)return 1;++n,++r}}return e.length-t.length}const Ei=48,rd=57;function dr(e){return!isNaN(e)&&Ei<=e&&e<=rd}function cn(e,t){const n=Object.create(null),r=new id(e),i=Math.floor(e.length*.4)+1;for(const a of t){const s=r.measure(a,i);s!==void 0&&(n[a]=s)}return Object.keys(n).sort((a,s)=>{const u=n[a]-n[s];return u!==0?u:Xn(a,s)})}
1class id{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=ka(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=ka(r),a=this._inputArray;if(i.length<a.length){const p=i;i=a,a=p}const s=i.length,u=a.length;if(s-u>n)return;const f=this._rows;for(let p=0;p<=u;p++)f[0][p]=p;for(let p=1;p<=s;p++){const _=f[(p-1)%3],T=f[p%3];let S=T[0]=p;for(let L=1;L<=u;L++){const B=i[p-1]===a[L-1]?0:1;let x=Math.min(_[L]+1,T[L-1]+1,_[L-1]+B);if(p>1&&L>1&&i[p-1]===a[L-2]&&i[p-2]===a[L-1]){const V=f[(p-2)%3][L-2];x=Math.min(x,V+1)}x<S&&(S=x),T[L]=x}if(S>n)return}const v=f[s%3][u];return v<=n?v:void 0}}function ka(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function It(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function Or(e,t){switch(e.kind){case w.NULL:return null;case w.INT:return parseInt(e.value,10);case w.FLOAT:return parseFloat(e.value);case w.STRING:case w.ENUM:case w.BOOLEAN:return e.value;case w.LIST:return e.values.map(n=>Or(n,t));case w.OBJECT:return rn(e.fields,n=>n.name.value,n=>Or(n.value,t));case w.VARIABLE:return t?.[e.name.value]}}function mt(e){if(e!=null||he(!1,"Must provide name."),typeof e=="string"||he(!1,"Expected name to be a string."),e.length===0)throw new R("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Qu(e.charCodeAt(t)))throw new R(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Uu(e.charCodeAt(0)))throw new R(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Is(e){if(e==="true"||e==="false"||e==="null")throw new R(`Enum values cannot be named: ${e}`);return mt(e)}function Zn(e){return pt(e)||ve(e)||be(e)||Be(e)||Me(e)||Se(e)||De(e)||ue(e)}function ad(e){if(!Zn(e))throw new Error(`Expected ${A(e)} to be a GraphQL type.`);return e}function pt(e){return xt(e,Ut)}function sd(e){if(!pt(e))throw new Error(`Expected ${A(e)} to be a GraphQL Scalar type.`);return e}function ve(e){return xt(e,wt)}function ks(e){if(!ve(e))throw new Error(`Expected ${A(e)} to be a GraphQL Object type.`);return e}function be(e){return xt(e,Dn)}function Ds(e){if(!be(e))throw new Error(`Expected ${A(e)} to be a GraphQL Interface type.`);return e}function Be(e){return xt(e,Rn)}function od(e){if(!Be(e))throw new Error(`Expected ${A(e)} to be a GraphQL Union type.`);return e}function Me(e){return xt(e,on)}function ud(e){if(!Me(e))throw new Error(`Expected ${A(e)} to be a GraphQL Enum type.`);return e}function Se(e){return xt(e,Fn)}function cd(e){if(!Se(e))throw new Error(`Expected ${A(e)} to be a GraphQL Input Object type.`);return e}function De(e){return xt(e,Ke)}function ld(e){if(!De(e))throw new Error(`Expected ${A(e)} to be a GraphQL List type.`);return e}function ue(e){return xt(e,le)}function fd(e){if(!ue(e))throw new Error(`Expected ${A(e)} to be a GraphQL Non-Null type.`);return e}function st(e){return pt(e)||Me(e)||Se(e)||er(e)&&st(e.ofType)}function dd(e){if(!st(e))throw new Error(`Expected ${A(e)} to be a GraphQL input type.`);return e}function sn(e){return pt(e)||ve(e)||be(e)||Be(e)||Me(e)||er(e)&&sn(e.ofType)}function md(e){if(!sn(e))throw new Error(`Expected ${A(e)} to be a GraphQL output type.`);return e}function qt(e){return pt(e)||Me(e)}function pd(e){if(!qt(e))throw new Error(`Expected ${A(e)} to be a GraphQL leaf type.`);return e}function Qt(e){return ve(e)||be(e)||Be(e)}function hd(e){if(!Qt(e))throw new Error(`Expected ${A(e)} to be a GraphQL composite type.`);return e}function jt(e){return be(e)||Be(e)}function vd(e){if(!jt(e))throw new Error(`Expected ${A(e)} to be a GraphQL abstract type.`);return e}class Ke{constructor(t){Zn(t)||he(!1,`Expected ${A(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}
1class le{constructor(t){Vr(t)||he(!1,`Expected ${A(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function er(e){return De(e)||ue(e)}function yd(e){if(!er(e))throw new Error(`Expected ${A(e)} to be a GraphQL wrapping type.`);return e}function Vr(e){return Zn(e)&&!ue(e)}function Rs(e){if(!Vr(e))throw new Error(`Expected ${A(e)} to be a GraphQL nullable type.`);return e}function Ai(e){if(e)return ue(e)?e.ofType:e}function tr(e){return pt(e)||ve(e)||be(e)||Be(e)||Me(e)||Se(e)}function gd(e){if(!tr(e))throw new Error(`Expected ${A(e)} to be a GraphQL named type.`);return e}function it(e){if(e){let t=e;for(;er(t);)t=t.ofType;return t}}function Ci(e){return typeof e=="function"?e():e}function Li(e){return typeof e=="function"?e():e}class Ut{constructor(t){var n,r,i,a;const s=(n=t.parseValue)!==null&&n!==void 0?n:Ia;this.name=mt(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Ia,this.parseValue=s,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(u,f)=>s(Or(u,f)),this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||he(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${A(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||he(!1,`${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.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||he(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){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:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class wt{constructor(t){var n;this.name=mt(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>As(t),this._interfaces=()=>Fs(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||he(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${A(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Ls(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Fs(e){var t;const n=Ci((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||he(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function As(e){const t=Li(e.fields);return kn(t)||he(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),$t(t,(n,r)=>{var i;kn(n)||he(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||he(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${A(n.resolve)}.`);const a=(i=n.args)!==null&&i!==void 0?i:{};return kn(a)||he(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:mt(r),description:n.description,type:n.type,args:Cs(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:It(n.extensions),astNode:n.astNode}})}function Cs(e){return Object.entries(e).map(([t,n])=>({name:mt(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:It(n.extensions),astNode:n.astNode}))}function kn(e){return St(e)&&!Array.isArray(e)}function Ls(e){return $t(e,t=>({description:t.description,type:t.type,args:Ms(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Ms(e){return rn(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function ln(e){return ue(e.type)&&e.defaultValue===void 0}class Dn{constructor(t){var n;this.name=mt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=As.bind(void 0,t),this._interfaces=Fs.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||he(!1,`${this.name} must provide "resolveType" as a function, but got: ${A(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Ls(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Rn{constructor(t){var n;this.name=mt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=bd.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||he(!1,`${this.name} must provide "resolveType" as a function, but got: ${A(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function bd(e){const t=Ci(e.types);return Array.isArray(t)||he(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class on{constructor(t){var n;this.name=mt(t.name),this.description=t.description,this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:Da(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=Da(this.name,this._values())
1),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=Ht(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));const n=this._valueLookup.get(t);if(n===void 0)throw new R(`Enum "${this.name}" cannot represent value: ${A(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=A(t);throw new R(`Enum "${this.name}" cannot represent non-string value: ${r}.`+mr(this,r))}const n=this.getValue(t);if(n==null)throw new R(`Value "${t}" does not exist in "${this.name}" enum.`+mr(this,t));return n.value}parseLiteral(t,n){if(t.kind!==w.ENUM){const i=ke(t);throw new R(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+mr(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=ke(t);throw new R(`Value "${i}" does not exist in "${this.name}" enum.`+mr(this,i),{nodes:t})}return r.value}toConfig(){const t=rn(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function mr(e,t){const n=e.getValues().map(i=>i.name),r=cn(t,n);return Yt("the enum value",r)}function Da(e,t){return kn(t)||he(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(kn(r)||he(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${A(r)}.`),{name:Is(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:It(r.extensions),astNode:r.astNode}))}class Fn{constructor(t){var n,r;this.name=mt(t.name),this.description=t.description,this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=_d.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=$t(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function _d(e){const t=Li(e.fields);return kn(t)||he(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),$t(t,(n,r)=>(!("resolve"in n)||he(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:mt(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:It(n.extensions),astNode:n.astNode}))}function jr(e){return ue(e.type)&&e.defaultValue===void 0}function Ir(e,t){return e===t?!0:ue(e)&&ue(t)||De(e)&&De(t)?Ir(e.ofType,t.ofType):!1}function _n(e,t,n){return t===n?!0:ue(n)?ue(t)?_n(e,t.ofType,n.ofType):!1:ue(t)?_n(e,t.ofType,n):De(n)?De(t)?_n(e,t.ofType,n.ofType):!1:De(t)?!1:jt(n)&&(be(t)||ve(t))&&e.isSubType(n,t)}function Ti(e,t,n){return t===n?!0:jt(t)?jt(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):jt(n)?e.isSubType(n,t):!1}const Nr=2147483647,Sr=-2147483648,Ps=new Ut({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(e){const t=rr(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new R(`Int cannot represent non-integer value: ${A(t)}`);if(n>Nr||n<Sr)throw new R("Int cannot represent non 32-bit signed integer value: "+A(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new R(`Int cannot represent non-integer value: ${A(e)}`);
1if(e>Nr||e<Sr)throw new R(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==w.INT)throw new R(`Int cannot represent non-integer value: ${ke(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>Nr||t<Sr)throw new R(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),$s=new Ut({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(e){const t=rr(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new R(`Float cannot represent non numeric value: ${A(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new R(`Float cannot represent non numeric value: ${A(e)}`);return e},parseLiteral(e){if(e.kind!==w.FLOAT&&e.kind!==w.INT)throw new R(`Float cannot represent non numeric value: ${ke(e)}`,e);return parseFloat(e.value)}}),Le=new Ut({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(e){const t=rr(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new R(`String cannot represent value: ${A(e)}`)},parseValue(e){if(typeof e!="string")throw new R(`String cannot represent a non string value: ${A(e)}`);return e},parseLiteral(e){if(e.kind!==w.STRING)throw new R(`String cannot represent a non string value: ${ke(e)}`,{nodes:e});return e.value}}),ot=new Ut({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=rr(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new R(`Boolean cannot represent a non boolean value: ${A(t)}`)},parseValue(e){if(typeof e!="boolean")throw new R(`Boolean cannot represent a non boolean value: ${A(e)}`);return e},parseLiteral(e){if(e.kind!==w.BOOLEAN)throw new R(`Boolean cannot represent a non boolean value: ${ke(e)}`,{nodes:e});return e.value}}),Mi=new Ut({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(e){const t=rr(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new R(`ID cannot represent value: ${A(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new R(`ID cannot represent value: ${A(e)}`)},parseLiteral(e){if(e.kind!==w.STRING&&e.kind!==w.INT)throw new R("ID cannot represent a non-string and non-integer value: "+ke(e),{nodes:e});return e.value}}),nr=Object.freeze([Le,Ps,$s,ot,Mi]);function qr(e){return nr.some(({name:t})=>e.name===t)}function rr(e){if(St(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!St(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Qr(e){return xt(e,Ct)}function Ed(e){if(!Qr(e))throw new Error(`Expected ${A(e)} to be a GraphQL directive.`);return e}class Ct{constructor(t){var n,r;this.name=mt(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=It(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||he(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};St(i)&&!Array.isArray(i)||he(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=Cs(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Ms(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Pi=new Ct({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[se.FIELD,se.FRAGMENT_SPREAD,se.INLINE_FRAGMENT],args:{if:{type:new le(ot),description:"Included when true."}}}),$i=new Ct({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[se.FIELD,se.FRAGMENT_SPREAD,se.INLINE_FRAGMENT],args:{if:{type:new le(ot),description:"Skipped when true."}}}),Vi="No longer supported",Ur=new Ct({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[se.FIELD_DEFINITION,se.ARGUMENT_DEFINITION,se.INPUT_FIELD_DEFINITION,se.ENUM_VALUE],args:{reason:{type:Le,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:Vi}}}),ji=new Ct({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[se.SCALAR],args:{url:{type:new le(Le),description:"The URL that specifies the behavior of this scalar."}}}),qi=new Ct({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[se.INPUT_OBJECT],args:{}}),fn=Object.freeze([Pi,$i,Ur,ji,qi]);function Qi(e){return fn.some(({name:t})=>t===e.name)}function Ui(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function an(e,t){if(ue(t)){const n=an(e,t.ofType);
1return n?.kind===w.NULL?null:n}if(e===null)return{kind:w.NULL};if(e===void 0)return null;if(De(t)){const n=t.ofType;if(Ui(e)){const r=[];for(const i of e){const a=an(i,n);a!=null&&r.push(a)}return{kind:w.LIST,values:r}}return an(e,n)}if(Se(t)){if(!St(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=an(e[r.name],r.type);i&&n.push({kind:w.OBJECT_FIELD,name:{kind:w.NAME,value:r.name},value:i})}return{kind:w.OBJECT,fields:n}}if(qt(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:w.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Ra.test(r)?{kind:w.INT,value:r}:{kind:w.FLOAT,value:r}}if(typeof n=="string")return Me(t)?{kind:w.ENUM,value:n}:t===Mi&&Ra.test(n)?{kind:w.INT,value:n}:{kind:w.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${A(n)}.`)}Ue(!1,"Unexpected input type: "+A(t))}const Ra=/^-?(?:0|[1-9][0-9]*)$/,xr=new wt({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Le,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new le(new Ke(new le(Tt))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new le(Tt),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Tt,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Tt,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new le(new Ke(new le(xi))),resolve:e=>e.getDirectives()}})}),xi=new wt({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. 2 3In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new le(Le),resolve:e=>e.name},description:{type:Le,resolve:e=>e.description},isRepeatable:{type:new le(ot),resolve:e=>e.isRepeatable},locations:{type:new le(new Ke(new le(Gi))),resolve:e=>e.locations},args:{type:new le(new Ke(new le(ir))),args:{includeDeprecated:{type:ot,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),Gi=new on({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:se.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:se.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:se.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:se.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:se.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:se.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:se.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:se.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:se.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:se.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:se.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:se.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:se.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:se.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:se.UNION,description:"Location adjacent to a union definition."},ENUM:{value:se.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:se.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:se.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:se.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Tt=new wt({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new le(zi),resolve(e){if(pt(e))return we.SCALAR;
3if(ve(e))return we.OBJECT;if(be(e))return we.INTERFACE;if(Be(e))return we.UNION;if(Me(e))return we.ENUM;if(Se(e))return we.INPUT_OBJECT;if(De(e))return we.LIST;if(ue(e))return we.NON_NULL;Ue(!1,`Unexpected type: "${A(e)}".`)}},name:{type:Le,resolve:e=>"name"in e?e.name:void 0},description:{type:Le,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Le,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Ke(new le(Bi)),args:{includeDeprecated:{type:ot,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ve(e)||be(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Ke(new le(Tt)),resolve(e){if(ve(e)||be(e))return e.getInterfaces()}},possibleTypes:{type:new Ke(new le(Tt)),resolve(e,t,n,{schema:r}){if(jt(e))return r.getPossibleTypes(e)}},enumValues:{type:new Ke(new le(Wi)),args:{includeDeprecated:{type:ot,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Me(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Ke(new le(ir)),args:{includeDeprecated:{type:ot,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Se(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Tt,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:ot,resolve:e=>{if(Se(e))return e.isOneOf}}})}),Bi=new wt({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new le(Le),resolve:e=>e.name},description:{type:Le,resolve:e=>e.description},args:{type:new le(new Ke(new le(ir))),args:{includeDeprecated:{type:ot,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new le(Tt),resolve:e=>e.type},isDeprecated:{type:new le(ot),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Le,resolve:e=>e.deprecationReason}})}),ir=new wt({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new le(Le),resolve:e=>e.name},description:{type:Le,resolve:e=>e.description},type:{type:new le(Tt),resolve:e=>e.type},defaultValue:{type:Le,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=an(n,t);return r?ke(r):null}},isDeprecated:{type:new le(ot),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Le,resolve:e=>e.deprecationReason}})}),Wi=new wt({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new le(Le),resolve:e=>e.name},description:{type:Le,resolve:e=>e.description},isDeprecated:{type:new le(ot),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Le,resolve:e=>e.deprecationReason}})});var we;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(we||(we={}));const zi=new on({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:we.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:we.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:we.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:we.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:we.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:we.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:we.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:we.NON_NULL,description:"Indicates this type is a
3non-null. `ofType` is a valid field."}}}),Wn={name:"__schema",type:new le(xr),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},zn={name:"__type",type:Tt,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new le(Le),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Yn={name:"__typename",type:new le(Le),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ar=Object.freeze([xr,xi,Gi,Tt,Bi,ir,Wi,zi]);function Nn(e){return ar.some(({name:t})=>e.name===t)}function Vs(e){return xt(e,Pn)}function Yi(e){if(!Vs(e))throw new Error(`Expected ${A(e)} to be a GraphQL schema.`);return e}class Pn{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,St(t)||he(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||he(!1,`"types" must be Array if provided but got: ${A(t.types)}.`),!t.directives||Array.isArray(t.directives)||he(!1,`"directives" must be Array if provided but got: ${A(t.directives)}.`),this.description=t.description,this.extensions=It(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:fn;const i=new Set(t.types);if(t.types!=null)for(const a of t.types)i.delete(a),Ft(a,i);this._queryType!=null&&Ft(this._queryType,i),this._mutationType!=null&&Ft(this._mutationType,i),this._subscriptionType!=null&&Ft(this._subscriptionType,i);for(const a of this._directives)if(Qr(a))for(const s of a.args)Ft(s.type,i);Ft(xr,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const a of i){if(a==null)continue;const s=a.name;if(s||he(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[s]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${s}".`);if(this._typeMap[s]=a,be(a)){for(const u of a.getInterfaces())if(be(u)){let f=this._implementationsMap[u.name];f===void 0&&(f=this._implementationsMap[u.name]={objects:[],interfaces:[]}),f.interfaces.push(a)}}else if(ve(a)){for(const u of a.getInterfaces())if(be(u)){let f=this._implementationsMap[u.name];f===void 0&&(f=this._implementationsMap[u.name]={objects:[],interfaces:[]}),f.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case ft.QUERY:return this.getQueryType();case ft.MUTATION:return this.getMutationType();case ft.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Be(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Be(t))for(const i of t.getTypes())r[i.name]=!0;else{const i=this.getImplementations(t);for(const a of i.objects)r[a.name]=!0;for(const a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function Ft(e,t){const n=it(e);if(!t.has(n)){if(t.add(n),Be(n))for(const r of n.getTypes())Ft(r,t);else if(ve(n)||be(n)){for(const r of n.getInterfaces())Ft(r,t);for(const r of Object.values(n.getFields())){Ft(r.type,t);for(const i of r.args)Ft(i.type,t)}}else if(Se(n))for(const r of Object.values(n.getFields()))Ft(r.type,t)}return t}function Hi(e){if(Yi(e),e.__validationErrors)return e.__validationErrors;const t=new Td(e);Nd(t),Sd(t),wd(t);const n=t.getErrors();return e.__validationErrors=n,n}function Ji(e){const t=Hi(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` 4 5`))}class Td{constructor(t){this._errors=[],this.schema=t}
5reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new R(t,{nodes:r}))}getErrors(){return this._errors}}function Nd(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!ve(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${A(n)}.`,(r=si(t,ft.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!ve(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${A(i)}.`,(a=si(t,ft.MUTATION))!==null&&a!==void 0?a:i.astNode)}const s=t.getSubscriptionType();if(s&&!ve(s)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${A(s)}.`,(u=si(t,ft.SUBSCRIPTION))!==null&&u!==void 0?u:s.astNode)}}function si(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r?.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function Sd(e){for(const n of e.schema.getDirectives()){if(!Qr(n)){e.reportError(`Expected directive but got: ${A(n)}.`,n?.astNode);continue}Tn(e,n),n.locations.length===0&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(const r of n.args)if(Tn(e,r),st(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${A(r.type)}.`,r.astNode),ln(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[Ki(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Tn(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}
5function wd(e){const t=Ad(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!tr(r)){e.reportError(`Expected GraphQL named type but got: ${A(r)}.`,r.astNode);continue}Nn(r)||Tn(e,r),ve(r)||be(r)?(Fa(e,r),Aa(e,r)):Be(r)?kd(e,r):Me(r)?Dd(e,r):Se(r)&&(Rd(e,r),t(r))}}function Fa(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){if(Tn(e,s),!sn(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Output Type but got: ${A(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}for(const u of s.args){const f=u.name;if(Tn(e,u),!st(u.type)){var i;e.reportError(`The type of ${t.name}.${s.name}(${f}:) must be Input Type but got: ${A(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if(ln(u)&&u.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${s.name}(${f}:) cannot be deprecated.`,[Ki(u.astNode),(a=u.astNode)===null||a===void 0?void 0:a.type])}}}}function Aa(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!be(r)){e.reportError(`Type ${A(t)} must only implement Interface types, it cannot implement ${A(r)}.`,Gn(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Gn(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,Gn(t,r));continue}n[r.name]=!0,Id(e,t,r),Od(e,t,r)}}function Od(e,t,n){const r=t.getFields();for(const f of Object.values(n.getFields())){const v=f.name,p=r[v];if(!p){e.reportError(`Interface field ${n.name}.${v} expected but ${t.name} does not provide it.`,[f.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!_n(e.schema,p.type,f.type)){var i,a;e.reportError(`Interface field ${n.name}.${v} expects type ${A(f.type)} but ${t.name}.${v} is type ${A(p.type)}.`,[(i=f.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(const _ of f.args){const T=_.name,S=p.args.find(L=>L.name===T);if(!S){e.reportError(`Interface field argument ${n.name}.${v}(${T}:) expected but ${t.name}.${v} does not provide it.`,[_.astNode,p.astNode]);continue}if(!Ir(_.type,S.type)){var s,u;e.reportError(`Interface field argument ${n.name}.${v}(${T}:) expects type ${A(_.type)} but ${t.name}.${v}(${T}:) is type ${A(S.type)}.`,[(s=_.astNode)===null||s===void 0?void 0:s.type,(u=S.astNode)===null||u===void 0?void 0:u.type])}}for(const _ of p.args){const T=_.name;!f.args.find(L=>L.name===T)&&ln(_)&&e.reportError(`Object field ${t.name}.${v} includes required argument ${T} that is missing from the Interface field ${n.name}.${v}.`,[_.astNode,f.astNode])}}}function Id(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...Gn(n,i),...Gn(t,n)])}function kd(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Ca(t,i.name));continue}r[i.name]=!0,ve(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${A(i)}.`,Ca(t,String(i)))}}function Dd(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)Tn(e,r)}function Rd(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const a of n){if(Tn(e,a),!st(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${A(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if(jr(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[Ki(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&Fd(t,a,e)}}
5function Fd(e,t,n){if(ue(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function Ad(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;const s=Object.values(a.getFields());for(const u of s)if(ue(u.type)&&Se(u.type.ofType)){const f=u.type.ofType,v=r[f.name];if(n.push(u),v===void 0)i(f);else{const p=n.slice(v),_=p.map(T=>T.name).join(".");e.reportError(`Cannot reference Input Object "${f.name}" within itself through a series of non-null fields: "${_}".`,p.map(T=>T.astNode))}n.pop()}r[a.name]=void 0}}function Gn(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var s;return(s=a.interfaces)!==null&&s!==void 0?s:[]}).filter(a=>a.name.value===t.name)}function Ca(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var s;return(s=a.types)!==null&&s!==void 0?s:[]}).filter(a=>a.name.value===t)}function Ki(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Ur.name)}function ut(e,t){switch(t.kind){case w.LIST_TYPE:{const n=ut(e,t.type);return n&&new Ke(n)}case w.NON_NULL_TYPE:{const n=ut(e,t.type);return n&&new le(n)}case w.NAMED_TYPE:return e.getType(t.name.value)}}class Xi{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??Cd,n&&(st(n)&&this._inputTypeStack.push(n),Qt(n)&&this._parentTypeStack.push(n),sn(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}
5getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const n=this._schema;switch(t.kind){case w.SELECTION_SET:{const i=it(this.getType());this._parentTypeStack.push(Qt(i)?i:void 0);break}case w.FIELD:{const i=this.getParentType();let a,s;i&&(a=this._getFieldDef(n,i,t),a&&(s=a.type)),this._fieldDefStack.push(a),this._typeStack.push(sn(s)?s:void 0);break}case w.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case w.OPERATION_DEFINITION:{const i=n.getRootType(t.operation);this._typeStack.push(ve(i)?i:void 0);break}case w.INLINE_FRAGMENT:case w.FRAGMENT_DEFINITION:{const i=t.typeCondition,a=i?ut(n,i):it(this.getType());this._typeStack.push(sn(a)?a:void 0);break}case w.VARIABLE_DEFINITION:{const i=ut(n,t.type);this._inputTypeStack.push(st(i)?i:void 0);break}case w.ARGUMENT:{var r;let i,a;const s=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();s&&(i=s.args.find(u=>u.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(st(a)?a:void 0);break}case w.LIST:{const i=Ai(this.getInputType()),a=De(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(st(a)?a:void 0);break}case w.OBJECT_FIELD:{const i=it(this.getInputType());let a,s;Se(i)&&(s=i.getFields()[t.name.value],s&&(a=s.type)),this._defaultValueStack.push(s?s.defaultValue:void 0),this._inputTypeStack.push(st(a)?a:void 0);break}case w.ENUM:{const i=it(this.getInputType());let a;Me(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}}}leave(t){switch(t.kind){case w.SELECTION_SET:this._parentTypeStack.pop();break;case w.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case w.DIRECTIVE:this._directive=null;break;case w.OPERATION_DEFINITION:case w.INLINE_FRAGMENT:case w.FRAGMENT_DEFINITION:this._typeStack.pop();break;case w.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case w.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case w.LIST:case w.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case w.ENUM:this._enumValue=null;break}}}function Cd(e,t,n){const r=n.name.value;if(r===Wn.name&&e.getQueryType()===t)return Wn;if(r===zn.name&&e.getQueryType()===t)return zn;if(r===Yn.name&&Qt(t))return Yn;if(ve(t)||be(t))return t.getFields()[r]}function Zi(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=pi(t,r.kind).enter;if(i){const a=i.apply(t,n);return a!==void 0&&(e.leave(r),xu(a)&&e.enter(a)),a}},leave(...n){const r=n[0],i=pi(t,r.kind).leave;let a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}function js(e){return{Document(t){for(const n of t.definitions)if(!cs(n)){const r=n.kind===w.SCHEMA_DEFINITION||n.kind===w.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new R(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function qs(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),a=t.name.value;let s=Yt("to use an inline fragment on",Ld(i,n,a));s===""&&(s=Yt(Md(n,a))),e.reportError(new R(`Cannot query field "${a}" on type "${n.name}".`+s,{nodes:t}))}}}}function Ld(e,t,n){if(!jt(t))return[];const r=new Set,i=Object.create(null);for(const s of e.getPossibleTypes(t))if(s.getFields()[n]){r.add(s),i[s.name]=1;for(const u of s.getInterfaces()){var a;u.getFields()[n]&&(r.add(u),i[u.name]=((a=i[u.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((s,u)=>{const f=i[u.name]-i[s.name];return f!==0?f:be(s)&&e.isSubType(s,u)?-1:be(u)&&e.isSubType(u,s)?1:Xn(s.name,u.name)}).map(s=>s.name)}function Md(e,t){if(ve(e)||be(e)){const n=Object.keys(e.getFields());return cn(t,n)}return[]}function Qs(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=ut(e.getSchema(),n);if(r&&!Qt(r)){const i=ke(n);e.reportError(new R(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=ut(e.getSchema(),t.typeCondition);if(n&&!Qt(n)){const r=ke(t.typeCondition);e.reportError(new R(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function Us(e){return{...xs(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const a=t.name.value,s=r.args.map(f=>f.name),u=cn(a,s);e.reportError(new R(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+Yt(u),{nodes:t}))}}}}function xs(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():fn;for(const s of r)t[s.name]=s.args.map(u=>u.name);const i=e.getDocument().definitions;for(const s of i)if(s.kind===w.DIRECTIVE_DEFINITION){var a;const u=(a=s.arguments)!==null&&a!==void 0?a:[];t[s.name.value]=u.map(f=>f.name.value)}return{Directive(s){const u=s.name.value,f=t[u];if(s.arguments&&f)for(const v of s.arguments){const p=v.name.value;if(!f.includes(p)){const _=cn(p,f);e.reportError(new R(`Unknown argument "${p}" on directive "@${u}".`+Yt(_),{nodes:v}))}}return!1}}}function ea(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():fn;for(const a of r)t[a.name]=a.locations;const i=e.getDocument().definitions;for(const a of i)a.kind===w.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(s=>s.value));return{Directive(a,s,u,f,v){const p=a.name.value,_=t[p];if(!_){e.reportError(new R(`Unknown directive "@${p}".`,{nodes:a}));return}const T=Pd(v);T&&!_.includes(T)&&e.reportError(new R(`Directive "@${p}" may not be used on ${T}.`,{nodes:a}))}}}function Pd(e){const t=e[e.length-1];
5switch("kind"in t||Ue(!1),t.kind){case w.OPERATION_DEFINITION:return $d(t.operation);case w.FIELD:return se.FIELD;case w.FRAGMENT_SPREAD:return se.FRAGMENT_SPREAD;case w.INLINE_FRAGMENT:return se.INLINE_FRAGMENT;case w.FRAGMENT_DEFINITION:return se.FRAGMENT_DEFINITION;case w.VARIABLE_DEFINITION:return se.VARIABLE_DEFINITION;case w.SCHEMA_DEFINITION:case w.SCHEMA_EXTENSION:return se.SCHEMA;case w.SCALAR_TYPE_DEFINITION:case w.SCALAR_TYPE_EXTENSION:return se.SCALAR;case w.OBJECT_TYPE_DEFINITION:case w.OBJECT_TYPE_EXTENSION:return se.OBJECT;case w.FIELD_DEFINITION:return se.FIELD_DEFINITION;case w.INTERFACE_TYPE_DEFINITION:case w.INTERFACE_TYPE_EXTENSION:return se.INTERFACE;case w.UNION_TYPE_DEFINITION:case w.UNION_TYPE_EXTENSION:return se.UNION;case w.ENUM_TYPE_DEFINITION:case w.ENUM_TYPE_EXTENSION:return se.ENUM;case w.ENUM_VALUE_DEFINITION:return se.ENUM_VALUE;case w.INPUT_OBJECT_TYPE_DEFINITION:case w.INPUT_OBJECT_TYPE_EXTENSION:return se.INPUT_OBJECT;case w.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||Ue(!1),n.kind===w.INPUT_OBJECT_TYPE_DEFINITION?se.INPUT_FIELD_DEFINITION:se.ARGUMENT_DEFINITION}default:Ue(!1,"Unexpected kind: "+A(t.kind))}}function $d(e){switch(e){case ft.QUERY:return se.QUERY;case ft.MUTATION:return se.MUTATION;case ft.SUBSCRIPTION:return se.SUBSCRIPTION}}function Gs(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new R(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function ta(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const a of e.getDocument().definitions)Jn(a)&&(r[a.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,s,u,f,v){const p=a.name.value;if(!n[p]&&!r[p]){var _;const T=(_=v[2])!==null&&_!==void 0?_:u,S=T!=null&&Vd(T);if(S&&La.includes(p))return;const L=cn(p,S?La.concat(i):i);e.reportError(new R(`Unknown type "${p}".`+Yt(L),{nodes:a}))}}}}const La=[...nr,...ar].map(e=>e.name);function Vd(e){return"kind"in e&&(ls(e)||fs(e))}function Bs(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===w.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new R("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function Ws(e){var t,n,r;const 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();let s=0;return{SchemaDefinition(u){if(a){e.reportError(new R("Cannot define a new schema within a schema extension.",{nodes:u}));return}s>0&&e.reportError(new R("Must provide only one schema definition.",{nodes:u})),++s}}}const jd=3;function zs(e){function t(n,r=Object.create(null),i=0){if(n.kind===w.FRAGMENT_SPREAD){const a=n.name.value;if(r[a]===!0)return!1;const s=e.getFragment(a);if(!s)return!1;try{return r[a]=!0,t(s,r,i)}finally{r[a]=void 0}}if(n.kind===w.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=jd))return!0;if("selectionSet"in n&&n.selectionSet){for(const a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new R("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function Ys(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;const s=a.name.value;t[s]=!0;const u=e.getFragmentSpreads(a.selectionSet);if(u.length!==0){r[s]=n.length;for(const f of u){const v=f.name.value,p=r[v];if(n.push(f),p===void 0){const _=e.getFragment(v);_&&i(_)}else{const _=n.slice(p),T=_.slice(0,-1).map(S=>'"'+S.name.value+'"').join(", ");e.reportError(new R(`Cannot spread fragment "${v}" within itself`+(T!==""?` via ${T}.`:"."),{nodes:_}))}n.pop()}r[s]=void 0}}}function Hs(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const a=i.name.value;t[a]!==!0&&e.reportError(new R(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Js(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(const i of n){const a=i.name.value;r[a]!==!0&&e.reportError(new R(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}function Ks(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:a}of i)r[a.name.value]=!0;for(const a of t){const s=a.variable.name.value;r[s]!==!0&&e.reportError(new R(n.name?`Variable "$${s}" is never used in operation "${n.name.value}".`:`Variable "$${s}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}function Gr(e){switch(e.kind){case w.OBJECT:return{...e,fields:qd(e.fields)};case w.LIST:return{...e,values:e.values.map(Gr)};case w.INT:case w.FLOAT:case w.STRING:case w.BOOLEAN:case w.NULL:case w.ENUM:case w.VARIABLE:return e}}function qd(e){return e.map(t=>({...t,value:Gr(t.value)})).sort((t,n)=>Xn(t.name.value,n.name.value))}function Xs(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Xs(n)).join(" and "):e}function Zs(e){const t=new no,n=new Wd,r=new Map;return{SelectionSet(i){const a=Qd(e,r,t,n,e.getParentType(),i);for(const[[s,u],f,v]of a){const p=Xs(u);e.reportError(new R(`Fields "${s}" conflict because ${p}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:f.concat(v)}))}}}}function Qd(e,t,n,r,i,a){const s=[],[u,f]=Rr(e,t,i,a);if(xd(e,s,t,n,r,u),f.length!==0)for(let v=0;v<f.length;v++){kr(e,s,t,n,r,!1,u,f[v]);for(let p=v+1;p<f.length;p++)Dr(e,s,t,n,r,!1,f[v],f[p])}return s}function kr(e,t,n,r,i,a,s,u){if(r.has(s,u,a))return;r.add(s,u,a);const f=e.getFragment(u);if(!f)return;const[v,p]=Si(e,n,f);if(s!==v){na(e,t,n,r,i,a,s,v);for(const _ of p)kr(e,t,n,r,i,a,s,_)}}function Dr(e,t,n,r,i,a,s,u){if(s===u||i.has(s,u,a))return;i.add(s,u,a);const f=e.getFragment(s),v=e.getFragment(u);if(!f||!v)return;const[p,_]=Si(e,n,f),[T,S]=Si(e,n,v);na(e,t,n,r,i,a,p,T);for(const L of S)Dr(e,t,n,r,i,a,s,L);for(const L of _)Dr(e,t,n,r,i,a,L,u)}function Ud(e,t,n,r,i,a,s,u,f){const v=[],[p,_]=Rr(e,t,a,s),[T,S]=Rr(e,t,u,f);na(e,v,t,n,r,i,p,T);for(const L of S)kr(e,v,t,n,r,i,p,L);for(const L of _)kr(e,v,t,n,r,i,T,L);for(const L of _)for(const B of S)Dr(e,v,t,n,r,i,L,B);return v}function xd(e,t,n,r,i,a){for(const[s,u]of Object.entries(a))if(u.length>1)for(let f=0;f<u.length;f++)for(let v=f+1;v<u.length;v++){const p=eo(e,n,r,i,!1,s,u[f],u[v]);p&&t.push(p)}}function na(e,t,n,r,i,a,s,u){for(const[f,v]of Object.entries(s)){const p=u[f];if(p)for(const _ of v)for(const T of p){const S=eo(e,n,r,i,a,f,_,T);
5S&&t.push(S)}}}function eo(e,t,n,r,i,a,s,u){const[f,v,p]=s,[_,T,S]=u,L=i||f!==_&&ve(f)&&ve(_);if(!L){const I=v.name.value,j=T.name.value;if(I!==j)return[[a,`"${I}" and "${j}" are different fields`],[v],[T]];if(!Gd(v,T))return[[a,"they have differing arguments"],[v],[T]]}const B=p?.type,x=S?.type;if(B&&x&&Ni(B,x))return[[a,`they return conflicting types "${A(B)}" and "${A(x)}"`],[v],[T]];const V=v.selectionSet,k=T.selectionSet;if(V&&k){const I=Ud(e,t,n,r,L,it(B),V,it(x),k);return Bd(I,a,v,T)}}function Gd(e,t){const n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return!1;const i=new Map(r.map(({name:a,value:s})=>[a.value,s]));return n.every(a=>{const s=a.value,u=i.get(a.name.value);return u===void 0?!1:Ma(s)===Ma(u)})}function Ma(e){return ke(Gr(e))}function Ni(e,t){return De(e)?De(t)?Ni(e.ofType,t.ofType):!0:De(t)?!0:ue(e)?ue(t)?Ni(e.ofType,t.ofType):!0:ue(t)?!0:qt(e)||qt(t)?e!==t:!1}function Rr(e,t,n,r){const i=t.get(r);if(i)return i;const a=Object.create(null),s=Object.create(null);to(e,n,r,a,s);const u=[a,Object.keys(s)];return t.set(r,u),u}function Si(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=ut(e.getSchema(),n.typeCondition);return Rr(e,t,i,n.selectionSet)}function to(e,t,n,r,i){for(const a of n.selections)switch(a.kind){case w.FIELD:{const s=a.name.value;let u;(ve(t)||be(t))&&(u=t.getFields()[s]);const f=a.alias?a.alias.value:s;r[f]||(r[f]=[]),r[f].push([t,a,u]);break}case w.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case w.INLINE_FRAGMENT:{const s=a.typeCondition,u=s?ut(e.getSchema(),s):t;to(e,u,a.selectionSet,r,i);break}}}function Bd(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class no{constructor(){this._data=new Map}has(t,n,r){var i;const a=(i=this._data.get(t))===null||i===void 0?void 0:i.get(n);return a===void 0?!1:r?!0:r===a}add(t,n,r){const i=this._data.get(t);i===void 0?this._data.set(t,new Map([[n,r]])):i.set(n,r)}}class Wd{constructor(){this._orderedPairSet=new no}has(t,n,r){return t<n?this._orderedPairSet.has(t,n,r):this._orderedPairSet.has(n,t,r)}add(t,n,r){t<n?this._orderedPairSet.add(t,n,r):this._orderedPairSet.add(n,t,r)}}function ro(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(Qt(n)&&Qt(r)&&!Ti(e.getSchema(),n,r)){const i=A(r),a=A(n);e.reportError(new R(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=zd(e,n),i=e.getParentType();if(r&&i&&!Ti(e.getSchema(),r,i)){const a=A(i),s=A(r);e.reportError(new R(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${s}".`,{nodes:t}))}}}}function zd(e,t){const n=e.getFragment(t);if(n){const r=ut(e.getSchema(),n.typeCondition);if(Qt(r))return r}}function io(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)Jn(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){const a=i.name.value,s=n[a],u=t?.getType(a);let f;if(s?f=Yd[s.kind]:u&&(f=Hd(u)),f){if(f!==i.kind){const v=Jd(i.kind);e.reportError(new R(`Cannot extend non-${v} type "${a}".`,{nodes:s?[s,i]:i}))}}else{const v=Object.keys({...n,...t?.getTypeMap()}),p=cn(a,v);e.reportError(new R(`Cannot extend type "${a}" because it is not defined.`+Yt(p),{nodes:i.name}))}}}const Yd={[w.SCALAR_TYPE_DEFINITION]:w.SCALAR_TYPE_EXTENSION,[w.OBJECT_TYPE_DEFINITION]:w.OBJECT_TYPE_EXTENSION,[w.INTERFACE_TYPE_DEFINITION]:w.INTERFACE_TYPE_EXTENSION,[w.UNION_TYPE_DEFINITION]:w.UNION_TYPE_EXTENSION,[w.ENUM_TYPE_DEFINITION]:w.ENUM_TYPE_EXTENSION,[w.INPUT_OBJECT_TYPE_DEFINITION]:w.INPUT_OBJECT_TYPE_EXTENSION};function Hd(e){if(pt(e))return w.SCALAR_TYPE_EXTENSION;if(ve(e))return w.OBJECT_TYPE_EXTENSION;if(be(e))return w.INTERFACE_TYPE_EXTENSION;if(Be(e))return w.UNION_TYPE_EXTENSION;if(Me(e))return w.ENUM_TYPE_EXTENSION;if(Se(e))return w.INPUT_OBJECT_TYPE_EXTENSION;Ue(!1,"Unexpected type: "+A(e))}function Jd(e){switch(e){case w.SCALAR_TYPE_EXTENSION:return"scalar";case w.OBJECT_TYPE_EXTENSION:return"object";case w.INTERFACE_TYPE_EXTENSION:return"interface";case w.UNION_TYPE_EXTENSION:return"union";case w.ENUM_TYPE_EXTENSION:return"enum";
5case w.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:Ue(!1,"Unexpected kind: "+A(e))}}function ao(e){return{...so(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(const a of r.args)if(!i.has(a.name)&&ln(a)){const s=A(a.type);e.reportError(new R(`Field "${r.name}" argument "${a.name}" of type "${s}" is required, but it was not provided.`,{nodes:t}))}}}}}function so(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r?.getDirectives())!==null&&t!==void 0?t:fn;for(const u of i)n[u.name]=Ht(u.args.filter(ln),f=>f.name);const a=e.getDocument().definitions;for(const u of a)if(u.kind===w.DIRECTIVE_DEFINITION){var s;const f=(s=u.arguments)!==null&&s!==void 0?s:[];n[u.name.value]=Ht(f.filter(Kd),v=>v.name.value)}return{Directive:{leave(u){const f=u.name.value,v=n[f];if(v){var p;const _=(p=u.arguments)!==null&&p!==void 0?p:[],T=new Set(_.map(S=>S.name.value));for(const[S,L]of Object.entries(v))if(!T.has(S)){const B=Zn(L.type)?A(L.type):ke(L.type);e.reportError(new R(`Directive "@${f}" argument "${S}" of type "${B}" is required, but it was not provided.`,{nodes:u}))}}}}}}function Kd(e){return e.type.kind===w.NON_NULL_TYPE&&e.defaultValue==null}function oo(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(qt(it(n))){if(r){const i=t.name.value,a=A(n);e.reportError(new R(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(r){if(r.selections.length===0){const i=t.name.value,a=A(n);e.reportError(new R(`Field "${i}" of type "${a}" must have at least one field selected.`,{nodes:t}))}}else{const i=t.name.value,a=A(n);e.reportError(new R(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}function uo(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function An(e,t,n){return{prev:e,key:t,typename:n}}function rt(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function co(e,t,n=Xd){return Un(e,t,n,void 0)}function Xd(e,t,n){let r="Invalid value "+A(t);throw e.length>0&&(r+=` at "value${uo(e)}"`),n.message=r+": "+n.message,n}function Un(e,t,n,r){if(ue(t)){if(e!=null)return Un(e,t.ofType,n,r);n(rt(r),e,new R(`Expected non-nullable type "${A(t)}" not to be null.`));return}if(e==null)return null;if(De(t)){const i=t.ofType;return Ui(e)?Array.from(e,(a,s)=>{const u=An(r,s,void 0);return Un(a,i,n,u)}):[Un(e,i,n,r)]}if(Se(t)){if(!St(e)||Array.isArray(e)){n(rt(r),e,new R(`Expected type "${t.name}" to be an object.`));return}const i=Object.create(null),a=t.getFields();for(const s of Object.values(a)){const u=e[s.name];if(u===void 0){if(s.defaultValue!==void 0)i[s.name]=s.defaultValue;else if(ue(s.type)){const f=A(s.type);n(rt(r),e,new R(`Field "${s.name}" of required type "${f}" was not provided.`))}continue}i[s.name]=Un(u,s.type,n,An(r,s.name,t.name))}for(const s of Object.keys(e))if(!a[s]){const u=cn(s,Object.keys(t.getFields()));n(rt(r),e,new R(`Field "${s}" is not defined by type "${t.name}".`+Yt(u)))}if(t.isOneOf){const s=Object.keys(i);s.length!==1&&n(rt(r),e,new R(`Exactly one key must be specified for OneOf type "${t.name}".`));const u=s[0],f=i[u];f===null&&n(rt(r).concat(u),f,new R(`Field "${u}" must be non-null.`))}return{...i}}if(qt(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof R?n(rt(r),e,a):n(rt(r),e,new R(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n(rt(r),e,new R(`Expected type "${t.name}".`)),i}Ue(!1,"Unexpected input type: "+A(t))}function Vt(e,t,n){if(e){if(e.kind===w.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&ue(t)?void 0:i}if(ue(t))return e.kind===w.NULL?void 0:Vt(e,t.ofType,n);if(e.kind===w.NULL)return null;if(De(t)){const r=t.ofType;if(e.kind===w.LIST){const a=[];for(const s of e.values)if(Pa(s,n)){if(ue(r))return;a.push(null)}else{const u=Vt(s,r,n);if(u===void 0)return;a.push(u)}return a}const i=Vt(e,r,n);return i===void 0?void 0:[i]}if(Se(t)){if(e.kind!==w.OBJECT)return;const r=Object.create(null),i=Ht(e.fields,a=>a.name.value);for(const a of Object.values(t.getFields())){const s=i[a.name];
5if(!s||Pa(s.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if(ue(a.type))return;continue}const u=Vt(s.value,a.type,n);if(u===void 0)return;r[a.name]=u}if(t.isOneOf){const a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if(qt(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}Ue(!1,"Unexpected input type: "+A(t))}}function Pa(e,t){return e.kind===w.VARIABLE&&(t==null||t[e.name.value]===void 0)}function lo(e,t,n,r){const i=[],a=r?.maxErrors;try{const s=Zd(e,t,n,u=>{if(a!=null&&i.length>=a)throw new R("Too many errors processing variables, error limit reached. Execution aborted.");i.push(u)});if(i.length===0)return{coerced:s}}catch(s){i.push(s)}return{errors:i}}function Zd(e,t,n,r){const i=Object.create(null);for(const a of t){const s=a.variable.name.value,u=ut(e,a.type);if(!st(u)){const v=ke(a.type);r(new R(`Variable "$${s}" expected value of type "${v}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!fo(n,s)){if(a.defaultValue)i[s]=Vt(a.defaultValue,u);else if(ue(u)){const v=A(u);r(new R(`Variable "$${s}" of required type "${v}" was not provided.`,{nodes:a}))}continue}const f=n[s];if(f===null&&ue(u)){const v=A(u);r(new R(`Variable "$${s}" of non-null type "${v}" must not be null.`,{nodes:a}));continue}i[s]=co(f,u,(v,p,_)=>{let T=`Variable "$${s}" got invalid value `+A(p);v.length>0&&(T+=` at "${s}${uo(v)}"`),r(new R(T+"; "+_.message,{nodes:a,originalError:_}))})}return{...i}}function Br(e,t,n){var r;const i=Object.create(null),a=(r=t.arguments)!==null&&r!==void 0?r:[],s=Ht(a,u=>u.name.value);for(const u of e.args){const f=u.name,v=u.type,p=s[f];if(!p){if(u.defaultValue!==void 0)i[f]=u.defaultValue;else if(ue(v))throw new R(`Argument "${f}" of required type "${A(v)}" was not provided.`,{nodes:t});continue}const _=p.value;let T=_.kind===w.NULL;if(_.kind===w.VARIABLE){const L=_.name.value;if(n==null||!fo(n,L)){if(u.defaultValue!==void 0)i[f]=u.defaultValue;else if(ue(v))throw new R(`Argument "${f}" of required type "${A(v)}" was provided the variable "$${L}" which was not provided a runtime value.`,{nodes:_});continue}T=n[L]==null}if(T&&ue(v))throw new R(`Argument "${f}" of non-null type "${A(v)}" must not be null.`,{nodes:_});const S=Vt(_,v,n);if(S===void 0)throw new R(`Argument "${f}" has invalid value ${ke(_)}.`,{nodes:_});i[f]=S}return{...i}}function Cn(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return Br(e,i,n)}function fo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ra(e,t,n,r,i){const a=new Map;return Fr(e,t,n,r,i,a,new Set),a}function em(e,t,n,r,i){const a=new Map,s=new Set;for(const u of i)u.selectionSet&&Fr(e,t,n,r,u.selectionSet,a,s);return a}function Fr(e,t,n,r,i,a,s){for(const u of i.selections)switch(u.kind){case w.FIELD:{if(!oi(n,u))continue;const f=tm(u),v=a.get(f);v!==void 0?v.push(u):a.set(f,[u]);break}case w.INLINE_FRAGMENT:{if(!oi(n,u)||!$a(e,u,r))continue;Fr(e,t,n,r,u.selectionSet,a,s);break}case w.FRAGMENT_SPREAD:{const f=u.name.value;if(s.has(f)||!oi(n,u))continue;s.add(f);const v=t[f];if(!v||!$a(e,v,r))continue;Fr(e,t,n,r,v.selectionSet,a,s);break}}}function oi(e,t){const n=Cn($i,t,e);if(n?.if===!0)return!1;const r=Cn(Pi,t,e);return r?.if!==!1}function $a(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=ut(e,r);return i===n?!0:jt(i)?e.isSubType(i,n):!1}function tm(e){return e.alias?e.alias.value:e.name.value}function mo(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,a=Object.create(null),s=e.getDocument(),u=Object.create(null);for(const v of s.definitions)v.kind===w.FRAGMENT_DEFINITION&&(u[v.name.value]=v);const f=ra(n,u,a,r,t.selectionSet);if(f.size>1){const _=[...f.values()].slice(1).flat();e.reportError(new R(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:_}))}for(const v of f.values())v[0].name.value.startsWith("__")&&e.reportError(new R(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:v}))}}}}}function ia(e,t){const n=new Map;for(const r of e){const i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}function po(e){return{DirectiveDefinition(r){var i;const a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;const a=r.name.value,s=(i=r.fields)!==null&&i!==void 0?i:[];for(const f of s){var u;const v=f.name.value,p=(u=f.arguments)!==null&&u!==void 0?u:[];n(`${a}.${v}`,p)}return!1}function n(r,i){const a=ia(i,s=>s.name.value);for(const[s,u]of a)u.length>1&&e.reportError(new R(`Argument "${r}(${s}:)" can only be defined once.`,{nodes:u.map(f=>f.name)}));return!1}}function aa(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],a=ia(i,s=>s.name.value);for(const[s,u]of a)u.length>1&&e.reportError(new R(`There can be only one argument named "${s}".`,{nodes:u.map(f=>f.name)}))}}function ho(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new R(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new R(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function sa(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():fn;for(const u of r)t[u.name]=!u.isRepeatable;const i=e.getDocument().definitions;for(const u of i)u.kind===w.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);const a=Object.create(null),s=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let f;if(u.kind===w.SCHEMA_DEFINITION||u.kind===w.SCHEMA_EXTENSION)f=a;else if(Jn(u)||Di(u)){const v=u.name.value;f=s[v],f===void 0&&(s[v]=f=Object.create(null))}else f=Object.create(null);for(const v of u.directives){const p=v.name.value;t[p]&&(f[p]?e.reportError(new R(`The directive "@${p}" can only be used once at this location.`,{nodes:[f[p],v]})):f[p]=v)}}}}function vo(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var s;const u=a.name.value;r[u]||(r[u]=Object.create(null));const f=(s=a.values)!==null&&s!==void 0?s:[],v=r[u];for(const p of f){const _=p.name.value,T=n[u];Me(T)&&T.getValue(_)?e.reportError(new R(`Enum value "${u}.${_}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):v[_]?e.reportError(new R(`Enum value "${u}.${_}" can only be defined once.`,{nodes:[v[_],p.name]})):v[_]=p.name}return!1}}function yo(e){const 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 s;const u=a.name.value;r[u]||(r[u]=Object.create(null));const f=(s=a.fields)!==null&&s!==void 0?s:[],v=r[u];for(const p of f){const _=p.name.value;nm(n[u],_)?e.reportError(new R(`Field "${u}.${_}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):v[_]?e.reportError(new R(`Field "${u}.${_}" can only be defined once.`,{nodes:[v[_],p.name]})):v[_]=p.name}return!1}}function nm(e,t){return ve(e)||be(e)||Se(e)?e.getFields()[t]!=null:!1}function go(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new R(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function oa(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||Ue(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new R(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function bo(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new R(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function _o(e){const 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){var s;const u=(s=a.operationTypes)!==null&&s!==void 0?s:[];for(const f of u){const v=f.operation,p=n[v];r[v]?e.reportError(new R(`Type for ${v} already defined in the schema. It cannot be redefined.`,{nodes:f})):p?e.reportError(new R(`There can be only one ${v} type in schema.`,{nodes:[p,f]})):n[v]=f}return!1}}function Eo(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new R(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new R(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}function To(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=ia(r,a=>a.variable.name.value);for(const[a,s]of i)s.length>1&&e.reportError(new R(`There can be only one variable named "$${a}".`,{nodes:s.map(u=>u.variable.name)}))}}}function No(e){return{ListValue(t){const n=Ai(e.getParentInputType());if(!De(n))return yn(e,t),!1},ObjectValue(t){const n=it(e.getInputType());if(!Se(n))return yn(e,t),!1;const r=Ht(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&jr(i)){const s=A(i.type);e.reportError(new R(`Field "${n.name}.${i.name}" of required type "${s}" was not provided.`,{nodes:t}))}n.isOneOf&&rm(e,t,n,r)},ObjectField(t){const n=it(e.getParentInputType());if(!e.getInputType()&&Se(n)){const i=cn(t.name.value,Object.keys(n.getFields()));e.reportError(new R(`Field "${t.name.value}" is not defined by type "${n.name}".`+Yt(i),{nodes:t}))}}
5,NullValue(t){const n=e.getInputType();ue(n)&&e.reportError(new R(`Expected value of type "${A(n)}", found ${ke(t)}.`,{nodes:t}))},EnumValue:t=>yn(e,t),IntValue:t=>yn(e,t),FloatValue:t=>yn(e,t),StringValue:t=>yn(e,t),BooleanValue:t=>yn(e,t)}}function yn(e,t){const n=e.getInputType();if(!n)return;const r=it(n);if(!qt(r)){const i=A(n);e.reportError(new R(`Expected value of type "${i}", found ${ke(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const a=A(n);e.reportError(new R(`Expected value of type "${a}", found ${ke(t)}.`,{nodes:t}))}}catch(i){const a=A(n);i instanceof R?e.reportError(i):e.reportError(new R(`Expected value of type "${a}", found ${ke(t)}; `+i.message,{nodes:t,originalError:i}))}}function rm(e,t,n,r){var i;const a=Object.keys(r);if(a.length!==1){e.reportError(new R(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}const u=(i=r[a[0]])===null||i===void 0?void 0:i.value;(!u||u.kind===w.NULL)&&e.reportError(new R(`Field "${n.name}.${a[0]}" must be non-null.`,{nodes:[t]}))}function So(e){return{VariableDefinition(t){const n=ut(e.getSchema(),t.type);if(n!==void 0&&!st(n)){const r=t.variable.name.value,i=ke(t.type);e.reportError(new R(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function wo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:a,defaultValue:s,parentType:u}of r){const f=i.name.value,v=t[f];if(v&&a){const p=e.getSchema(),_=ut(p,v.type);if(_&&!im(p,_,v.defaultValue,a,s)){const T=A(_),S=A(a);e.reportError(new R(`Variable "$${f}" of type "${T}" used in position expecting type "${S}".`,{nodes:[v,i]}))}Se(u)&&u.isOneOf&&Vr(_)&&e.reportError(new R(`Variable "$${f}" is of type "${_}" but must be non-nullable to be used for OneOf Input Object "${u}".`,{nodes:[v,i]}))}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function im(e,t,n,r,i){if(ue(r)&&!ue(t)){if(!(n!=null&&n.kind!==w.NULL)&&!(i!==void 0))return!1;const u=r.ofType;return _n(e,t,u)}return _n(e,t,r)}const Oo=Object.freeze([zs]),Io=Object.freeze([js,bo,Bs,mo,ta,Qs,So,oo,qs,go,Gs,Js,ro,Ys,To,Hs,Ks,ea,sa,Us,aa,No,ao,wo,Zs,oa,...Oo]),am=Object.freeze([Ws,_o,Eo,vo,yo,po,ho,ta,ea,sa,io,xs,aa,oa,so]);class ko{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===w.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const a of i.selections)a.kind===w.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let a;for(;a=i.pop();)for(const s of this.getFragmentSpreads(a)){const u=s.name.value;if(r[u]!==!0){r[u]=!0;const f=this.getFragment(u);f&&(n.push(f),i.push(f.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class sm extends ko{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Do extends ko{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new Xi(this._schema);Mn(t,Zi(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue(),parentType:i.getParentInputType()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}const om=$t(Gu,e=>e.filter(t=>t!=="description"));function Ro(e,t,n=Io,r,i=new Xi(e)){var a;const s=(a=r?.maxErrors)!==null&&a!==void 0?a:100;t||he(!1,"Must provide document."),Ji(e);const u=Object.freeze({}),f=[],v=new Do(e,t,i,_=>{if(f.length>=s)throw f.push(new R("Too many validation errors, error limit reached. Validation aborted.")),u;f.push(_)}),p=Ri(n.map(_=>_(v)));try{Mn(t,Zi(i,p),om)}catch(_){if(_!==u)throw _}return f}function Fo(e,t,n=am){const r=[],i=new sm(e,t,s=>{r.push(s)}),a=n.map(s=>s(i));return Mn(e,Ri(a)),r}function um(e){const t=Fo(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` 6 7`))}function cm(e,t){const n=Fo(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` 8 9`))}function lm(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let s=t.get(r);s===void 0&&(s=new WeakMap,t.set(r,s));let u=s.get(i);u===void 0&&(u=new WeakMap,s.set(i,u));let f=u.get(a);return f===void 0&&(f=e(r,i,a),u.set(a,f)),f}}function Va(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}function fm(e,t,n){let r=n;for(const i of e)r=dt(r)?r.then(a=>t(a,i)):t(r,i);return r}function dm(e){return e instanceof Error?e:new mm(e)}
9class mm extends Error{constructor(t){super("Unexpected error value: "+A(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Ln(e,t,n){var r;const i=dm(e);return pm(i)?i:new R(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function pm(e){return Array.isArray(e.path)}const hm=lm((e,t,n)=>em(e.schema,e.fragments,e.variableValues,t,n));class vm{constructor(){this._errorPositions=new Set,this._errors=[]}get errors(){return this._errors}add(t,n){this._hasNulledPosition(n)||(this._errorPositions.add(n),this._errors.push(t))}_hasNulledPosition(t){let n=t;for(;n!==void 0;){if(this._errorPositions.has(n))return!0;n=n.prev}return this._errorPositions.has(void 0)}}function Wr(e){arguments.length<2||he(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;Co(t,n,r);const a=Lo(e);if(!("schema"in a))return{errors:a};try{const{operation:s}=a,u=ym(a,s,i);return dt(u)?u.then(f=>pr(f,a.collectedErrors.errors),f=>(a.collectedErrors.add(f,void 0),pr(null,a.collectedErrors.errors))):pr(u,a.collectedErrors.errors)}catch(s){return a.collectedErrors.add(s,void 0),pr(null,a.collectedErrors.errors)}}function Ao(e){const t=Wr(e);if(dt(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function pr(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function Co(e,t,n){t||he(!1,"Must provide document."),Ji(e),n==null||St(n)||he(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Lo(e){var t,n,r;const{schema:i,document:a,rootValue:s,contextValue:u,variableValues:f,operationName:v,fieldResolver:p,typeResolver:_,subscribeFieldResolver:T,options:S}=e;let L;const B=Object.create(null);for(const k of a.definitions)switch(k.kind){case w.OPERATION_DEFINITION:if(v==null){if(L!==void 0)return[new R("Must provide operation name if query contains multiple operations.")];L=k}else((t=k.name)===null||t===void 0?void 0:t.value)===v&&(L=k);break;case w.FRAGMENT_DEFINITION:B[k.name.value]=k;break}if(!L)return v!=null?[new R(`Unknown operation named "${v}".`)]:[new R("Must provide an operation.")];const x=(n=L.variableDefinitions)!==null&&n!==void 0?n:[],V=lo(i,x,f??{},{maxErrors:(r=S?.maxCoercionErrors)!==null&&r!==void 0?r:50});return V.errors?V.errors:{schema:i,fragments:B,rootValue:s,contextValue:u,operation:L,variableValues:V.coerced,fieldResolver:p??Oi,typeResolver:_??$o,subscribeFieldResolver:T??Oi,collectedErrors:new vm}}function ym(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new R(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=ra(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case ft.QUERY:return Ar(e,r,n,a,i);case ft.MUTATION:return gm(e,r,n,a,i);case ft.SUBSCRIPTION:return Ar(e,r,n,a,i)}}function gm(e,t,n,r,i){return fm(i.entries(),(a,[s,u])=>{const f=An(r,s,t.name),v=Mo(e,t,n,u,f);return v===void 0?a:dt(v)?v.then(p=>(a[s]=p,a)):(a[s]=v,a)},Object.create(null))}function Ar(e,t,n,r,i){const a=Object.create(null);let s=!1;try{for(const[u,f]of i.entries()){const v=An(r,u,t.name),p=Mo(e,t,n,f,v);p!==void 0&&(a[u]=p,dt(p)&&(s=!0))}}catch(u){if(s)return Va(a).finally(()=>{throw u});throw u}return s?Va(a):a}function Mo(e,t,n,r,i){var a;const s=Vo(e.schema,t,r[0]);if(!s)return;const u=s.type,f=(a=s.resolve)!==null&&a!==void 0?a:e.fieldResolver,v=Po(e,s,r,t,i);try{const p=Br(s,r[0],e.variableValues),_=e.contextValue,T=f(n,p,_,v);let S;return dt(T)?S=T.then(L=>Hn(e,u,r,v,i,L)):S=Hn(e,u,r,v,i,T),dt(S)?S.then(void 0,L=>{const B=Ln(L,r,rt(i));return Cr(B,u,i,e)}):S}catch(p){const _=Ln(p,r,rt(i));return Cr(_,u,i,e)}}function Po(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Cr(e,t,n,r){if(ue(t))throw e;return r.collectedErrors.add(e,n),null}function Hn(e,t,n,r,i,a){if(a instanceof Error)throw a;if(ue(t)){const s=Hn(e,t.ofType,n,r,i,a);if(s===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return s}if(a==null)return null;if(De(t))return bm(e,t,n,r,i,a);if(qt(t))return _m(t,a);if(jt(t))return Em(e,t,n,r,i,a);if(ve(t))return wi(e,t,n,r,i,a);Ue(!1,"Cannot complete value of unexpected output type: "+A(t))}
9function bm(e,t,n,r,i,a){if(!Ui(a))throw new R(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const s=t.ofType;let u=!1;const f=Array.from(a,(v,p)=>{const _=An(i,p,void 0);try{let T;return dt(v)?T=v.then(S=>Hn(e,s,n,r,_,S)):T=Hn(e,s,n,r,_,v),dt(T)?(u=!0,T.then(void 0,S=>{const L=Ln(S,n,rt(_));return Cr(L,s,_,e)})):T}catch(T){const S=Ln(T,n,rt(_));return Cr(S,s,_,e)}});return u?Promise.all(f):f}function _m(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${A(e)}.serialize(${A(t)})\` to return non-nullable value, returned: ${A(n)}`);return n}function Em(e,t,n,r,i,a){var s;const u=(s=t.resolveType)!==null&&s!==void 0?s:e.typeResolver,f=e.contextValue,v=u(a,f,r,t);return dt(v)?v.then(p=>wi(e,ja(p,e,t,n,r,a),n,r,i,a)):wi(e,ja(v,e,t,n,r,a),n,r,i,a)}function ja(e,t,n,r,i,a){if(e==null)throw new R(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(ve(e))throw new R("Support for returning GraphQLObjectType from resolveType was removed in [email protected] please return type name instead.");if(typeof e!="string")throw new R(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${A(a)}, received "${A(e)}".`);const s=t.schema.getType(e);if(s==null)throw new R(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!ve(s))throw new R(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,s))throw new R(`Runtime Object type "${s.name}" is not a possible type for "${n.name}".`,{nodes:r});return s}function wi(e,t,n,r,i,a){const s=hm(e,t,n);if(t.isTypeOf){const u=t.isTypeOf(a,e.contextValue,r);if(dt(u))return u.then(f=>{if(!f)throw qa(t,a,n);return Ar(e,t,a,i,s)});if(!u)throw qa(t,a,n)}return Ar(e,t,a,i,s)}function qa(e,t,n){return new R(`Expected value of type "${e.name}" but got: ${A(t)}.`,{nodes:n})}const $o=function(e,t,n,r){if(St(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),a=[];for(let s=0;s<i.length;s++){const u=i[s];if(u.isTypeOf){const f=u.isTypeOf(e,t,n);if(dt(f))a[s]=f;else if(f)return a.length&&Promise.allSettled(a).catch(()=>{}),u.name}}if(a.length)return Promise.all(a).then(s=>{for(let u=0;u<s.length;u++)if(s[u])return i[u].name})},Oi=function(e,t,n,r){if(St(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function Vo(e,t,n){const r=n.name.value;return r===Wn.name&&e.getQueryType()===t?Wn:r===zn.name&&e.getQueryType()===t?zn:r===Yn.name?Yn:t.getFields()[r]}function Tm(e){return new Promise(t=>t(jo(e)))}function Nm(e){const t=jo(e);if(dt(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function jo(e){arguments.length<2||he(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:s,fieldResolver:u,typeResolver:f}=e,v=Hi(t);if(v.length>0)return{errors:v};let p;try{p=Lr(n)}catch(T){return{errors:[T]}}const _=Ro(t,p);return _.length>0?{errors:_}:Wr({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:s,fieldResolver:u,typeResolver:f})}function qo(e){return typeof e?.[Symbol.asyncIterator]=="function"}function Sm(e,t){const n=e[Symbol.asyncIterator]();async function r(i){if(i.done)return i;try{return{value:await t(i.value),done:!1}}catch(a){if(typeof n.return=="function")try{await n.return()}catch{}throw a}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(i){if(typeof n.throw=="function")return r(await n.throw(i));throw i},[Symbol.asyncIterator](){return this}}}async function wm(e){arguments.length<2||he(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await Qo(e);return qo(t)?Sm(t,r=>Wr({...e,rootValue:r})):t}
9function Om(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function Qo(...e){const t=Om(e),{schema:n,document:r,variableValues:i}=t;Co(n,r,i);const a=Lo(t);if(!("schema"in a))return{errors:a};try{const s=await Im(a);if(!qo(s))throw new Error(`Subscription field must return Async Iterable. Received: ${A(s)}.`);return s}catch(s){if(s instanceof R)return{errors:[s]};throw s}}async function Im(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,s=t.getSubscriptionType();if(s==null)throw new R("Schema is not configured to execute subscription operation.",{nodes:r});const u=ra(t,n,i,s,r.selectionSet),[f,v]=[...u.entries()][0],p=Vo(t,s,v[0]);if(!p){const L=v[0].name.value;throw new R(`The subscription field "${L}" is not defined.`,{nodes:v})}const _=An(void 0,f,s.name),T=Po(e,p,v,s,_);try{var S;const L=Br(p,v[0],i),B=e.contextValue,V=await((S=p.subscribe)!==null&&S!==void 0?S:e.subscribeFieldResolver)(a,L,B,T);if(V instanceof Error)throw V;return V}catch(L){throw Ln(L,v,rt(_))}}function km(e){return{Field(t){const n=e.getFieldDef(),r=n?.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||Ue(!1),e.reportError(new R(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n?.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new R(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const a=e.getParentType(),s=e.getFieldDef();a!=null&&s!=null||Ue(!1),e.reportError(new R(`Field "${a.name}.${s.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=it(e.getParentInputType());if(Se(n)){const r=n.getFields()[t.name.value],i=r?.deprecationReason;i!=null&&e.reportError(new R(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n?.deprecationReason;if(n&&r!=null){const i=it(e.getInputType());i!=null||Ue(!1),e.reportError(new R(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function Dm(e){return{Field(t){const n=it(e.getType());n&&Nn(n)&&e.reportError(new R(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function Uo(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function s(f){return t.inputValueDeprecation?f:""}const u=t.oneOf?"isOneOf":"";return` 10 query IntrospectionQuery { 11 __schema { 12 ${a} 13 queryType { name kind } 14 mutationType { name kind } 15 subscriptionType { name kind } 16 types { 17 ...FullType 18 } 19 directives { 20 name 21 ${n} 22 ${i} 23 locations 24 args${s("(includeDeprecated: true)")} { 25 ...InputValue 26 } 27 } 28 } 29 } 30 31 fragment FullType on __Type { 32 kind 33 name 34 ${n} 35 ${r} 36 ${u} 37 fields(includeDeprecated: true) { 38 name 39 ${n} 40 args${s("(includeDeprecated: true)")} { 41 ...InputValue 42 } 43 type { 44 ...TypeRef 45 } 46 isDeprecated 47 deprecationReason 48 } 49 inputFields${s("(includeDeprecated: true)")} { 50 ...InputValue 51 } 52 interfaces { 53 ...TypeRef 54 } 55 enumValues(includeDeprecated: true) { 56 name 57 ${n} 58 isDeprecated 59 deprecationReason 60 } 61 possibleTypes { 62 ...TypeRef 63 } 64 } 65 66 fragment InputValue on __InputValue { 67 name 68 ${n} 69 type { ...TypeRef } 70 defaultValue 71 ${s("isDeprecated")} 72 ${s("deprecationReason")} 73 } 74 75 fragment TypeRef on __Type { 76 kind 77 name 78 ofType { 79 kind 80 name 81 ofType { 82 kind 83 name 84 ofType { 85 kind 86 name 87 ofType { 88 kind 89 name 90 ofType { 91 kind 92 name 93 ofType { 94 kind 95 name 96 ofType { 97 kind 98 name 99 ofType { 100 kind 101 name 102 ofType { 103 kind 104 name 105 } 106 } 107 } 108 } 109 } 110 } 111 } 112 } 113 } 114 } 115 `}function xo(e,t){let n=null;for(const i of e.definitions)if(i.kind===w.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}const Rm=Object.freeze(Object.defineProperty({__proto__:null,getOperationAST:xo},Symbol.toStringTag,{value:"Module"}));function Fm(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new R("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new R("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new R("Schema is not configured for subscriptions.",{nodes:t});return n}throw new R("Can only have query, mutation and subscription operations.",{nodes:t})}function Am(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...t},r=Lr(Uo(n)),i=Ao({schema:e,document:r});return!i.errors&&i.data||Ue(!1),i.data}function Cm(e,t){St(e)&&St(e.__schema)||he(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${A(e)}.`);const n=e.__schema,r=rn(n.types,C=>C.name,C=>T(C));for(const C of[...nr,...ar])r[C.name]&&(r[C.name]=C);const i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,s=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(pe):[];return new Pn({description:n.description,query:i,mutation:a,subscription:s,types:Object.values(r),directives:u,assumeValid:t?.assumeValid});function f(C){if(C.kind===we.LIST){const Q=C.ofType;
115if(!Q)throw new Error("Decorated type deeper than introspection query.");return new Ke(f(Q))}if(C.kind===we.NON_NULL){const Q=C.ofType;if(!Q)throw new Error("Decorated type deeper than introspection query.");const ce=f(Q);return new le(Rs(ce))}return v(C)}function v(C){const Q=C.name;if(!Q)throw new Error(`Unknown type reference: ${A(C)}.`);const ce=r[Q];if(!ce)throw new Error(`Invalid or incomplete schema, unknown type: ${Q}. Ensure that a full introspection query is used in order to build a client schema.`);return ce}function p(C){return ks(v(C))}function _(C){return Ds(v(C))}function T(C){if(C!=null&&C.name!=null&&C.kind!=null)switch(C.kind){case we.SCALAR:return S(C);case we.OBJECT:return B(C);case we.INTERFACE:return x(C);case we.UNION:return V(C);case we.ENUM:return k(C);case we.INPUT_OBJECT:return I(C)}const Q=A(C);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Q}.`)}function S(C){return new Ut({name:C.name,description:C.description,specifiedByURL:C.specifiedByURL})}function L(C){if(C.interfaces===null&&C.kind===we.INTERFACE)return[];if(!C.interfaces){const Q=A(C);throw new Error(`Introspection result missing interfaces: ${Q}.`)}return C.interfaces.map(_)}function B(C){return new wt({name:C.name,description:C.description,interfaces:()=>L(C),fields:()=>j(C)})}function x(C){return new Dn({name:C.name,description:C.description,interfaces:()=>L(C),fields:()=>j(C)})}function V(C){if(!C.possibleTypes){const Q=A(C);throw new Error(`Introspection result missing possibleTypes: ${Q}.`)}return new Rn({name:C.name,description:C.description,types:()=>C.possibleTypes.map(p)})}function k(C){if(!C.enumValues){const Q=A(C);throw new Error(`Introspection result missing enumValues: ${Q}.`)}return new on({name:C.name,description:C.description,values:rn(C.enumValues,Q=>Q.name,Q=>({description:Q.description,deprecationReason:Q.deprecationReason}))})}function I(C){if(!C.inputFields){const Q=A(C);throw new Error(`Introspection result missing inputFields: ${Q}.`)}return new Fn({name:C.name,description:C.description,fields:()=>G(C.inputFields),isOneOf:C.isOneOf})}function j(C){if(!C.fields)throw new Error(`Introspection result missing fields: ${A(C)}.`);return rn(C.fields,Q=>Q.name,K)}function K(C){const Q=f(C.type);if(!sn(Q)){const ce=A(Q);throw new Error(`Introspection must provide output type for fields, but received: ${ce}.`)}if(!C.args){const ce=A(C);throw new Error(`Introspection result missing field args: ${ce}.`)}return{description:C.description,deprecationReason:C.deprecationReason,type:Q,args:G(C.args)}}function G(C){return rn(C,Q=>Q.name,_e)}function _e(C){const Q=f(C.type);if(!st(Q)){const Pe=A(Q);throw new Error(`Introspection must provide input type for arguments, but received: ${Pe}.`)}const ce=C.defaultValue!=null?Vt(ds(C.defaultValue),Q):void 0;return{description:C.description,type:Q,defaultValue:ce,deprecationReason:C.deprecationReason}}function pe(C){if(!C.args){const Q=A(C);throw new Error(`Introspection result missing directive args: ${Q}.`)}if(!C.locations){const Q=A(C);throw new Error(`Introspection result missing directive locations: ${Q}.`)}return new Ct({name:C.name,description:C.description,isRepeatable:C.isRepeatable,locations:C.locations.slice(),args:G(C.args)})}}function Lm(e,t,n){Yi(e),t!=null&&t.kind===w.DOCUMENT||he(!1,"Must provide valid Document AST."),n?.assumeValid!==!0&&n?.assumeValidSDL!==!0&&cm(t,e);const r=e.toConfig(),i=Go(r,t,n);return r===i?e:new Pn(i)}function Go(e,t,n){var r,i,a,s;const u=[],f=Object.create(null),v=[];let p;const _=[];for(const D of t.definitions)if(D.kind===w.SCHEMA_DEFINITION)p=D;else if(D.kind===w.SCHEMA_EXTENSION)_.push(D);else if(Jn(D))u.push(D);else if(Di(D)){const H=D.name.value,z=f[H];f[H]=z?z.concat([D]):[D]}else D.kind===w.DIRECTIVE_DEFINITION&&v.push(D);if(Object.keys(f).length===0&&u.length===0&&v.length===0&&_.length===0&&p==null)return e;const T=Object.create(null);for(const D of e.types)T[D.name]=k(D);for(const D of u){var S;const H=D.name.value;T[H]=(S=Qa[H])!==null&&S!==void 0?S:qe(D)}const L={query:e.query&&x(e.query),mutation:e.mutation&&x(e.mutation),subscription:e.subscription&&x(e.subscription),...p&&ce([p]),...ce(_)};return{description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...L,types:Object.values(T),directives:[...e.directives.map(V),...v.map(Lt)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(_),assumeValid:(s=n?.assumeValid)!==null&&s!==void 0?s:!1};function B(D){return De(D)?new Ke(B(D.ofType)):ue(D)?new le(B(D.ofType)):x(D)}function x(D){return T[D.name]}function V(D){const H=D.toConfig();return new Ct({...H,args:$t(H.args,Q)})}function k(D){if(Nn(D)||qr(D))return D;if(pt(D))return K(D);if(ve(D))return G(D);if(be(D))return _e(D);if(Be(D))return pe(D);if(Me(D))return j(D);if(Se(D))return I(D);Ue(!1,"Unexpected type: "+A(D))}function I(D){var H;const z=D.toConfig(),te=(H=f[z.name])!==null&&H!==void 0?H:[];return new Fn({...z,fields:()=>({...$t(z.fields,Ne=>({...Ne,type:B(Ne.type)})),...Mt(te)}),extensionASTNodes:z.extensionASTNodes.concat(te)})}function j(D){var H;const z=D.toConfig(),te=(H=f[D.name])!==null&&H!==void 0?H:[];return new on({...z,values:{...z.values,...Pt(te)},extensionASTNodes:z.extensionASTNodes.concat(te)})}function K(D){var H;const z=D.toConfig(),te=(H=f[z.name])!==null&&H!==void 0?H:[];let Ne=z.specifiedByURL;for(const Ee of te){var Re;Ne=(Re=Ua(Ee))!==null&&Re!==void 0?Re:Ne}return new Ut({...z,specifiedByURL:Ne,extensionASTNodes:z.extensionASTNodes.concat(te)})}function G(D){var H;const z=D.toConfig(),te=(H=f[z.name])!==null&&H!==void 0?H:[];return new wt({...z,interfaces:()=>[...D.getInterfaces().map(x),...at(te)],fields:()=>({...$t(z.fields,C),...ht(te)}),extensionASTNodes:z.extensionASTNodes.concat(te)})}
115function _e(D){var H;const z=D.toConfig(),te=(H=f[z.name])!==null&&H!==void 0?H:[];return new Dn({...z,interfaces:()=>[...D.getInterfaces().map(x),...at(te)],fields:()=>({...$t(z.fields,C),...ht(te)}),extensionASTNodes:z.extensionASTNodes.concat(te)})}function pe(D){var H;const z=D.toConfig(),te=(H=f[z.name])!==null&&H!==void 0?H:[];return new Rn({...z,types:()=>[...D.getTypes().map(x),...ze(te)],extensionASTNodes:z.extensionASTNodes.concat(te)})}function C(D){return{...D,type:B(D.type),args:D.args&&$t(D.args,Q)}}function Q(D){return{...D,type:B(D.type)}}function ce(D){const H={};for(const te of D){var z;const Ne=(z=te.operationTypes)!==null&&z!==void 0?z:[];for(const Re of Ne)H[Re.operation]=Pe(Re.type)}return H}function Pe(D){var H;const z=D.name.value,te=(H=Qa[z])!==null&&H!==void 0?H:T[z];if(te===void 0)throw new Error(`Unknown type: "${z}".`);return te}function We(D){return D.kind===w.LIST_TYPE?new Ke(We(D.type)):D.kind===w.NON_NULL_TYPE?new le(We(D.type)):Pe(D)}function Lt(D){var H;return new Ct({name:D.name.value,description:(H=D.description)===null||H===void 0?void 0:H.value,locations:D.locations.map(({value:z})=>z),isRepeatable:D.repeatable,args:Gt(D.arguments),astNode:D})}function ht(D){const H=Object.create(null);for(const Ne of D){var z;const Re=(z=Ne.fields)!==null&&z!==void 0?z:[];for(const Ee of Re){var te;H[Ee.name.value]={type:We(Ee.type),description:(te=Ee.description)===null||te===void 0?void 0:te.value,args:Gt(Ee.arguments),deprecationReason:hr(Ee),astNode:Ee}}}return H}function Gt(D){const H=D??[],z=Object.create(null);for(const Ne of H){var te;const Re=We(Ne.type);z[Ne.name.value]={type:Re,description:(te=Ne.description)===null||te===void 0?void 0:te.value,defaultValue:Vt(Ne.defaultValue,Re),deprecationReason:hr(Ne),astNode:Ne}}return z}function Mt(D){const H=Object.create(null);for(const Ne of D){var z;const Re=(z=Ne.fields)!==null&&z!==void 0?z:[];for(const Ee of Re){var te;const tt=We(Ee.type);H[Ee.name.value]={type:tt,description:(te=Ee.description)===null||te===void 0?void 0:te.value,defaultValue:Vt(Ee.defaultValue,tt),deprecationReason:hr(Ee),astNode:Ee}}}return H}function Pt(D){const H=Object.create(null);for(const Ne of D){var z;const Re=(z=Ne.values)!==null&&z!==void 0?z:[];for(const Ee of Re){var te;H[Ee.name.value]={description:(te=Ee.description)===null||te===void 0?void 0:te.value,deprecationReason:hr(Ee),astNode:Ee}}}return H}function at(D){return D.flatMap(H=>{var z,te;return(z=(te=H.interfaces)===null||te===void 0?void 0:te.map(Pe))!==null&&z!==void 0?z:[]})}function ze(D){return D.flatMap(H=>{var z,te;return(z=(te=H.types)===null||te===void 0?void 0:te.map(Pe))!==null&&z!==void 0?z:[]})}function qe(D){var H;const z=D.name.value,te=(H=f[z])!==null&&H!==void 0?H:[];switch(D.kind){case w.OBJECT_TYPE_DEFINITION:{var Ne;const He=[D,...te];return new wt({name:z,description:(Ne=D.description)===null||Ne===void 0?void 0:Ne.value,interfaces:()=>at(He),fields:()=>ht(He),astNode:D,extensionASTNodes:te})}case w.INTERFACE_TYPE_DEFINITION:{var Re;const He=[D,...te];return new Dn({name:z,description:(Re=D.description)===null||Re===void 0?void 0:Re.value,interfaces:()=>at(He),fields:()=>ht(He),astNode:D,extensionASTNodes:te})}case w.ENUM_TYPE_DEFINITION:{var Ee;const He=[D,...te];return new on({name:z,description:(Ee=D.description)===null||Ee===void 0?void 0:Ee.value,values:Pt(He),astNode:D,extensionASTNodes:te})}case w.UNION_TYPE_DEFINITION:{var tt;const He=[D,...te];return new Rn({name:z,description:(tt=D.description)===null||tt===void 0?void 0:tt.value,types:()=>ze(He),astNode:D,extensionASTNodes:te})}case w.SCALAR_TYPE_DEFINITION:{var Bt;return new Ut({name:z,description:(Bt=D.description)===null||Bt===void 0?void 0:Bt.value,specifiedByURL:Ua(D),astNode:D,extensionASTNodes:te})}case w.INPUT_OBJECT_TYPE_DEFINITION:{var Wt;const He=[D,...te];return new Fn({name:z,description:(Wt=D.description)===null||Wt===void 0?void 0:Wt.value,fields:()=>Mt(He),astNode:D,extensionASTNodes:te,isOneOf:Mm(D)})}}}}const Qa=Ht([...nr,...ar],e=>e.name);function hr(e){const t=Cn(Ur,e);return t?.reason}function Ua(e){const t=Cn(ji,e);return t?.url}function Mm(e){return!!Cn(qi,e)}function Bo(e,t){e!=null&&e.kind===w.DOCUMENT||he(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&um(e);const r=Go({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}const i=[...r.directives,...fn.filter(a=>r.directives.every(s=>s.name!==a.name))];return new Pn({...r,directives:i})}function Pm(e,t){const n=Lr(e,{noLocation:t?.noLocation,allowLegacyFragmentVariables:t?.allowLegacyFragmentVariables});return Bo(n,{assumeValidSDL:t?.assumeValidSDL,assumeValid:t?.assumeValid})}function $m(e){const t=e.toConfig(),n=rn(ui(t.types),T=>T.name,_);return new Pn({...t,types:Object.values(n),directives:ui(t.directives).map(s),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)});function r(T){return De(T)?new Ke(r(T.ofType)):ue(T)?new le(r(T.ofType)):i(T)}function i(T){return n[T.name]}function a(T){return T&&i(T)}function s(T){const S=T.toConfig();return new Ct({...S,locations:Wo(S.locations,L=>
115L),args:u(S.args)})}function u(T){return vr(T,S=>({...S,type:r(S.type)}))}function f(T){return vr(T,S=>({...S,type:r(S.type),args:S.args&&u(S.args)}))}function v(T){return vr(T,S=>({...S,type:r(S.type)}))}function p(T){return ui(T).map(i)}function _(T){if(pt(T)||Nn(T))return T;if(ve(T)){const S=T.toConfig();return new wt({...S,interfaces:()=>p(S.interfaces),fields:()=>f(S.fields)})}if(be(T)){const S=T.toConfig();return new Dn({...S,interfaces:()=>p(S.interfaces),fields:()=>f(S.fields)})}if(Be(T)){const S=T.toConfig();return new Rn({...S,types:()=>p(S.types)})}if(Me(T)){const S=T.toConfig();return new on({...S,values:vr(S.values,L=>L)})}if(Se(T)){const S=T.toConfig();return new Fn({...S,fields:()=>v(S.fields)})}Ue(!1,"Unexpected type: "+A(T))}}function vr(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(Xn))n[r]=t(e[r]);return n}function ui(e){return Wo(e,t=>t.name)}function Wo(e,t){return e.slice().sort((n,r)=>{const i=t(n),a=t(r);return Xn(i,a)})}function Vm(e){return zo(e,t=>!Qi(t),qm)}function jm(e){return zo(e,Qi,Nn)}function qm(e){return!qr(e)&&!Nn(e)}function zo(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Qm(e),...r.map(a=>Hm(a)),...i.map(a=>Yo(a))].filter(Boolean).join(` 116 117`)}function Qm(e){if(e.description==null&&Um(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Ot(e)+`schema { 118${t.join(` 119`)} 120}`}function Um(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function Yo(e){if(pt(e))return xm(e);if(ve(e))return Gm(e);if(be(e))return Bm(e);if(Be(e))return Wm(e);if(Me(e))return zm(e);if(Se(e))return Ym(e);Ue(!1,"Unexpected type: "+A(e))}function xm(e){return Ot(e)+`scalar ${e.name}`+Jm(e)}function Ho(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Gm(e){return Ot(e)+`type ${e.name}`+Ho(e)+Jo(e)}function Bm(e){return Ot(e)+`interface ${e.name}`+Ho(e)+Jo(e)}function Wm(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Ot(e)+"union "+e.name+n}function zm(e){const t=e.getValues().map((n,r)=>Ot(n," ",!r)+" "+n.name+ca(n.deprecationReason));return Ot(e)+`enum ${e.name}`+ua(t)}function Ym(e){const t=Object.values(e.getFields()).map((n,r)=>Ot(n," ",!r)+" "+Ii(n));return Ot(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+ua(t)}function Jo(e){const t=Object.values(e.getFields()).map((n,r)=>Ot(n," ",!r)+" "+n.name+Ko(n.args," ")+": "+String(n.type)+ca(n.deprecationReason));return ua(t)}function ua(e){return e.length!==0?` { 121`+e.join(` 122`)+` 123}`:""}function Ko(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Ii).join(", ")+")":`( 124`+e.map((n,r)=>Ot(n," "+t,!r)+" "+t+Ii(n)).join(` 125`)+` 126`+t+")"}function Ii(e){const t=an(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ke(t)}`),n+ca(e.deprecationReason)}function Hm(e){return Ot(e)+"directive @"+e.name+Ko(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function ca(e){return e==null?"":e!==Vi?` @deprecated(reason: ${ke({kind:w.STRING,value:e})})`:" @deprecated"}function Jm(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${ke({kind:w.STRING,value:e.specifiedByURL})})`}function Ot(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=ke({kind:w.STRING,value:r,block:Bu(r)});return(t&&!n?` 127`+t:t)+i.replace(/\n/g,` 128`+t)+` 129`}function Km(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:w.DOCUMENT,definitions:t}}function Xm(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case w.OPERATION_DEFINITION:t.push(i);break;case w.FRAGMENT_DEFINITION:n[i.name.value]=xa(i.selectionSet);break}const r=Object.create(null);for(const i of t){const a=new Set;for(const u of xa(i.selectionSet))Xo(a,n,u);const s=i.name?i.name.value:"";r[s]={kind:w.DOCUMENT,definitions:e.definitions.filter(u=>u===i||u.kind===w.FRAGMENT_DEFINITION&&a.has(u.name.value))}}return r}function Xo(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)Xo(e,t,i)}}function xa(e){const t=[];return Mn(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function Zm(e){const t=Wu(e)?e:new ms(e),n=t.body,r=new ps(t);let i="",a=!1;for(;r.advance().kind!==Er.EOF;){const s=r.token,u=s.kind,f=!zu(s.kind);a&&(f||s.kind===Er.SPREAD)&&(i+=" ");const v=n.slice(s.start,s.end);u===Er.BLOCK_STRING?i+=Yu(s.value,{minimize:!0}):i+=v,a=f}return i}function ep(e){const t=Zo(e);if(t)throw t;return e}function Zo(e){if(typeof e=="string"||he(!1,"Expected name to be a string."),e.startsWith("__"))return new R(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{mt(e)}catch(t){return t}}var Ce;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENT
129ED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(Ce||(Ce={}));var At;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(At||(At={}));function tp(e,t){return eu(e,t).filter(n=>n.type in Ce)}function np(e,t){return eu(e,t).filter(n=>n.type in At)}function eu(e,t){return[...ip(e,t),...rp(e,t)]}function rp(e,t){const n=[],r=Jt(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:Ce.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,a]of r.persisted){const s=Jt(i.args,a.args);for(const u of s.added)ln(u)&&n.push({type:Ce.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${u.name} on directive ${i.name} was added.`});for(const u of s.removed)n.push({type:Ce.DIRECTIVE_ARG_REMOVED,description:`${u.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Ce.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const u of i.locations)a.locations.includes(u)||n.push({type:Ce.DIRECTIVE_LOCATION_REMOVED,description:`${u} was removed from ${i.name}.`})}return n}function ip(e,t){const n=[],r=Jt(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:Ce.TYPE_REMOVED,description:qr(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,a]of r.persisted)Me(i)&&Me(a)?n.push(...op(i,a)):Be(i)&&Be(a)?n.push(...sp(i,a)):Se(i)&&Se(a)?n.push(...ap(i,a)):ve(i)&&ve(a)?n.push(...Ba(i,a),...Ga(i,a)):be(i)&&be(a)?n.push(...Ba(i,a),...Ga(i,a)):i.constructor!==a.constructor&&n.push({type:Ce.TYPE_CHANGED_KIND,description:`${i.name} changed from ${Wa(i)} to ${Wa(a)}.`});return n}function ap(e,t){const n=[],r=Jt(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)jr(i)?n.push({type:Ce.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:At.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:Ce.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,a]of r.persisted)Bn(i.type,a.type)||n.push({type:Ce.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function sp(e,t){const n=[],r=Jt(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:At.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:Ce.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function op(e,t){const n=[],r=Jt(e.getValues(),t.getValues());for(const i of r.added)n.push({type:At.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:Ce.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function Ga(e,t){const n=[],r=Jt(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:At.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:Ce.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function Ba(e,t){const n=[],r=Jt(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:Ce.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,a]of r.persisted)n.push(...up(e,i,a)),xn(i.type,a.type)||n.push({type:Ce.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function up(e,t,n){const r=[],i=Jt(t.args,n.args);for(const a of i.removed)r.push({type:Ce.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(const[a,s]of i.persisted)if(!Bn(a.type,s.type))r.push({type:Ce.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(s.type)}.`});else if(a.defaultValue!==void 0)if(s.defaultValue===void 0)r.push({type:At.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{const f=za(a.defaultValue,a.type),v=za(s.defaultValue,s.type);f!==v&&r.push({type:At.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${f} to ${v}.`})}for(const a of i.added)ln(a)?r.push({type:Ce.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:At.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function xn(e,t){return De(e)?De(t)&&xn(e.ofType,t.ofType)||ue(t)&&xn(e,t.ofType):ue(e)?ue(t)&&xn(e.ofType,t.ofType):tr(t)&&e.name===t.name||ue(t)&&xn(e,t.ofType)}function Bn(e,t){return De(e)?De(t)&&Bn(e.ofType,t.ofType):ue(e)?ue(t)&&Bn(e.ofType,t.ofType)||!ue(t)&&Bn(e.ofType,t):tr(t)&&e.name===t.name}function Wa(e){if(pt(e))return"a Scalar type";if(ve(e))return"an Object type";if(be(e))return"an Interface type";if(Be(e))return"a Union type";if(Me(e))return"an Enum type";if(Se(e))return"an Input type";Ue(!1,"Unexpected type: "+A(e))}function za(e,t){const n=an(e,t);return n!=null||Ue(!1),ke(Gr(n))}function Jt(e,t){const n=[],r=[],i=[],a=Ht(e,({name:u})=>u),s=Ht(t,({name:u})=>u);for(const u of e){const f=s[u.name];
129f===void 0?r.push(u):i.push([u,f])}for(const u of t)a[u.name]===void 0&&n.push(u);return{added:n,persisted:i,removed:r}}function cp(e,t){return tu(e,hs(t))}function lp(e,t){const n=t.name.value,r=e.getType(n);if(r!=null)return{kind:"NamedType",type:r}}function fp(e,t){const n=t.name.value,r=e.getType(n);if(!r)throw new Error(`Expected ${A(n)} to be defined as a type in the schema.`);if(!Me(r)&&!Se(r)&&!ve(r)&&!be(r))throw new Error(`Expected ${A(n)} to be an Enum, Input Object, Object or Interface type.`);if(Me(r)){const s=t.memberName.value,u=r.getValue(s);return u==null?void 0:{kind:"EnumValue",type:r,enumValue:u}}if(Se(r)){const s=t.memberName.value,u=r.getFields()[s];return u==null?void 0:{kind:"InputField",type:r,inputField:u}}const i=t.memberName.value,a=r.getFields()[i];if(a!=null)return{kind:"Field",type:r,field:a}}function dp(e,t){const n=t.name.value,r=e.getType(n);if(r==null)throw new Error(`Expected ${A(n)} to be defined as a type in the schema.`);if(!ve(r)&&!be(r))throw new Error(`Expected ${A(n)} to be an object type or interface type.`);const i=t.fieldName.value,a=r.getFields()[i];if(a==null)throw new Error(`Expected ${A(i)} to exist as a field of type ${A(n)} in the schema.`);const s=t.argumentName.value,u=a.args.find(f=>f.name===s);if(u!=null)return{kind:"FieldArgument",type:r,field:a,fieldArgument:u}}function mp(e,t){const n=t.name.value,r=e.getDirective(n);if(r)return{kind:"Directive",directive:r}}function pp(e,t){const n=t.name.value,r=e.getDirective(n);if(!r)throw new Error(`Expected ${A(n)} to be defined as a directive in the schema.`);const{argumentName:{value:i}}=t,a=r.args.find(s=>s.name===i);if(a)return{kind:"DirectiveArgument",directive:r,directiveArgument:a}}function tu(e,t){switch(t.kind){case w.TYPE_COORDINATE:return lp(e,t);case w.MEMBER_COORDINATE:return fp(e,t);case w.ARGUMENT_COORDINATE:return dp(e,t);case w.DIRECTIVE_COORDINATE:return mp(e,t);case w.DIRECTIVE_ARGUMENT_COORDINATE:return pp(e,t)}}const hp=Object.freeze(Object.defineProperty({__proto__:null,BREAK:Hu,get BreakingChangeType(){return Ce},DEFAULT_DEPRECATION_REASON:Vi,get DangerousChangeType(){return At},get DirectiveLocation(){return se},ExecutableDefinitionsRule:js,FieldsOnCorrectTypeRule:qs,FragmentsOnCompositeTypesRule:Qs,GRAPHQL_MAX_INT:Nr,GRAPHQL_MIN_INT:Sr,GraphQLBoolean:ot,GraphQLDeprecatedDirective:Ur,GraphQLDirective:Ct,GraphQLEnumType:on,GraphQLError:R,GraphQLFloat:$s,GraphQLID:Mi,GraphQLIncludeDirective:Pi,GraphQLInputObjectType:Fn,GraphQLInt:Ps,GraphQLInterfaceType:Dn,GraphQLList:Ke,GraphQLNonNull:le,GraphQLObjectType:wt,GraphQLOneOfDirective:qi,GraphQLScalarType:Ut,GraphQLSchema:Pn,GraphQLSkipDirective:$i,GraphQLSpecifiedByDirective:ji,GraphQLString:Le,GraphQLUnionType:Rn,get Kind(){return w},KnownArgumentNamesRule:Us,KnownDirectivesRule:ea,KnownFragmentNamesRule:Gs,KnownTypeNamesRule:ta,Lexer:ps,Location:Ju,LoneAnonymousOperationRule:Bs,LoneSchemaDefinitionRule:Ws,MaxIntrospectionDepthRule:zs,NoDeprecatedCustomRule:km,NoFragmentCyclesRule:Ys,NoSchemaIntrospectionCustomRule:Dm,NoUndefinedVariablesRule:Hs,NoUnusedFragmentsRule:Js,NoUnusedVariablesRule:Ks,get OperationTypeNode(){return ft},OverlappingFieldsCanBeMergedRule:Zs,PossibleFragmentSpreadsRule:ro,PossibleTypeExtensionsRule:io,ProvidedRequiredArgumentsRule:ao,ScalarLeafsRule:oo,SchemaMetaFieldDef:Wn,SingleFieldSubscriptionsRule:mo,Source:ms,Token:Ku,get TokenKind(){return Er},TypeInfo:Xi,get TypeKind(){return we},TypeMetaFieldDef:zn,TypeNameMetaFieldDef:Yn,UniqueArgumentDefinitionNamesRule:po,UniqueArgumentNamesRule:aa,UniqueDirectiveNamesRule:ho,UniqueDirectivesPerLocationRule:sa,UniqueEnumValueNamesRule:vo,UniqueFieldDefinitionNamesRule:yo,UniqueFragmentNamesRule:go,UniqueInputFieldNamesRule:oa,UniqueOperationNamesRule:bo,UniqueOperationTypesRule:_o,UniqueTypeNamesRule:Eo,UniqueVariableNamesRule:To,ValidationContext:Do,ValuesOfCorrectTypeRule:No,VariablesAreInputTypesRule:So,VariablesInAllowedPositionRule:wo,__Directive:xi,__DirectiveLocation:Gi,__EnumValue:Wi,__Field:Bi,__InputValue:ir,__Schema:xr,__Type:Tt,__TypeKind:zi,assertAbstractType:vd,assertCompositeType:hd,assertDirective:Ed,assertEnumType:ud,assertEnumValueName:Is,assertInputObjectType:cd,assertInputType:dd,assertInterfaceType:Ds,assertLeafType:pd,assertListType:ld,assertName:mt,assertNamedType:gd,assertNonNullType:fd,assertNullableType:Rs,assertObjectType:ks,assertOutputType:md,assertScalarType:sd,assertSchema:Yi,assertType:ad,assertUnionType:od,assertValidName:ep,assertValidSchema:Ji,assertWrappingType:yd,astFromValue:an,buildASTSchema:Bo,buildClientSchema:Cm,buildSchema:Pm,coerceInputValue:co,concatAST:Km,createSourceEventStream:Qo,defaultFieldResolver:Oi,defaultTypeResolver:$o,doTypesOverlap:Ti,execute:Wr,executeSync:Ao,extendSchema:Lm,findBreakingChanges:tp,findDangerousChanges:np,formatError:Xu,getArgumentValues:Br,getDirectiveValues:Cn,getEnterLeaveForKind:pi,getIntrospectionQuery:Uo,getLocation:Zu,getNamedType:it,getNullableType:Ai,getOperationAST:xo,getOperationRootType:Fm,getVariableValues:lo,getVisitFn:ec,graphql:Tm,graphqlSync:Nm,introspectionFromSchema:Am,introspectionTypes:ar,isAbstractType:jt,isCompositeType:Qt,isConstValueNode:tc,isDefinitionNode:nc,isDirective:Qr,isEnumType:Me,isEqualType:Ir,isExecutableDefinitionNode:cs,isInputObjectType:Se,isInputType:st,isInterfaceType:be,isIntrospectionType:Nn,isLeafType:qt,isListType:De,isNamedType:tr,isNonNullType:ue,isNullableType:Vr,isObjectType:ve,isOutputType:sn,isRequiredArgument:ln,isRequiredInputField:jr,isScalarType:pt,isSchema:Vs,isSchemaCoordinateNode:rc,isSelectionNode:ic,isSpecifiedDirective:Qi,isSpecifiedScalarType:qr,isType:Zn,isTypeDefinitionNode:Jn,isTypeExtensionNode:Di,isTypeNode:ac,isTypeSubTypeOf:_n,isTypeSystemDefinitionNode:ls,isTypeSystemExtensionNode:fs,isUnionType:Be,isValidNameError:Zo,isValueNode:sc,isWrappingType:er,lexicographicSortSchema:$m,locatedError:Ln,parse:Lr,parseConstValue:oc,parseSchemaCoordinate:hs,parseType:uc,parseValue:ds,print:ke,printError:cc,printIntrospectionSchema:jm,printLocation:lc,printSchema:Vm,printSourceLocation:fc,printType:Yo,recommendedRules:Oo,resolveASTSchemaCoordinate:tu,resolveObjMapThunk:Li,resolveReadonlyArrayThunk:Ci,resolveSchemaCoordinate:cp,responsePathAsArray:rt,separateOperations:Xm,specifiedDirectives:fn,specifiedRules:Io,specifiedScalarTypes:nr,stripIgnoredCharacters:Zm,subscribe:wm,syntaxError:dc,typeFromAST:ut,validate:Ro,val
129idateSchema:Hi,valueFromAST:Vt,valueFromASTUntyped:Or,version:ed,versionInfo:td,visit:Mn,visitInParallel:Ri,visitWithTypeInfo:Zi},Symbol.toStringTag,{value:"Module"})),vp=Object.freeze(Object.defineProperty({__proto__:null,StrongCache:mc,WeakCache:hi},Symbol.toStringTag,{value:"Module"}));function la(e,t){var n;return((n=vs(e))===null||n===void 0?void 0:n.operation)===t}function yp(e){return la(e,"mutation")}function gp(e){return la(e,"query")}function bp(e){return la(e,"subscription")}function _p(e){return e===void 0&&(e=!1),{keyArgs:e,merge:function(t,n){return t?In(In([],t,!0),n,!0):n}}}function Ep(e){return e===void 0&&(e=!1),{keyArgs:e,merge:function(t,n,r){var i=r.args,a=t?t.slice(0):[];if(n)if(i)for(var s=i.offset,u=s===void 0?0:s,f=0;f<n.length;++f)a[u+f]=n[f];else a.push.apply(a,n);return a}}}function Tp(e){return e===void 0&&(e=!1),{keyArgs:e,read:function(t,n){var r=n.canRead,i=n.readField;if(!t)return t;var a=[],s="",u="";t.edges.forEach(function(_){r(i("node",_))&&(a.push(_),_.cursor&&(s=s||_.cursor||"",u=_.cursor||u))}),a.length>1&&s===u&&(s="");var f=t.pageInfo||{},v=f.startCursor,p=f.endCursor;return _t(_t({},ci(t)),{edges:a,pageInfo:_t(_t({},t.pageInfo),{startCursor:v||s,endCursor:p||u})})},merge:function(t,n,r){var i=r.args,a=r.isReference,s=r.readField;if(t||(t=Sp()),!n)return t;var u=n.edges?n.edges.map(function(pe){return a(pe=_t({},pe))&&(pe.cursor=s("cursor",pe)),pe}):[];if(n.pageInfo){var f=n.pageInfo,v=f.startCursor,p=f.endCursor,_=u[0],T=u[u.length-1];_&&v&&(_.cursor=v),T&&p&&(T.cursor=p);var S=_&&_.cursor;S&&!v&&(n=vi(n,{pageInfo:{startCursor:S}}));var L=T&&T.cursor;L&&!p&&(n=vi(n,{pageInfo:{endCursor:L}}))}var B=t.edges,x=[];if(i&&i.after){var V=B.findIndex(function(pe){return pe.cursor===i.after});V>=0&&(B=B.slice(0,V+1))}else if(i&&i.before){var V=B.findIndex(function(C){return C.cursor===i.before});x=V<0?B:B.slice(V),B=[]}else n.edges&&(B=[]);var k=In(In(In([],B,!0),u,!0),x,!0),I=_t(_t({},n.pageInfo),t.pageInfo);if(n.pageInfo){var j=n.pageInfo,K=j.hasPreviousPage,G=j.hasNextPage,v=j.startCursor,p=j.endCursor,_e=ys(j,["hasPreviousPage","hasNextPage","startCursor","endCursor"]);Object.assign(I,_e),B.length||(K!==void 0&&(I.hasPreviousPage=K),v!==void 0&&(I.startCursor=v)),x.length||(G!==void 0&&(I.hasNextPage=G),p!==void 0&&(I.endCursor=p))}return _t(_t(_t({},ci(t)),ci(n)),{edges:k,pageInfo:I})}}}var ci=function(e){return ys(e,Np)},Np=["edges","pageInfo"];function Sp(){return{edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}}function wp(e){var t=Promise.resolve(e);return t.status="fulfilled",t.value=e,t}function Op(e){var t=Promise.reject(e);return t.catch(function(){}),t.status="rejected",t.reason=e,t}function nu(e){return"status"in e}function Ip(e){if(nu(e))return e;var t=e;return t.status="pending",t.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}}),e}function ru(e,t){return ki(e,t)}function ki(e,t,n){if(n===void 0&&(n=new Map),n.has(e))return n.get(e);var r=!1;if(Array.isArray(e)){var i=[];if(n.set(e,i),e.forEach(function(s,u){var f=ki(s,t,n);r||(r=f!==s),i[u]=f}),r)return i}else if(gs(e)){var a=Object.create(Object.getPrototypeOf(e));if(n.set(e,a),Object.keys(e).forEach(function(s){if(s===t){r=!0;return}var u=ki(e[s],t,n);r||(r=u!==e[s]),a[s]=u}),r)return a}return e}function kp(e){return ru(e,"__typename")}const Dp=Object.freeze(Object.defineProperty({__proto__:null,AutoCleanedStrongCache:pc,AutoCleanedWeakCache:hc,Concast:vc,DEV:_i,DeepMerger:yc,DocumentTransform:gc,Observable:bc,addNonReactiveToNamedFragments:_c,addTypenameToDocument:Ec,argumentsObjectFromField:Tc,asyncMap:Nc,buildQueryFromSelectionSet:Sc,cacheSizes:Tr,canUseAsyncIteratorSymbol:wc,canUseDOM:Oc,canUseLayoutEffect:Ic,canUseSymbol:kc,canUseWeakMap:Dc,canUseWeakSet:Rc,canonicalStringify:bs,checkDocument:Fc,cloneDeep:Ac,compact:Cc,concatPagination:_p,createFragmentMap:Lc,createFulfilledPromise:wp,createRejectedPromise:Op,fixObservableSubclass:Mc,getDefaultValues:Pc,getDirectiveNames:$c,getFragmentDefinition:Vc,getFragmentDefinitions:yi,getFragmentFromSelection:jc,getFragmentMaskMode:qc,getFragmentQueryDocument:Qc,getGraphQLErrorsFromResult:Uc,getInclusionDirectives:xc,getMainDefinition:Gc,getOperationDefinition:vs,getOperationName:Bc,getQueryDefinition:Wc,getStoreKeyName:zc,getTypenameFromResult:Yc,graphQLResultHasError:Hc,hasAllDirectives:Jc,hasAnyDirectives:Kc,hasClientExports:Xc,hasDirectives:Zc,isApolloPayloadResult:el,isArray:tl,isDocumentNode:nl,isExecutionPatchIncrementalResult:rl,isExecutionPatchInitialResult:il,isExecutionPatchResult:al,isField:sl,isFullyUnmaskedOperation:ol,isInlineFragment:ul,isMutationOperation:yp,isNonEmptyArray:cl,isNonNullObject:ll,isPlainObject:gs,isQueryOperation:gp,isReference:_s,isStatefulPromise:nu,isSubscriptionOperation:bp,iterateObserversSafely:fl,makeReference:Es,makeUniqueId:dl,maybe:us,maybeDeepFreeze:ml,mergeDeep:vi,mergeDeepArray:pl,mergeIncrementalData:hl,mergeOptions:vl,offsetLimitPagination:Ep,omitDeep:ru,preventUnhandledRejection:yl,print:gl,relayStylePagination:Tp,removeArgumentsFromDocument:bl,removeClientSet
129sFromDocument:_l,removeConnectionDirectiveFromDocument:El,removeDirectivesFromDocument:Tl,removeFragmentSpreadFromDocument:Nl,resultKeyNameFromField:Sl,shouldInclude:wl,storeKeyNameFromField:Ol,stringifyForDisplay:Il,stripTypename:kp,valueToObjectRepresentation:kl,wrapPromiseWithState:Ip},Symbol.toStringTag,{value:"Module"})),Rp=Object.freeze(Object.defineProperty({__proto__:null,createOperation:Dl,filterOperationVariables:Rl,fromError:Fl,fromPromise:Al,throwServerError:Cl,toPromise:Ll,transformOperation:Ml,validateOperation:Pl},Symbol.toStringTag,{value:"Module"})),Fp=Object.freeze(Object.defineProperty({__proto__:null,ApolloLink:Ts,concat:$l,empty:Vl,execute:jl,from:ql,split:Ql},Symbol.toStringTag,{value:"Module"})),Ap=Object.freeze(Object.defineProperty({__proto__:null,HttpLink:Ul,checkFetcher:xl,createHttpLink:Gl,createSignalIfSupported:Bl,defaultPrinter:Wl,fallbackHttpConfig:zl,parseAndCheckHttpResponse:Yl,rewriteURIForGET:Hl,selectHttpOptionsAndBody:Jl,selectHttpOptionsAndBodyInternal:Kl,selectURI:Xl,serializeFetchParameter:Zl},Symbol.toStringTag,{value:"Module"})),Cp=Object.freeze(Object.defineProperty({__proto__:null,disableWarningsSlot:ef,maskFragment:tf,maskOperation:nf},Symbol.toStringTag,{value:"Module"}));function Lp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(Ya.bind.apply(Ya,In([void 0],e,!1)))}var Ya=(function(){function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.registry=Object.create(null),this.resetCaches(),t.length&&this.register.apply(this,t)}return e.prototype.register=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=new Map;return n.forEach(function(a){yi(a).forEach(function(s){i.set(s.name.value,s)})}
129),i.forEach(function(a,s){a!==t.registry[s]&&(t.registry[s]=a,t.invalidate(s))}),this},e.prototype.invalidate=function(t){},e.prototype.resetCaches=function(){var t=e.prototype;this.invalidate=(this.lookup=ai(t.lookup.bind(this),{makeCacheKey:function(n){return n},max:Tr["fragmentRegistry.lookup"]||1e3})).dirty,this.transform=ai(t.transform.bind(this),{cache:hi,max:Tr["fragmentRegistry.transform"]||2e3}),this.findFragmentSpreads=ai(t.findFragmentSpreads.bind(this),{cache:hi,max:Tr["fragmentRegistry.findFragmentSpreads"]||4e3})},e.prototype.lookup=function(t){return this.registry[t]||null},e.prototype.transform=function(t){var n=this,r=new Map;yi(t).forEach(function(p){r.set(p.name.value,p)});var i=new Set,a=function(p){r.has(p)||i.add(p)},s=function(p){return Object.keys(n.findFragmentSpreads(p)).forEach(a)};s(t);var u=[],f=Object.create(null);if(i.forEach(function(p){var _=r.get(p);if(_)s(f[p]=_);else{u.push(p);var T=n.lookup(p);T&&s(f[p]=T)}}),u.length){var v=[];u.forEach(function(p){var _=f[p];_&&v.push(_)}),v.length&&(t=_t(_t({},t),{definitions:t.definitions.concat(v)}))}return t},e.prototype.findFragmentSpreads=function(t){var n=Object.create(null);return Mn(t,{FragmentSpread:function(r){n[r.name.value]=r}}),n},e})();const Mp=Object.freeze(Object.defineProperty({__proto__:null,ApolloCache:rf,get Cache(){return af},get EntityStore(){return sf},InMemoryCache:of,MissingFieldError:uf,Policies:cf,cacheSlot:lf,canonicalStringify:bs,createFragmentRegistry:Lp,defaultDataIdFromObject:ff,fieldNameFromStoreName:df,isReference:_s,makeReference:Es,makeVar:mf},Symbol.toStringTag,{value:"Module"})),Pp=["id"],$p=Kt({__name:"CommentsFrontendLegacy",props:{article:{},articleUrl:{}},emits:["loaded"],setup(e,{emit:t}){const n=e,r=t,{$channelConfig:i,$store:a,$device:s}=Mr(),u=Ns(),f=lt({commentsAds:xf.commentsAds,loadCommentsOnMount:!1}),v=lt(null),p=et(()=>`comments-fe-${u.params.id}`),_=et(()=>a.getters["gam/getAdsRenderingState"]);gi(async()=>{window.addEventListener("commentFeInited",T),f.value.loadCommentsOnMount&&await S()}),Ss(()=>{window.removeEventListener("commentFeInited",T)}),ws(()=>f.value.loadCommentsOnMount,async V=>{V&&await S()},{immediate:!0});function T(){r("loaded")}gi(async()=>{try{await S()}catch(V){Os("Fetch article for comments failed: loadComments failed",{contexts:{...V.message&&{message:V.message}},tags:{"process.type":"client"}}),console.error("Error: ","Fetch article for comments failed: loadComments failed"),wr(V)}});async function S(){await pf(),_.value||a.state.piano.isScriptInited?L():a.state.piano.isScriptInited||a.watch(V=>V.piano.isScriptInited,async()=>{L()})}function L(){window.showCommentDialog?x():hf(vf.comment_frontend_url).then(()=>{x()}).catch(V=>console.error("comments loadScript error",V))}function B(){document.getElementById("openLoginModal")?.click()}function x(){if(!v.value)return!1;if(!window.showCommentDialog)return wr({debug:"window.showCommentDialog does not exist",message:"comments.error.
129not_found",statusCode:404}),!1;const{showRegisteredOnly:V=!1}=i("page").article.component.comments,k=V||n.article&&n.article.comments.onlyRegisteredUsersAllowedToComment,I=a.state.piano.access.adFree;f.value.commentsAds.config.gamKeywords=a.getters["gam/getPageAdsTargeting"];const j=a.getters["gam/getAdUnitsConfig"],K=a.getters["gam/getDisabledAdsList"];j.tower&&!K.includes("tower")&&f.value.commentsAds.placements[0].gam.push(j.tower),j.content&&!K.includes("content")&&f.value.commentsAds.placements[1].gam.push(j.content),window.showCommentDialog(p.value,{articleId:u.params.id,publisherId:1,articleUrl:n.articleUrl,articleTitle:"",locale:i("settings").locale,tpl:"default",customTpl:"et",reverse:!1,noScroll:!0,orderBy:"DATE_ASC",offset:0,showAll:!k,ads:I?null:{config:f.value.commentsAds.config,placements:f.value.commentsAds.placements},noPreloader:!1,moreRepliesLimit:15,topInput:!(s.isMobile&&!s.isTablet),enableLoginApiClient:!1,enablePiano:!0,useCommentAPIv2:!0,loginAction:()=>B()})}return(V,k)=>(ye(),Ie("div",{id:je(p),ref_key:"commentsFe",ref:v},null,8,Pp))}}),Vp=`#import "@root/modules/article/graphql/fragments/Article.graphql" 130#import "@root/modules/article/graphql/fragments/ArticleAuthor.graphql" 131#import "@root/common/graphql/fragments/MetaImage.graphql" 132 133query portal_root_getArticleCommentsByID($id: [Int!], $authorLanguage: Language ) { 134 article: getArticles(input: {id: $id }) { 135 data: items { 136 ...Article 137 content { 138 paywall { 139 enabled 140 } 141 } 142 metaImage { 143 ...MetaImage 144 } 145 seoFields: attributes(input: {key: ["seoDescription", "seoTitle", "disallowIndexing"]}) { 146 key 147 value 148 } 149 banners: attributes(input: {key: "disableAds"}) { 150 key 151 value 152 } 153 authors { 154 items {
155 ...ArticleAuthor 156 } 157 } 158 } 159 } 160} 161`,un={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"portal_root_getArticleCommentsByID"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"authorLanguage"}},type:{kind:"NamedType",name:{kind:"Name",value:"Language"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"article"},name:{kind:"Name",value:"getArticles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"data"},name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Article"},directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywall"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metaImage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaImage"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"seoFields"},name:{kind:"Name",value:"attributes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"seoDescription",block:!1},{kind:"StringValue",value:"seoTitle",block:!1},{kind:"StringValue",value:"disallowIndexing",block:!1}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"banners"},name:{kind:"Name",value:"attributes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"disableAds",block:!1}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"authors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ArticleAuthor"},directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:825,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Vp}}},fa=e=>{const t={};return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;const r=n.name.value;return t[r]?!1:(t[r]=!0,!0)})};un.definitions=fa(un.definitions.concat(Gf.definitions));un.definitions=fa(un.definitions.concat(Bf.definitions));un.definitions=fa(un.definitions.concat(yf.definitions));const jp=(e,t)=>{const n=(p,_)=>{if(p.kind==="FragmentSpread")_.add(p.name.value);else if(p.kind==="VariableDefinition"){const T=p.type;T.kind==="NamedType"&&_.add(T.name.value)}return p&&"selectionSet"in p&&p.selectionSet&&p.selectionSet.selections.forEach(T=>{n(T,_)}),p&&"variableDefinitions"in p&&p.variableDefinitions&&p.variableDefinitions.forEach(T=>{n(T,_)}),p&&"definitions"in p&&p.definitions&&p.definitions.forEach(T=>{n(T,_)}),_},r=p=>{const _={};return p.definitions.forEach(function(T){"name"in T&&T.name&&(_[T.name.value]=n(T,new Set))}),_},i=(p,_)=>{for(let T=0;T<p.definitions.length;T++){const S=p.definitions[T];if(S&&"name"in S&&S.name&&S.name.value==_)return S}},a=r(e),s=Object.assign({},e,{definitions:[i(e,t)]}),u=a[t]||new Set,f=new Set;let v=new Set;for(u.forEach(p=>{v.add(p)});v.size>0;){const p=v;v=new Set,p.forEach(_=>{f.has(_)||(f.add(_),(a[_]||new Set).forEach(S=>{v.add(S)}))})}return f.forEach(p=>{const _=i(e,p);_&&s.definitions.push(_)}),s};jp(un,"portal_root_getArticleCommentsByID");class qp extends gf{constructor(t,n){super(t,{req:n?.req,serviceType:"article"})}fixVariables({id:t}){return{id:Number(t)}}async fetchArticleForComments(t){const n=Object.assign({query:un},{variables:t});if(isNaN(Number(t.id))||!bf(Number(t.id))){this.handleError({message:"article.error.not_found",statusCode:400,extraData:"invalid input `id`"});return}
161try{const r={remote:{keyPrefix:"article_comments"}},i=async v=>{const p=this.createProvider("GraphQL");p.selectAPI("content-api-v3").setLinkOptions({useAutomaticPersistedQueries:!0,useGETAutomaticPersistedQueries:!0});const[_]=await p.query(v);return this.throwGraphqlOrApolloErrorIfExists(_),_.data},a=await _f(i,r),s=a?await a.load(n):await i(n);if(s instanceof Error)throw s;return s?.article?.data.length||this.handleError({message:"article.error.not_found",statusCode:404}),{article:new Wf(s.article.data[0]).adapt()}}catch(r){const i=this.generateErrorData(r);this.handleError(i)}}async fetch(t){const n=this.fixVariables(t);return await this.fetchArticleForComments(n)}}const Qp={class:"comments-skeleton-loader"},Up={class:"container"},xp={class:"row justify-content-center"},Gp={class:"row"},Bp={class:"col-12"},Wp={class:"display-none display-md-block"},zp={class:"display-md-none"},Yp={class:"row"},Hp={class:"col-12"},Jp={class:"display-none display-md-block"},Kp={class:"display-md-none"},Xp={class:"row"},Zp={class:"comments-skeleton-loader__form-col"},eh={class:"comments-skeleton-loader__form-content-col"},th={class:"comments-skeleton-loader__author-col"},nh={class:"comments-skeleton-loader__author-content-col"},rh={class:"display-none display-md-block"},ih={class:"display-md-none"},ah=Kt({__name:"CommentsSkeletonLoader",setup(e){const{$store:t}=Mr(),n=et(()=>t.getters["gam/getDisabledAdsList"]);return(r,i)=>(ye(),Ie("div",Qp,[fe("div",Up,[fe("div",xp,[fe("div",{class:Pr(["comments-skeleton-loader__wrapper-col",{"comments-skeleton-loader__wrapper-col--has-tower":!je(n).includes("tower")}])},[fe("div",Gp,[fe("div",Bp,[fe("div",Wp,[Oe(Ge,{width:780,height:16,space:{top:"15px",bottom:"12px"},type:"rounded"}),Oe(Ge,{width:600,height:16,space:{bottom:"36px"},"max-width":"75%",type:"rounded"})]),fe("div",zp,[Oe(Ge,{width:343,height:12,space:{top:"15px",bottom:"10px"},type:"rounded"}),Oe(Ge,{width:264,height:12,space:{bottom:"36px"},"max-width":"75%",type:"rounded"})])])]),fe("div",Yp,[fe("div",Hp,[fe("div",Jp,[Oe(Ge,{width:780,height:8,space:{bottom:"8px"},"max-width":"75%",type:"rounded"}),Oe(Ge,{width:600,height:8,space:{bottom:"8px"},"max-width":"60%",type:"rounded"}),Oe(Ge,{width:550,height:8,space:{bottom:"48px"},"max-width":"50%",type:"rounded"})]),fe("div",Kp,[Oe(Ge,{width:343,height:8,space:{bottom:"8px"},"max-width":"75%",type:"rounded"}),Oe(Ge,{width:264,height:8,space:{bottom:"8px"},"max-width":"60%",type:"rounded"}),Oe(Ge,{width:264,height:8,space:{bottom:"36px"},"max-width":"50%",type:"rounded"})])])]),fe("div",Xp,[fe("div",Zp,[Oe(Ge,{width:48,height:48,type:"round"})]),fe("div",eh,[Oe(Ge,{width:780,height:48,space:{bottom:"70px"},type:"rounded",class:""})])]),(ye(),Ie(En,null,Fi(6,a=>fe("div",{key:a,class:"row"},[fe("div",th,[Oe(Ge,{width:48,height:48,type:"round"})]),fe("div",nh,[Oe(Ge,{width:84,height:10,space:{top:"10px",bottom:"8px"},type:"rounded"}),Oe(Ge,{width:60,height:10,space:{bottom:"20px"},type:"rounded"}),fe("div",rh,[Oe(Ge,{width:550,height:10,"max-width":"75%",space:{bottom:"8px"},type:"rounded"}),Oe(Ge,{width:400,height:10,"max-width":"60%",space:{bottom:"36px"},type:"rounded"})]),fe("div",ih,[Oe(Ge,{width:550,height:10,space:{bottom:"8px"},type:"rounded"}),Oe(Ge,{width:400,height:10,"max-width":"75%",space:{bottom:"36px"},type:"rounded"})])])])),64))],2)])])]))}}),sh=Kn(ah,[["__scopeId","data-v-0e0fab88"]]);function oh({article:e,$channelConfig:t}){const{targeting:n=[],...r}=zf({article:e,$channelConfig:t});return{...r,targeting:n.map(i=>i.key==="page_type"?{...i,value:"comments"}:i)}}var li={};const da=xe(Ef),iu=xe(Zf),au=xe(Fp),uh=xe(Ap),ch=xe(Tf),lh=xe(Dp),fh=xe(Mp),dh=xe(Nf),su=xe(Sf),ou=xe(wf),mh=xe(Cp),uu=xe(hp),ph=xe(Rp),hh=xe(Of),vh=xe(If);var Ha;function yh(){return Ha||(Ha=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=da,n=iu,r=au,i=uh,a=ch,s=lh,u=fh,f=dh,v=su,p=ou,_=mh,T=uu,S=ph,L=hh,B=vh;function x(g){return g&&typeof g=="object"&&"default"in g?g.default:g}var V=x(a),k="3.14.0";function I(g){return g!==null&&typeof g=="object"}function j(g){return Array.isArray(g)&&g.length>0}var K=Object.prototype.hasOwnProperty,G=function(g,o,c){return this.merge
161(g[c],o[c])},_e=(function(){function g(o){o===void 0&&(o=G),this.reconciler=o,this.isObject=I,this.pastCopies=new Set}return g.prototype.merge=function(o,c){for(var m=this,y=[],E=2;E<arguments.length;E++)y[E-2]=arguments[E];return I(c)&&I(o)?(Object.keys(c).forEach(function(N){if(K.call(o,N)){var F=o[N];if(c[N]!==F){var $=m.reconciler.apply(m,t.__spreadArray([o,c,N],y,!1));$!==F&&(o=m.shallowCopyForMerge(o),o[N]=$)}}else o=m.shallowCopyForMerge(o),o[N]=c[N]}),o):c},g.prototype.shallowCopyForMerge=function(o){return I(o)&&(this.pastCopies.has(o)||(Array.isArray(o)?o=o.slice(0):o=t.__assign({__proto__:Object.getPrototypeOf(o)},o),this.pastCopies.add(o))),o},g})();function pe(g){return"incremental"in g}function C(g,o){var c=g,m=new _e;return pe(o)&&j(o.incremental)&&o.incremental.forEach(function(y){for(var E=y.data,N=y.path,F=N.length-1;F>=0;--F){var $=N[F],M=!isNaN(+$),U=M?[]:{};U[$]=E,E=U}c=m.merge(c,E)}),c}e.NetworkStatus=void 0,(function(g){g[g.loading=1]="loading",g[g.setVariables=2]="setVariables",g[g.fetchMore=3]="fetchMore",g[g.refetch=4]="refetch",g[g.poll=6]="poll",g[g.ready=7]="ready",g[g.error=8]="error"})(e.NetworkStatus||(e.NetworkStatus={}));function Q(g){return g?g<7:!1}function ce(g){return g===7||g===8}function Pe(g,o,c,m){var y=o.data,E=t.__rest(o,["data"]),N=c.data,F=t.__rest(c,["data"]);return V(E,F)&&We(s.getMainDefinition(g).selectionSet,y,N,{fragmentMap:s.createFragmentMap(s.getFragmentDefinitions(g)),variables:m})}function We(g,o,c,m){if(o===c)return!0;var y=new Set;return g.selections.every(function(E){if(y.has(E)||(y.add(E),!s.shouldInclude(E,m.variables))||Lt(E))return!0;if(s.isField(E)){var N=s.resultKeyNameFromField(E),F=o&&o[N],$=c&&c[N],M=E.selectionSet;if(!M)return V(F,$);var U=Array.isArray(F),ee=Array.isArray($);if(U!==ee)return!1;if(U&&ee){var Y=F.length;if($.length!==Y)return!1;for(var J=0;J<Y;++J)if(!We(M,F[J],$[J],m))return!1;return!0}return We(M,F,$,m)}else{var Z=s.getFragmentFromSelection(E,m.fragmentMap);if(Z)return Lt(Z)?!0:We(Z.selectionSet,o,c,m)}})}function Lt(g){return!!g.directives&&g.directives.some(ht)}function ht(g){return g.name.value==="nonreactive"}var Gt=Symbol.for("apollo.deprecations"),Mt=n.global,Pt=new v.Slot;function at(g){return Mt[Gt]||(Pt.getValue()||[]).includes(g)}function ze(g){for(var o=[],c=1;c<arguments.length;c++)o[c-1]=arguments[c];return Pt.withValue.apply(Pt,t.__spreadArray([Array.isArray(g)?g:[g]],o,!1))}function qe(g,o,c,m){m===void 0&&(m="Please remove this option."),D(o,function(){o in g&&globalThis.__DEV__!==!1&&n.invariant.warn(104,c,o,m)})}function D(g,o){at(g)||o()}var H=Object.assign,z=Object.hasOwnProperty,te=(function(g){t.__extends(o,g);function o(c){var m=c.queryManager,y=c.queryInfo,E=c.options,N=this,F=o.inactiveOnCreation.getValue();N=g.call(this,function(re){N._getOrCreateQuery();try{var oe=re._subscription._observer;oe&&!oe.error&&(oe.error=Ne)}catch{}var Te=!N.observers.size;N.observers.add(re);var me=N.last;return me&&me.error?re.error&&re.error(me.error):me&&me.result&&re.
161next&&re.next(N.maskResult(me.result)),Te&&N.reobserve().catch(function(){}),function(){N.observers.delete(re)&&!N.observers.size&&N.tearDownQuery()}})||this,N.observers=new Set,N.subscriptions=new Set,N.dirty=!1,N._getOrCreateQuery=function(){return F&&(m.queries.set(N.queryId,y),F=!1),N.queryManager.getOrCreateQuery(N.queryId)},N.queryInfo=y,N.queryManager=m,N.waitForOwnResult=Ee(E.fetchPolicy),N.isTornDown=!1,N.subscribeToMore=N.subscribeToMore.bind(N),N.maskResult=N.maskResult.bind(N);var $=m.defaultOptions.watchQuery,M=$===void 0?{}:$,U=M.fetchPolicy,ee=U===void 0?"cache-first":U,Y=E.fetchPolicy,J=Y===void 0?ee:Y,Z=E.initialFetchPolicy,X=Z===void 0?J==="standby"?ee:J:Z;N.options=t.__assign(t.__assign({},E),{initialFetchPolicy:X,fetchPolicy:J}),N.queryId=y.queryId||m.generateQueryId();var ne=s.getOperationDefinition(N.query);return N.queryName=ne&&ne.name&&ne.name.value,N}return Object.defineProperty(o.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),o.prototype.result=function(){var c=this;return globalThis.__DEV__!==!1&&D("observableQuery.result",function(){globalThis.__DEV__!==!1&&n.invariant.warn(23)}),new Promise(function(m,y){var E={next:function(F){m(F),c.observers.delete(E),c.observers.size||c.queryManager.removeQuery(c.queryId),setTimeout(function(){N.unsubscribe()},0)},error:y},N=c.subscribe(E)})},o.prototype.resetDiff=function(){this.queryInfo.resetDiff()},o.prototype.getCurrentFullResult=function(c){var m=this;c===void 0&&(c=!0);var y=ze("getLastResult",function(){return m.getLastResult(!0)}),E=this.queryInfo.networkStatus||y&&y.networkStatus||e.NetworkStatus.ready,N=t.__assign(t.__assign({},y),{loading:Q(E),networkStatus:E}),F=this.options.fetchPolicy,$=F===void 0?"cache-first":F;if(!(Ee($)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var M=this.queryInfo.getDiff();(M.complete||this.options.returnPartialData)&&(N.data=M.result),a.equal(N.data,{})&&(N.data=void 0),M.complete?(delete N.partial,M.complete&&N.networkStatus===e.NetworkStatus.loading&&($==="cache-first"||$==="cache-only")&&(N.networkStatus=e.NetworkStatus.ready,N.loading=!1)):N.partial=!0,N.networkStatus===e.NetworkStatus.ready&&(N.error||N.errors)&&(N.networkStatus=e.NetworkStatus.error),globalThis.__DEV__!==!1&&!M.complete&&!this.options.partialRefetch&&!N.loading&&!N.data&&!N.error&&Re(M.missing)}return c&&this.updateLastResult(N),N},o.prototype.getCurrentResult=function(c){return c===void 0&&(c=!0),this.maskResult(this.getCurrentFullResult(c))},o.prototype.isDifferentFromLastResult=function(c,m){if(!this.last)return!0;var y=this.queryManager.getDocumentInfo(this.query),E=this.queryManager.dataMasking,N=E?y.nonReactiveQuery:this.query,F=E||y.hasNonreactiveDirective?!Pe(N,this.last.result,c,this.variables):!a.equal(this.last.result,c);return F||m&&!a.equal(this.last.variables,m)},o.prototype.getLast=function(c,m){var y=this.last;if(y&&y[c]&&(!m||a.equal(y.variables,this.variables)))return y[c]},o.prototype.getLastResult=function(c){return globalThis.__DEV__!==!1&&D("getLastResult",function(){globalThis.__DEV__!==!1&&n.invariant.warn(24)}),this.getLast("result",c)},o.prototype.getLastError=function(c){return globalThis.__DEV__!==!1&&D("getLastError",function(){globalThis.__DEV__!==!1&&n.invariant.warn(25)}),this.getLast("error",c)},o.prototype.resetLastResults=function(){globalThis.__DEV__!==!1&&D("resetLastResults",function(){globalThis.__DEV__!==!1&&n.invariant.warn(26)}),delete this.last,this.isTornDown=!1},o.prototype.resetQueryStoreErrors=function(){globalThis.__DEV__!==!1&&globalThis.__DEV__!==!1&&n.invariant.warn(27),this.queryManager.resetErrors(this.queryId)},o.prototype.refetch=function(c){var m,y={pollInterval:0},E=this.options.fetchPolicy;if(E==="no-cache"?y.fetchPolicy="no-cache":y.fetchPolicy="network-only",globalThis.__DEV__!==!1&&c&&z.call(c,"variables")){var N=s.getQueryDefinition(this.query),F=N.variableDefinitions;(!F||!F.some(function($){return $.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&n.invariant.warn(28,c,((m=N.name)===null||m===void 0?void 0:m.value)||N)}return c&&!a.equal(this.options.variables,c)&&(y.variables=this.options.variables=t.__assign(t.__assign({},this.options.variables),c)),this.queryInfo.resetLastWrite(),this.reobserve(y,e.NetworkStatus.refetch)},o.prototype.fetchMore=function(c){var m=this,y=t.__assign(t.__assign({},c.query?c:t.__assign(t.__assign(t.__assign(t.__assign({},this.options),{query:this.options.query}),c),{variables:t.__assign(t.__assign({},this.options.variables),c.variables)})),{fetchPolicy:"no-cache"});y.query=this.transformDocument(y.query);var E=this.queryManager.generateQueryId();this.lastQuery=c.query?this.transformDocument(this.options.query):y.query;var N=this.queryInfo,F=N.networkStatus;N.networkStatus=e.NetworkStatus.fetchMore,y.notifyOnNetworkStatusChange&&this.observe();var $=new Set,M=c?.updateQuery,U=this.options.fetchPolicy!=="no-cache";return U||n.invariant(M,29),this.queryManager.fetchQuery(E,y,e.NetworkStatus.fetchMore).then(function(ee){if(m.queryManager.removeQuery(E),N.networkStatus===e.NetworkStatus.fetchMore&&(N.networkStatus=F),U)m.queryManager.cache.batch({update:function(Z){var X=c.updateQuery;X?Z.updateQuery({query:m.query,variables:m.variables,returnPartialData:!0,optimistic:!1},function(ne){return X(ne,{fetchMoreResult:ee.data,variables:y.variables})}):Z.writeQuery({query:y.query,variables:y.variables,data:ee.data})}
161,onWatchUpdated:function(Z){$.add(Z.query)}});else{var Y=m.getLast("result"),J=M(Y.data,{fetchMoreResult:ee.data,variables:y.variables});m.reportResult(t.__assign(t.__assign({},Y),{networkStatus:F,loading:Q(F),data:J}),m.variables)}return m.maskResult(ee)}).finally(function(){U&&!$.has(m.query)&&m.reobserveCacheFirst()})},o.prototype.subscribeToMore=function(c){var m=this,y=this.queryManager.startGraphQLSubscription({query:c.document,variables:c.variables,context:c.context}).subscribe({next:function(E){var N=c.updateQuery;N&&m.updateQuery(function(F,$){return N(F,t.__assign({subscriptionData:E},$))})},error:function(E){if(c.onError){c.onError(E);return}globalThis.__DEV__!==!1&&n.invariant.error(30,E)}});return this.subscriptions.add(y),function(){m.subscriptions.delete(y)&&y.unsubscribe()}},o.prototype.setOptions=function(c){return globalThis.__DEV__!==!1&&(qe(c,"canonizeResults","setOptions"),D("setOptions",function(){globalThis.__DEV__!==!1&&n.invariant.warn(31)})),this.reobserve(c)},o.prototype.silentSetOptions=function(c){var m=s.compact(this.options,c||{});H(this.options,m)},o.prototype.setVariables=function(c){var m=this;return a.equal(this.variables,c)?this.observers.size?ze("observableQuery.result",function(){return m.result()}):Promise.resolve():(this.options.variables=c,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:c},e.NetworkStatus.setVariables):Promise.resolve())},o.prototype.updateQuery=function(c){var m=this.queryManager,y=m.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),E=y.result,N=y.complete,F=c(E,{variables:this.variables,complete:!!N,previousData:E});F&&(m.cache.writeQuery({query:this.options.query,data:F,variables:this.variables}),m.broadcastQueries())},o.prototype.startPolling=function(c){this.options.pollInterval=c,this.updatePolling()},o.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},o.prototype.applyNextFetchPolicy=function(c,m){if(m.nextFetchPolicy){var y=m.fetchPolicy,E=y===void 0?"cache-first":y,N=m.initialFetchPolicy,F=N===void 0?E:N;E==="standby"||(typeof m.nextFetchPolicy=="function"?m.fetchPolicy=m.nextFetchPolicy(E,{reason:c,options:m,observable:this,initialFetchPolicy:F}):c==="variables-changed"?m.fetchPolicy=F:m.fetchPolicy=m.nextFetchPolicy)}return m.fetchPolicy},o.prototype.fetch=function(c,m,y){var E=this._getOrCreateQuery();return E.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(E,c,m,y)},o.prototype.updatePolling=function(){var c=this;if(!this.queryManager.ssrMode){var m=this,y=m.pollingInfo,E=m.options.pollInterval;if(!E||!this.hasObservers()){y&&(clearTimeout(y.timeout),delete this.pollingInfo);return}if(!(y&&y.interval===E)){n.invariant(E,32);var N=y||(this.pollingInfo={});N.interval=E;var F=function(){var M,U;c.pollingInfo&&(!Q(c.queryInfo.networkStatus)&&!(!((U=(M=c.options).skipPollAttempt)===null||U===void 0)&&U.call(M))?c.reobserve({fetchPolicy:c.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},e.NetworkStatus.poll).then($,$):$())},$=function(){var M=c.pollingInfo;M&&(clearTimeout(M.timeout),M.timeout=setTimeout(F,M.interval))};$()}}},o.prototype.updateLastResult=function(c,m){var y=this;m===void 0&&(m=this.variables);var E=ze("getLastError",function(){return y.getLastError()});return E&&this.last&&!a.equal(m,this.last.variables)&&(E=void 0),this.last=t.__assign({result:this.queryManager.assumeImmutableResults?c:s.cloneDeep(c),variables:m},E?{error:E}:null)},o.prototype.reobserveAsConcast=function(c,m){var y=this;this.isTornDown=!1;var E=m===e.NetworkStatus.refetch||m===e.NetworkStatus.fetchMore||m===e.NetworkStatus.poll,N=this.options.variables,F=this.options.fetchPolicy,$=s.compact(this.options,c||{}),M=E?$:H(this.options,$),U=this.transformDocument(M.query);this.lastQuery=U,E||(this.updatePolling(),c&&c.variables&&!a.equal(c.variables,N)&&M.fetchPolicy!=="standby"&&(M.fetchPolicy===F||typeof M.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",M),m===void 0&&(m=e.NetworkStatus.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=Ee(M.fetchPolicy));
161var ee=function(){y.concast===Z&&(y.waitForOwnResult=!1)},Y=M.variables&&t.__assign({},M.variables),J=this.fetch(M,m,U),Z=J.concast,X=J.fromLink,ne={next:function(re){a.equal(y.variables,Y)&&(ee(),y.reportResult(re,Y))},error:function(re){a.equal(y.variables,Y)&&(f.isApolloError(re)||(re=new f.ApolloError({networkError:re})),ee(),y.reportError(re,Y))}};return!E&&(X||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=Z,this.observer=ne),Z.addObserver(ne),Z},o.prototype.reobserve=function(c,m){return s.preventUnhandledRejection(this.reobserveAsConcast(c,m).promise.then(this.maskResult))},o.prototype.resubscribeAfterError=function(){for(var c=this,m=[],y=0;y<arguments.length;y++)m[y]=arguments[y];var E=this.last;ze("resetLastResults",function(){return c.resetLastResults()});var N=this.subscribe.apply(this,m);return this.last=E,N},o.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},o.prototype.reportResult=function(c,m){var y=this,E=ze("getLastError",function(){return y.getLastError()}),N=this.isDifferentFromLastResult(c,m);(E||!c.partial||this.options.returnPartialData)&&this.updateLastResult(c,m),(E||N)&&s.iterateObserversSafely(this.observers,"next",this.maskResult(c))},o.prototype.reportError=function(c,m){var y=this,E=t.__assign(t.__assign({},ze("getLastResult",function(){return y.getLastResult()})),{error:c,errors:c.graphQLErrors,networkStatus:e.NetworkStatus.error,loading:!1});this.updateLastResult(E,m),s.iterateObserversSafely(this.observers,"error",this.last.error=c)},o.prototype.hasObservers=function(){return this.observers.size>0},o.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(c){return c.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},o.prototype.transformDocument=function(c){return this.queryManager.transform(c)},o.prototype.maskResult=function(c){return c&&"data"in c?t.__assign(t.__assign({},c),{data:this.queryManager.maskOperation({document:this.query,data:c.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):c},o.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},o.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},o.prototype.scheduleNotify=function(){var c=this;this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return c.notify()},0)))},o.prototype.notify=function(){if(this.cancelNotifyTimeout(),this.dirty&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!Q(this.queryInfo.networkStatus))){var c=this.queryInfo.getDiff();c.fromOptimisticTransaction?this.observe():this.reobserveCacheFirst()}this.dirty=!1},o.prototype.reobserveCacheFirst=function(){var c=this.options,m=c.fetchPolicy,y=c.nextFetchPolicy;return m==="cache-and-network"||m==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(E,N){return this.nextFetchPolicy=y,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(E,N):m}}):this.reobserve()},o.inactiveOnCreation=new v.Slot,o})(s.Observable);s.fixObservableSubclass(te);function Ne(g){globalThis.__DEV__!==!1&&n.invariant.error(33,g.message,g.stack)}function Re(g){globalThis.__DEV__!==!1&&g&&globalThis.__DEV__!==!1&&n.invariant.debug(34,g)}function Ee(g){return g==="network-only"||g==="no-cache"||g==="standby"}var tt=new(s.canUseWeakMap?WeakMap:Map);function Bt(g,o){var c=g[o];typeof c=="function"&&(g[o]=function(){return tt.set(g,(tt.get(g)+1)%1e15),c.apply(this,arguments)})}var Wt=(function(){function g(o,c){c===void 0&&(c=o.generateQueryId()),this.queryId=c,this.document=null,this.lastRequestId=1,this.stopped=!1,this.observableQuery=null;var m=this.cache=o.cache;tt.has(m)||(tt.set(m,0),Bt(m,"evict"),Bt(m,"modify"),Bt(m,"reset"))}return g.prototype.init=function(o){var c=o.networkStatus||e.NetworkStatus.loading;return this.variables&&this.networkStatus!==e.NetworkStatus.loading&&!a.equal(this.variables,o.variables)&&(c=e.NetworkStatus.setVariables),a.equal(o.variables,this.variables)||(this.lastDiff=void 0,this.cancel()),Object.assign(this,{document:o.document,variables:o.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:c}),o.observableQuery&&this.setObservableQuery(o.observableQuery),o.lastRequestId&&(this.lastRequestId=o.lastRequestId),this},g.prototype.resetDiff=function(){this.lastDiff=void 0},g.prototype.getDiff=function(){var o=this,c=this.getDiffOptions();if(this.lastDiff&&a.equal(c,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var m=this.observableQuery;if(m&&m.options.fetchPolicy==="no-cache")return{complete:!1};var y=ze("canonizeResults",function(){return o.cache.diff(c)});return this.updateLastDiff(y,c),y},g.prototype.updateLastDiff=function(o,c){this.lastDiff=o?{diff:o,options:c||this.getDiffOptions()}:void 0},g.prototype.getDiffOptions=function(o){var c;return o===void 0&&(o=this.variables),{query:this.document,variables:o,returnPartialData:!0,optimistic:!0,canonizeResults:(c=this.observableQuery)===null||c===void 0?void 0:c.options.canonizeResults}},g.prototype.setDiff=function(o){var c=this,m,y=this.lastDiff&&this.lastDiff.diff;o&&!o.complete&&ze("getLastError",function(){var E;return(E=c.observableQuery)===null||E===void 0?void 0:E.getLastError()})||(this.updateLastDiff(o),a.equal(y&&y.result,o&&o.result)||(m=this.observableQuery)===null||m===void 0||m.scheduleNotify())},g.prototype.setObservableQuery=function(o){o!==this.observableQuery&&(this.observableQuery=o,o&&(o.queryInfo=this))},g.prototype.stop=function(){var o;if(!this.stopped){this.stopped=!0,(o=this.observableQuery)===null||o===void 0||o.resetNotifications(),this.cancel();var c=this.observableQuery;c&&c.stopPolling()}},g.prototype.cancel=function(){var o;(o=this.cancelWatch)===null||o===void 0||o.call(this),this.cancelWatch=void 0},g.prototype.updateWatch=function(o){var c=this;o===void 0&&(o=this.variables);var m=this.observableQuery;if(!(m&&m.options.fetchPolicy==="no-cache")){var y=t.__assign(t.__assign({},this.getDiffOptions(o)),{watcher:this,callback:function(E){return c.setDiff(E)}});(!this.lastWatch||!a.equal(y,this.lastWatch))&&(this.cancel(),this.cancelWatch=this.cache.watch(this.lastWatch=y))}},g.prototype.resetLastWrite=function(){this.lastWrite=void 0},g.prototype.shouldWrite=function(o,c){var m=this.lastWrite;return!(m&&m.dmCount===tt.get(this.cache)&&a.equal(c,m.variables)&&a.equal(o.data,m.result.data))},g.prototype.markResult=function(o,c,m,y){var E=this,N,F=new s.DeepMerger,$=s.isNonEmptyArray(o.errors)?o.errors.slice(0):[];if((N=this.observableQuery)===null||N===void 0||N.resetNotifications(),"incremental"in o&&s.isNonEmptyArray(o.incremental)){var M=s.mergeIncrementalData(this.getDiff().result,o);o.data=M}else if("hasNext"in o&&o.hasNext){var U=this.getDiff();o.data=F.merge(U.result,o.data)}this.graphQLErrors=$,m.fetchPolicy==="no-cache"?this.updateLastDiff({result:o.data,complete:!0},this.getDiffOptions(m.variables)):y!==0&&(He(o,m.errorPolicy)?this.cache.performTransaction(function(ee){if(E.shouldWrite(o,m.variables))ee.writeQuery({query:c,data:o.data,variables:m.variables,overwrite:y===1}),E.lastWrite={result:o,variables:m.variables,dmCount:tt.get(E.cache)};else if(E.lastDiff&&E.lastDiff.diff.complete){o.data=E.lastDiff.diff.result;return}var Y=E.getDiffOptions(m.variables),J=ze("canonizeResults",function(){return ee.diff(Y)});!E.stopped&&a.equal(E.variables,m.variables)&&E.updateWatch(m.variables),E.updateLastDiff(J,Y),J.complete&&(o.data=J.result)}):this.lastWrite=void 0)},g.prototype.markReady=function(){return this.networkError=null,this.networkStatus=e.NetworkStatus.ready},g.prototype.markError=function(o){var c;return this.networkStatus=e.NetworkStatus.error,this.lastWrite=void 0,(c=this.observableQuery)===null||c===void 0||c.resetNotifications(),o.graphQLErrors&&(this.graphQLErrors=o.graphQLErrors),o.networkError&&(this.networkError=o.networkError),o},g})();function He(g,o){o===void 0&&(o="none");var c=o==="ignore"||o==="all",m=!s.graphQLResultHasError(g);return!m&&c&&g.data&&(m=!0),m}var Yr=Object.prototype.hasOwnProperty,sr=Object.create(null),Hr=(function(){function g(o){var c=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new s.AutoCleanedWeakCache(s.cacheSizes["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new p.Trie(!1),this.noCacheWarningsByQueryId=new Set;var m=new s.DocumentTransform(function(E){return c.cache.transformDocument(E)},{cache:!1});this.cache=o.cache,this.link=o.link,this.defaultOptions=o.defaultOptions,this.queryDeduplication=o.queryDeduplication,this.clientAwareness=o.clientAwareness,this.localState=o.localState,this.ssrMode=o.ssrMode,this.assumeImmutableResults=o.assumeImmutableResults,this.dataMasking=o.dataMasking;var y=o.documentTransform;this.documentTransform=y?m.concat(y).concat(m):m,this.defaultContext=o.defaultContext||Object.create(null),(this.onBroadcast=o.onBroadcast)&&(this.mutationStore=Object.create(null))}return g.prototype.stop=function(){var o=this;
161this.queries.forEach(function(c,m){o.stopQueryNoBroadcast(m)}),this.cancelPendingFetches(n.newInvariantError(35))},g.prototype.cancelPendingFetches=function(o){this.fetchCancelFns.forEach(function(c){return c(o)}),this.fetchCancelFns.clear()},g.prototype.mutate=function(o){return t.__awaiter(this,arguments,void 0,function(c){var m,y,E,N,F,$,M,U=c.mutation,ee=c.variables,Y=c.optimisticResponse,J=c.updateQueries,Z=c.refetchQueries,X=Z===void 0?[]:Z,ne=c.awaitRefetchQueries,re=ne===void 0?!1:ne,oe=c.update,Te=c.onQueryUpdated,me=c.fetchPolicy,ge=me===void 0?(($=this.defaultOptions.mutate)===null||$===void 0?void 0:$.fetchPolicy)||"network-only":me,$e=c.errorPolicy,nt=$e===void 0?((M=this.defaultOptions.mutate)===null||M===void 0?void 0:M.errorPolicy)||"none":$e,Xe=c.keepRootFields,Ye=c.context;return t.__generator(this,function(pn){switch(pn.label){case 0:return n.invariant(U,36),n.invariant(ge==="network-only"||ge==="no-cache",37),m=this.generateMutationId(),U=this.cache.transformForLink(this.transform(U)),y=this.getDocumentInfo(U).hasClientExports,ee=this.getVariables(U,ee),y?[4,this.localState.addExportedVariables(U,ee,Ye)]:[3,2];case 1:ee=pn.sent(),pn.label=2;case 2:return E=this.mutationStore&&(this.mutationStore[m]={mutation:U,variables:ee,loading:!0,error:null}),N=Y&&this.markMutationOptimistic(Y,{mutationId:m,document:U,variables:ee,fetchPolicy:ge,errorPolicy:nt,context:Ye,updateQueries:J,update:oe,keepRootFields:Xe}),this.broadcastQueries(),F=this,[2,new Promise(function(jn,Zt){return s.asyncMap(F.getObservableFromLink(U,t.__assign(t.__assign({},Ye),{optimisticResponse:N?Y:void 0}),ee,{},!1),function(Je){if(s.graphQLResultHasError(Je)&&nt==="none")throw new f.ApolloError({graphQLErrors:s.getGraphQLErrorsFromResult(Je)});E&&(E.loading=!1,E.error=null);var gt=t.__assign({},Je);return typeof X=="function"&&(X=X(gt)),nt==="ignore"&&s.graphQLResultHasError(gt)&&delete gt.errors,F.markMutationResult({mutationId:m,result:gt,document:U,variables:ee,fetchPolicy:ge,errorPolicy:nt,context:Ye,update:oe,updateQueries:J,awaitRefetchQueries:re,refetchQueries:X,removeOptimistic:N?m:void 0,onQueryUpdated:Te,keepRootFields:Xe})}).subscribe({next:function(Je){F.broadcastQueries(),(!("hasNext"in Je)||Je.hasNext===!1)&&jn(t.__assign(t.__assign({},Je),{data:F.maskOperation({document:U,data:Je.data,fetchPolicy:ge,id:m})}))},error:function(Je){E&&(E.loading=!1,E.error=Je),N&&F.cache.removeOptimistic(m),F.broadcastQueries(),Zt(Je instanceof f.ApolloError?Je:new f.ApolloError({networkError:Je}))}})})]}})})},g.prototype.markMutationResult=function(o,c){var m=this;c===void 0&&(c=this.cache);var y=o.result,E=[],N=o.fetchPolicy==="no-cache";if(!N&&He(y,o.errorPolicy)){if(s.isExecutionPatchIncrementalResult(y)||E.push({result:y.data,dataId:"ROOT_MUTATION",query:o.document,variables:o.variables}),s.isExecutionPatchIncrementalResult(y)&&s.isNonEmptyArray(y.incremental)){var F=c.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(o.document).asQuery,variables:o.variables,optimistic:!1,returnPartialData:!0}),$=void 0;F.result&&($=C(F.result,y)),typeof $<"u"&&(y.data=$,E.push({result:$,dataId:"ROOT_MUTATION",query:o.document,variables:o.variables}))}var M=o.updateQueries;M&&this.queries.forEach(function(ee,Y){var J=ee.observableQuery,Z=J&&J.queryName;if(!(!Z||!Yr.call(M,Z))){var X=M[Z],ne=m.queries.get(Y),re=ne.document,oe=ne.variables,Te=c.diff({query:re,variables:oe,returnPartialData:!0,optimistic:!1}),me=Te.result,ge=Te.complete;if(ge&&me){var $e=X(me,{mutationResult:y,queryName:re&&s.getOperationName(re)||void 0,queryVariables:oe});$e&&E.push({result:$e,dataId:"ROOT_QUERY",query:re,variables:oe})}}})}if(E.length>0||(o.refetchQueries||"").length>0||o.update||o.onQueryUpdated||o.removeOptimistic){var U=[];if(this.refetchQueries({updateCache:function(ee){N||E.forEach(function(X){return ee.write(X)});var Y=o.update,J=!s.isExecutionPatchResult(y)||s.isExecutionPatchIncrementalResult(y)&&!y.hasNext;if(Y){if(!N){var Z=ee.diff({id:"ROOT_MUTATION",query:m.getDocumentInfo(o.document).asQuery,variables:o.variables,optimistic:!1,returnPartialData:!0});Z.complete&&(y=t.__assign(t.__assign({},y),{data:Z.result}),"incremental"in y&&delete y.incremental,"hasNext"in y&&delete y.hasNext)}
161J&&Y(ee,y,{context:o.context,variables:o.variables})}!N&&!o.keepRootFields&&J&&ee.modify({id:"ROOT_MUTATION",fields:function(X,ne){var re=ne.fieldName,oe=ne.DELETE;return re==="__typename"?X:oe}})},include:o.refetchQueries,optimistic:!1,removeOptimistic:o.removeOptimistic,onQueryUpdated:o.onQueryUpdated||null}).forEach(function(ee){return U.push(ee)}),o.awaitRefetchQueries||o.onQueryUpdated)return Promise.all(U).then(function(){return y})}return Promise.resolve(y)},g.prototype.markMutationOptimistic=function(o,c){var m=this,y=typeof o=="function"?o(c.variables,{IGNORE:sr}):o;return y===sr?!1:(this.cache.recordOptimisticTransaction(function(E){try{m.markMutationResult(t.__assign(t.__assign({},c),{result:{data:y}}),E)}catch(N){globalThis.__DEV__!==!1&&n.invariant.error(N)}},c.mutationId),!0)},g.prototype.fetchQuery=function(o,c,m){return this.fetchConcastWithInfo(this.getOrCreateQuery(o),c,m).concast.promise},g.prototype.getQueryStore=function(){var o=Object.create(null);return this.queries.forEach(function(c,m){o[m]={variables:c.variables,networkStatus:c.networkStatus,networkError:c.networkError,graphQLErrors:c.graphQLErrors}}),o},g.prototype.resetErrors=function(o){var c=this.queries.get(o);c&&(c.networkError=void 0,c.graphQLErrors=[])},g.prototype.transform=function(o){return this.documentTransform.transformDocument(o)},g.prototype.getDocumentInfo=function(o){var c=this.transformCache;if(!c.has(o)){var m={hasClientExports:s.hasClientExports(o),hasForcedResolvers:this.localState.shouldForceResolvers(o),hasNonreactiveDirective:s.hasDirectives(["nonreactive"],o),nonReactiveQuery:s.addNonReactiveToNamedFragments(o),clientQuery:this.localState.clientQuery(o),serverQuery:s.removeDirectivesFromDocument([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],o),defaultVars:s.getDefaultValues(s.getOperationDefinition(o)),asQuery:t.__assign(t.__assign({},o),{definitions:o.definitions.map(function(y){return y.kind==="OperationDefinition"&&y.operation!=="query"?t.__assign(t.__assign({},y),{operation:"query"}):y})})};c.set(o,m)}return c.get(o)},g.prototype.getVariables=function(o,c){return t.__assign(t.__assign({},this.getDocumentInfo(o).defaultVars),c)},g.prototype.watchQuery=function(o){var c=this.transform(o.query);o=t.__assign(t.__assign({},o),{variables:this.getVariables(c,o.variables)}),typeof o.notifyOnNetworkStatusChange>"u"&&(o.notifyOnNetworkStatusChange=!1);var m=new Wt(this),y=new te({queryManager:this,queryInfo:m,options:o});return y.lastQuery=c,te.inactiveOnCreation.getValue()||this.queries.set(y.queryId,m),m.init({document:c,observableQuery:y,variables:y.variables}),y},g.prototype.query=function(o,c){var m=this;c===void 0&&(c=this.generateQueryId()),n.invariant(o.query,38),n.invariant(o.query.kind==="Document",39),n.invariant(!o.returnPartialData,40),n.invariant(!o.pollInterval,41);var y=this.transform(o.query);return this.fetchQuery(c,t.__assign(t.__assign({},o),{query:y})).then(function(E){return E&&t.__assign(t.__assign({},E),{data:m.maskOperation({document:y,data:E.data,fetchPolicy:o.fetchPolicy,id:c})})}).finally(function(){return m.stopQuery(c)})},g.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},g.prototype.generateRequestId=function(){return this.requestIdCounter++},g.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},g.prototype.stopQueryInStore=function(o){this.stopQueryInStoreNoBroadcast(o),this.broadcastQueries()},g.prototype.stopQueryInStoreNoBroadcast=function(o){var c=this.queries.get(o);c&&c.stop()},g.prototype.clearStore=function(o){return o===void 0&&(o={discardWatches:!0}),this.cancelPendingFetches(n.newInvariantError(42)),this.queries.forEach(function(c){c.observableQuery?c.networkStatus=e.NetworkStatus.loading:c.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(o)},g.prototype.getObservableQueries=function(o){var c=this;o===void 0&&(o="active");var m=new Map,y=new Map,E=new Map,N=new Set;return Array.isArray(o)&&o.forEach(function(F){if(typeof F=="string")y.set(F,F),E.set(F,!1);else if(s.isDocumentNode(F)){var $=s.print(c.transform(F));y.set($,s.getOperationName(F)),E.set($,!1)}else s.isNonNullObject(F)&&F.query&&N.add(F)}
161),this.queries.forEach(function(F,$){var M=F.observableQuery,U=F.document;if(M){if(o==="all"){m.set($,M);return}var ee=M.queryName,Y=M.options.fetchPolicy;if(Y==="standby"||o==="active"&&!M.hasObservers())return;(o==="active"||ee&&E.has(ee)||U&&E.has(s.print(U)))&&(m.set($,M),ee&&E.set(ee,!0),U&&E.set(s.print(U),!0))}}),N.size&&N.forEach(function(F){var $=s.makeUniqueId("legacyOneTimeQuery"),M=c.getOrCreateQuery($).init({document:F.query,variables:F.variables}),U=new te({queryManager:c,queryInfo:M,options:t.__assign(t.__assign({},F),{fetchPolicy:"network-only"})});n.invariant(U.queryId===$),M.setObservableQuery(U),m.set($,U)}),globalThis.__DEV__!==!1&&E.size&&E.forEach(function(F,$){if(!F){var M=y.get($);M?globalThis.__DEV__!==!1&&n.invariant.warn(43,M):globalThis.__DEV__!==!1&&n.invariant.warn(44)}}),m},g.prototype.reFetchObservableQueries=function(o){var c=this;o===void 0&&(o=!1);var m=[];return this.getObservableQueries(o?"all":"active").forEach(function(y,E){var N=y.options.fetchPolicy;ze("resetLastResults",function(){return y.resetLastResults()}),(o||N!=="standby"&&N!=="cache-only")&&m.push(y.refetch()),(c.queries.get(E)||y.queryInfo).setDiff(null)}),this.broadcastQueries(),Promise.all(m)},g.prototype.startGraphQLSubscription=function(o){var c=this,m=o.query,y=o.variables,E=o.fetchPolicy,N=o.errorPolicy,F=N===void 0?"none":N,$=o.context,M=$===void 0?{}:$,U=o.extensions,ee=U===void 0?{}:U;m=this.transform(m),y=this.getVariables(m,y);var Y=function(Z){return c.getObservableFromLink(m,M,Z,ee).map(function(X){E!=="no-cache"&&(He(X,F)&&c.c
161ache.write({query:m,result:X.data,dataId:"ROOT_SUBSCRIPTION",variables:Z}),c.broadcastQueries());var ne=s.graphQLResultHasError(X),re=f.graphQLResultHasProtocolErrors(X);if(ne||re){var oe={};if(ne&&(oe.graphQLErrors=X.errors),re&&(oe.protocolErrors=X.extensions[f.PROTOCOL_ERRORS_SYMBOL]),F==="none"||re)throw new f.ApolloError(oe)}return F==="ignore"&&delete X.errors,X})};if(this.getDocumentInfo(m).hasClientExports){var J=this.localState.addExportedVariables(m,y,M).then(Y);return new s.Observable(function(Z){var X=null;return J.then(function(ne){return X=ne.subscribe(Z)},Z.error),function(){return X&&X.unsubscribe()}})}return Y(y)},g.prototype.stopQuery=function(o){this.stopQueryNoBroadcast(o),this.broadcastQueries()},g.prototype.stopQueryNoBroadcast=function(o){this.stopQueryInStoreNoBroadcast(o),this.removeQuery(o)},g.prototype.removeQuery=function(o){var c;this.fetchCancelFns.delete(o),this.queries.has(o)&&((c=this.queries.get(o))===null||c===void 0||c.stop(),this.queries.delete(o))},g.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(o){var c;return(c=o.observableQuery)===null||c===void 0?void 0:c.notify()})},g.prototype.getLocalState=function(){return this.localState},g.prototype.getObservableFromLink=function(o,c,m,y,E){var N=this,F;E===void 0&&(E=(F=c?.queryDeduplication)!==null&&F!==void 0?F:this.queryDeduplication);var $,M=this.getDocumentInfo(o),U=M.serverQuery,ee=M.clientQuery;if(U){var Y=this,J=Y.inFlightLinkObservables,Z=Y.link,X={query:U,variables:m,operationName:s.getOperationName(U)||void 0,context:this.prepareContext(t.__assign(t.__assign({},c),{forceFetch:!E})),extensions:y};if(c=X.context,E){var ne=s.print(U),re=u.canonicalStringify(m),oe=J.lookup(ne,re);if($=oe.observable,!$){var Te=new s.Concast([r.execute(Z,X)]);$=oe.observable=Te,Te.beforeNext(function me(ge,$e){ge==="next"&&"hasNext"in $e&&$e.hasNext?Te.beforeNext(me):J.remove(ne,re)})}}else $=new s.Concast([r.execute(Z,X)])}else $=new s.Concast([s.Observable.of({data:{}})]),c=this.prepareContext(c);return ee&&($=s.asyncMap($,function(me){return N.localState.runResolvers({document:ee,remoteResult:me,context:c,variables:m})})),$},g.prototype.getResultsFromLink=function(o,c,m){var y=o.lastRequestId=this.generateRequestId(),E=this.cache.transformForLink(m.query);return s.asyncMap(this.getObservableFromLink(E,m.context,m.variables),function(N){var F=s.getGraphQLErrorsFromResult(N),$=F.length>0,M=m.errorPolicy;if(y>=o.lastRequestId){if($&&M==="none")throw o.markError(new f.ApolloError({graphQLErrors:F}));o.markResult(N,E,m,c),o.markReady()}var U={data:N.data,loading:!1,networkStatus:e.NetworkStatus.ready};return $&&M==="none"&&(U.data=void 0),$&&M!=="ignore"&&(U.errors=F,U.networkStatus=e.NetworkStatus.error),U},function(N){var F=f.isApolloError(N)?N:new f.ApolloError({networkError:N});throw y>=o.lastRequestId&&o.markError(F),F})},g.prototype.fetchConcastWithInfo=function(o,c,m,y){var E=this;m===void 0&&(m=e.NetworkStatus.loading),y===void 0&&(y=c.query);var N=this.getVariables(y,c.variables),F=this.defaultOptions.watchQuery,$=c.fetchPolicy,M=$===void 0?F&&F.fetchPolicy||"cache-first":$,U=c.errorPolicy,ee=U===void 0?F&&F.errorPolicy||"none":U,Y=c.returnPartialData,J=Y===void 0?!1:Y,Z=c.notifyOnNetworkStatusChange,X=Z===void 0?!1:Z,ne=c.context,re=ne===void 0?{}:ne,oe=Object.assign({},c,{query:y,variables:N,fetchPolicy:M,errorPolicy:ee,returnPartialData:J,notifyOnNetworkStatusChange:X,context:re}),Te=function(Xe){oe.variables=Xe;var Ye=E.fetchQueryByPolicy(o,oe,m);return oe.fetchPolicy!=="standby"&&Ye.sources.length>0&&o.observableQuery&&o.observableQuery.applyNextFetchPolicy("after-fetch",c),Ye},me=function(){return E.fetchCancelFns.delete(o.queryId)};this.fetchCancelFns.set(o.queryId,function(Xe){me(),setTimeout(function(){return ge.cancel(Xe)})});var ge,$e;if(this.getDocumentInfo(oe.query).hasClientExports)ge=new s.Concast(this.localState.addExportedVariables(oe.query,oe.variables,oe.context).then(Te).then(function(Xe){return Xe.sources})),$e=!0;else{var nt=Te(oe.variables);$e=nt.fromLink,ge=new s.Concast(nt.sources)}return ge.promise.then(me,me),{concast:ge,fromLink:$e}},g.prototype.refetchQueries=function(o){var c=this,m=o.updateCache,y=o.include,E=o.optimistic,N=E===void 0?!1:E,F=o.removeOptimistic,$=F===void 0?N?s.makeUniqueId("refetchQueries"):void 0:F,M=o.onQueryUpdated,U=new Map;
161y&&this.getObservableQueries(y).forEach(function(Y,J){U.set(J,{oq:Y,lastDiff:(c.queries.get(J)||Y.queryInfo).getDiff()})});var ee=new Map;return m&&this.cache.batch({update:m,optimistic:N&&$||!1,removeOptimistic:$,onWatchUpdated:function(Y,J,Z){var X=Y.watcher instanceof Wt&&Y.watcher.observableQuery;if(X){if(M){U.delete(X.queryId);var ne=M(X,J,Z);return ne===!0&&(ne=X.refetch()),ne!==!1&&ee.set(X,ne),ne}M!==null&&U.set(X.queryId,{oq:X,lastDiff:Z,diff:J})}}}),U.size&&U.forEach(function(Y,J){var Z=Y.oq,X=Y.lastDiff,ne=Y.diff,re;M&&(ne||(ne=ze("canonizeResults",function(){return c.cache.diff(Z.queryInfo.getDiffOptions())})),re=M(Z,ne,X)),(!M||re===!0)&&(re=Z.refetch()),re!==!1&&ee.set(Z,re),J.indexOf("legacyOneTimeQuery")>=0&&c.stopQueryNoBroadcast(J)}),$&&this.cache.removeOptimistic($),ee},g.prototype.maskOperation=function(o){var c,m,y,E=o.document,N=o.data;if(globalThis.__DEV__!==!1){var F=o.fetchPolicy,$=o.id,M=(c=s.getOperationDefinition(E))===null||c===void 0?void 0:c.operation,U=((m=M?.[0])!==null&&m!==void 0?m:"o")+$;this.dataMasking&&F==="no-cache"&&!s.isFullyUnmaskedOperation(E)&&!this.noCacheWarningsByQueryId.has(U)&&(this.noCacheWarningsByQueryId.add(U),globalThis.__DEV__!==!1&&n.invariant.warn(45,(y=s.getOperationName(E))!==null&&y!==void 0?y:"Unnamed ".concat(M??"operation")))}return this.dataMasking?_.maskOperation(N,E,this.cache):N},g.prototype.maskFragment=function(o){var c=o.data,m=o.fragment,y=o.fragmentName;return this.dataMasking?_.maskFragment(c,m,this.cache,y):c},g.prototype.fetchQueryByPolicy=function(o,c,m){var y=this,E=c.query,N=c.variables,F=c.fetchPolicy,$=c.refetchWritePolicy,M=c.errorPolicy,U=c.returnPartialData,ee=c.context,Y=c.notifyOnNetworkStatusChange,J=o.networkStatus;o.init({document:E,variables:N,networkStatus:m});var Z=function(){return o.getDiff()},X=function(me,ge){ge===void 0&&(ge=o.networkStatus||e.NetworkStatus.loading);var $e=me.result;globalThis.__DEV__!==!1&&!U&&!a.equal($e,{})&&Re(me.missing);var nt=function(Xe){return s.Observable.of(t.__assign({data:Xe,loading:Q(ge),networkStatus:ge},me.complete?null:{partial:!0}))};return $e&&y.getDocumentInfo(E).hasForcedResolvers?y.localState.runResolvers({document:E,remoteResult:{data:$e},context:ee,variables:N,onlyRunForcedResolvers:!0}).then(function(Xe){return nt(Xe.data||void 0)}):M==="none"&&ge===e.NetworkStatus.refetch&&Array.isArray(me.missing)?nt(void 0):nt($e)},ne=F==="no-cache"?0:m===e.NetworkStatus.refetch&&$!=="merge"?1:2,re=function(){return y.getResultsFromLink(o,ne,{query:E,variables:N,context:ee,fetchPolicy:F,errorPolicy:M})},oe=Y&&typeof J=="number"&&J!==m&&Q(m);switch(F){default:case"cache-first":{var Te=Z();return Te.complete?{fromLink:!1,sources:[X(Te,o.markReady())]}:U||oe?{fromLink:!0,sources:[X(Te),re()]}:{fromLink:!0,sources:[re()]}}case"cache-and-network":{var Te=Z();return Te.complete||U||oe?{fromLink:!0,sources:[X(Te),re()]}:{fromLink:!0,sources:[re()]}}case"cache-only":return{fromLink:!1,sources:[X(Z(),o.markReady())]};case"network-only":return oe?{fromLink:!0,sources:[X(Z()),re()]}:{fromLink:!0,sources:[re()]};case"no-cache":return oe?{fromLink:!0,sources:[X(o.getDiff()),re()]}:{fromLink:!0,sources:[re()]};case"standby":return{fromLink:!1,sources:[]}}},g.prototype.getOrCreateQuery=function(o){return o&&!this.queries.has(o)&&this.queries.set(o,new Wt(this,o)),this.queries.get(o)},g.prototype.prepareContext=function(o){o===void 0&&(o={});var c=this.localState.prepareContext(o);return t.__assign(t.__assign(t.__assign({},this.defaultContext),c),{clientAwareness:this.clientAwareness})},g})(),Jr=(function(){function g(o){var c=o.cache,m=o.client,y=o.resolvers,E=o.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=c,m&&(this.client=m),y&&this.addResolvers(y),E&&this.setFragmentMatcher(E)}return g.prototype.addResolvers=function(o){var c=this;this.resolvers=this.resolvers||{},Array.isArray(o)?o.forEach(function(m){c.resolvers=s.mergeDeep(c.resolvers,m)}):this.resolvers=s.mergeDeep(this.resolvers,o)},g.prototype.setResolvers=function(o){this.resolvers={},this.addResolvers(o)},g.prototype.getResolvers=function(){return this.resolvers||{}},g.prototype.runResolvers=function(o){return t.__awaiter(this,arguments,void 0,function(c){var m=c.document,y=c.remoteResult,E=c.context,N=c.variables,F=c.onlyRunForcedResolvers,$=F===void 0?!1:F;return t.__generator(this,function(M){return m?[2,this.resolveDocument(m,y.data,E,N,this.fragmentMatcher,$).then(function(U){return t.__assign(t.__assign({},y),{data:U.result})})]:[2,y]})})},g.prototype.setFragmentMatcher=function(o){this.fragmentMatcher=o},g.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},g.prototype.clientQuery=function(o){return s.hasDirectives(["client"],o)&&this.resolvers?o:null}
161,g.prototype.serverQuery=function(o){return s.removeClientSetsFromDocument(o)},g.prototype.prepareContext=function(o){var c=this.cache;return t.__assign(t.__assign({},o),{cache:c,getCacheKey:function(m){return c.identify(m)}})},g.prototype.addExportedVariables=function(o){return t.__awaiter(this,arguments,void 0,function(c,m,y){return m===void 0&&(m={}),y===void 0&&(y={}),t.__generator(this,function(E){return c?[2,this.resolveDocument(c,this.buildRootValueFromCache(c,m)||{},this.prepareContext(y),m).then(function(N){return t.__assign(t.__assign({},m),N.exportedVariables)})]:[2,t.__assign({},m)]})})},g.prototype.shouldForceResolvers=function(o){var c=!1;return T.visit(o,{Directive:{enter:function(m){if(m.name.value==="client"&&m.arguments&&(c=m.arguments.some(function(y){return y.name.value==="always"&&y.value.kind==="BooleanValue"&&y.value.value===!0}),c))return T.BREAK}}}),c},g.prototype.buildRootValueFromCache=function(o,c){return this.cache.diff({query:s.buildQueryFromSelectionSet(o),variables:c,returnPartialData:!0,optimistic:!1}).result},g.prototype.resolveDocument=function(o,c){return t.__awaiter(this,arguments,void 0,function(m,y,E,N,F,$){var M,U,ee,Y,J,Z,X,ne,re,oe,Te;return E===void 0&&(E={}),N===void 0&&(N={}),F===void 0&&(F=function(){return!0}),$===void 0&&($=!1),t.__generator(this,function(me){return M=s.getMainDefinition(m),U=s.getFragmentDefinitions(m),ee=s.createFragmentMap(U),Y=this.collectSelectionsToResolve(M,ee),J=M.operation,Z=J?J.charAt(0).toUpperCase()+J.slice(1):"Query",X=this,ne=X.cache,re=X.client,oe={fragmentMap:ee,context:t.__assign(t.__assign({},E),{cache:ne,client:re}),variables:N,fragmentMatcher:F,defaultOperationType:Z,exportedVariables:{},selectionsToResolve:Y,onlyRunForcedResolvers:$},Te=!1,[2,this.resolveSelectionSet(M.selectionSet,Te,y,oe).then(function(ge){return{result:ge,exportedVariables:oe.exportedVariables}})]})})},g.prototype.resolveSelectionSet=function(o,c,m,y){return t.__awaiter(this,void 0,void 0,function(){var E,N,F,$,M,U=this;return t.__generator(this,function(ee){return E=y.fragmentMap,N=y.context,F=y.variables,$=[m],M=function(Y){return t.__awaiter(U,void 0,void 0,function(){var J,Z;return t.__generator(this,function(X){return!c&&!y.selectionsToResolve.has(Y)?[2]:s.shouldInclude(Y,F)?s.isField(Y)?[2,this.resolveField(Y,c,m,y).then(function(ne){var re;typeof ne<"u"&&$.push((re={},re[s.resultKeyNameFromField(Y)]=ne,re))})]:(s.isInlineFragment(Y)?J=Y:(J=E[Y.name.value],n.invariant(J,21,Y.name.value)),J&&J.typeCondition&&(Z=J.typeCondition.name.value,y.fragmentMatcher(m,Z,N))?[2,this.resolveSelectionSet(J.selectionSet,c,m,y).then(function(ne){$.push(ne)})]:[2]):[2]})})},[2,Promise.all(o.selections.map(M)).then(function(){return s.mergeDeepArray($)})]})})},g.prototype.resolveField=function(o,c,m,y){return t.__awaiter(this,void 0,void 0,function(){var E,N,F,$,M,U,ee,Y,J,Z=this;return t.__generator(this,function(X){return m?(E=y.variables,N=o.name.value,F=s.resultKeyNameFromField(o),$=N!==F,M=m[F]||m[N],U=Promise.resolve(M),(!y.onlyRunForcedResolvers||this.shouldForceResolvers(o))&&(ee=m.__typename||y.defaultOperationType,Y=this.resolvers&&this.resolvers[ee],Y&&(J=Y[$?N:F],J&&(U=Promise.resolve(u.cacheSlot.withValue(this.cache,J,[m,s.argumentsObjectFromField(o,E),y.context,{field:o,fragmentMap:y.fragmentMap}]))))),[2,U.then(function(ne){var re,oe;if(ne===void 0&&(ne=M),o.directives&&o.directives.forEach(function(me){me.name.value==="export"&&me.arguments&&me.arguments.forEach(function(ge){ge.name.value==="as"&&ge.value.kind==="StringValue"&&(y.exportedVariables[ge.value.value]=ne)})}),!o.selectionSet||ne==null)return ne;var Te=(oe=(re=o.directives)===null||re===void 0?void 0:re.some(function(me){return me.name.value==="client"}))!==null&&oe!==void 0?oe:!1;if(Array.isArray(ne))return Z.resolveSubSelectedArray(o,c||Te,ne,y);if(o.selectionSet)return Z.resolveSelectionSet(o.selectionSet,c||Te,ne,y)})]):[2,null]})})},g.prototype.resolveSubSelectedArray=function(o,c,m,y){var E=this;return Promise.all(m.map(function(N){if(N===null)return null;if(Array.isArray(N))return E.resolveSubSelectedArray(o,c,N,y);if(o.selectionSet)return E.resolveSelectionSet(o.selectionSet,c,N,y)}))},g.prototype.collectSelectionsToResolve=function(o,c){var m=function(N){return!Array.isArray(N)},y=this.selectionsToResolveCache;function E(N){if(!y.has(N)){var F=new Set;y.set(N,F),T.visit(N,{Directive:function($,M,U,ee,Y){$.name.value==="client"&&Y.forEach(function(J){m(J)&&T.isSelectionNode(J)&&F.add(J)})},FragmentSpread:function($,M,U,ee,Y){var J=c[$.name.value];n.invariant(J,22,$.name.value);var Z=E(J);Z.size>0&&(Y.forEach(function(X){m(X)&&T.isSelectionNode(X)&&F.add(X)}),F.add($),Z.forEach(function(X){F.add(X)}))}})}return y.get(N)}return E(o)},g})(),Kr=Symbol.for("apollo.cacheSize"),zt=t.__assign({},n.global[Kr]),Xt={},Xr=globalThis.__DEV__!==!1?or:void 0;function dn(){var g={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(g).map(function(o){var c=o[0],m=o[
1611];return[c,zt[c]||m]}))}function or(){var g,o,c,m,y;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:dn(),sizes:t.__assign({print:(g=Xt.print)===null||g===void 0?void 0:g.call(Xt),parser:(o=Xt.parser)===null||o===void 0?void 0:o.call(Xt),canonicalStringify:(c=Xt.canonicalStringify)===null||c===void 0?void 0:c.call(Xt),links:vt(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:Sn(this.queryManager.documentTransform)}},(y=(m=this.cache).getMemoryInternals)===null||y===void 0?void 0:y.call(m))}}function Zr(g){return!!g&&"dirtyKey"in g}function ur(g){return Zr(g)?g.size:void 0}function $n(g){return g!=null}function Sn(g){return Vn(g).map(function(o){return{cache:o}})}function Vn(g){return g?t.__spreadArray(t.__spreadArray([ur(g?.performWork)],Vn(g?.left),!0),Vn(g?.right),!0).filter($n):[]}function vt(g){var o;return g?t.__spreadArray(t.__spreadArray([(o=g?.getMemoryInternals)===null||o===void 0?void 0:o.call(g)],vt(g?.left),!0),vt(g?.right),!0).filter($n):[]}var mn=!1,cr=(function(){function g(o){var c=this,m,y,E;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!o.cache)throw n.newInvariantError(16);var N=o.uri,F=o.credentials,$=o.headers,M=o.cache,U=o.documentTransform,ee=o.ssrMode,Y=ee===void 0?!1:ee,J=o.ssrForceFetchDelay,Z=J===void 0?0:J,X=o.connectToDevTools,ne=o.queryDeduplication,re=ne===void 0?!0:ne,oe=o.defaultOptions,Te=o.defaultContext,me=o.assumeImmutableResults,ge=me===void 0?M.assumeImmutableResults:me,$e=o.resolvers,nt=o.typeDefs,Xe=o.fragmentMatcher,Ye=o.clientAwareness,pn=o.name,jn=o.version,Zt=o.devtools,Je=o.dataMasking;globalThis.__DEV__!==!1&&(qe(o,"connectToDevTools","ApolloClient","Please use `devtools.enabled` instead."),qe(o,"uri","ApolloClient","Please initialize an instance of `HttpLink` with `uri` instead."),qe(o,"credentials","ApolloClient","Please initialize an instance of `HttpLink` with `credentials` instead."),qe(o,"headers","ApolloClient","Please initialize an instance of `HttpLink` with `headers` instead."),qe(o,"name","ApolloClient","Please use the `clientAwareness.name` option instead."),qe(o,"version","ApolloClient","Please use the `clientAwareness.version` option instead."),qe(o,"typeDefs","ApolloClient"),o.link||globalThis.__DEV__!==!1&&n.invariant.warn(17));var gt=o.link;gt||(gt=N?new i.HttpLink({uri:N,credentials:F,headers:$}):r.ApolloLink.empty()),this.link=gt,this.cache=M,this.disableNetworkFetches=Y||Z>0,this.queryDeduplication=re,this.defaultOptions=oe||Object.create(null),this.typeDefs=nt,this.devtoolsConfig=t.__assign(t.__assign({},Zt),{enabled:(m=Zt?.enabled)!==null&&m!==void 0?m:X}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),Z&&setTimeout(function(){return c.disableNetworkFetches=!1},Z),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=k,this.localState=new Jr({cache:M,client:this,resolvers:$e,fragmentMatcher:Xe}),this.queryManager=new Hr({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:Te,documentTransform:U,queryDeduplication:re,ssrMode:Y,dataMasking:!!Je,clientAwareness:{name:(y=Ye?.name)!==null&&y!==void 0?y:pn,version:(E=Ye?.version)!==null&&E!==void 0?E:jn},localState:this.localState,assumeImmutableResults:ge,onBroadcast:this.devtoolsConfig.enabled?function(){c.devToolsHookCb&&c.devToolsHookCb({action:{},state:{queries:c.queryManager.getQueryStore(),mutations:c.queryManager.mutationStore||{}},dataWithOptimisticResults:c.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return Object.defineProperty(g.prototype,"prioritizeCacheValues",{get:function(){return this.disableNetworkFetches},set:function(o){this.disableNetworkFetches=o},enumerable:!1,configurable:!0}),g.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var o=window,c=Symbol.for("apollo.devtools");(o[c]=o[c]||[]).push(this),o.__APOLLO_CLIENT__=this,!mn&&globalThis.__DEV__!==!1&&(mn=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var m=window.navigator,y=m&&m.userAgent,E=void 0;typeof y=="string"&&(y.indexOf("Chrome/")>-1?E="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":y.indexOf("Firefox/")>-1&&(E="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),E&&globalThis.__DEV__!==!1&&n.invariant.log("Download the Apollo DevTools for a better development experience: %s",E)}},1e4))}},Object.defineProperty(g.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform}
161,enumerable:!1,configurable:!0}),g.prototype.stop=function(){this.queryManager.stop()},g.prototype.watchQuery=function(o){return this.defaultOptions.watchQuery&&(o=s.mergeOptions(this.defaultOptions.watchQuery,o)),this.disableNetworkFetches&&(o.fetchPolicy==="network-only"||o.fetchPolicy==="cache-and-network")&&(o=t.__assign(t.__assign({},o),{fetchPolicy:"cache-first"})),globalThis.__DEV__!==!1&&(qe(o,"canonizeResults","client.watchQuery"),qe(o,"partialRefetch","client.watchQuery")),this.queryManager.watchQuery(o)},g.prototype.query=function(o){return this.defaultOptions.query&&(o=s.mergeOptions(this.defaultOptions.query,o)),n.invariant(o.fetchPolicy!=="cache-and-network",18),this.disableNetworkFetches&&o.fetchPolicy==="network-only"&&(o=t.__assign(t.__assign({},o),{fetchPolicy:"cache-first"})),globalThis.__DEV__!==!1&&(qe(o,"canonizeResults","client.query"),qe(o,"notifyOnNetworkStatusChange","client.query","This option does not affect `client.query` and can be safely removed."),o.fetchPolicy==="standby"&&globalThis.__DEV__!==!1&&n.invariant.warn(19)),this.queryManager.query(o)},g.prototype.mutate=function(o){return this.defaultOptions.mutate&&(o=s.mergeOptions(this.defaultOptions.mutate,o)),this.queryManager.mutate(o)},g.prototype.subscribe=function(o){var c=this,m=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(o).map(function(y){return t.__assign(t.__assign({},y),{data:c.queryManager.maskOperation({document:o.query,data:y.data,fetchPolicy:o.fetchPolicy,id:m})})})},g.prototype.readQuery=function(o,c){return c===void 0&&(c=!1),this.cache.readQuery(o,c)},g.prototype.watchFragment=function(o){var c;return this.cache.watchFragment(t.__assign(t.__assign({},o),(c={},c[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,c)))},g.prototype.readFragment=function(o,c){return c===void 0&&(c=!1),this.cache.readFragment(o,c)},g.prototype.writeQuery=function(o){var c=this.cache.writeQuery(o);return o.broadcast!==!1&&this.queryManager.broadcastQueries(),c},g.prototype.writeFragment=function(o){var c=this.cache.writeFragment(o);return o.broadcast!==!1&&this.queryManager.broadcastQueries(),c},g.prototype.__actionHookForDevTools=function(o){this.devToolsHookCb=o},g.prototype.__requestRaw=function(o){return r.execute(this.link,o)},g.prototype.resetStore=function(){var o=this;return Promise.resolve().then(function(){return o.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(o.resetStoreCallbacks.map(function(c){return c()}))}).then(function(){return o.reFetchObservableQueries()})},g.prototype.clearStore=function(){var o=this;return Promise.resolve().then(function(){return o.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(o.clearStoreCallbacks.map(function(c){return c()}))})},g.prototype.onResetStore=function(o){var c=this;return this.resetStoreCallbacks.push(o),function(){c.resetStoreCallbacks=c.resetStoreCallbacks.filter(function(m){return m!==o})}},g.prototype.onClearStore=function(o){var c=this;return this.clearStoreCallbacks.push(o),function(){c.clearStoreCallbacks=c.clearStoreCallbacks.filter(function(m){return m!==o})}},g.prototype.reFetchObservableQueries=function(o){return this.queryManager.reFetchObservableQueries(o)},g.prototype.refetchQueries=function(o){var c=this.queryManager.refetchQueries(o),m=[],y=[];c.forEach(function(N,F){m.push(F),y.push(N)});var E=Promise.all(y);return E.queries=m,E.results=y,E.catch(function(N){globalThis.__DEV__!==!1&&n.invariant.debug(20,N)}),E},g.prototype.getObservableQueries=function(o){return o===void 0&&(o="active"),this.queryManager.getObservableQueries(o)},g.prototype.extract=function(o){return this.cache.extract(o)},g.prototype.restore=function(o){return this.cache.restore(o)},g.prototype.addResolvers=function(o){this.localState.addResolvers(o)},g.prototype.setResolvers=function(o){this.localState.setResolvers(o)},g.prototype.getResolvers=function(){return this.localState.getResolvers()},g.prototype.setLocalStateFragmentMatcher=function(o){this.localState.setFragmentMatcher(o)},g.prototype.setLink=function(o){this.link=this.queryManager.link=o},Object.defineProperty(g.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext}
161,enumerable:!1,configurable:!0}),g})();globalThis.__DEV__!==!1&&(cr.prototype.getMemoryInternals=Xr),L.setVerbosity(globalThis.__DEV__!==!1?"log":"silent"),e.DocumentTransform=s.DocumentTransform,e.Observable=s.Observable,e.isReference=s.isReference,e.makeReference=s.makeReference,e.mergeOptions=s.mergeOptions,e.ApolloCache=u.ApolloCache,e.Cache=u.Cache,e.InMemoryCache=u.InMemoryCache,e.MissingFieldError=u.MissingFieldError,e.defaultDataIdFromObject=u.defaultDataIdFromObject,e.makeVar=u.makeVar,e.ApolloError=f.ApolloError,e.isApolloError=f.isApolloError,e.fromError=S.fromError,e.fromPromise=S.fromPromise,e.throwServerError=S.throwServerError,e.toPromise=S.toPromise,e.setLogVerbosity=L.setVerbosity,e.disableExperimentalFragmentVariables=B.disableExperimentalFragmentVariables,e.disableFragmentWarnings=B.disableFragmentWarnings,e.enableExperimentalFragmentVariables=B.enableExperimentalFragmentVariables,e.gql=B.gql,e.resetCaches=B.resetCaches,e.ApolloClient=cr,e.ObservableQuery=te,e.isNetworkRequestSettled=ce;for(var yt in r)yt!=="default"&&!e.hasOwnProperty(yt)&&(e[yt]=r[yt]);for(var yt in i)yt!=="default"&&!e.hasOwnProperty(yt)&&(e[yt]=i[yt])})(li)),li}var qn=yh(),q={};const gh=xe(vp),bh=xe(kf);var Ja;function _h(){if(Ja)return q;Ja=1,Object.defineProperty(q,"__esModule",{value:!0});var e=iu,t=uu,n=ou,r=da,i=gh,a=su,s=bh;function u(l,d){var h=l.directives;return!h||!h.length?!0:L(h).every(function(b){var O=b.directive,P=b.ifArgument,W=!1;return P.value.kind==="Variable"?(W=d&&d[P.value.name.value],e.invariant(W!==void 0,106,O.name.value)):W=P.value.value,O.name.value==="skip"?!W:W})}function f(l){var d=[];return t.visit(l,{Directive:function(h){d.push(h.name.value)}}),d}var v=function(l,d){return _(l,d,!1)},p=function(l,d){return _(l,d,!0)};function _(l,d,h){var b=new Set(l),O=b.size;return t.visit(d,{Directive:function(P){if(b.delete(P.name.value)&&(!h||!b.size))return t.BREAK}}),h?!b.size:b.size<O}function T(l){return l&&_(["client","export"],l,!0)}function S(l){var d=l.name.value;return d==="skip"||d==="include"}function L(l){var d=[];return l&&l.length&&l.forEach(function(h){if(S(h)){var b=h.arguments,O=h.name.value;e.invariant(b&&b.length===1,107,O);var P=b[0];e.invariant(P.name&&P.name.value==="if",108,O);var W=P.value;e.invariant(W&&(W.kind==="Variable"||W.kind==="BooleanValue"),109,O),d.push({directive:h,ifArgument:P})}}),d}function B(l){var d,h,b=(d=l.directives)===null||d===void 0?void 0:d.find(function(P){var W=P.name;return W.value==="unmask"});if(!b)return"mask";var O=(h=b.arguments)===null||h===void 0?void 0:h.find(function(P){var W=P.name;return W.value==="mode"});return globalThis.__DEV__!==!1&&O&&(O.value.kind===t.Kind.VARIABLE?globalThis.__DEV__!==!1&&e.invariant.warn(110):O.value.kind!==t.Kind.STRING?globalThis.__DEV__!==!1&&e.invariant.warn(111):O.value.value!=="migrate"&&globalThis.__DEV__!==!1&&e.invariant.warn(112,O.value.value)),O&&"value"in O.value&&O.value.value==="migrate"?"migrate":"unmask"}var x=e.maybe(function(){return navigator.product})=="ReactNative",V=typeof WeakMap=="function"&&!(x&&!bi.HermesInternal),k=typeof WeakSet=="function",I=typeof Symbol=="function"&&typeof Symbol.for=="function",j=I&&Symbol.asyncIterator,K=typeof e.maybe(function(){return window.document.createElement})=="function",G=e.maybe(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,_e=(K||x)&&!G;function pe(l){return l!==null&&typeof l=="object"}function C(l){return l!==null&&typeof l=="object"&&(Object.getPrototypeOf(l)===Object.prototype||Object.getPrototypeOf(l)===null)}function Q(l,d){var h=d,b=[];l.definitions.forEach(function(P){if(P.kind==="OperationDefinition")throw e.newInvariantError(113,P.operation,P.name?" named '".concat(P.name.value,"'"):"");P.kind==="FragmentDefinition"&&b.push(P)}),typeof h>"u"&&(e.invariant(b.length===1,114,b.length),h=b[0].name.value);var O=r.__assign(r.__assign({},l),{definitions:r.__spreadArray([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:h}}]}}],l.definitions,!0)});return O}function ce(l){l===void 0&&(l=[]);var d={};return l.forEach(function(h){d[h.name.value]=h}),d}function Pe(l,d){switch(l.kind){case"InlineFragment":return l;case"FragmentSpread":{var h=l.name.value;if(typeof d=="function")return d(h);var b=d&&d[h];return e.invariant(b,115,h),b||null}default:return null}}function We(l){var d=!0;return t.visit(l,{FragmentSpread:function(h){if(d=!!h.directives&&h.directives.some(function(b){return b.name.value==="unmask"}),!d)return t.BREAK}}),d}var Lt=new WeakSet;function ht(l){l.size<=(l.max||-1)||Lt.has(l)||(Lt.add(l),setTimeout(function(){l.clean(),Lt.delete(l)},100))}var Gt=function(l,d){var h=new i.WeakCache(l,d);return h.set=function(b,O){var P=i.WeakCache.prototype.set.call(this,b,O);return ht(this),P},h},Mt=function(l,d){var h=new i.StrongCache(l,d);return h.set=function(b,O){var P=i.StrongCache.prototype.set.call(this,b,O);return ht(this),P},h},Pt=Symbol.for("apollo.cacheSize"),at=r.__assign({},e.global[Pt]),ze={};function qe(l,d){ze[l]=d}var D=Object.assign(function(d){return JSON.stringify(d,z)},{reset:function(){H=new Mt(at.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&qe("canonicalStringify",function(){return H.size});var H;D.reset();function z(l,d){if(d&&typeof d=="object"){var h=Object.getPrototypeOf(d);if(h===Object.prototype||h===null){var b=Object.keys(d);if(b.every(te))return d;var O=JSON.stringify(b),P=H.get(O);if(!P){b.sort();var W=JSON.stringify(b);P=H.get(W)||b,H.set(O,P),H.set(W,P)}var ie=Object.create(h);return P.forEach(function(de){ie[de]=d[de]}
161),ie}}return d}function te(l,d,h){return d===0||h[d-1]<=l}function Ne(l){return{__ref:String(l)}}function Re(l){return!!(l&&typeof l=="object"&&typeof l.__ref=="string")}function Ee(l){return pe(l)&&l.kind==="Document"&&Array.isArray(l.definitions)}function tt(l){return l.kind==="StringValue"}function Bt(l){return l.kind==="BooleanValue"}function Wt(l){return l.kind==="IntValue"}function He(l){return l.kind==="FloatValue"}function Yr(l){return l.kind==="Variable"}function sr(l){return l.kind==="ObjectValue"}function Hr(l){return l.kind==="ListValue"}function Jr(l){return l.kind==="EnumValue"}function Kr(l){return l.kind==="NullValue"}function zt(l,d,h,b){if(Wt(h)||He(h))l[d.value]=Number(h.value);else if(Bt(h)||tt(h))l[d.value]=h.value;else if(sr(h)){var O={};h.fields.map(function(W){return zt(O,W.name,W.value,b)}),l[d.value]=O}else if(Yr(h)){var P=(b||{})[h.name.value];l[d.value]=P}else if(Hr(h))l[d.value]=h.values.map(function(W){var ie={};return zt(ie,d,W,b),ie[d.value]});else if(Jr(h))l[d.value]=h.value;else if(Kr(h))l[d.value]=null;else throw e.newInvariantError(124,d.value,h.kind)}function Xt(l,d){var h=null;l.directives&&(h={},l.directives.forEach(function(O){h[O.name.value]={},O.arguments&&O.arguments.forEach(function(P){var W=P.name,ie=P.value;return zt(h[O.name.value],W,ie,d)})}));var b=null;return l.arguments&&l.arguments.length&&(b={},l.arguments.forEach(function(O){var P=O.name,W=O.value;return zt(b,P,W,d)})),or(l.name.value,b,h)}var Xr=["connection","include","skip","client","rest","export","nonreactive"],dn=D,or=Object.assign(function(l,d,h){if(d&&h&&h.connection&&h.connection.key)if(h.connection.filter&&h.connection.filter.length>0){var b=h.connection.filter?h.connection.filter:[];b.sort();var O={};return b.forEach(function(ie){O[ie]=d[ie]}),"".concat(h.connection.key,"(").concat(dn(O),")")}else return h.connection.key;var P=l;if(d){var W=dn(d);P+="(".concat(W,")")}return h&&Object.keys(h).forEach(function(ie){Xr.indexOf(ie)===-1&&(h[ie]&&Object.keys(h[ie]).length?P+="@".concat(ie,"(").concat(dn(h[ie]),")"):P+="@".concat(ie))}),P},{setStringify:function(l){var d=dn;return dn=l,d}});function Zr(l,d){if(l.arguments&&l.arguments.length){var h={};return l.arguments.forEach(function(b){var O=b.name,P=b.value;return zt(h,O,P,d)}),h}return null}function ur(l){return l.alias?l.alias.value:l.name.value}function $n(l,d,h){for(var b,O=0,P=d.selections;O<P.length;O++){var W=P[O];if(Sn(W)){if(W.name.value==="__typename")return l[ur(W)]}else b?b.push(W):b=[W]}if(typeof l.__typename=="string")return l.__typename;if(b)for(var ie=0,de=b;ie<de.length;ie++){var W=de[ie],Fe=$n(l,Pe(W,h).selectionSet,h);if(typeof Fe=="string")return Fe}}function Sn(l){return l.kind==="Field"}function Vn(l){return l.kind==="InlineFragment"}function vt(l){e.invariant(l&&l.kind==="Document",116);var d=l.definitions.filter(function(h){return h.kind!=="FragmentDefinition"}).map(function(h){if(h.kind!=="OperationDefinition")throw e.newInvariantError(117,h.kind);return h});return e.invariant(d.length<=1,118,d.length),l}function mn(l){return vt(l),l.definitions.filter(function(d){return d.kind==="OperationDefinition"})[0]}function cr(l){return l.definitions.filter(function(d){return d.kind==="OperationDefinition"&&!!d.name}).map(function(d){return d.name.value})[0]||null}function yt(l){return l.definitions.filter(function(d){return d.kind==="FragmentDefinition"})}function g(l){var d=mn(l);return e.invariant(d&&d.operation==="query",119),d}function o(l){e.invariant(l.kind==="Document",120),e.invariant(l.definitions.length<=1,121);var d=l.definitions[0];return e.invariant(d.kind==="FragmentDefinition",122),d}function c(l){vt(l);for(var d,h=0,b=l.definitions;h<b.length;h++){var O=b[h];if(O.kind==="OperationDefinition"){var P=O.operation;if(P==="query"||P==="mutation"||P==="subscription")return O}O.kind==="FragmentDefinition"&&!d&&(d=O)}if(d)return d;throw e.newInvariantError(123)}function m(l){var d=Object.create(null),h=l&&l.variableDefinitions;return h&&h.length&&h.forEach(function(b){b.defaultValue&&zt(d,b.variable.name,b.defaultValue)}),d}function y(l){return l}var E=(function(){function l(d,h){h===void 0&&(h=Object.create(null)),this.resultCache=k?new WeakSet:new Set,this.transform=d,h.getCacheKey&&(this.getCacheKey=h.getCacheKey),this.cached=h.cache!==!1,this.resetCache()}return l.prototype.getCacheKey=function(d){return[d]},l.identity=function(){return new l(y,{cache:!1})},l.split=function(d,h,b){return b===void 0&&(b=l.identity()),Object.assign(new l(function(O){var P=d(O)?h:b;return P.transformDocument(O)},{cache:!1}),{left:h,right:b})},l.prototype.resetCache=function(){var d=this;if(this.cached){var h=new n.Trie(V);this.performWork=a.wrap(l.prototype.performWork.bind(this),{makeCacheKey:function(b){var O=d.getCacheKey(b);if(O)return e.invariant(Array.isArray(O),105),h.lookupArray(O)},max:at["documentTransform.cache"],cache:i.WeakCache})}},l.prototype.performWork=function(d){return vt(d),this.transform(d)},l.prototype.transformDocument=function(d){if(this.resultCache.has(d))return d;var h=this.performWork(d);return this.resultCache.add(h),h},l.prototype.concat=function(d){var h=this;return Object.assign(new l(function(b){return d.transformDocument(h.transformDocument(b))},{cache:!1}),{left:this,right:d})},l})(),N,F=Object.assign(function(l){var d=N.get(l);return d||(d=t.print(l),N.set(l,d)),d},{reset:function(){N=new Gt(at.print||2e3)}});F.reset(),globalThis.__DEV__!==!1&&qe("print",function(){return N?N.size:0});var $=Array.isArray;function M(l){return Array.isArray(l)&&l.length>0}var U={kind:t.Kind.FIELD,name:{kind:t.Kind.NAME,value:"__typename"}};function ee(l,d){return!l||l.selectionSet.selections.every(function(h){return h.kind===t.Kind.FRAGMENT_SPREAD&&ee(d[h.name.value],d)})}function Y(l){return ee(mn(l)||o(l),ce(yt(l)))?null:l}function J(l){var d=new Map,h=new Map;return l.forEach(function(b){b&&(b.name?d.set(b.name,b):b.test&&h.set(b.test,b))}),function(b){var O=d.get(b.name.value);return!O&&h.size&&h.forEach(function(P,W){W(b)&&(O=P)}),O}}function Z(l){var d=new Map;return function(b){b===void 0&&(b=l);var O=d.get(b);return O||d.set(b,O={variables:new Set,fragmentSpreads:new Set}),O}}function X(l,d){vt(d);for(var h=Z(""),b=Z(""),O=function(ae){for(var Ve=0,Ae=void 0;Ve<ae.length&&(Ae=ae[Ve]);++Ve)if(!$(Ae)){if(Ae.kind===t.Kind.OPERATION_DEFINITION)return h(Ae.name&&Ae.name.value);if(Ae.kind===t.Kind.FRAGMENT_DEFINITION)return b(Ae.name.value)}return globalThis.__DEV__!==!1&&e.invariant.error(125),null},P=0,W=d.definitions.length-1;W>=0;--W)d.definitions[W].kind===t.Kind.OPERATION_DEFINITION&&++P;var ie=J(l),de=function(ae){return M(ae)&&ae.map(ie).some(function(Ve){return Ve&&Ve.remove})},Fe=new Map,Qe=!1,Ze={enter:function(ae){if(de(ae.directives))return Qe=!0,null}},kt=t.visit(d,{Field:Ze,InlineFragment:Ze,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(ae,Ve,Ae,Dt,tn){var Rt=O(tn);Rt&&Rt.variables.add(ae.name.value)}},FragmentSpread:{enter:function(ae,Ve,Ae,Dt,tn){if(de(ae.directives))return Qe=!0,null;var Rt=O(tn);Rt&&Rt.fragmentSpreads.add(ae.name.value)}},FragmentDefinition:{enter:function(ae,Ve,Ae,Dt){Fe.set(JSON.stringify(Dt),ae)},leave:function(ae,Ve,Ae,Dt){var tn=Fe.get(JSON.stringify(Dt));if(ae===tn)return ae;if(P>0&&ae.selectionSet.selections.every(function(Rt){return Rt.kind===t.Kind.FIELD&&Rt.name.value==="__typename"}))return b(ae.name.value).removed=!0,Qe=!0,null}},Directive:{leave:function(ae){if(ie(ae))return Qe=!0,null}}});if(!Qe)return d;var hn=function(ae){return ae.transitiveVars||(ae.transitiveVars=new Set(ae.variables),ae.removed||ae.fragmentSpreads.forEach(function(Ve){hn(b(Ve)).transitiveVars.forEac
161h(function(Ae){ae.transitiveVars.add(Ae)})})),ae},en=new Set;kt.definitions.forEach(function(ae){ae.kind===t.Kind.OPERATION_DEFINITION?hn(h(ae.name&&ae.name.value)).fragmentSpreads.forEach(function(Ve){en.add(Ve)}):ae.kind===t.Kind.FRAGMENT_DEFINITION&&P===0&&!b(ae.name.value).removed&&en.add(ae.name.value)}),en.forEach(function(ae){hn(b(ae)).fragmentSpreads.forEach(function(Ve){en.add(Ve)})});var bt=function(ae){return!!(!en.has(ae)||b(ae).removed)},wn={enter:function(ae){if(bt(ae.name.value))return null}};return Y(t.visit(kt,{FragmentSpread:wn,FragmentDefinition:wn,OperationDefinition:{leave:function(ae){if(ae.variableDefinitions){var Ve=hn(h(ae.name&&ae.name.value)).transitiveVars;if(Ve.size<ae.variableDefinitions.length)return r.__assign(r.__assign({},ae),{variableDefinitions:ae.variableDefinitions.filter(function(Ae){return Ve.has(Ae.variable.name.value)})})}}}}))}var ne=Object.assign(function(l){return t.visit(l,{SelectionSet:{enter:function(d,h,b){if(!(b&&b.kind===t.Kind.OPERATION_DEFINITION)){var O=d.selections;if(O){var P=O.some(function(ie){return Sn(ie)&&(ie.name.value==="__typename"||ie.name.value.lastIndexOf("__",0)===0)});if(!P){var W=b;if(!(Sn(W)&&W.directives&&W.directives.some(function(ie){return ie.name.value==="export"})))return r.__assign(r.__assign({},d),{selections:r.__spreadArray(r.__spreadArray([],O,!0),[U],!1)})}}}}}})},{added:function(l){return l===U}}),re={test:function(l){var d=l.name.value==="connection";return d&&(!l.arguments||!l.arguments.some(function(h){return h.name.value==="key"}))&&globalThis.__DEV__!==!1&&e.invariant.warn(126),d}};function oe(l){return X([re],vt(l))}function Te(l){return function(h){return l.some(function(b){return h.value&&h.value.kind===t.Kind.VARIABLE&&h.value.name&&(b.name===h.value.name.value||b.test&&b.test(h))})}}function me(l,d){var h=Te(l);return Y(t.visit(d,{OperationDefinition:{enter:function(b){return r.__assign(r.__assign({},b),{variableDefinitions:b.variableDefinitions?b.variableDefinitions.filter(function(O){return!l.some(function(P){return P.name===O.variable.name.value})}):[]})}},Field:{enter:function(b){var O=l.some(function(W){return W.remove});if(O){var P=0;if(b.arguments&&b.arguments.forEach(function(W){h(W)&&(P+=1)}),P===1)return null}}},Argument:{enter:function(b){if(h(b))return null}}}))}function ge(l,d){function h(b){if(l.some(function(O){return O.name===b.name.value}))return null}return Y(t.visit(d,{FragmentSpread:{enter:h},FragmentDefinition:{enter:h}}))}function $e(l){var d=c(l),h=d.operation;if(h==="query")return l;var b=t.visit(l,{OperationDefinition:{enter:function(O){return r.__assign(r.__assign({},O),{operation:"query"})}}});return b}function nt(l){vt(l);var d=X([{test:function(h){return h.name.value==="client"},remove:!0}],l);return d}function Xe(l){return vt(l),t.visit(l,{FragmentSpread:function(d){var h;if(!(!((h=d.directives)===null||h===void 0)&&h.some(function(b){return b.name.value==="unmask"})))return r.__assign(r.__assign({},d),{directives:r.__spreadArray(r.__spreadArray([],d.directives||[],!0),[{kind:t.Kind.DIRECTIVE,name:{kind:t.Kind.NAME,value:"nonreactive"}}
161],!1)})}})}function Ye(l,d){var h;return((h=mn(l))===null||h===void 0?void 0:h.operation)===d}function pn(l){return Ye(l,"mutation")}function jn(l){return Ye(l,"query")}function Zt(l){return Ye(l,"subscription")}var Je=Object.prototype.hasOwnProperty;function gt(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return ma(l)}function ma(l){var d=l[0]||{},h=l.length;if(h>1)for(var b=new ei,O=1;O<h;++O)d=b.merge(d,l[O]);return d}var du=function(l,d,h){return this.merge(l[h],d[h])},ei=(function(){function l(d){d===void 0&&(d=du),this.reconciler=d,this.isObject=pe,this.pastCopies=new Set}return l.prototype.merge=function(d,h){for(var b=this,O=[],P=2;P<arguments.length;P++)O[P-2]=arguments[P];return pe(h)&&pe(d)?(Object.keys(h).forEach(function(W){if(Je.call(d,W)){var ie=d[W];if(h[W]!==ie){var de=b.reconciler.apply(b,r.__spreadArray([d,h,W],O,!1));de!==ie&&(d=b.shallowCopyForMerge(d),d[W]=de)}}else d=b.shallowCopyForMerge(d),d[W]=h[W]}),d):h},l.prototype.shallowCopyForMerge=function(d){return pe(d)&&(this.pastCopies.has(d)||(Array.isArray(d)?d=d.slice(0):d=r.__assign({__proto__:Object.getPrototypeOf(d)},d),this.pastCopies.add(d))),d},l})();function mu(l){return l===void 0&&(l=!1),{keyArgs:l,merge:function(d,h){return d?r.__spreadArray(r.__spreadArray([],d,!0),h,!0):h}}}function pu(l){return l===void 0&&(l=!1),{keyArgs:l,merge:function(d,h,b){var O=b.args,P=d?d.slice(0):[];if(h)if(O)for(var W=O.offset,ie=W===void 0?0:W,de=0;de<h.length;++de)P[ie+de]=h[de];else P.push.apply(P,h);return P}}}function hu(l){return l===void 0&&(l=!1),{keyArgs:l,read:function(d,h){var b=h.canRead,O=h.readField;if(!d)return d;var P=[],W="",ie="";
161d.edges.forEach(function(Ze){b(O("node",Ze))&&(P.push(Ze),Ze.cursor&&(W=W||Ze.cursor||"",ie=Ze.cursor||ie))}),P.length>1&&W===ie&&(W="");var de=d.pageInfo||{},Fe=de.startCursor,Qe=de.endCursor;return r.__assign(r.__assign({},ti(d)),{edges:P,pageInfo:r.__assign(r.__assign({},d.pageInfo),{startCursor:Fe||W,endCursor:Qe||ie})})},merge:function(d,h,b){var O=b.args,P=b.isReference,W=b.readField;if(d||(d=yu()),!h)return d;var ie=h.edges?h.edges.map(function(vn){return P(vn=r.__assign({},vn))&&(vn.cursor=W("cursor",vn)),vn}):[];if(h.pageInfo){var de=h.pageInfo,Fe=de.startCursor,Qe=de.endCursor,Ze=ie[0],kt=ie[ie.length-1];Ze&&Fe&&(Ze.cursor=Fe),kt&&Qe&&(kt.cursor=Qe);var hn=Ze&&Ze.cursor;hn&&!Fe&&(h=gt(h,{pageInfo:{startCursor:hn}}));var en=kt&&kt.cursor;en&&!Qe&&(h=gt(h,{pageInfo:{endCursor:en}}))}var bt=d.edges,wn=[];if(O&&O.after){var ae=bt.findIndex(function(vn){return vn.cursor===O.after});ae>=0&&(bt=bt.slice(0,ae+1))}else if(O&&O.before){var ae=bt.findIndex(function(Pu){return Pu.cursor===O.before});wn=ae<0?bt:bt.slice(ae),bt=[]}else h.edges&&(bt=[]);var Ve=r.__spreadArray(r.__spreadArray(r.__spreadArray([],bt,!0),ie,!0),wn,!0),Ae=r.__assign(r.__assign({},h.pageInfo),d.pageInfo);if(h.pageInfo){var Dt=h.pageInfo,tn=Dt.hasPreviousPage,Rt=Dt.hasNextPage,Fe=Dt.startCursor,Qe=Dt.endCursor,Mu=r.__rest(Dt,["hasPreviousPage","hasNextPage","startCursor","endCursor"]);Object.assign(Ae,Mu),bt.length||(tn!==void 0&&(Ae.hasPreviousPage=tn),Fe!==void 0&&(Ae.startCursor=Fe)),wn.length||(Rt!==void 0&&(Ae.hasNextPage=Rt),Qe!==void 0&&(Ae.endCursor=Qe))}return r.__assign(r.__assign(r.__assign({},ti(d)),ti(h)),{edges:Ve,pageInfo:Ae})}}}var ti=function(l){return r.__rest(l,vu)},vu=["edges","pageInfo"];function yu(){return{edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}}function gu(l){var d=Promise.resolve(l);return d.status="fulfilled",d.value=l,d}function bu(l){var d=Promise.reject(l);return d.catch(function(){}),d.status="rejected",d.reason=l,d}function pa(l){return"status"in l}function _u(l){if(pa(l))return l;var d=l;return d.status="pending",d.then(function(h){if(d.status==="pending"){var b=d;b.status="fulfilled",b.value=h}},function(h){if(d.status==="pending"){var b=d;b.status="rejected",b.reason=h}}),l}function Eu(l){return l.catch(function(){}),l}var Tu=Object.prototype.toString;function Nu(l){return ni(l)}function ni(l,d){switch(Tu.call(l)){case"[object Array]":{if(d=d||new Map,d.has(l))return d.get(l);var h=l.slice(0);return d.set(l,h),h.forEach(function(O,P){h[P]=ni(O,d)}),h}case"[object Object]":{if(d=d||new Map,d.has(l))return d.get(l);var b=Object.create(Object.getPrototypeOf(l));return d.set(l,b),Object.keys(l).forEach(function(O){b[O]=ni(l[O],d)}),b}default:return l}}function Su(l){var d=new Set([l]);return d.forEach(function(h){pe(h)&&wu(h)===h&&Object.getOwnPropertyNames(h).forEach(function(b){pe(h[b])&&d.add(h[b])})}),l}function wu(l){if(globalThis.__DEV__!==!1&&!Object.isFrozen(l))try{Object.freeze(l)}catch(d){if(d instanceof TypeError)return null;throw d}return l}function Ou(l){return globalThis.__DEV__!==!1&&Su(l),l}function lr(l,d,h){var b=[];l.forEach(function(O){return O[d]&&b.push(O)}),b.forEach(function(O){return O[d](h)})}function Iu(l,d,h){return new s.Observable(function(b){var O={then:function(de){return new Promise(function(Fe){return Fe(de())})}};function P(de,Fe){return function(Qe){if(de){var Ze=function(){return b.closed?0:de(Qe)};O=O.then(Ze,Ze).then(function(kt){return b.next(kt)},function(kt){return b.error(kt)})}else b[Fe](Qe)}}var W={next:P(d,"next"),error:P(h,"error"),complete:function(){O.then(function(){return b.complete()})}},ie=l.subscribe(W);return function(){return ie.unsubscribe()}})}function ha(l){function d(h){Object.defineProperty(l,h,{value:s.Observable})}return I&&Symbol.species&&d(Symbol.species),d("@@species"),l}function va(l){return l&&typeof l.then=="function"}var ya=(function(l){r.__extends(d,l);function d(h){var b=l.call(this,function(O){return b.addObserver(O),function(){return b.removeObserver(O)}})||this;return b.observers=new Set,b.promise=new Promise(function(O,P){b.resolve=O,b.reject=P}),b.handlers={next:function(O){b.sub!==null&&(b.latest=["next",O],b.notify("next",O),lr(b.observers,"next",O))},error:function(O){var P=b.sub;P!==null&&(P&&setTimeout(function(){return P.unsubscribe()}),b.sub=null,b.latest=["error",O],b.reject(O),b.notify("error",O),lr(b.observers,"error",O))},complete:function(){var O=b,P=O.sub,W=O.sources,ie=W===void 0?[]:W;if(P!==null){var de=ie.shift();de?va(de)?de.then(function(Fe){return b.sub=Fe.subscribe(b.handlers)},b.handlers.error):b.sub=de.subscribe(b.handlers):(P&&setTimeout(function(){return P.unsubscribe()}),b.sub=null,b.latest&&b.latest[0]==="next"?b.resolve(b.latest[1]):b.resolve(),b.notify("complete"),lr(b.observers,"complete"))}}},b.nextResultListeners=new Set,b.cancel=function(O){b.reject(O),b.sources=[],b.handlers.error(O)},b.promise.catch(function(O){}),typeof h=="function"&&(h=[new s.Observable(h)]),va(h)?h.then(function(O){return b.start(O)},b.handlers.error):b.start(h),b}return d.prototype.start=function(h){this.sub===void 0&&(this.sources=Array.from(h),this.handlers.complete())},d.prototype.deliverLastMessage=function(h){if(this.latest){var b=this.latest[0],O=h[b];O&&O.call(h,this.latest[1]),this.sub===null&&b==="next"&&h.complete&&h.complete()}},d.prototype.addObserver=function(h){this.observers.has(h)||(this.deliverLastMessage(h),this.observers.add(h))},d.prototype.removeObserver=function(h){this.observers.delete(h)&&this.observers.size<1&&this.handlers.complete()},d.prototype.notify=function(h,b){var O=this.nextResultListeners;O.size&&(this.nextResultListeners=new Set,O.forEach(function(P){return P(h,b)}))},d.prototype.beforeNext=function(h){var b=!1;this.nextResultListeners.add(function(O,P){b||(b=!0,h(O,P))})},d})(s.Observable);ha(ya);function fr(l){return"incremental"in l}function ga(l){return"hasNext"in l&&"data"in l}function ku(l){return fr(l)||ga(l)}function Du(l){return pe(l)&&"payload"in l}function Ru(l,d){var h=l,b=new ei;return fr(d)&&M(d.incremental)&&d.incremental.forEach(function(O){for(var P=O.data,W=O.path,ie=W.length-1;ie>=0;--ie){var de=W[ie],Fe=!isNaN(+de),Qe=Fe?[]:{};Qe[de]=P,P=Qe}h=b.merge(h,P)}),h}function Fu(l){var d=ba(l);return M(d)}function ba(l){var d=M(l.errors)?l.errors.slice(0):[];return fr(l)&&M(l.incremental)&&l.incremental.forEach(function(h){h.errors&&d.push.apply(d,h.errors)}),d}function ri(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];var h=Object.create(null);return l.forEach(function(b){b&&Object.keys(b).forEach(function(O){var P=b[O];P!==void 0&&(h[O]=P)})}),h}var _a=new Map;function Ea(l){var d=_a.get(l)||1;return _a.set(l,d+1),"".concat(l,":").concat(d,":").concat(Math.random().toString(36).slice(2))}function Au(l,d){d===void 0&&(d=0);var h=Ea("stringifyForDisplay");return JSON.stringify(l,function(b,O){return O===void 0?h:O},d).split(JSON.stringify(h)).join("<undefined>")}function Cu(l,d){return ri(l,d,d.variables&&{variables:ri(r.__assign(r.__assign({},l&&l.variables),d.variables))})}function Ta(l,d){return ii(l,d)}function ii(l,d,h){if(h===void 0&&(h=new Map),h.has(l))return h.get(l);var b=!1;if(Array.isArray(l)){var O=[];if(h.set(l,O),l.forEach(function(W,ie){var de=ii(W,d,h);b||(b=de!==W),O[ie]=de}),b)return O}else if(C(l)){var P=Object.create(Object.getPrototypeOf(l));if(h.set(l,P),Object.keys(l).forEach(function(W){if(W===d){b=!0;return}var ie=ii(l[W],d,h);b||(b=ie!==l[W]),P[W]=ie}),b)return P}return l}function Lu(l){return Ta(l,"__typename")}return q.DEV=e.DEV,q.maybe=e.maybe,q.Observable=s.Observable,q.AutoCleanedStrongCache=Mt,q.AutoCleanedWeakCache=Gt,q.Concast=ya,q.DeepMerger=ei,q.DocumentTransform=E,q.addNonReactiveToNamedFragments=Xe,q.addTypenameToDocument=ne,q.argumentsObjectFromField=Zr,q.asyncMap=Iu,q.buildQueryFromSelectionSet=$e,q.cacheSizes=at,q.canUseAsyncIteratorSymbol=j,q.canUseDOM=K,q.canUseLayoutEffect=_e,q.canUseSymbol=I,q.canUseWeakMap=V,q.canUseWeakSet=k,q.canonicalStringify=D,q.checkDocument=vt,q.cloneDeep=Nu,q.compact=ri,q.concatPagination=mu,q.createFragmentMap=ce,q.createFulfilledPromise=gu,q.createRejectedPromise=bu,q.fixObservableSubclass=ha,q.getDefaultValues=m,q.getDirectiveNames=f,q.getFragmentDefinition=o,q.getFragmentDefinitions=yt,q.getFragmentFromSelection=Pe,q.getFragmentMaskMode=B,q.getFragmentQueryDocument=Q,q.getGraphQLErrorsFromResult=ba,q.getInclusionDirectives=L,q.getMainDefinition=c,q.getOperationDefinition=mn,q.getOperationName=cr,q.getQueryDefinition=g,q.getStoreKeyName=or,q.getTypenameFromResult=$n,q.graphQLResultHasError=Fu,q.hasAllDirectives=p,q.hasAnyDirectives=v,q.hasClientExports=T,q.hasDirectives=_,q.isApolloPayloadResult=Du,q.isArray=$,q.isDocumentNode=Ee,q.isExecutionPatchIncrementalResult=fr,q.isExecutionPatchInitialResult=ga,q.isExecutionPatchResult=ku,q.isField=Sn,q.isFullyUnmaskedOperation=We,q.isInlineFragment=Vn,q.isMutationOperation=pn,q.isNonEmptyArray=M,q.isNonNullObject=pe,q.isPlainObject=C,q.isQueryOperation=jn,q.isReference=Re,q.isStatefulPromise=pa,q.isSubscriptionOperation=Zt,q.
161iterateObserversSafely=lr,q.makeReference=Ne,q.makeUniqueId=Ea,q.maybeDeepFreeze=Ou,q.mergeDeep=gt,q.mergeDeepArray=ma,q.mergeIncrementalData=Ru,q.mergeOptions=Cu,q.offsetLimitPagination=pu,q.omitDeep=Ta,q.preventUnhandledRejection=Eu,q.print=F,q.relayStylePagination=hu,q.removeArgumentsFromDocument=me,q.removeClientSetsFromDocument=nt,q.removeConnectionDirectiveFromDocument=oe,q.removeDirectivesFromDocument=X,q.removeFragmentSpreadFromDocument=ge,q.resultKeyNameFromField=ur,q.shouldInclude=u,q.storeKeyNameFromField=Xt,q.stringifyForDisplay=Au,q.stripTypename=Lu,q.valueToObjectRepresentation=zt,q.wrapPromiseWithState=_u,q}var Eh=_h(),yr={},ct={},fi,Ka;function Th(){if(Ka)return fi;Ka=1,fi=e;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*t);t=(Math.floor(n*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},fi}var di={exports:{}},Xa;function Nh(){return Xa||(Xa=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,v,p){this.fn=f,this.context=v,this.once=p||!1}function a(f,v,p,_,T){if(typeof p!="function")throw new TypeError("The listener must be a function");var S=new i(p,_||f,T),L=n?n+v:v;return f._events[L]?f._events[L].fn?f._events[L]=[f._events[L],S]:f._events[L].push(S):(f._events[L]=S,f._eventsCount++),f}function s(f,v){--f._eventsCount===0?f._events=new r:delete f._events[v]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var v=[],p,_;if(this._eventsCount===0)return v;for(_ in p=this._events)t.call(p,_)&&v.push(n?_.slice(1):_);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(p)):v},u.prototype.listeners=function(v){var p=n?n+v:v,_=this._events[p];if(!_)return[];if(_.fn)return[_.fn];for(var T=0,S=_.length,L=new Array(S);T<S;T++)L[T]=_[T].fn;return L},u.prototype.listenerCount=function(v){var p=n?n+v:v,_=this._events[p];return _?_.fn?1:_.length:0},u.prototype.emit=function(v,p,_,T,S,L){var B=n?n+v:v;if(!this._events[B])return!1;var x=this._events[B],V=arguments.length,k,I;if(x.fn){switch(x.once&&this.removeListener(v,x.fn,void 0,!0),V){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,p),!0;case 3:return x.fn.call(x.context,p,_),!0;case 4:return x.fn.call(x.context,p,_,T),!0;case 5:return x.fn.call(x.context,p,_,T,S),!0;case 6:return x.fn.call(x.context,p,_,T,S,L),!0}for(I=1,k=new Array(V-1);I<V;I++)k[I-1]=arguments[I];x.fn.apply(x.context,k)}else{var j=x.length,K;for(I=0;I<j;I++)switch(x[I].once&&this.removeListener(v,x[I].fn,void 0,!0),V){case 1:x[I].fn.call(x[I].context);break;case 2:x[I].fn.call(x[I].context,p);break;case 3:x[I].fn.call(x[I].context,p,_);break;case 4:x[I].fn.call(x[I].context,p,_,T);break;default:if(!k)for(K=1,k=new Array(V-1);K<V;K++)k[K-1]=arguments[K];x[I].fn.apply(x[I].context,k)}}return!0},u.prototype.on=function(v,p,_){return a(this,v,p,_,!1)},u.prototype.once=function(v,p,_){return a(this,v,p,_,!0)},u.prototype.removeListener=function(v,p,_,T){var S=n?n+v:v;if(!this._events[S])return this;if(!p)return s(this,S),this;var L=this._events[S];if(L.fn)L.fn===p&&(!T||L.once)&&(!_||L.context===_)&&s(this,S);else{for(var B=0,x=[],V=L.length;B<V;B++)(L[B].fn!==p||T&&!L[B].once||_&&L[B].context!==_)&&x.push(L[B]);x.length?this._events[S]=x.length===1?x[0]:x:s(this,S)}return this},u.prototype.removeAllListeners=function(v){var p;return v?(p=n?n+v:v,this._events[p]&&s(this,p)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(di)),di.exports}var gr={},Za;function Sh(){if(Za)return gr;
161Za=1,Object.defineProperty(gr,"__esModule",{value:!0});function e(t){return typeof t=="string"}return gr.default=e,gr}var br={},es;function wh(){if(es)return br;es=1,Object.defineProperty(br,"__esModule",{value:!0});function e(t){return t!==null&&typeof t=="object"}return br.default=e,br}const Oh=xe(Df),Ih=xe(Rm);function kh(e){var t,n=e.Symbol;return typeof n=="function"?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}var On;typeof self<"u"?On=self:typeof window<"u"?On=window:typeof global<"u"?On=global:typeof module<"u"?On=module:On=Function("return this")();var Dh=kh(On);const Rh=Object.freeze(Object.defineProperty({__proto__:null,default:Dh},Symbol.toStringTag,{value:"Module"})),Fh=xe(Rh);var gn={},ts;function Ah(){if(ts)return gn;ts=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.GRAPHQL_SUBSCRIPTIONS=gn.GRAPHQL_WS=void 0;var e="graphql-ws";gn.GRAPHQL_WS=e;var t="graphql-subscriptions";return gn.GRAPHQL_SUBSCRIPTIONS=t,gn}var bn={},ns;function Ch(){if(ns)return bn;ns=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.WS_TIMEOUT=bn.MIN_WS_TIMEOUT=void 0;var e=1e3;bn.MIN_WS_TIMEOUT=e;var t=3e4;return bn.WS_TIMEOUT=t,bn}var _r={},rs;function Lh(){if(rs)return _r;rs=1,Object.defineProperty(_r,"__esModule",{value:!0});var e=(function(){function t(){throw new Error("Static Class")}return t.GQL_CONNECTION_INIT="connection_init",t.GQL_CONNECTION_ACK="connection_ack",t.GQL_CONNECTION_ERROR="connection_error",t.GQL_CONNECTION_KEEP_ALIVE="ka",t.GQL_CONNECTION_TERMINATE="connection_terminate",t.GQL_START="start",t.GQL_DATA="data",t.GQL_ERROR="error",t.GQL_COMPLETE="complete",t.GQL_STOP="stop",t.SUBSCRIPTION_START="subscription_start",t.SUBSCRIPTION_DATA="subscription_data",t.SUBSCRIPTION_SUCCESS="subscription_success",t.SUBSCRIPTION_FAIL="subscription_fail",t.SUBSCRIPTION_END="subscription_end",t.INIT="init",t.INIT_SUCCESS="init_success",t.INIT_FAIL="init_fail",t.KEEP_ALIVE="keepalive",t})();return _r.default=e,_r}var is;function Mh(){if(is)return ct;is=1;var e=ct&&ct.__assign||function(){return e=Object.assign||function(V){for(var k,I=1,j=arguments.length;I<j;I++){k=arguments[I];for(var K in k)Object.prototype.hasOwnProperty.call(k,K)&&(V[K]=k[K])}return V},e.apply(this,arguments)},t=ct&&ct.__awaiter||function(V,k,I,j){function K(G){return G instanceof I?G:new I(function(_e){_e(G)})}return new(I||(I=Promise))(function(G,_e){function pe(ce){try{Q(j.next(ce))}catch(Pe){_e(Pe)}}function C(ce){try{Q(j.throw(ce))}catch(Pe){_e(Pe)}}function Q(ce){ce.done?G(ce.value):K(ce.value).then(pe,C)}Q((j=j.apply(V,k||[])).next())})},n=ct&&ct.__generator||function(V,k){var I={label:0,sent:function(){if(G[0]&1)throw G[1];return G[1]},trys:[],ops:[]},j,K,G,_e;return _e={next:pe(0),throw:pe(1),return:pe(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function pe(Q){return function(ce){return C([Q,ce])}}function C(Q){if(j)throw new TypeError("Generator is already executing.");for(;I;)try{if(j=1,K&&(G=Q[0]&2?K.return:Q[0]?K.throw||((G=K.return)&&G.call(K),0):K.next)&&!(G=G.call(K,Q[1])).done)return G;switch(K=0,G&&(Q=[Q[0]&2,G.value]),Q[0]){case 0:case 1:G=Q;break;case 4:return I.label++,{value:Q[1],done:!1};case 5:I.label++,K=Q[1],Q=[0];continue;case 7:Q=I.ops.pop(),I.trys.pop();continue;default:if(G=I.trys,!(G=G.length>0&&G[G.length-1])&&(Q[0]===6||Q[0]===2)){I=0;continue}if(Q[0]===3&&(!G||Q[1]>G[0]&&Q[1]<G[3])){I.label=Q[1];break}if(Q[0]===6&&I.label<G[1]){I.label=G[1],G=Q;break}if(G&&I.label<G[2]){I.label=G[2],I.ops.push(Q);break}G[2]&&I.ops.pop(),I.trys.pop();continue}Q=k.call(V,I)}catch(ce){Q=[6,ce],K=0}finally{j=G=0}if(Q[0]&5)throw Q[1];return{value:Q[0]?Q[1]:void 0,done:!0}}},r=ct&&ct.__spreadArray||function(V,k,I){if(I||arguments.length===2)for(var j=0,K=k.length,G;j<K;j++)(G||!(j in k))&&(G||(G=Array.prototype.slice.call(k,0,j)),G[j]=k[j]);return V.concat(G||Array.prototype.slice.call(k))};Object.defineProperty(ct,"__esModule",{value:!0}),ct.SubscriptionClient=void 0;var i=typeof bi<"u"?bi:typeof window<"u"?window:{},a=i.WebSocket||i.MozWebSocket,s=Th(),u=Nh(),f=Sh(),v=wh(),p=Oh,_=Ih,T=Fh,S=Ah(),L=Ch(),B=Lh(),x=(function(){function V(k,I,j,K){var G=I||{},_e=G.connectionCallback,pe=_e===void 0?void 0:_e,C=G.connectionParams,Q=C===void 0?{}:C,ce=G.minTimeout,Pe=ce===void 0?L.MIN_WS_TIMEOUT:ce,We=G.timeout,Lt=We===void 0?L.WS_TIMEOUT:We,ht=G.reconnect,Gt=ht===void 0?!1:ht,Mt=G.reconnectionAttempts,Pt=Mt===void 0?1/0:Mt,at=G.lazy,ze=at===void 0?!1:at,qe=G.inactivityTimeout,D=qe===void 0?0:qe,H=G.wsOptionArguments,z=H===void 0?[]:H;if(this.wsImpl=j||a,!this.wsImpl)throw new Error("Unable to find native implementation, or alternative implementation for WebSocket!");this.wsProtocols=K||S.GRAPHQL_WS,this.connectionCallback=pe,this.url=k,this.operations={},this.nextOperationId=0,this.minWsTimeout=Pe,this.wsTimeout=Lt,this.unsentMessagesQueue=[],this.reconnect=Gt,this.reconnecting=!1,this.reconnectionAttempts=Pt,this.lazy=!!ze,this.inactivityTimeout=D,this.closedByUser=!1,this.backoff=new s({jitter:.5}),this.eventEmitter=new u.EventEmitter,this.middlewares=[],this.client=null,this.maxConnectTimeGenerator=this.createMaxConnectTimeGenerator(),this.connectionParams=this.getConnectionParams(Q),this.wsOptionArguments=z,this.lazy||this.connect()}return Object.defineProperty(V.prototype,"status",{get:function(){return this.client===null?this.wsImpl.CLOSED:this.client.readyState}
161,enumerable:!1,configurable:!0}),V.prototype.close=function(k,I){k===void 0&&(k=!0),I===void 0&&(I=!0),this.clearInactivityTimeout(),this.client!==null&&(this.closedByUser=I,k&&(this.clearCheckConnectionInterval(),this.clearMaxConnectTimeout(),this.clearTryReconnectTimeout(),this.unsubscribeAll(),this.sendMessage(void 0,B.default.GQL_CONNECTION_TERMINATE,null)),this.client.close(),this.client.onopen=null,this.client.onclose=null,this.client.onerror=null,this.client.onmessage=null,this.client=null,this.eventEmitter.emit("disconnected"),k||this.tryReconnect())},V.prototype.request=function(k){var I,j=this.getObserver.bind(this),K=this.executeOperation.bind(this),G=this.unsubscribe.bind(this),_e;return this.clearInactivityTimeout(),I={},I[T.default]=function(){return this},I.subscribe=function(pe,C,Q){var ce=j(pe,C,Q);return _e=K(k,function(Pe,We){Pe===null&&We===null?ce.complete&&ce.complete():Pe?ce.error&&ce.error(Pe[0]):ce.next&&ce.next(We)}),{unsubscribe:function(){_e&&(G(_e),_e=null)}}},I},V.prototype.on=function(k,I,j){var K=this.eventEmitter.on(k,I,j);return function(){K.off(k,I,j)}},V.prototype.onConnected=function(k,I){return this.on("connected",k,I)},V.prototype.onConnecting=function(k,I){return this.on("connecting",k,I)},V.prototype.onDisconnected=function(k,I){return this.on("disconnected",k,I)},V.prototype.onReconnected=function(k,I){return this.on("reconnected",k,I)},V.prototype.onReconnecting=function(k,I){return this.on("reconnecting",k,I)},V.prototype.onError=function(k,I){return this.on("error",k,I)},V.prototype.unsubscribeAll=function(){var k=this;Object.keys(this.operations).forEach(function(I){k.unsubscribe(I)})},V.prototype.applyMiddlewares=function(k){var I=this;return new Promise(function(j,K){var G=function(_e,pe){var C=function(Q){if(Q)K(Q);else if(_e.length>0){var ce=_e.shift();ce&&ce.applyMiddleware.apply(pe,[k,C])}else j(k)};C()};G(r([],I.middlewares,!0),I)})},V.prototype.use=function(k){var I=this;return k.map(function(j){if(typeof j.applyMiddleware=="function")I.middlewares.push(j);else throw new Error("Middleware must implement the applyMiddleware function.")}),this},V.prototype.getConnectionParams=function(k){return function(){return new Promise(function(I,j){if(typeof k=="function")try{return I(k.call(null))}catch(K){return j(K)}I(k)})}},V.prototype.executeOperation=function(k,I){var j=this;this.client===null&&this.connect();var K=this.generateOperationId();return this.operations[K]={options:k,handler:I},this.applyMiddlewares(k).then(function(G){j.checkOperationOptions(G,I),j.operations[K]&&(j.operations[K]={options:G,handler:I},j.sendMessage(K,B.default.GQL_START,G))}).catch(function(G){j.unsubscribe(K),I(j.formatErrors(G))}),K},V.prototype.getObserver=function(k,I,j){return typeof k=="function"?{next:function(K){return k(K)},error:function(K){return I&&I(K)},complete:function(){return j&&j()}}:k},V.prototype.createMaxConnectTimeGenerator=function(){var k=this.minWsTimeout,I=this.wsTimeout;return new s({min:k,max:I,factor:1.2})},V.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},V.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},V.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},V.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},V.prototype.setInactivityTimeout=function(){var k=this;this.inactivityTimeout>0&&Object.keys(this.operations).length===0&&(this.inactivityTimeoutId=setTimeout(function(){Object.keys(k.operations).length===0&&k.close()},this.inactivityTimeout))},V.prototype.checkOperationOptions=function(k,I){var j=k.query,K=k.variables,G=k.operationName;
161if(!j)throw new Error("Must provide a query.");if(!I)throw new Error("Must provide an handler.");if(!(0,f.default)(j)&&!(0,_.getOperationAST)(j,G)||G&&!(0,f.default)(G)||K&&!(0,v.default)(K))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},V.prototype.buildMessage=function(k,I,j){var K=j&&j.query?e(e({},j),{query:typeof j.query=="string"?j.query:(0,p.print)(j.query)}):j;return{id:k,type:I,payload:K}},V.prototype.formatErrors=function(k){return Array.isArray(k)?k:k&&k.errors?this.formatErrors(k.errors):k&&k.message?[k]:[{name:"FormatedError",message:"Unknown error",originalError:k}]},V.prototype.sendMessage=function(k,I,j){this.sendMessageRaw(this.buildMessage(k,I,j))},V.prototype.sendMessageRaw=function(k){switch(this.status){case this.wsImpl.OPEN:var I=JSON.stringify(k);try{JSON.parse(I)}catch{this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+k))}this.client.send(I);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(k);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(k)))}},V.prototype.generateOperationId=function(){return String(++this.nextOperationId)},V.prototype.tryReconnect=function(){var k=this;if(!(!this.reconnect||this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach(function(j){k.unsentMessagesQueue.push(k.buildMessage(j,B.default.GQL_START,k.operations[j].options))}),this.reconnecting=!0),this.clearTryReconnectTimeout();var I=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout(function(){k.connect()},I)}},V.prototype.flushUnsentMessagesQueue=function(){var k=this;this.unsentMessagesQueue.forEach(function(I){k.sendMessageRaw(I)}),this.unsentMessagesQueue=[]},V.prototype.checkConnection=function(){if(this.wasKeepAliveReceived){this.wasKeepAliveReceived=!1;return}this.reconnecting||this.close(!1,!0)},V.prototype.checkMaxConnectTimeout=function(){var k=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout(function(){k.status!==k.wsImpl.OPEN&&(k.reconnecting=!0,k.close(!1,!0))},this.maxConnectTimeGenerator.duration())},V.prototype.connect=function(){var k,I=this;this.client=new((k=this.wsImpl).bind.apply(k,r([void 0,this.url,this.wsProtocols],this.wsOptionArguments,!1))),this.checkMaxConnectTimeout(),this.client.onopen=function(){return t(I,void 0,void 0,function(){var j,K;return n(this,function(G){switch(G.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),G.label=1;case 1:return G.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return j=G.sent(),this.sendMessage(void 0,B.default.GQL_CONNECTION_INIT,j),this.flushUnsentMessagesQueue(),[3,4];case 3:return K=G.sent(),this.sendMessage(void 0,B.default.GQL_CONNECTION_ERROR,K),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}})})},this.client.onclose=function(){I.closedByUser||I.close(!1,!1)},this.client.onerror=function(j){I.eventEmitter.emit("error",j)},this.client.onmessage=function(j){var K=j.data;I.processReceivedData(K)}},V.prototype.processReceivedData=function(k){var I,j;try{I=JSON.parse(k),j=I.id}catch{throw new Error("Message must be JSON-parseable. Got: "+k)}if([B.default.GQL_DATA,B.default.GQL_COMPLETE,B.default.GQL_ERROR].indexOf(I.type)!==-1&&!this.operations[j]){this.unsubscribe(j);return}switch(I.type){case B.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(I.payload);break;case B.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",I.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case B.default.GQL_COMPLETE:var K=this.operations[j].handler;delete this.operations[j],K.call(this,null,null);break;case B.default.GQL_ERROR:this.operations[j].handler(this.formatErrors(I.payload),null),delete this.operations[j];break;case B.default.GQL_DATA:var G=I.payload.errors?e(e({},I.payload),{errors:this.formatErrors(I.payload.errors)}):I.payload;this.operations[j].handler(null,G);break;case B.default.GQL_CONNECTION_KEEP_ALIVE:var _e=typeof this.wasKeepAliveReceived>"u";this.wasKeepAliveReceived=!0,_e&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}},V.prototype.unsubscribe=function(k){this.operations[k]&&(delete this.operations[k],this.setInactivityTimeout(),this.sendMessage(k,B.default.GQL_STOP,void 0))},V})();return ct.SubscriptionClient=x,ct}var as;function Ph(){if(as)return yr;
161as=1,Object.defineProperty(yr,"__esModule",{value:!0});var e=da,t=Mh(),n=au,r=(function(i){e.__extends(a,i);function a(s){var u=i.call(this)||this;return s instanceof t.SubscriptionClient?u.subscriptionClient=s:u.subscriptionClient=new t.SubscriptionClient(s.uri,s.options,s.webSocketImpl),u}return a.prototype.request=function(s){return this.subscriptionClient.request(s)},a})(n.ApolloLink);return yr.WebSocketLink=r,yr}var $h=Ph();const ss=new Ts((e,t)=>{const n=window.tp?.pianoId?.getToken(),r={dcid:Na().get("dcid")||"",commentatorToken:Na().get("commentatorToken")||""};return n&&(r.Authorization=`Bearer ${n}`),e.setContext({headers:r}),t(e)}),zr=()=>{const{public:{commentApiV2Url:e,commentApiV2WS:t}}=Rf();if(!e)throw new Error("Missing runtime config: commentApiV2Url");if(!t)throw new Error("Missing runtime config: commentApiV2WS");const n=new qn.HttpLink({uri:e,fetch}),r=new $h.WebSocketLink({uri:t,options:{reconnect:!0}}),i=qn.split(({query:u})=>{const f=Eh.getMainDefinition(u);return f.kind==="OperationDefinition"&&f.operation==="subscription"},r,n);qn.concat(ss,i);const a=ss.concat(i),s=new qn.InMemoryCache;return new qn.ApolloClient({link:a,cache:s})},Vh=`query Counts($input: GetArticleStatsInput!) { 162 getArticleStats(input: $input) { 163 counts { 164 articleId 165 commentsTotalCount 166 mainCommentsTotalCount 167 registeredCommentsCount 168 anonymousCommentsCount 169 registeredMainCommentsCount 170 anonymousMainCommentsCount 171 } 172 } 173} 174`,jh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Counts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetArticleStatsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getArticleStats"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"counts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"articleId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commentsTotalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mainCommentsTotalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"registeredCommentsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"anonymousCommentsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"registeredMainCommentsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"anonymousMainCommentsCount"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:340,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Vh}}},qh=async e=>{const n={variables:$r(e),fetchPolicy:"no-cache",query:jh},{data:r}=await zr().query(n),i=r?.getArticleStats?.counts?.[0];return i||null},Qh=`query GetConfig($input: GetConfigInput!) { 175 getConfig(input: $input) { 176 enabled: isCommentingAllowed 177 comments_per_page: commentsPerPage 178 isCommentingWithoutModerationAllowed 179 user_can_delete_comments: canUserDeleteOwnComments 180 registered_comments_only: isOnlyCustomersAllowedToComment 181 isReplyingAllowed 182 subscriberCommentsOnly: isOnlySubscribersAllowedToComment 183 recaptchaSiteKey: reCaptchaSiteKey 184 } 185} 186`,Uh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetConfigInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"enabled"},name:{kind:"Name",value:"isCommentingAllowed"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"comments_per_page"},name:{kind:"Name",value:"commentsPerPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCommentingWithoutModerationAllowed"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"user_can_delete_comments"}
186,name:{kind:"Name",value:"canUserDeleteOwnComments"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"registered_comments_only"},name:{kind:"Name",value:"isOnlyCustomersAllowedToComment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isReplyingAllowed"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subscriberCommentsOnly"},name:{kind:"Name",value:"isOnlySubscribersAllowedToComment"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"recaptchaSiteKey"},name:{kind:"Name",value:"reCaptchaSiteKey"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:469,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Qh}}},xh=async e=>{const n={variables:$r(e),fetchPolicy:"no-cache",query:Uh},{data:r}=await zr().query(n);return r.getConfig},Gh=`query GetComments($input: GetCommentsInput, $repliesInput: GetCommentsInput) { 187 getComments(input: $input) { 188 pager { 189 count 190 offset 191 limit 192 } 193 items { 194 id 195 subject: commentatorName 196 content 197 createdAt 198 status 199 reactions { 200 count 201 reaction 202 } 203 parentComment { 204 id 205 subject: commentatorName 206 } 207 quotedComment { 208 id 209 subject: commentatorName 210 } 211 author: customer { 212 displayName 213 avatar 214 } 215 cookieId 216 replies(input: $repliesInput) { 217 items { 218 id 219 subject: commentatorName 220 content 221 createdAt 222 status 223 reactions { 224 count 225 reaction 226 } 227 parentComment { 228 id 229 subject: commentatorName 230 } 231 quotedComment { 232 id 233 subject: commentatorName 234 } 235 author: customer { 236 displayName 237 avatar 238 } 239 cookieId 240 } 241 pager { 242 count 243 offset 244 limit 245 } 246 } 247 } 248 } 249} 250`,Bh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"GetCommentsInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"repliesInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"GetCommentsInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getComments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pager"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"offset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reactions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"parentComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"quotedComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"author"},name:{kind:"Name",value:"customer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatar"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"cookieId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"replies"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"repliesInput"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reactions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"parentComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"quotedComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"author"},name:{kind:"Name",value:"customer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatar"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"cookieId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pager"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"offset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:1204,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Gh}}},Wh=async e=>{const t=$r(e),n=await xh({input:{articleId:t.input.articleId}});if(!n.enabled)return{comments:[],pager:null,counts:null,config:n};const r={variables:t,fetchPolicy:"no-cache",query:Bh},{data:i}=await zr().query(r),{getComments:a}=i,s=a?.items.filter(f=>f===null?!1:f.status==="UNPROCESSED"||f.status==="APPROVED"||f.status==="DISAPPROVED"&&(f.replies?.items?.length??0)>0),u=await qh({input:{articleId:t.input.articleId}});return{comments:s,pager:a?.pager??null,counts:u,config:n}},zh={class:"comment-avatar"},Yh={key:0,class:"comment-ai-avatar"},Hh={key:1,class:"comment-default-avatar"},Jh=Kt({__name:"CommentAvatar",props:{comment:{}},setup(e){const t=["Tehisaru mõtiskleb","ÐРзадÑмалÑÑ"],n=r=>r.status==="UNPROCESSED"||r.status==="APPROVED";return(r,i)=>(ye(),Ie("div",zh,[n(e.comment)&&e.comment.author&&t.includes(e.comment.author.displayName)?(ye(),Ie("span",Yh)):n(e.comment)&&e.comment.author?(ye(),Ie("span",Hh)):(ye(),Ie("span",{key:2,class:Pr({"comment-anonymous":!0,removed:!n(e.comment)})},null,2))]))}}),Kh=Kn(Jh,[["__scopeId","data-v-8f577683"]]),Xh={class:"comment-body"},Zh={class:"comment-subject"},ev={class:"inline-block"},tv={class:"created-time"},nv={key:0,class:"comment-content"},rv={key:0,class:"quoteTo"},iv={class:"comment-subject text-disabled"},av={class:"created-time"},mi=600,sv=Kt({__name:"CommentBody",props:{comment:{}},setup(e){const t=e,{t:n}=Ff(),r=lt({}),i=et(()=>t.comment.subject??n("comments.anonymous"));function a(S){return Af(S).format("DD.MM.YYYY HH:mm:ss")}const s=et(()=>a(t.comment.createdAt));function u(S){return S.status==="UNPROCESSED"||S.status==="APPROVED"}function f(S){return!!(S&&S.length>mi)}function v(S){return!!r.value[S]}function p(S){r.value={...r.value,[S]:!r.value[S]}}function _(S,L){return S.length<=mi||v(L)?S:`${S.slice(0,mi)}â¦`}function T(S){return n(S==="EXPIRED"?"comments.expiredComment":"comments.removedComment")}return(S,L)=>(ye(),Ie("div",Xh,[u(e.comment)?(ye(),Ie(En,{key:0},[fe("div",Zh,[fe("div",ev,Et(i.value),1)]),fe("div",tv,Et(s.value),1),e.comment.content?(ye(),Ie("div",nv,[e.comment.quotedComment?.subject?(ye(),Ie("span",rv,"@"+Et(e.comment.quotedComment.subject)+" ",1)):Nt("",!0),fe("span",null,Et(_(e.comment.content,e.comment.id)),1),f(e.comment.content)?(ye(),Ie("button",{key:1,type:"button",class:Pr(["comment-read-more",{"is-expanded":v(e.comment.id)}]),onClick:L[0]||(L[0]=B=>p(e.comment.id))},Et(v(e.comment.id)?S.$t("comments.readLess"):S.$t("comments.readMore")),3)):Nt("",!0)])):Nt("",!0)],64)):(ye(),Ie(En,{key:1},[fe("div",iv,Et(T(e.comment.status)),1),fe("div",av,Et(s.value),1)],64))]))}}),ov=Kn(sv,[["__scopeId","data-v-8e000010"]]),uv=`query GetCommentReplies($input
250: GetCommentsInput) { 251 getComments(input: $input) { 252 pager { 253 count 254 offset 255 limit 256 } 257 items { 258 id 259 subject: commentatorName 260 content 261 createdAt 262 status 263 reactions { 264 count 265 reaction 266 } 267 parentComment { 268 id 269 subject: commentatorName 270 } 271 quotedComment { 272 id 273 subject: commentatorName 274 } 275 author: customer { 276 displayName 277 avatar 278 } 279 cookieId 280 } 281 } 282} 283`,cv={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCommentReplies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"GetCommentsInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getComments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pager"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"offset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reactions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"parentComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"quotedComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"subject"},name:{kind:"Name",value:"commentatorName"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"author"},name:{kind:"Name",value:"customer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatar"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"cookieId"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:571,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:uv}}},lv=async e=>{const n={variables:$r(e),fetchPolicy:"no-cache",query:cv},{data:r}=await zr().query(n),{getComments:i}=r;return{comments:i?.items.filter(s=>s===null?!1:s.status==="UNPROCESSED"||s.status==="APPROVED"||s.status==="DISAPPROVED"),pager:i?.pager??null}},cu=3,os=15,lu="CREATED_AT",fu="DESC",fv=["id"],dv={class:"comment"},mv={key:0,class:"loadmore-reply"},pv=["disabled"],hv={key:1,class:"comment-replies"},vv=Kt({__name:"Comment",props:{comment:{}},setup(e){const t=e,n=lt(t.comment.replies?.items.toReversed()??[]),r=lt({offset:(t.comment.replies?.pager.offset??0)+cu,count:t.comment.replies?.pager.count}),i=lt(!1),a=lt(!1);function s(S){return S.status==="UNPROCESSED"||S.status==="APPROVED"}const u=et(()=>n.value.filter(S=>s(S))),f=et(()=>n.value.length??0),v=et(()=>r.value.count??0),p=et(()=>Math.max(v.value-f.value,0)),_=et(()=>p.value>0);async function T(){i.value=!0;try{const{comments:S}=await lv({input:{parentCommentId:t.comment.id,pager:{offset:r.value.offset,limit:os,orderBy:lu,orderDirection:fu}}});if(!S)throw new Error("Parent comment replies were not returned");S.reverse(),n.value=S.concat(n.value),r.value.offset!==null&&(r.value.offset+=os)}catch{a.value=!0;return}i.value=!1}return(S,L)=>{const B=Cf("Comment",!0);return e.comment?(ye(),Ie("div",{key:0,id:`comment_${e.comment.id}`,class:Pr({"has-reply":u.value.length||_.value})},[fe("div",dv,[Oe(Kh,{comment:e.comment},null,8,["comment"]),Oe(ov,{comment:e.comment},null,8,["comment"])]),_.value?(ye(),Ie("div",mv,[fe("button",{type:"button",class:"btn-loadmore small",disabled:je(i),onClick:T},Et(je(i)?S.$t("comments.loading"):`${S.$t("comments.loadMoreReplies")} (${p.value})`),9,pv)])):Nt("",!0),u.value.length?(ye(),Ie("div",hv,[(ye(!0),Ie(En,null,Fi(u.value,x=>(ye(),nn(B,{key:x.id,comment:x,class:"comment-reply"},null,8,["comment"]))),128))])):Nt("",!0)],10,fv)):Nt("",!0)}}}),yv={class:"comment-terms-modal"},gv={class:"uc"},bv={class:"uc-header flex-container"},_v=["innerHTML"],Ev=Kt({__name:"CommentTermsModal",emits:["close"],setup(e,{emit:t}){const n=t;function r(){n("close")}return(i,a)=>(ye(),Ie("div",yv,[Oe(Lf,{onClose:r},{default:Qn(()=>[fe("div",gv,[fe("div",bv,Et(i.$t("comments.terms")),1),fe("div",{class:"uc-body",innerHTML:i.$t("comments.termsText")},null,8,_v)])]),_:1})]))}}),Tv=Kn(Ev,[["__scopeId","data-v-f184c580"]]),Nv={class:"posting-rules"},Sv={class:"nb-box"},wv=Kt({__name:"CommentPostingRules",setup(e){const t=lt(!1);function n(){t.value=!0}function r(){t.value=!1}return(i,a)=>(ye(),Ie(En,null,[fe("div",Nv,[fe("div",Sv,Et(i.$t("comments.nbText")),1),fe("button",{type:"button",class:"commentRules",onClick:a[0]||(a[0]=s=>n())},Et(i.$t("comments.commentRulesBtn")),1)]),t.value?(ye(),nn(Tv,{key:0,onClose:a[1]||(a[1]=s=>r())})):Nt("",!0)],64))}}),Ov=Kn(wv,[["__scopeId","data-v-69226c29"]]),Iv={key:0,id:"comments-fe-v2","data-testid":"comments-fe-v2"},kv=["disabled"],Dv=20,Rv=15,Fv=Kt({__name:"CommentsFrontendV2",setup(e){const t=lt(!1),n=lt(!1),r=lt([]),i=lt({count:0,offset:0,limit:0}),a=lt(null),{$store:s}=Mr(),u=et(()=>Number(s.getters["article/getActiveArticle"]?.id)),f=et(()=>t.value?Rv:Dv),v=et(()=>{const x=i.value.count??0,V=i.value.offset??0;return Math.max(x-V,0)}),p=et(()=>v.value>0),{status:_,execute:T}=Kf("comments",async()=>(await S(),!0),{immediate:!1,server:!1});gi(async()=>{t.value=window.screen.width<=Mf.breakpoints.lg,await T()});async function S(){const x=i.value.offset??0,V=await Wh(B(x)),k=V.comments??[];r.value.push(...k),V.pager&&(i.value=V.pager),a.value=V.config,i.value.offset!==null&&(i.value.offset+=i.value.limit??0)}async function L(){if(!(n.value||!p.value)){n.value=!0;try{await S()}catch{return}n.value=!1}}function B(x,V=0){return{input:{articleId:u.value,pager:{limit:f.value,offset:x,orderBy:"CREATED_AT",orderDirection:"ASC"},isNested:!0},repliesInput:{isNested:!1,pager:{limit:cu,offset:V,orderBy:lu,orderDirection:fu}}}}return(x,V)=>je(a)?.enabled!==!1?(ye(),Ie("div",Iv,[je(_)==="pending"?(ye(),nn(Jf,{key:0,size:"big"})):(ye(),Ie(En,{key:1},[Oe(Ov),(ye(!0),Ie(En,null,Fi(je(r),k=>(ye(),nn(vv,{key:k.id,comment:k},null,8,["comment"]))),128)),je(p)?(ye(),Ie("button",{key:0,id:"bt
283n-loadmore",type:"button",class:"btn-loadmore small mb-20",disabled:je(n),onClick:L},Et(je(n)?x.$t("comments.loading"):`${x.$t("comments.loadMoreComments")} (${je(v)})`),9,kv)):Nt("",!0)],64))])):Nt("",!0)}}),Av={class:"container"},Cv={key:0,class:"article-info"},Lv={class:"article-info__title"},Mv=["innerHTML"],Pv=["onClick"],Bv=Kt({__name:"comments",setup(e){const{$channelConfig:t,$config:n,$store:r,ssrContext:i}=Mr(),a=Ns(),s=et(()=>a.query["comments-fe-v2"]!==void 0),u=et(()=>f.value.showComments||s.value),f=Pf(`article-${a.params.id}-comments`,()=>({article:null,showComments:!1,articleUrl:"",loadCommentsOnMount:!1}));Xf(`article-${a.params.id}-comments`,async()=>{const p=a.params.id,{lang:_}=t("settings"),T={id:p,authorLanguage:_};let S;try{S=await new qp({config:n},{req:i?.event.node.req}).fetch(T)}catch(B){return Os("Fetch article for comments failed: ArticleForCommentsService failed",{contexts:{...B.message&&{message:B.message},...B.statusCode&&{service:{responseCode:B.statusCode}}},tags:{"process.type":"client"}}),wr(B),!0}if(!S?.article)return wr({statusCode:404,message:"error.page_not_found"}),!0;r.commit("article/setActiveArticle",S.article),r.commit("gam/setPageAdsSettings",oh({article:S.article,$channelConfig:t})),f.value.article=S.article;const L={type:"article",id:f.value.article.id,slug:f.value.article.slug,channel:f.value.article.primaryCategory.channel};return f.value.articleUrl=qf({pathOptions:L}),!0}),ws(()=>f.value.article,p=>{if(!p)return;const _=t("settings").locale;Uf({type:"article",locale:_,route:a,id:p.id,slug:p.slug})},{immediate:!0}),$f(()=>{const p=Yf({$channelConfig:t,$config:n,article:f.value.article,path:a.path});p.url=a.path,p.type="website";const _=[...p.data];return _?.push({hid:"cXenseParse:eks-taxonomy",name:"cXenseParse:eks-taxonomy",content:"comments"}),_?.push({hid:"cXenseParse:url",name:"cXenseParse:url",content:`${t("meta").base.baseUrl}${f.value.articleUrl}`}),{title:p.title,meta:_,style:p.style.map(T=>({...T,textContent:T.cssText})),link:p.link,__dangerouslyDisableSanitizers:["style"]}}),Ss(()=>{r.commit("article/setActiveArticle",null)}),Vf((p,_,T)=>{r.commit("gam/resetPageAdsSettings"),T()});function v(){f.value.showComments=!0}return(p,_)=>{const T=Oa,S=Oa;return ye(),Ie("div",null,[je(u)?Nt("",!0):(ye(),nn(sh,{key:0})),fe("div",Av,[Sa(fe("div",null,[je(f).article?(ye(),Ie("div",Cv,[fe("h1",Lv,[Oe(jf,{href:je(f).articleUrl},{default:Qn(()=>[fe("span",{innerHTML:je(f).article.content.title.text},null,8,Mv)]),_:1},8,["href"])])])):Nt("",!0)],512),[[wa,je(u)]]),Oe(T,null,{default:Qn(()=>[Oe(Qf,{"ad-type":"leaderboard"})]),_:1}),Sa(fe("div",null,[je(s)?(ye(),nn(S,{key:0},{default:Qn(()=>[je(s)?(ye(),nn(Fv,{key:0})):Nt("",!0)]),_:1})):(ye(),nn($p,{key:1,article:je(f).article,"article-url":je(f).articleUrl,onLoaded:v},null,8,["article","article-url"])),Oe(Hf,null,{default:Qn(({openLoginModal:L})=>[fe("button",{id:"openLoginModal",onClick:B=>L()},null,8,Pv)]),_:1})],512),[[wa,je(u)]])])])}}});export{Bv as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.