PageSourceSearch

https://500px.com/assets/vendors-apollo-Cy12Slu_.js

js 500px.com collected 2026-09-24 06:23:18 UTC 146,181 bytes, 44 lines download raw bytes

1import{_ as tt,a as ge,b as ve,c as L,d as Fi,e as yn,f as gt,g as _i,h as Di}from"./vendors-intl-BbHKVUVx.js";function Ni(r,e){if(!!!r)throw new Error(e)}const mn={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Ri=new Set(Object.keys(mn));function mr(r){const e=r?.kind;return typeof e=="string"&&Ri.has(e)}var ae;(function(r){r.QUERY="query",r.MUTATION="mutation",r.SUBSCRIPTION="subscription"})(ae||(ae={}));var C;(function(r){r.NAME="Name",r.DOCUMENT="Document",r.OPERATION_DEFINITION="OperationDefinition",r.VARIABLE_DEFINITION="VariableDefinition",r.SELECTION_SET="SelectionSet",r.FIELD="Field",r.ARGUMENT="Argument",r.FRAGMENT_SPREAD="FragmentSpread",r.INLINE_FRAGMENT="InlineFragment",r.FRAGMENT_DEFINITION="FragmentDefinition",r.VARIABLE="Variable",r.INT="IntValue",r.FLOAT="FloatValue",r.STRING="StringValue",r.BOOLEAN="BooleanValue",r.NULL="NullValue",r.ENUM="EnumValue",r.LIST="ListValue",r.OBJECT="ObjectValue",r.OBJECT_FIELD="ObjectField",r.DIRECTIVE="Directive",r.NAMED_TYPE="NamedType",r.LIST_TYPE="ListType",r.NON_NULL_TYPE="NonNullType",r.SCHEMA_DEFINITION="SchemaDefinition",r.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",r.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",r.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",r.FIELD_DEFINITION="FieldDefinition",r.INPUT_VALUE_DEFINITION="InputValueDefinition",r.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",r.UNION_TYPE_DEFINITION="UnionTypeDefinition",r.ENUM_TYPE_DEFINITION="EnumTypeDefinition",r.ENUM_VALUE_DEFINITION="EnumValueDefinition",r.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",r.DIRECTIVE_DEFINITION="DirectiveDefinition",r.SCHEMA_EXTENSION="SchemaExtension",r.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",r.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",r.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",r.UNION_TYPE_EXTENSION="UnionTypeExtension",r.ENUM_TYPE_EXTENSION="EnumTypeExtension",r.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",r.TYPE_COORDINATE="TypeCoordinate",r.MEMBER_COORDINATE="MemberCoordinate",r.ARGUMENT_COORDINATE="ArgumentCoordinate",r.DIRECTIVE_COORDINATE="DirectiveCoordinate",r.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(C||(C={}));function gr(r){return r===9||r===32}function xi(r,e){const t=r.replace(/"""/g,'\\"""'),n=t.split(/\r\n|[\n\r]/g),i=n.length===1,s=n.length>1&&n.slice(1).every(f=>f.length===0||gr(f.charCodeAt(0))),a=t.endsWith('\\"""'),o=r.endsWith('"')&&!a,c=r.endsWith("\\"),u=o||c,l=!i||r.length>70||u||s||a;let d="";const h=i&&gr(r.charCodeAt(0));return(l&&!h||s)&&(d+=`
2`),d+=t,(l||u)&&(d+=`
3`),'"""'+d+'"""'}const Mi=10,gn=2;function Ai(r){return at(r,[])}function at(r,e){switch(typeof r){case"string":return JSON.stringify(r);case"function":return r.name?`[function ${r.name}]`:"[function]";case"object":return Pi(r,e);default:return String(r)}}function Pi(r,e){if(r===null)return"null";if(e.includes(r))return"[Circular]";const t=[...e,r];if(ji(r)){const n=r.toJSON();if(n!==r)return typeof n=="string"?n:at(n,t)}else if(Array.isArray(r))return qi(r,t);return Vi(r,t)}function ji(r){return typeof r.toJSON=="function"}function Vi(r,e){const t=Object.entries(r);return t.length===0?"{}":e.length>gn?"["+Li(r)+"]":"{ "+t.map(([i,s])=>i+": "+at(s,e)).join(", ")+" }"}function qi(r,e){if(r.length===0)return"[]";if(e.length>gn)return"[Array]";const t=Math.min(Mi,r.length),n=r.length-t,i=[];for(let s=0;s<t;++s)i.push(at(r[s],e));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function Li(r){const e=Object.prototype.toString.call(r).replace(/^\[object /,"").replace(/]$/,"");
3if(e==="Object"&&typeof r.constructor=="function"){const t=r.constructor.name;if(typeof t=="string"&&t!=="")return t}return e}function Qi(r){return`"${r.replace(zi,Wi)}"`}const zi=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Wi(r){return Bi[r.charCodeAt(0)]}const Bi=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Jt=Object.freeze({});function B(r,e,t=mn){const n=new Map;for(const g of Object.values(C))n.set(g,Ui(e,g));let i,s=Array.isArray(r),a=[r],o=-1,c=[],u=r,l,d;const h=[],f=[];do{o++;const g=o===a.length,v=g&&c.length!==0;if(g){if(l=f.length===0?void 0:h[h.length-1],u=d,d=f.pop(),v)if(s){u=u.slice();let S=0;for(const[O,V]of c){const M=O-S;V===null?(u.splice(M,1),S++):u[M]=V}}else{u={...u};for(const[S,O]of c)u[S]=O}o=i.index,a=i.keys,c=i.edits,s=i.inArray,i=i.prev}else if(d){if(l=s?o:a[o],u=d[l],u==null)continue;h.push(l)}let b;if(!Array.isArray(u)){var m,y;mr(u)||Ni(!1,`Invalid AST Node: ${Ai(u)}.`);const S=g?(m=n.get(u.kind))===null||m===void 0?void 0:m.leave:(y=n.get(u.kind))===null||y===void 0?void 0:y.enter;if(b=S?.call(e,u,l,d,h,f),b===Jt)break;if(b===!1){if(!g){h.pop();continue}}else if(b!==void 0&&(c.push([l,b]),!g))if(mr(b))u=b;else{h.pop();continue}}if(b===void 0&&v&&c.push([l,u]),g)h.pop();else{var p;i={inArray:s,index:o,keys:a,edits:c,prev:i},s=Array.isArray(u),a=s?u:(p=t[u.kind])!==null&&p!==void 0?p:[],o=-1,c=[],d&&f.push(d),d=u}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:r}function Ui(r,e){const t=r[e];return typeof t=="object"?t:typeof t=="function"?{enter:t,leave:void 0}:{enter:r.enter,leave:r.leave}}function $i(r){return B(r,Gi)}const Hi=80,Gi={Name:{leave:r=>r.value},Variable:{leave:r=>"$"+r.name},Document:{leave:r=>w(r.definitions,`
4
5`)},OperationDefinition:{leave(r){const e=vt(r.variableDefinitions)?E(`(
6`,w(r.variableDefinitions,`
7`),`
8)`):E("(",w(r.variableDefinitions,", "),")"),t=E("",r.description,`
9`)+w([r.operation,w([r.name,e]),w(r.directives," ")]," ");return(t==="query"?"":t+" ")+r.selectionSet}},VariableDefinition:{leave:({variable:r,type:e,defaultValue:t,directives:n,description:i})=>E("",i,`
10`)+r+": "+e+E(" = ",t)+E(" ",w(n," "))},SelectionSet:{leave:({selections:r})=>Q(r)},Field:{leave({alias:r,name:e,arguments:t,directives:n,selectionSet:i}){const s=E("",r,": ")+e;let a=s+E("(",w(t,", "),")");return a.length>Hi&&(a=s+E(`(
11`,Ge(w(t,`
12`)),`
13)`)),w([a,w(n," "),i]," ")}},Argument:{leave:({name:r,value:e})=>r+": "+e},FragmentSpread:{leave:({name:r,directives:e})=>"..."+r+E(" ",w(e," "))},InlineFragment:{leave:({typeCondition:r,directives:e,selectionSet:t})=>w(["...",E("on ",r),w(e," "),t]," ")},FragmentDefinition:{leave:({name:r,typeCondition:e,variableDefinitions:t,directives:n,selectionSet:i,description:s})=>E("",s,`
14`)+`fragment ${r}${E("(",w(t,", "),")")} on ${e} ${E("",w(n," ")," ")}`+i},IntValue:{leave:({value:r})=>r},FloatValue:{leave:({value:r})=>r},StringValue:{leave:({value:r,block:e})=>e?xi(r):Qi(r)},BooleanValue:{leave:({value:r})=>r?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:r})=>r},ListValue:{leave:({values:r})=>"["+w(r,", ")+"]"},ObjectValue:{leave:({fields:r})=>"{"+w(r,", ")+"}"},ObjectField:{leave:({name:r,value:e})=>r+": "+e},Directive:{leave:({name:r,arguments:e})=>"@"+r+E("(",w(e,", "),")")},NamedType:{leave:({name:r})=>r},ListType:{leave:({type:r})=>"["+r+"]"},NonNullType:{leave:({type:r})=>r+"!"},SchemaDefinition:{leave:({description:r,directives:e,operationTypes:t})=>E("",r,`
15`)+w(["schema",w(e," "),Q(t)]," ")},OperationTypeDefinition:{leave:({operation:r,type:e})=>r+": "+e},ScalarTypeDefinition:{leave:({description:r,name:e,directives:t})=>E("",r,`
16`)+w(["scalar",e,w(t," ")]," ")},ObjectTypeDefinition:{leave:({description:r,name:e,interfaces:t,directives:n,fields:i})=>E("",r,`
17`)+w(["type",e,E("implements ",w(t," & ")),w(n," "),Q(i)]," ")},FieldDefinition:{leave:({description:r,name:e,arguments:t,type:n,directives:i})=>E("",r,`
18`)+e+(vt(t)?E(`(
19`,Ge(w(t,`
20`)),`
21)`):E("(",w(t,", "),")"))+": "+n+E(" ",w(i," "))},InputValueDefinition:{leave:({description:r,name:e,type:t,defaultValue:n,directives:i})=>E("",r,`
22`)+w([e+": "+t,E("= ",n),w(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:r,name:e,interfaces:t,directives:n,fields:i})=>E("",r,`
23`)+w(["interface",e,E("implements ",w(t," & ")),w(n," "),Q(i)]," ")},UnionTypeDefinition:{leave:({description:r,name:e,directives:t,types:n})=>E("",r,`
24`)+w(["union",e,w(t," "),E("= ",w(n," | "))]," ")},EnumTypeDefinition:{leave:({description:r,name:e,directives:t,values:n})=>E("",r,`
25`)+w(["enum",e,w(t," "),Q(n)]," ")},EnumValueDefinition:{leave:({description:r,name:e,directives:t})=>E("",r,`
26`)+w([e,w(t," ")]," ")},InputObjectTypeDefinition:{leave:({description:r,name:e,directives:t,fields:n})=>E("",r,`
27`)+w(["input",e,w(t," "),Q(n)]," ")},DirectiveDefinition:{leave:({description:r,name:e,arguments:t,repeatable:n,locations:i})=>E("",r,`
28`)+"directive @"+e+(vt(t)?E(`(
29`,Ge(w(t,`
30`)),`
31)`):E("(",w(t,", "),")"))+(n?" repeatable":"")+" on "+w(i," | ")},SchemaExtension:{leave:({directives:r,operationTypes:e})=>w(["extend schema",w(r," "),Q(e)]," ")},ScalarTypeExtension:{leave:({name:r,directives:e})=>w(["extend scalar",r,w(e," ")]," ")},ObjectTypeExtension:{leave:({name:r,interfaces:e,directives:t,fields:n})=>w(["extend type",r,E("implements ",w(e," & ")),w(t," "),Q(n)]," ")},InterfaceTypeExtension:{leave:({name:r,interfaces:e,directives:t,fields:n})=>w(["extend interface",r,E("implements ",w(e," & ")),w(t," "),Q(n)]," ")},UnionTypeExtension:{leave:({name:r,directives:e,types:t})=>w(["extend union",r,w(e," "),E("= ",w(t," | "))]," ")},EnumTypeExtension:{leave:({name:r,directives:e,values:t})=>w(["extend enum",r,w(e," "),Q(t)]," ")},InputObjectTypeExtension:{leave:({name:r,directives:e,fields:t})=>w(["extend input",r,w(e," "),Q(t)]," ")},TypeCoordinate:{leave:({name:r})=>r},MemberCoordinate:{leave:({name:r,memberName:e})=>w([r,E(".",e)])},ArgumentCoordinate:{leave:({name:r,fieldName:e,argumentName:t})=>w([r,E(".",e),E("(",t,":)")])},DirectiveCoordinate:{leave:({name:r})=>w(["@",r])},DirectiveArgumentCoordinate:{leave:({name:r,argumentName:e})=>w(["@",r,E("(",e,":)")])}};function w(r,e=""){var t;return(t=r?.filter(n=>n).join(e))!==null&&t!==void 0?t:""}function Q(r){return E(`{
32`,Ge(w(r,`
33`)),`
34}`)}function E(r,e,t=""){return e!=null&&e!==""?r+e+t:""}function Ge(r){return E("  ",r.replace(/\n/g,`
35  `))}function vt(r){var e;return(e=r?.some(t=>t.includes(`
36`)))!==null&&e!==void 0?e:!1}function D(r){return typeof r=="function"}function Kt(r){var e=function(n){Error.call(n),n.stack=new Error().stack},t=r(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var bt=Kt(function(r){return function(t){r(this),this.message=t?t.length+` errors occurred during unsubscription:
37`+t.map(function(n,i){return i+1+") "+n.toString()}).join(`
38  `):"",this.name="UnsubscriptionError",this.errors=t}});function rt(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var Qe=(function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=tt(a),c=o.next();!c.done;c=o.next()){var u=c.value;u.remove(this)}}catch(y){e={error:y}}finally{try{c&&!c.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(D(l))try{l()}catch(y){s=y instanceof bt?y.errors:[y]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var h=tt(d),f=h.next();!f.done;f=h.next()){var m=f.value;try{vr(m)}catch(y){s=s??[],y instanceof bt?s=ge(ge([],ve(s)),ve(y.errors)):s.push(y)}}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}if(s)throw new bt(s)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)vr(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&rt(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&rt(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=(function(){var e=new r;return e.closed=!0,e})(),r})(),vn=Qe.EMPTY;function bn(r){return r instanceof Qe||r&&"closed"in r&&D(r.remove)&&D(r.add)&&D(r.unsubscribe)}function vr(r){D(r)?r():r.unsubscribe()}var Yi={Promise:void 0},Ji={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return setTimeout.apply(void 0,ge([r,e],ve(t)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function wn(r){Ji.setTimeout(function(){throw r})}function br(){}function Ye(r){r()}var Xt=(function(r){L(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,bn(t)&&t.add(n)):n.destination=Zi,n}return e.create=function(t,n,i){return new Me(t,n,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(Qe),Ki=(function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){He(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){He(n)}else He(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){He(t)}},r})(),Me=(function(r){L(e,r);function e(t,n,i){var s=r.call(this)||this,a;return D(t)||!t?a={next:t??void 0,error:n??void 0,complete:i??void 0}:a=t,s.destination=new Ki(a),s}return e})(Xt);function He(r){wn(r)}function Xi(r){throw r}var Zi={closed:!0,next:br,error:Xi,complete:br},Zt=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function ot(r){return r}function es(r){return r.length===0?ot:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var _=(function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,s=rs(e)?e:new Me(e,t,n);return Ye(function(){var a=i,o=a.operator,c=a.source;s.add(o?o.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=wr(t),new t(function(i,s){var a=new Me({next:function(o){try{e(o)}catch(c){s(c),a.unsubscribe()}},error:s,complete:i});n.subscribe(a)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[Zt]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return es(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=wr(e),new e(function(n,i){var s;t.subscribe(function(a){return s=a},function(a){return i(a)},function(){return n(s)})})},r.create=function(e){return new r(e)},r})();function wr(r){var e;return(e=r??Yi.Promise)!==null&&e!==void 0?e:Promise}function ts(r){return r&&D(r.next)&&D(r.error)&&D(r.complete)}function rs(r){return r&&r instanceof Xt||ts(r)&&bn(r)}function ns(r){return D(r?.lift)}function z(r){return function(e){if(ns(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Y(r,e,t,n,i){return new is(r,e,t,n,i)}var is=(function(r){L(e,r);function e(t,n,i,s,a,o){var c=r.call(this,t)||this;return c.onFinalize=a,c.shouldUnsubscribe=o,c._next=n?function(u){try{n(u)}catch(l){t.error(l)}}:r.prototype._next,c._error=s?function(u){try{s(u)}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._error,c._complete=i?function(){try{i()}catch(u){t.error(u)}finally{this.unsubscribe()}}:r.prototype._complete,c}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e})(Xt),ss=Kt(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ee=(function(r){L(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new Sr(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new ss},e.prototype.next=function(t){var n=this;Ye(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=tt(n.currentObservers),o=a.next();!o.done;o=a.next()){var c=o.value;c.next(t)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;Ye(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;Ye(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}
vendor: 3,420 bytes, line 38
38,enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,s=i.hasError,a=i.isStopped,o=i.observers;return s||a?vn:(this.currentObservers=null,o.push(t),new Qe(function(){n.currentObservers=null,rt(o,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n.thrownError,a=n.isStopped;i?t.error(s):a&&t.complete()},e.prototype.asObservable=function(){var t=new _;return t.source=this,t},e.create=function(t,n){return new Sr(t,n)},e})(_),Sr=(function(r){L(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:vn},e})(Ee),as=(function(r){L(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,s=t._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e})(Ee),er={now:function(){return(er.delegate||Date).now()},delegate:void 0},Sn=(function(r){L(e,r);function e(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=er);var s=r.call(this)||this;return s._bufferSize=t,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,t),s._windowTime=Math.max(1,n),s}return e.prototype.next=function(t){var n=this,i=n.isStopped,s=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,c=n._windowTime;i||(s.push(t),!a&&s.push(o.now()+c)),this._trimBuffer(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),i=this,s=i._infiniteTimeWindow,a=i._buffer,o=a.slice(),c=0;c<o.length&&!t.closed;c+=s?1:2)t.next(o[c]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,i=t._timestampProvider,s=t._buffer,a=t._infiniteTimeWindow,o=(a?1:2)*n;if(n<1/0&&o<s.length&&s.splice(0,s.length-o),!a){for(var c=i.now(),u=0,l=1;l<s.length&&s[l]<=c;l+=2)u=l;u&&s.splice(0,u+1)}},e})(Ee),os=(function(r){L(e,r);function e(t,n){return r.call(this)||this}return e.prototype.schedule=function(t,n){return this},e})(Qe),Or={setInterval:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return setInterval.apply(void 0,ge([r,e],ve(t)))},clearInterval:function(r){return clearInterval(r)},delegate:void 0},On=(function(r){L(e,r);function e(t,n){var i=r.call(this,t,n)||this;
38return i.scheduler=t,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(t,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=t;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),Or.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Or.clearInterval(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var i=!1,s;try{this.work(t)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,i=t.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,rt(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},e})(os),cs=1,wt,jt={};function kr(r){return r in jt?(delete jt[r],!0):!1}var kn={setImmediate:function(r){var e=cs++;return jt[e]=!0,wt||(wt=Promise.resolve()),wt.then(function(){return kr(e)&&r()}),e},clearImmediate:function(r){kr(r)}},us=kn.setImmediate,ls=kn.clearImmediate,Er={setImmediate:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return us.apply(void 0,ge([],ve(r)))},clearImmediate:function(r){return ls(r)},delegate:void 0},fs=(function(r){L(e,r);function e(t,n){var i=r.call(this,t,n)||this;
38return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=Er.setImmediate(t.flush.bind(t,void 0))))},e.prototype.recycleAsyncId=function(t,n,i){var s;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);var a=t.actions;n!=null&&((s=a[a.length-1])===null||s===void 0?void 0:s.id)!==n&&(Er.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},e})(On),Tr=(function(){function r(e,t){t===void 0&&(t=r.now),this.schedulerActionCtor=e,this.now=t}return r.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},r.now=er.now,r})(),En=(function(r){L(e,r);function e(t,n){n===void 0&&(n=Tr.now);var i=r.call(this,t,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(t){var n=this.actions;if(this._active){n.push(t);return}var i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},e})(Tr),hs=(function(r){L(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;t=t||i.shift();do if(s=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===n&&i.shift());if(this._active=!1,s){for(;(t=i[0])&&t.id===n&&i.shift();)t.unsubscribe();throw s}},e})(En),Bo=new hs(fs),ds=new En(On),ps=ds,Ae=new _(function(r){return r.complete()});function ys(r){return r&&D(r.schedule)}function ms(r){return r[r.length-1]}function Tn(r){return ys(ms(r))?r.pop():void 0}var Cn=(function(r){return r&&typeof r.length=="number"&&typeof r!="function"});function In(r){return D(r?.then)}function Fn(r){return D(r[Zt])}function _n(r){return Symbol.asyncIterator&&D(r?.[Symbol.asyncIterator])}function Dn(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function gs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Nn=gs();function Rn(r){return D(r?.[Nn])}function xn(r){return Fi(this,arguments,function(){var t,n,i,s;return yn(this,function(a){switch(a.label){case 0:t=r.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,gt(t.read())];case 3:return n=a.sent(),i=n.value,s=n.done,s?[4,gt(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,gt(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Mn(r){return D(r?.getReader)}function ne(r){if(r instanceof _)return r;if(r!=null){if(Fn(r))return vs(r);if(Cn(r))return bs(r);if(In(r))return ws(r);if(_n(r))return An(r);if(Rn(r))return Ss(r);if(Mn(r))return Os(r)}throw Dn(r)}function vs(r){return new _(function(e){var t=r[Zt]();if(D(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bs(r){return new _(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function ws(r){return new _(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,wn)})}function Ss(r){return new _(function(e){var t,n;try{for(var i=tt(r),s=i.next();!s.done;s=i.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(o){t={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}function An(r){return new _(function(e){ks(r,e).catch(function(t){return e.error(t)})})}function Os(r){return An(xn(r))}function ks(r,e){var t,n,i,s;return _i(this,void 0,void 0,function(){var a,o;return yn(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),t=Di(r),c.label=1;case 1:return[4,t.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=c.sent(),i={error:o},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=t.return)?[4,s.call(t)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];
38case 10:return[7];case 11:return e.complete(),[2]}})})}function oe(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var s=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(s),!i)return s}function Pn(r,e){return e===void 0&&(e=0),z(function(t,n){t.subscribe(Y(n,function(i){return oe(n,r,function(){return n.next(i)},e)},function(){return oe(n,r,function(){return n.complete()},e)},function(i){return oe(n,r,function(){return n.error(i)},e)}))})}function jn(r,e){return e===void 0&&(e=0),z(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}function Es(r,e){return ne(r).pipe(jn(e),Pn(e))}function Ts(r,e){return ne(r).pipe(jn(e),Pn(e))}function Cs(r,e){return new _(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}function Is(r,e){return new _(function(t){var n;return oe(t,e,function(){n=r[Nn](),oe(t,e,function(){var i,s,a;try{i=n.next(),s=i.value,a=i.done}catch(o){t.error(o);return}a?t.complete():t.next(s)},0,!0)}),function(){return D(n?.return)&&n.return()}})}function Vn(r,e){if(!r)throw new Error("Iterable cannot be null");return new _(function(t){oe(t,e,function(){var n=r[Symbol.asyncIterator]();oe(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function Fs(r,e){return Vn(xn(r),e)}function _s(r,e){if(r!=null){if(Fn(r))return Es(r,e);if(Cn(r))return Cs(r,e);if(In(r))return Ts(r,e);if(_n(r))return Vn(r,e);if(Rn(r))return Is(r,e);if(Mn(r))return Fs(r,e)}throw Dn(r)}function se(r,e){return e?_s(r,e):ne(r)}function ie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Tn(r);return se(r,t)}function qn(r,e){var t=D(r)?r:function(){return r},n=function(i){return i.error(t())};return new _(n)}var Cr;(function(r){r.NEXT="N",r.ERROR="E",r.COMPLETE="C"})(Cr||(Cr={}));var St=(function(){function r(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e==="N"}return r.prototype.observe=function(e){return Ds(this,e)},r.prototype.do=function(e,t,n){var i=this,s=i.kind,a=i.value,o=i.error;return s==="N"?e?.(a):s==="E"?t?.(o):n?.()},r.prototype.accept=function(e,t,n){var i;return D((i=e)===null||i===void 0?void 0:i.next)?this.observe(e):this.do(e,t,n)},r.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,i=e.error,s=t==="N"?ie(n):t==="E"?qn(function(){return i}):t==="C"?Ae:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},r.createNext=function(e){return new r("N",e)},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r})();function Ds(r,e){var t,n,i,s=r,a=s.kind,o=s.value,c=s.error;if(typeof a!="string")throw new TypeError('Invalid notification, missing "kind"');a==="N"?(t=e.next)===null||t===void 0||t.call(e,o):a==="E"?(n=e.error)===null||n===void 0||n.call(e,c):(i=e.complete)===null||i===void 0||i.call(e)}var Ns=Kt(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function Rs(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=!1,a;r.subscribe({next:function(o){a=o,s=!0},error:i,complete:function(){s?n(a):t?n(e.defaultValue):i(new Ns)}})})}function xs(r){return r instanceof Date&&!isNaN(r)}function Z(r,e){return z(function(t,n){var i=0;t.subscribe(Y(n,function(s){n.next(r.call(e,s,i++))}))})}function Ms(r,e,t,n,i,s,a,o){var c=[],u=0,l=0,d=!1,h=function(){d&&!c.length&&!u&&e.complete()},f=function(y){return u<n?m(y):c.push(y)},m=function(y){u++;var p=!1;ne(t(y,l++)).subscribe(Y(e,function(g){e.next(g)},function(){p=!0},void 0,function(){if(p)try{u--;for(var g=function(){var v=c.shift();a||m(v)};c.length&&u<n;)g();h()}catch(v){e.error(v)}}))};return r.subscribe(Y(e,f,function(){d=!0,h()})),function(){}}function ue(r,e,t){return t===void 0&&(t=1/0),D(e)?ue(function(n,i){return Z(function(s,a){return e(n,s,i,a)})(ne(r(n,i)))},t):(typeof e=="number"&&(t=e),z(function(n,i){return Ms(n,i,r,t)}))}function As(r){return ue(ot,r)}function Ps(){return As(1)}function Ot(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Ps()(se(r,Tn(r)))}function js(r,e,t){return t===void 0&&(t=ps),new _(function(n){var i=xs(r)?+r-t.now():r;i<0&&(i=0);var s=0;return t.schedule(function(){n.closed||(n.next(s++),n.complete())},i)})}function Ln(r,e){return z(function(t,n){var i=0;t.subscribe(Y(n,function(s){return r.call(e,s,i++)&&n.next(s)}))})}function Je(r){return z(function(e,t){var n=null,i=!1,s;n=e.subscribe(Y(t,void 0,void 0,function(a){s=ne(r(a,Je(r)(e))),n?(n.unsubscribe(),n=null,s.subscribe(t)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(t))})}function Vs(r,e){return e===void 0&&(e=ot),r=r??qs,z(function(t,n){var i,s=!0;t.subscribe(Y(n,function(a){var o=e(a);(s||!r(i,o))&&(s=!1,i=o,n.next(a))}
38))})}function qs(r,e){return r===e}function Ls(r){return z(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})}function Qs(){return z(function(r,e){r.subscribe(Y(e,function(t){e.next(St.createNext(t))},function(){e.next(St.createComplete()),e.complete()},function(t){e.next(St.createError(t)),e.complete()}))})}function Pe(r){r===void 0&&(r={});var e=r.connector,t=e===void 0?function(){return new Ee}:e,n=r.resetOnError,i=n===void 0?!0:n,s=r.resetOnComplete,a=s===void 0?!0:s,o=r.resetOnRefCountZero,c=o===void 0?!0:o;return function(u){var l,d,h,f=0,m=!1,y=!1,p=function(){d?.unsubscribe(),d=void 0},g=function(){p(),l=h=void 0,m=y=!1},v=function(){var b=l;g(),b?.unsubscribe()};return z(function(b,S){f++,!y&&!m&&p();var O=h=h??t();S.add(function(){f--,f===0&&!y&&!m&&(d=kt(v,c))}),O.subscribe(S),!l&&f>0&&(l=new Me({next:function(V){return O.next(V)},error:function(V){y=!0,p(),d=kt(g,i,V),O.error(V)},complete:function(){m=!0,p(),d=kt(g,a),O.complete()}}),ne(b).subscribe(l))})(u)}}function kt(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];if(e===!0){r();return}if(e!==!1){var i=new Me({next:function(){i.unsubscribe(),r()}});return ne(e.apply(void 0,ge([],ve(t)))).subscribe(i)}}function tr(r,e,t){var n,i,s,a,o=!1;return r&&typeof r=="object"?(n=r.bufferSize,a=n===void 0?1/0:n,i=r.windowTime,e=i===void 0?1/0:i,s=r.refCount,o=s===void 0?!1:s,t=r.scheduler):a=r??1/0,Pe({connector:function(){return new Sn(a,e,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function je(r,e,t){var n=D(r)||e||t?{next:r,error:e,complete:t}:r;return n?z(function(i,s){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var o=!0;i.subscribe(Y(s,function(c){var u;(u=n.next)===null||u===void 0||u.call(n,c),s.next(c)},function(){var c;o=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},function(c){var u;o=!1,(u=n.error)===null||u===void 0||u.call(n,c),s.error(c)},function(){var c,u;o&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):ot}const Qn=!1;function $(r){try{return r()}catch{}}const Vt=$(()=>globalThis)||$(()=>window)||$(()=>self)||$(()=>global)||$(function(){return $.constructor("return this")()}),rr="4.1.6",Ir=new Map;function zn(r){const e=Ir.get(r)||1;return Ir.set(r,e+1),`${r}:${e}:${Math.random().toString(36).slice(2)}`}function zs(r,e=0){const t=zn("stringifyForDisplay");return JSON.stringify(r,(n,i)=>i===void 0?t:i,e).split(JSON.stringify(t)).join("<undefined>")}const Fr="Invariant Violation";class nr extends Error{constructor(e=Fr){super(e),this.name=Fr,Object.setPrototypeOf(this,nr.prototype)}}const Wn=["debug","log","warn","error","silent"];let Ws=Wn.indexOf("silent");function T(r,...e){if(!r)throw q(...e)}function ct(r){return function(e,...t){if(Wn.indexOf(r)>=Ws){const n=console[r]||console.log;if(typeof e=="number"){const i=e;e=Bn(i),e||(e=Un(i,t),t=[])}n(e,...t)}}}T.debug=ct("debug");T.log=ct("log");T.warn=ct("warn");T.error=ct("error");function q(r,...e){return new nr(Bn(r,e)||Un(r,e))}const _r=Symbol.for("ApolloErrorMessageHandler_"+rr);function qt(r){if(typeof r=="string")return r;try{return zs(r,2).slice(0,1e3)}catch{return"<non-serializable>"}}function Bn(r,e=[]){if(r)return Vt[_r]&&Vt[_r](r,e.map(qt))}function Un(r,e=[]){if(r)return typeof r=="string"?e.reduce((t,n)=>t.replace(/%[sdfo]/,qt(n)),r):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:rr,message:r,args:e.map(qt)}))}`}function be(r,e,t,n){if(t.kind===C.INT||t.kind===C.FLOAT)r[e.value]=Number(t.value);else if(t.kind===C.BOOLEAN||t.kind===C.STRING)r[e.value]=t.value;else if(t.kind===C.OBJECT){const i={};t.fields.map(s=>be(i,s.name,s.value,n)),r[e.value]=i}else if(t.kind===C.VARIABLE){const i=(n||{})[t.name.value];r[e.value]=i}else if(t.kind===C.LIST)r[e.value]=t.values.map(i=>{const s={};return be(s,e,i,n),s[e.value]});else if(t.kind===C.ENUM)r[e.value]=t.value;else if(t.kind===C.NULL)r[e.value]=null;else throw q(19,e.value,t.kind)}function ir(r,e){if(r.arguments&&r.arguments.length){const t={};
38return r.arguments.forEach(({name:n,value:i})=>be(t,n,i,e)),t}return null}const Uo=typeof $(()=>window.document.createElement)=="function",Bs=Symbol.for("apollo.cacheSize"),J={...Vt[Bs]};function we(r,e){return r.definitions.find(t=>t.kind==="OperationDefinition"&&!!t.name)?.name.value??e}const Us=()=>Object.create(null),{forEach:$s,slice:Dr}=Array.prototype,{hasOwnProperty:Hs}=Object.prototype;class U{constructor(e=!0,t=Us){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return $s.call(e,n=>t=t.getChildTrie(n)),Hs.call(t,"data")?t.data:t.data=this.makeData(Dr.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,i=e.length;t&&n<i;++n){const s=t.mapFor(e[n],!1);t=s&&s.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],i=this.mapFor(n,!1),s=i&&i.get(n);s&&(t=s.removeArray(Dr.call(e,1)),!s.data&&!s.weak&&!(s.strong&&s.strong.size)&&i.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let n=t.get(e);return n||t.set(e,n=new U(this.weakness,this.makeData)),n}mapFor(e,t){return this.weakness&&Gs(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function Gs(r){switch(typeof r){case"object":if(r===null)break;case"function":return!0}return!1}function Ys(){}class Lt{constructor(e=1/0,t=Ys){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:n,newer:i}=t;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return t?(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0):!1}}function Qt(){}const Js=Qt,Ks=typeof WeakRef<"u"?WeakRef:function(r){return{deref:()=>r}},Xs=typeof WeakMap<"u"?WeakMap:Map,Zs=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:Qt,unregister:Qt}},ea=10024;class nt{constructor(e=1/0,t=Js){this.max=e,this.dispose=t,this.map=new Xs,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<ea;i++){const s=n.next().value;if(!s)break;this.unfinalizedNodes.delete(s);const a=s.key;delete s.key,s.keyRef=new Ks(a),this.registry.register(a,s,s)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Zs(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:n,newer:i}=t;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return t?(this.deleteNode(t),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}const Et=new WeakSet;function $n(r){r.size<=(r.max||-1)||Et.has(r)||(Et.add(r),setTimeout(()=>{r.clean(),Et.delete(r)},100))}const sr=function(r,e){const t=new nt(r,e);return t.set=function(n,i){const s=nt.prototype.set.call(this,n,i);return $n(this),s},t},ta=function(r,e){const t=new Lt(r,e);return t.set=function(n,i){const s=Lt.prototype.set.call(this,n,i);return $n(this),s},t};function Hn(r,{max:e,makeCacheKey:t=n=>n}){const n=new U(!0),i=new sr(e);return(...s)=>{const a=n.lookupArray(t(s)),o=i.get(a);if(o){if(o.error)throw o.error;return o.result}const c=i.set(a,{});try{return c.result=r(...s)}catch(u){throw c.error=u,u}}}const ee=Hn((r,e)=>{T(r&&r.kind==="Document",1);const t=r.definitions.filter(n=>n.kind==="OperationDefinition");e&&T(t.length==1&&t[0].operation===e,4,e,e,t[0].operation),B(r,{Field(n,i,s,a){if(n.alias&&(n.alias.value==="__typename"||n.alias.value.startsWith("__ac_"))&&n.alias.value!==n.name.value){let o=r,c=[];for(const u of a)o=o[u],o.kind===C.FIELD&&c.push(o.alias?.value||o.name.value);throw c.splice(-1,1,n.name.value),q(5,n.alias.value,c.join("."),t[0].operation,we(r,"(anonymous)"))}}})},{max:J.checkDocument||2e3});function ra(r){return r.length===0?Ae:new _(e=>{const{length:t}=r,n=new Array(t),i=new Map;r.forEach((c,u)=>{i.has(c)||i.set(c,new Set),i.get(c).add(u)});let s=i.size,a=i.size,o;
38i.forEach((c,u)=>{let l=!1;const d=u.subscribe({next:h=>{c.forEach(f=>n[f]=h),l||(l=!0,a--),a||(o||=new Set(r.filter(f=>f.dirty)),o.delete(u),o.size||(e.next(n.slice()),o=void 0))},complete:()=>{s--,s||e.complete()},error:e.error.bind(e)});e.add(d)})})}function j(...r){const e={};return r.forEach(t=>{t&&Reflect.ownKeys(t).forEach(n=>{const i=t[n];i!==void 0&&(e[n]=i)})}),e}function ze(r=[]){const e={};return r.forEach(t=>{e[t.name.value]=t}),e}function A(r){return r!==null&&typeof r=="object"}const{hasOwnProperty:na}=Object.prototype,ia=function(r,e,t){return this.merge(r[t],e[t])},Nr=r=>isNaN(+r)?{}:[];class Se{options;reconciler;constructor(e={}){this.options=e,this.reconciler=e.reconciler||ia}merge(e,t,n={}){const i=n.atPath;if(i?.length){const[s,...a]=i;e===void 0&&(e=Nr(s));let o=e[s];o===void 0&&a.length&&(o=Nr(a[0]));const c=this.merge(o,t,{...n,atPath:a});return o!==c&&(e=this.shallowCopyForMerge(e),e[s]=c),e}return Array.isArray(e)&&Array.isArray(t)&&this.options.arrayMerge==="truncate"&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),A(t)&&A(e)?(Object.keys(t).forEach(s=>{if(na.call(e,s)){const a=e[s];if(t[s]!==a){const o=this.reconciler(e,t,s);o!==a&&(e=this.shallowCopyForMerge(e),e[s]=o)}}else e=this.shallowCopyForMerge(e),e[s]=t[s]}),e):t}isObject=A;pastCopies=new Set;shallowCopyForMerge(e){return A(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e={__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e))),e}}function ar(r){const e={},t=r&&r.variableDefinitions;return t&&t.length&&t.forEach(n=>{n.defaultValue&&be(e,n.variable.name,n.defaultValue)}),e}function ut(r,e){switch(r.kind){case"InlineFragment":return r;case"FragmentSpread":{const t=r.name.value;if(typeof e=="function")return e(t);const n=e&&e[t];return T(n,9,t),n||null}default:return null}}function sa(r,e){let t=e;const n=[];return r.definitions.forEach(s=>{if(s.kind==="OperationDefinition")throw q(10,s.operation,s.name?` named '${s.name.value}'`:"");s.kind==="FragmentDefinition"&&n.push(s)}),typeof t>"u"&&(T(n.length===1,11,n.length),t=n[0].name.value),{...r,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}},...r.definitions]}}function aa(r){T(r.kind==="Document",6),T(r.definitions.length<=1,7);const e=r.definitions[0];return T(e.kind==="FragmentDefinition",8),e}function We(r){return r.definitions.filter(e=>e.kind==="FragmentDefinition")}function Gn(r){ee(r);let e;for(let t of r.definitions){if(t.kind==="OperationDefinition")return t;t.kind==="FragmentDefinition"&&!e&&(e=t)}if(e)return e;throw q(12)}function K(r){return ee(r),r.definitions.filter(e=>e.kind==="OperationDefinition")[0]}function oa(r){const e=K(r);return T(e&&e.operation==="query",13),e}const G=Object.assign(function(e){return JSON.stringify(e,ca)},{reset(){_e=new ta(J.canonicalStringify||1e3)}});let _e;G.reset();function ca(r,e){if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null){const n=Object.keys(e);if(n.every(ua))return e;const i=JSON.stringify(n);let s=_e.get(i);if(!s){n.sort();const o=JSON.stringify(n);s=_e.get(o)||n,_e.set(i,s),_e.set(o,s)}const a=Object.create(t);return s.forEach(o=>{a[o]=e[o]}),a}}return e}function ua(r,e,t){return e===0||t[e-1]<=r}const la=["connection","include","skip","client","rest","export","nonreactive","stream"];let Ie=G;const Yn=Object.assign(function(r,e,t){if(e&&t&&t.connection&&t.connection.key){if(t.connection.filter&&t.connection.filter.length>0){const i=t.connection.filter?t.connection.filter:[];i.sort();const s={};i.forEach(o=>{s[o]=e[o]});const a=Ie(s);if(a!=="{}")return`${t.connection.key}(${a})`}return t.connection.key}let n=r;if(e){const i=Ie(e);i!=="{}"&&(n+=`(${i})`)}return t&&Object.keys(t).forEach(i=>{la.indexOf(i)===-1&&(t[i]&&Object.keys(t[i]).length?n+=`@${i}(${Ie(t[i])})`:n+=`@${i}`)}),n},{setStringify(r){const e=Ie;return Ie=r,e}});function le(r){return!!r.errors?.length}function fe(r,e,t){const n=new Set(r),i=n.size;return B(e,{Directive(s){if(n.delete(s.name.value)&&(!t||!n.size))return Jt}}),t?!n.size:n.size<i}function fa(r){let e=!1;return B(r,{Directive:{enter(t){if(t.name.value==="client"&&t.arguments&&(e=t.arguments.some(n=>n.name.value==="always"&&n.value.kind==="BooleanValue"&&n.value.value===!0),e))return Jt}}}),e}const N=Array.isArray;function ha(r){return A(r)&&r.kind==="Document"&&Array.isArray(r.definitions)}function Be(r){return r.kind==="Field"}function or(r){return Array.isArray(r)&&r.length>0}function pe(r){return{__ref:String(r)}}function $o(r){return r}function da(r){let e=r[0]||{};const t=r.length;if(t>1){const n=new Se;for(let i=1;i<t;++i)e=n.merge(e,r[i])}return e}function Ke(r,e){return j(r,e,e.variables&&{variables:j({...r&&r.variables,...e.variables})})}function Rr(r){return r.catch(()=>{}),r}function pa(r,e){ee(e);const t=xr(""),n=xr(""),i=p=>{for(let g=0,v;g<p.length&&(v=p[g]);++g)if(!N(v)){if(v.kind===C.OPERATION_DEFINITION)return t(v.name&&v.name.value);if(v.kind===C.FRAGMENT_DEFINITION)return n(v.name.value)}return T.error(14),null};let s=0;for(let p=e.definitions.length-1;p>=0;--p)e.definitions[p].kind===C.OPERATION_DEFINITION&&++s;const a=ya(r),o=p=>or(p)&&p.map(a).some(g=>g&&g.remove),c=new Map;let u=!1;const l={enter(p){if(o(p.directives))return u=!0,null}},d=B(e,{Field:l,InlineFragment:l,VariableDefinition:{enter(){return!1}},Variable:{enter(p,g,v,b,S){const O=i(S);O&&O.variables.add(p.name.value)}},FragmentSpread:{enter(p,g,v,b,S){if(o(p.directives))return u=!0,null;const O=i(S);O&&O.fragmentSpreads.add(p.name.value)}},FragmentDefinition:{enter(p,g,v,b){c.set(JSON.stringify(b),p)},leave(p,g,v,b){const S=c.get(JSON.stringify(b));if(p===S)return p;if(s>0&&p.selectionSet.selections.every(O=>O.kind===C.FIELD&&O.name.value==="__typename"))return n(p.name.value).removed=!0,u=!0,null}},Directive:{leave(p){if(a(p))return u=!0,null}}});if(!u)return e;const h=p=>(p.transitiveVars||(p.transitiveVars=new Set(p.variables),p.removed||p.fragmentSpreads.forEach(g=>
38{h(n(g)).transitiveVars.forEach(v=>{p.transitiveVars.add(v)})})),p),f=new Set;d.definitions.forEach(p=>{p.kind===C.OPERATION_DEFINITION?h(t(p.name&&p.name.value)).fragmentSpreads.forEach(g=>{f.add(g)}):p.kind===C.FRAGMENT_DEFINITION&&s===0&&!n(p.name.value).removed&&f.add(p.name.value)}),f.forEach(p=>{h(n(p)).fragmentSpreads.forEach(g=>{f.add(g)})});const m=p=>!!(!f.has(p)||n(p).removed),y={enter(p){if(m(p.name.value))return null}};return ma(B(d,{FragmentSpread:y,FragmentDefinition:y,OperationDefinition:{leave(p){if(p.variableDefinitions){const g=h(t(p.name&&p.name.value)).transitiveVars;if(g.size<p.variableDefinitions.length)return{...p,variableDefinitions:p.variableDefinitions.filter(v=>g.has(v.variable.name.value))}}}}}))}function xr(r){const e=new Map;return function(n=r){let i=e.get(n);return i||e.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function ya(r){const e=new Map,t=new Map;return r.forEach(n=>{n&&(n.name?e.set(n.name,n):n.test&&t.set(n.test,n))}),n=>{let i=e.get(n.name.value);return!i&&t.size&&t.forEach((s,a)=>{a(n)&&(i=s)}),i}}function Jn(r,e){return!r||r.selectionSet.selections.every(t=>t.kind===C.FRAGMENT_SPREAD&&Jn(e[t.name.value],e))}function ma(r){return Jn(K(r)||aa(r),ze(We(r)))?null:r}function ga(r){return B(r,{FragmentSpread(e){if(!e.directives?.some(({name:t})=>t.value==="unmask"))return null}})}function Te(r){return r.alias?r.alias.value:r.name.value}function lt({directives:r},e){return!r||!r.length?!0:ba(r).every(({directive:t,ifArgument:n})=>{let i=!1;return n.value.kind==="Variable"?(i=e&&e[n.value.name.value],T(i!==void 0,15,t.name.value)):i=n.value.value,t.name.value==="skip"?!i:i})}function va({name:{value:r}}){return r==="skip"||r==="include"}function ba(r){const e=[];return r&&r.length&&r.forEach(t=>{if(!va(t))return;const n=t.arguments,i=t.name.value;T(n&&n.length===1,16,i);const s=n[0];T(s.name&&s.name.value==="if",17,i);const a=s.value;T(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),18,i),e.push({directive:t,ifArgument:s})}),e}function wa(r,e){let t=null;r.directives&&(t={},r.directives.forEach(i=>{t[i.name.value]={},i.arguments&&i.arguments.forEach(({name:s,value:a})=>be(t[i.name.value],s,a,e))}));let n=null;return r.arguments&&r.arguments.length&&(n={},r.arguments.forEach(({name:i,value:s})=>be(n,i,s,e))),Yn(r.name.value,n,t)}function De(r){const e={data:r.data};return r.error&&(e.error=r.error),e}function zt(r,e=()=>{}){return t=>new _(n=>{let i=e();return t.subscribe({next(s){let a;try{a=r(s,i)}catch(o){n.error(o)}a!==void 0&&n.next(a)},error(s){n.error(s)},complete(){n.complete()}})})}const{toString:Mr,hasOwnProperty:Sa}=Object.prototype,Ar=Function.prototype.toString,Wt=new Map;function F(r,e){try{return Bt(r,e)}finally{Wt.clear()}}function Bt(r,e){if(r===e)return!0;const t=Mr.call(r),n=Mr.call(e);if(t!==n)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(jr(r,e))return!0;const i=Pr(r),s=Pr(e),a=i.length;if(a!==s.length)return!1;for(let o=0;o<a;++o)if(!Sa.call(e,i[o]))return!1;for(let o=0;o<a;++o){const c=i[o];if(!Bt(r[c],e[c]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==`${e}`;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(jr(r,e))return!0;const i=r.entries(),s=t==="[object Map]";for(;;){const a=i.next();if(a.done)break;const[o,c]=a.value;if(!e.has(o)||s&&!Bt(c,e.get(o)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":r=new Uint8Array(r),e=new Uint8Array(e);case"[object DataView]":{let i=r.byteLength;if(i===e.byteLength)for(;i--&&r[i]===e[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=Ar.call(r);return i!==Ar.call(e)?!1:!Ea(i,ka)}}return!1}function Pr(r){return Object.keys(r).filter(Oa,r)}function Oa(r){return this[r]!==void 0}const ka="{ [native code] }";function Ea(r,e){const t=r.length-e.length;return t>=0&&r.indexOf(e,t)===t}function jr(r,e){let t=Wt.get(r);if(t){if(t.has(e))return!0}else Wt.set(r,t=new Set);return t.add(e),!1}function Kn(r,{data:e,...t},{data:n,...i},s){return F(t,i)&&Xe(Gn(r).selectionSet,e,n,{fragmentMap:ze(We(r)),variables:s})}function Xe(r,e,t,n){if(e===t)return!0;const i=new Set;return r.selections.every(s=>{if(i.has(s)||(i.add(s),!lt(s,n.variables))||Vr(s))return!0;
38if(Be(s)){const a=Te(s),o=e&&e[a],c=t&&t[a],u=s.selectionSet;if(!u)return F(o,c);const l=Array.isArray(o),d=Array.isArray(c);if(l!==d)return!1;if(l&&d){const h=o.length;if(c.length!==h)return!1;for(let f=0;f<h;++f)if(!Xe(u,o[f],c[f],n))return!1;return!0}return Xe(u,o,c,n)}else{const a=ut(s,n.fragmentMap);if(a)return Vr(a)?!0:Xe(a.selectionSet,e,t,n)}})}function Vr(r){return!!r.directives&&r.directives.some(Ta)}function Ta(r){return r.name.value==="nonreactive"}function Ca(r,e){let t,n;function i(s){return s!==t&&(t=s,n=e(t)),n}return Object.assign(r.pipe(Z(i),tr({bufferSize:1,refCount:!0})),{getCurrentResult:()=>i(r.getCurrentResult())})}const Ia=Hn(function(e,t,n){return Ca(e,n)},{max:1,makeCacheKey:r=>r.slice(0,2)}),Xn=Symbol.for("apollo.result.extensions"),te=Symbol.for("apollo.result.streamInfo"),Fa=Symbol.for("apollo.observableQuery.variablesUnknown");let x=null;const qr={};let _a=1;const Da=()=>class{constructor(){this.id=["slot",_a++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=x;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===qr)break;return e!==x&&(x.slots[this.id]=t),!0}return x&&(x.slots[this.id]=qr),!1}getValue(){if(this.hasValue())return x.slots[this.id]}withValue(e,t,n,i){const s={__proto__:null,[this.id]:e},a=x;x={parent:a,slots:s};try{return t.apply(i,n)}finally{x=a}}static bind(e){const t=x;return function(){const n=x;try{return x=t,e.apply(this,arguments)}finally{x=n}}}static noContext(e,t,n){if(x){const i=x;try{return x=null,e.apply(n,t)}finally{x=i}}else return e.apply(n,t)}};function Lr(r){try{return r()}catch{}}const Tt="@wry/context:Slot",Na=Lr(()=>globalThis)||Lr(()=>global)||Object.create(null),Qr=Na,ft=Qr[Tt]||Array[Tt]||(function(r){try{Object.defineProperty(Qr,Tt,{value:r,enumerable:!1,writable:!1,configurable:!0})}finally{return r}})(Da()),{bind:Go,noContext:Yo}=ft,ht=new ft,{hasOwnProperty:Ra}=Object.prototype,cr=Array.from||function(r){const e=[];return r.forEach(t=>e.push(t)),e};function ur(r){const{unsubscribe:e}=r;typeof e=="function"&&(r.unsubscribe=void 0,e())}const Ve=[],xa=100;function Oe(r,e){if(!r)throw new Error(e||"assertion failure")}function Zn(r,e){const t=r.length;return t>0&&t===e.length&&r[t-1]===e[t-1]}function ei(r){switch(r.length){case 0:throw new Error("unknown value");case 1:return r[0];case 2:throw r[1]}}function ti(r){return r.slice(0)}class dt{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++dt.count}peek(){if(this.value.length===1&&!re(this))return zr(this),this.value[0]}recompute(e){return Oe(!this.recomputing,"already recomputing"),zr(this),re(this)?Ma(this,e):ei(this.value)}setDirty(){this.dirty||(this.dirty=!0,ri(this),ur(this))}dispose(){this.setDirty(),oi(this),lr(this,(e,t)=>{e.setDirty(),ci(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=Ve.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(cr(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),Ve.push(this.deps),this.deps=null)}}dt.count=0;function zr(r){const e=ht.getValue();if(e)return r.parents.add(e),e.childValues.has(r)||e.childValues.set(r,[]),re(r)?ii(e,r):si(e,r),e}function Ma(r,e){return oi(r),ht.withValue(r,Aa,[r,e]),ja(r,e)&&Pa(r),ei(r.value)}function Aa(r,e){r.recomputing=!0;const{normalizeResult:t}=r;let n;t&&r.value.length===1&&(n=ti(r.value)),r.value.length=0;try{if(r.value[0]=r.fn.apply(null,e),t&&n&&!Zn(n,r.value))try{r.value[0]=t(r.value[0],n[0])}catch{}}catch(i){r.value[1]=i}r.recomputing=!1}function re(r){return r.dirty||!!(r.dirtyChildren&&r.dirtyChildren.size)}function Pa(r){r.dirty=!1,!re(r)&&ni(r)}function ri(r){lr(r,ii)}function ni(r){lr(r,si)}function lr(r,e){const t=r.parents.size;if(t){const n=cr(r.parents);for(let i=0;i<t;++i)e(n[i],r)}}function ii(r,e){Oe(r.childValues.has(e)),Oe(re(e));const t=!re(r);if(!r.dirtyChildren)r.dirtyChildren=Ve.pop()||new Set;else if(r.dirtyChildren.has(e))return;r.dirtyChildren.add(e),t&&ri(r)}function si(r,e){Oe(r.childValues.has(e)),Oe(!re(e));const t=r.childValues.get(e);t.length===0?r.childValues.set(e,ti(e.value)):Zn(t,e.value)||r.setDirty(),ai(r,e),!re(r)&&ni(r)}function ai(r,e){const t=r.dirtyChildren;t&&(t.delete(e),t.size===0&&(Ve.length<xa&&Ve.push(t),r.dirtyChildren=null))}function oi(r){r.childValues.size>
380&&r.childValues.forEach((e,t)=>{ci(r,t)}),r.forgetDeps(),Oe(r.dirtyChildren===null)}function ci(r,e){e.parents.delete(r),r.childValues.delete(e),ai(r,e)}function ja(r,e){if(typeof r.subscribe=="function")try{ur(r),r.unsubscribe=r.subscribe.apply(null,e)}catch{return r.setDirty(),!1}return!0}const Va={setDirty:!0,dispose:!0,forget:!0};function ui(r){const e=new Map;function t(n){const i=ht.getValue();if(i){let s=e.get(n);s||e.set(n,s=new Set),i.dependOn(s)}}return t.dirty=function(i,s){const a=e.get(i);if(a){const o=s&&Ra.call(Va,s)?s:"setDirty";cr(a).forEach(c=>c[o]()),e.delete(i),ur(a)}},t}let Wr;function li(...r){return(Wr||(Wr=new U(typeof WeakMap=="function"))).lookupArray(r)}const Ct=new Set;function qe(r,{max:e=Math.pow(2,16),keyArgs:t,makeCacheKey:n=li,normalizeResult:i,subscribe:s,cache:a=Lt}=Object.create(null)){const o=typeof a=="function"?new a(e,h=>h.dispose()):a,c=function(){const h=n.apply(null,t?t.apply(null,arguments):arguments);if(h===void 0)return r.apply(null,arguments);let f=o.get(h);f||(o.set(h,f=new dt(r)),f.normalizeResult=i,f.subscribe=s,f.forget=()=>o.delete(h));const m=f.recompute(Array.prototype.slice.call(arguments));return o.set(h,f),Ct.add(o),ht.hasValue()||(Ct.forEach(y=>y.clean()),Ct.clear()),m};Object.defineProperty(c,"size",{get:()=>o.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:e,keyArgs:t,makeCacheKey:n,normalizeResult:i,subscribe:s,cache:o});function u(h){const f=h&&o.get(h);f&&f.setDirty()}c.dirtyKey=u,c.dirty=function(){u(n.apply(null,arguments))};function l(h){const f=h&&o.get(h);if(f)return f.peek()}c.peekKey=l,c.peek=function(){return l(n.apply(null,arguments))};function d(h){return h?o.delete(h):!1}return c.forgetKey=d,c.forget=function(){return d(n.apply(null,arguments))},c.makeCacheKey=n,c.getKey=t?function(){return n.apply(null,t.apply(null,arguments))}:n,Object.freeze(c)}function qa(...r){return li.bind(null,...r)}class La{isIncrementalResult(e){return!1}prepareRequest(e){return T(!fe(["defer","stream"],e.query),67),e}extractErrors(){}startRequest=void 0}function Qa(r,{client:e}){const t={query:r.query,variables:r.variables||{},extensions:r.extensions||{},operationName:we(r.query),operationType:K(r.query).operation};let n={...r.context};const i=a=>{typeof a=="function"?n={...n,...a(s())}:n={...n,...a}},s=()=>Object.freeze({...n});return Object.defineProperty(t,"setContext",{enumerable:!1,value:i}),Object.defineProperty(t,"getContext",{enumerable:!1,value:s}),Object.defineProperty(t,"client",{enumerable:!1,value:e}),t}function za(r,e){const t={...r},n=new Set(Object.keys(r));return B(e,{Variable(i,s,a){a&&a.kind!=="VariableDefinition"&&n.delete(i.name.value)}}),n.forEach(i=>{delete t[i]}),t}class P{static empty(){return new P(()=>Ae)}static from(e){if(e.length===0)return P.empty();const[t,...n]=e;return t.concat(...n)}static split(e,t,n=new P((i,s)=>s(i))){const i=new P((s,a)=>e(s)?t.request(s,a):n.request(s,a));return Object.assign(i,{left:t,right:n})}static execute(e,t,n){return e.request(Qa(t,n),()=>Ae)}static concat(...e){return P.from(e)}constructor(e){e&&(this.request=e)}split(e,t,n){return this.concat(P.split(e,t,n))}concat(...e){return e.length===0?this:e.reduce(this.combine.bind(this),this)}combine(e,t){const n=new P((i,s)=>e.request(i,a=>t.request(a,s)));return Object.assign(n,{left:e,right:t})}request(e,t){throw q(65)}left;right}const Ut=P.execute;function Wa(r){return r}class H{transform;cached;resultCache=new WeakSet;getCacheKey(e){return[e]}static identity(){return new H(Wa,{cache:!1})}static split(e,t,n=H.identity()){return Object.assign(new H(i=>(e(i)?t:n).transformDocument(i),{cache:!1}),{left:t,right:n})}constructor(e,t={}){this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=t.cache!==!1,this.resetCache()}resetCache(){if(this.cached){const e=new U;this.performWork=qe(H.prototype.performWork.bind(this),{makeCacheKey:t=>{const n=this.getCacheKey(t);if(n)return T(Array.isArray(n),20),e.lookupArray(n)},max:J["documentTransform.cache"],cache:nt})}}performWork(e){return ee(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;const t=this.performWork(e);return this.resultCache.add(t),t}concat(e){return Object.assign(new H(t=>e.transformDocument(this.transformDocument(t)),{cache:!1}),{left:this,right:e})}left;
38right}let It;const ye=Object.assign(r=>{let e=It.get(r);return e||(e=$i(r),It.set(r,e)),e},{reset(){It=new sr(J.print||2e3)}});ye.reset();function I(r){return!!(r&&typeof r=="object"&&typeof r.__ref=="string")}const Br={kind:C.FIELD,name:{kind:C.NAME,value:"__typename"}},fi=Object.assign(function(r){return B(r,{SelectionSet:{enter(e,t,n){if(n&&n.kind===C.OPERATION_DEFINITION)return;const{selections:i}=e;if(!i||i.some(o=>o.kind===C.FIELD&&(o.name.value==="__typename"||o.name.value.lastIndexOf("__",0)===0)))return;const a=n;if(!(a.kind===C.FIELD&&a.directives&&a.directives.some(o=>o.name.value==="export")))return{...e,selections:[...i,Br]}}}})},{added(r){return r===Br}});function hi(r,e){return K(r)?.operation===e}function Ba(r){return hi(r,"mutation")}function Ua(r){return hi(r,"subscription")}function di(r){return r===7||r===8}function Ze(r){return!di(r)}class $a{assumeImmutableResults=!1;lookupFragment(e){return null}batch(e){const t=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0;let n;return this.performTransaction(()=>n=e.update(this),t),n}recordOptimisticTransaction(e,t){this.performTransaction(e,t)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e,t=!!e.optimistic){return this.read({...e,rootId:e.id||"ROOT_QUERY",optimistic:t})}fragmentWatches=new U(!0);watchFragment(e){const{fragment:t,fragmentName:n,from:i}=e,s=this.getFragmentDoc(t,n),o=(Array.isArray(i)?i:[i]).map(f=>f==null?f:this.toCacheId(f));if(!Array.isArray(i)){const f=this.watchSingleFragment(o[0],s,e);return i===null?f:Ia(f,Symbol.for("apollo.transform.individualResult"),m=>({...m,data:m.data??{}}))}let c;function u(f){const m=f.reduce((y,p,g)=>(y.data.push(p.data),y.complete&&=p.complete,y.dataState=y.complete?"complete":"partial",p.missing&&(y.missing||={},y.missing[g]=p.missing),y),{data:[],dataState:"complete",complete:!0});return F(c,m)||(c=m),c}if(o.length===0)return Ga;let l=!1;const d=o.map(f=>this.watchSingleFragment(f,s,e)),h=ra(d).pipe(Z(u),je({subscribe:()=>l=!0,unsubscribe:()=>l=!1}),tr({bufferSize:1,refCount:!0}));return Object.assign(h,{getCurrentResult:()=>{if(l&&c)return c;const f=d.map(m=>m.getCurrentResult());return u(f)}})}onAfterBroadcast=e=>e();watchSingleFragment(e,t,n){if(e===null)return Ha;const{optimistic:i=!0,variables:s}=n,a=[t,G({id:e,optimistic:i,variables:s})],o=this.fragmentWatches.lookupArray(a);if(!o.observable){let l=function(h){const f=h.result;return(!u||!Kn(t,{data:u.data},{data:f},n.variables))&&(u={data:f,dataState:h.complete?"complete":"partial",complete:h.complete},h.missing&&(u.missing=h.missing.missing)),u},c=!1,u;const d=new _(h=>{c=!0;const f=this.watch({variables:s,returnPartialData:!0,id:e,query:t,optimistic:i,immediate:!0,callback:m=>{d.dirty=!0,this.onAfterBroadcast(()=>{h.next(l(m)),d.dirty=!1})}});return()=>{c=!1,f(),this.fragmentWatches.removeArray(a)}}).pipe(Vs(),Pe({connector:()=>new Sn(1),resetOnRefCountZero:()=>js(0)}));o.observable=Object.assign(d,{dirty:!1,getCurrentResult:()=>c&&u?u:l(this.diff({id:e,query:t,returnPartialData:!0,optimistic:i,variables:s}))})}return o.observable}getFragmentDoc=qe(sa,{max:J["cache.fragmentQueryDocuments"]||1e3,cache:nt,makeCacheKey:qa(this)});readFragment(e,t=!!e.optimistic){const n=e.from!==void 0?this.toCacheId(e.from):e.id;return this.read({...e,query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:n,optimistic:t})}writeQuery({id:e,data:t,...n}){return this.write(Object.assign(n,{dataId:e||"ROOT_QUERY",result:t}))}writeFragment({data:e,fragment:t,fragmentName:n,...i}){const s=i.from!==void 0?this.toCacheId(i.from):i.id;return this.write(Object.assign(i,{query:this.getFragmentDoc(t,n),dataId:s,result:e}))}updateQuery(e,t){return this.batch({update(n){const i=n.readQuery(e),s=t(i);return s==null?i:(n.writeQuery({...e,data:s}),s)}})}updateFragment(e,t){return this.batch({update(n){const i=n.readFragment(e),s=t(i);return s==null?i:(n.writeFragment({...e,data:s}),s)}})}toCacheId(e){return typeof e=="string"?e:this.identify(e)}}const Ur=Object.freeze({data:null,dataState:"complete",complete:!0}),Ha=Object.assign(new _(r=>{r.next(Ur)}),{dirty:!1,getCurrentResult:()=>Ur}),$r=Object.freeze({data:[],dataState:"complete",complete:!0}),Ga=Object.assign(new _(r=>{r.next($r)}),{getCurrentResult:()=>$r});
38class fr extends Error{message;path;query;variables;constructor(e,t,n,i){if(super(e),this.message=e,this.path=t,this.query=n,this.variables=i,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let s=this.path.length-1;s>=0;--s)this.missing={[this.path[s]]:this.missing}}else this.missing=this.path;this.__proto__=fr.prototype}missing}const{hasOwnProperty:R}=Object.prototype;function pi({__typename:r,id:e,_id:t},n){if(typeof r=="string"&&(n&&(n.keyObject=e!=null?{id:e}:t!=null?{_id:t}:void 0),e==null&&t!=null&&(e=t),e!=null))return`${r}:${typeof e=="number"||typeof e=="string"?e:JSON.stringify(e)}`}const Ya={dataIdFromObject:pi,resultCaching:!0};function Ja(r){return j(Ya,r)}const yi=/^[_a-z][_0-9a-z]*/i;function ke(r){const e=r.match(yi);return e?e[0]:r}function $t(r,e,t){return A(e)?N(e)?e.every(n=>$t(r,n,t)):r.selections.every(n=>{if(Be(n)&&lt(n,t)){const i=Te(n);return R.call(e,i)&&(!n.selectionSet||$t(n.selectionSet,e[i],t))}return!0}):!1}function he(r){return A(r)&&!I(r)&&!N(r)}function Ka(){return new Se}function mi(r,e){const t=ze(We(r));return{fragmentMap:t,lookupFragment(n){let i=t[n];return!i&&e&&(i=e.lookup(n)),i||null}}}const et={},Ft=()=>et,Hr={};class pt{policies;group;data={};constructor(e,t){this.policies=e,this.group=t}toObject(){return{...this.data}}has(e){return this.lookup(e,!0)!==void 0}get(e,t){if(this.group.depend(e,t),R.call(this.data,e)){const n=this.data[e];if(n&&R.call(n,t))return n[t]}if(t==="__typename"&&R.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof W)return this.parent.get(e,t)}lookup(e,t){if(t&&this.group.depend(e,"__exists"),R.call(this.data,e))return this.data[e];if(this instanceof W)return this.parent.lookup(e,t);if(this.policies.rootTypenamesById[e])return{}}merge(e,t){let n;I(e)&&(e=e.__ref),I(t)&&(t=t.__ref);const i=typeof e=="string"?this.lookup(n=e):e,s=typeof t=="string"?this.lookup(n=t):t;if(!s)return;T(typeof n=="string",99);const a=new Se({reconciler:eo}).merge(i,s);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){const o={};i||(o.__exists=1),Object.keys(s).forEach(c=>{if(!i||i[c]!==a[c]){o[c]=1;const u=ke(c);u!==c&&!this.policies.hasKeyArgs(a.__typename,u)&&(o[u]=1),a[c]===void 0&&!(this instanceof W)&&delete a[c]}}),o.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===a.__typename&&delete o.__typename,Object.keys(o).forEach(c=>this.group.dirty(n,c))}}modify(e,t,n){const i=this.lookup(e);if(i){const s={};let a=!1,o=!0;const c={DELETE:et,INVALIDATE:Hr,isReference:I,toReference:this.toReference,canRead:this.canRead,readField:(u,l)=>this.policies.readField(typeof u=="string"?{fieldName:u,from:l||pe(e)}:u,{store:this})};
38if(Object.keys(i).forEach(u=>{const l=ke(u);let d=i[u];if(d===void 0)return;const h=typeof t=="function"?t:t[u]||(n?void 0:t[l]);if(h){let f=h===Ft?et:h(d,{...c,fieldName:l,storeFieldName:u,storage:this.getStorage(e,u)});f===Hr?this.group.dirty(e,u):(f===et&&(f=void 0),f!==d&&(s[u]=f,a=!0,d=f))}d!==void 0&&(o=!1)}),a)return this.merge(e,s),o&&(this instanceof W?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,n){const i=this.lookup(e);if(i){const s=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:s,fieldName:t,args:n}):t;return this.modify(e,a?{[a]:Ft}:Ft,!!n)}return!1}evict(e,t){let n=!1;return e.id&&(R.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof W&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n}clear(){this.replace(null)}extract(){const e=this.toObject(),t=[];return this.getRootIdSet().forEach(n=>{R.call(this.policies.rootTypenamesById,n)||t.push(n)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}replace(e){if(Object.keys(this.data).forEach(t=>{e&&R.call(e,t)||this.delete(t)}),e){const{__META:t,...n}=e;Object.keys(n).forEach(i=>{this.merge(i,n[i])}),t&&t.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){const t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0}getRootIdSet(e=new Set){return Object.keys(this.rootIds).forEach(e.add,e),this instanceof W?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){const e=this.getRootIdSet(),t=this.toObject();e.forEach(i=>{R.call(t,i)&&(Object.keys(this.findChildRefIds(i)).forEach(e.add,e),delete t[i])});const n=Object.keys(t);if(n.length){let i=this;for(;i instanceof W;)i=i.parent;n.forEach(s=>i.delete(s))}return n}refs={};findChildRefIds(e){if(!R.call(this.refs,e)){const t=this.refs[e]={},n=this.data[e];if(!n)return t;const i=new Set([n]);i.forEach(s=>{I(s)&&(t[s.__ref]=!0),A(s)&&Object.keys(s).forEach(a=>{const o=s[a];A(o)&&i.add(o)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(e,t)=>I(e)?this.get(e.__ref,t):e&&e[t];canRead=e=>I(e)?this.has(e.__ref):typeof e=="object";toReference=(e,t)=>{if(typeof e=="string")return pe(e);if(I(e))return e;const[n]=this.policies.identify(e);if(n){const i=pe(n);return t&&this.merge(n,e),i}};get supportsResultCaching(){return this.group.caching}}class gi{caching;parent;d=null;keyMaker;constructor(e,t=null){this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?ui():null,this.keyMaker=new U}depend(e,t){if(this.d){this.d(_t(e,t));const n=ke(t);n!==t&&this.d(_t(e,n)),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(_t(e,t),t==="__exists"?"forget":"setDirty")}}function _t(r,e){return e+"#"+r}function Gr(r,e){Re(r)&&r.group.depend(e,"__exists")}class Xa extends pt{constructor({policies:e,resultCaching:t=!0,seed:n}){super(e,new gi(t)),n&&this.replace(n)}stump=new Za(this);addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}storageTrie=new U;getStorage(){return this.storageTrie.lookupArray(arguments)}}pt.Root=Xa;class W extends pt{id;parent;replay;group;constructor(e,t,n,i){super(t.policies,i),this.id=e,this.parent=t,this.replay=n,this.group=i,n(this)}addLayer(e,t){return new W(e,this,t,this.group)}removeLayer(e){const t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(n=>{const i=this.data[n],s=t.lookup(n);
38s?i?i!==s&&Object.keys(i).forEach(a=>{F(i[a],s[a])||this.group.dirty(n,a)}):(this.group.dirty(n,"__exists"),Object.keys(s).forEach(a=>{this.group.dirty(n,a)})):this.delete(n)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(e){const t=this.parent.findChildRefIds(e);return R.call(this.data,e)?{...t,...super.findChildRefIds(e)}:t}getStorage(...e){let t=this.parent;for(;t.parent;)t=t.parent;return t.getStorage(...e)}}class Za extends W{constructor(e){super("EntityStore.Stump",e,()=>{},new gi(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}}function eo(r,e,t){const n=r[t],i=e[t];return F(n,i)?n:i}function Re(r){return!!(r&&r.supportsResultCaching)}const vi=new ft;function to(r){const e=r.directives?.find(({name:n})=>n.value==="unmask");if(!e)return"mask";const t=e.arguments?.find(({name:n})=>n.value==="mode");return t&&"value"in t.value&&t.value.value==="migrate"?"migrate":"unmask"}function bi(r,e,t){return vi.withValue(!0,()=>Ne(r,e,t,!1))}function ro(r,e){if(e.has(r))return e.get(r);const t=Array.isArray(r)?[]:{};return e.set(r,t),t}function Ne(r,e,t,n,i){const{knownChanged:s}=t,a=ro(r,t.mutableTargets);if(Array.isArray(r)){for(const[o,c]of Array.from(r.entries())){if(c===null){a[o]=null;continue}const u=Ne(c,e,t,n);s.has(u)&&s.add(a),a[o]=u}return s.has(a)?a:r}for(const o of e.selections){let c;if(n&&s.add(a),o.kind===C.FIELD){const u=Te(o),l=o.selectionSet;if(c=a[u]||r[u],c===void 0)continue;if(l&&c!==null){const d=Ne(r[u],l,t,n);s.has(d)&&(c=d)}a[u]=c}if(o.kind===C.INLINE_FRAGMENT&&(!o.typeCondition||t.cache.fragmentMatches(o,r.__typename))&&(c=Ne(r,o.selectionSet,t,n)),o.kind===C.FRAGMENT_SPREAD){const u=o.name.value,l=t.fragmentMap[u]||(t.fragmentMap[u]=t.cache.lookupFragment(u));T(l,39,u);const d=to(o);d!=="mask"&&(c=Ne(r,l.selectionSet,t,d==="migrate"))}s.has(c)&&s.add(a)}return"__typename"in r&&!("__typename"in a)&&(a.__typename=r.__typename),Object.keys(a).length!==Object.keys(r).length&&s.add(a),s.has(a)?a:r}function no(r,e,t,n){const i=e.definitions.filter(a=>a.kind===C.FRAGMENT_DEFINITION);typeof n>"u"&&(T(i.length===1,41,i.length),n=i[0].name.value);const s=i.find(a=>a.name.value===n);return T(!!s,42,n),r==null||F(r,{})?r:bi(r,s.selectionSet,{operationName:s.name.value,fragmentMap:ze(We(e)),cache:t,mutableTargets:new WeakMap,knownChanged:new WeakSet})}function io(r,e,t){const n=K(e);return T(n,43),r==null?r:bi(r,n.selectionSet,{operationType:n.operation,operationName:n.name?.value,fragmentMap:ze(We(e)),cache:t,mutableTargets:new WeakMap,knownChanged:new WeakSet})}const Yr={};function hr(r){const e=JSON.stringify(r);return Yr[e]||(Yr[e]={})}function Jr(r){const e=hr(r);return e.keyFieldsFn||(e.keyFieldsFn=(t,n)=>{const i=(a,o)=>n.readField(o,a),s=n.keyObject=dr(r,a=>{let o=me(n.storeObject,a,i);return o===void 0&&t!==n.storeObject&&R.call(t,a[0])&&(o=me(t,a,Si)),T(o!==void 0,102,a.join("."),t),o});return`${n.typename}:${JSON.stringify(s)}`})}function Kr(r){const e=hr(r);return e.keyArgsFn||(e.keyArgsFn=(t,{field:n,variables:i,fieldName:s})=>{const a=dr(r,c=>{const u=c[0],l=u.charAt(0);if(l==="@"){if(n&&or(n.directives)){const d=u.slice(1),h=n.directives.find(m=>m.name.value===d),f=h&&ir(h,i);return f&&me(f,c.slice(1))}return}if(l==="$"){const d=u.slice(1);if(i&&R.call(i,d)){const h=c.slice(0);return h[0]=d,me(i,h)}return}if(t)return me(t,c)}),o=JSON.stringify(a);return(t||o!=="{}")&&(s+=":"+o),s})}function dr(r,e){const t=new Se;return wi(r).reduce((n,i)=>{let s=e(i);if(s!==void 0){for(let a=i.length-1;a>=0;--a)s={[i[a]]:s};n=t.merge(n,s)}return n},{})}function wi(r){const e=hr(r);if(!e.paths){const t=e.paths=[],n=[];r.forEach((i,s)=>{N(i)?(wi(i).forEach(a=>t.push(n.concat(a))),n.length=0):(n.push(i),N(r[s+1])||(t.push(n.slice(0)),n.length=0))})}return e.paths}function Si(r,e){return r[e]}function me(r,e,t){return t=t||Si,Oi(e.reduce(function n(i,s){return N(i)?i.map(a=>n(a,s)):i&&t(i,s)},r))}function Oi(r){return A(r)?N(r)?r.map(Oi):dr(Object.keys(r).sort(),e=>me(r,e)):r}const ki=new ft,Xr=new WeakMap;function xe(r){let e=Xr.get(r);
38return e||Xr.set(r,e={vars:new Set,dep:ui()}),e}function Zr(r){xe(r).vars.forEach(e=>e.forgetCache(r))}function so(r){xe(r).vars.forEach(e=>e.attachCache(r))}function ao(r){const e=new Set,t=new Set,n=function(s){if(arguments.length>0){if(r!==s){r=s,e.forEach(o=>{xe(o).dep.dirty(n),oo(o)});const a=Array.from(t);t.clear(),a.forEach(o=>o(r))}}else{const a=ki.getValue();a&&(i(a),xe(a).dep(n))}return r};n.onNextChange=s=>(t.add(s),()=>{t.delete(s)});const i=n.attachCache=s=>(e.add(s),xe(s).vars.add(n),n);return n.forgetCache=s=>e.delete(s),n}function oo(r){r.broadcastWatches&&r.broadcastWatches()}function Ht(r){return r.args!==void 0?r.args:r.field?ir(r.field,r.variables):null}const co=()=>{},en=(r,e)=>e.fieldName,tn=(r,e,{mergeObjects:t})=>t(r,e),rn=(r,e)=>e,uo=(r,e,{streamFieldInfo:t,existingData:n})=>{if(!r&&!n)return e;const i=[],s=r??n,a=t?.isLastChunk?e.length:Math.max(s.length,e.length);for(let o=0;o<a;o++)i[o]=e[o]===void 0?s[o]:e[o];return i};class lo{config;typePolicies={};toBeAdded={};supertypeMap=new Map;fuzzySubtypes=new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(e){this.config=e,this.config={dataIdFromObject:pi,...e},this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}identify(e,t){const n=this,i=t&&(t.typename||t.storeObject?.__typename)||e.__typename;if(i===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const s=t&&t.storeObject||e,a={...t,typename:i,storeObject:s,readField:t&&t.readField||((...l)=>{const d=pr(l,s);return n.readField(d,{store:n.cache.data,variables:d.variables})})};let o;const c=i&&this.getTypePolicy(i);let u=c&&c.keyFn||this.config.dataIdFromObject;return vi.withValue(!0,()=>{for(;u;){const l=u({...e,...s},a);if(N(l))u=Jr(l);else{o=l;break}}}),o=o?String(o):void 0,a.keyObject?[o,a.keyObject]:[o]}addTypePolicies(e){Object.keys(e).forEach(t=>{const{queryType:n,mutationType:i,subscriptionType:s,...a}=e[t];n&&this.setRootTypename("Query",t),i&&this.setRootTypename("Mutation",t),s&&this.setRootTypename("Subscription",t),R.call(this.toBeAdded,t)?this.toBeAdded[t].push(a):this.toBeAdded[t]=[a]})}updateTypePolicy(e,t,n){const i=this.getTypePolicy(e),{keyFields:s,fields:a}=t;function o(c,u){c.merge=typeof u=="function"?u:u===!0?tn:u===!1?rn:c.merge}o(i,t.merge),i.keyFn=s===!1?co:N(s)?Jr(s):typeof s=="function"?s:i.keyFn,a&&Object.keys(a).forEach(c=>{let u=n[c];(!u||u?.typename!==e)&&(u=n[c]={typename:e});const l=a[c];if(typeof l=="function")u.read=l;else{const{keyArgs:d,read:h,merge:f}=l;u.keyFn=d===!1?en:N(d)?Kr(d):typeof d=="function"?d:u.keyFn,typeof h=="function"&&(u.read=h),o(u,f)}u.read&&u.merge&&(u.keyFn=u.keyFn||en)})}setRootTypename(e,t=e){const n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];t!==i&&(T(!i||i===e,103,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>{this.getSupertypeSet(t,!0),e[t].forEach(n=>{this.getSupertypeSet(n,!0).add(t);const i=n.match(yi);(!i||i[0]!==n)&&this.fuzzySubtypes.set(n,new RegExp(n))})})}getTypePolicy(e){if(!R.call(this.typePolicies,e)){const n=this.typePolicies[e]={};n.fields={};let i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((s,a)=>
38{if(s.test(e)){const o=this.supertypeMap.get(a);o&&o.forEach(c=>i.add(c))}})),i&&i.size&&i.forEach(s=>{const{fields:a,...o}=this.getTypePolicy(s);Object.assign(n,o),Object.assign(n.fields,a)})}const t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(n=>{this.updateTypePolicy(e,n,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n}fragmentMatches(e,t,n,i){if(!e.typeCondition)return!0;if(!t)return!1;const s=e.typeCondition.name.value;if(t===s)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(s)){const a=this.getSupertypeSet(t,!0),o=[a],c=l=>{const d=this.getSupertypeSet(l,!1);d&&d.size&&o.indexOf(d)<0&&o.push(d)};let u=!!(n&&this.fuzzySubtypes.size);for(let l=0;l<o.length;++l){const d=o[l];if(d.has(s))return a.has(s)||a.add(s),!0;d.forEach(c),u&&l===o.length-1&&$t(e.selectionSet,n,i)&&(u=!1,this.fuzzySubtypes.forEach((h,f)=>{const m=t.match(h);m&&m[0]===t&&c(f)}))}}return!1}hasKeyArgs(e,t){const n=this.getFieldPolicy(e,t);return!!(n&&n.keyFn)}getStoreFieldName(e){const{typename:t,fieldName:n}=e,i=this.getFieldPolicy(t,n);let s,a=i&&i.keyFn;if(a&&t){const o={typename:t,fieldName:n,field:e.field||null,variables:e.variables},c=Ht(e);for(;a;){const u=a(c,o);if(N(u))a=Kr(u);else{s=u||n;break}}}return s===void 0&&(s=e.field?wa(e.field,e.variables):Yn(n,Ht(e))),s===!1?n:n===ke(s)?s:n+":"+s}readField(e,t){const n=e.from;if(!n||!(e.field||e.fieldName))return;if(e.typename===void 0){const l=t.store.getFieldValue(n,"__typename");l&&(e.typename=l)}const s=this.getStoreFieldName(e),a=ke(s),o=t.store.getFieldValue(n,s),c=this.getFieldPolicy(e.typename,a),u=c&&c.read;if(u){const l=Ei(this,n,e,t,t.store.getStorage(I(n)?n.__ref:n,s));return ki.withValue(this.cache,u,[o,l])}return o}getReadFunction(e,t){const n=this.getFieldPolicy(e,t);return n&&n.read}getMergeFunction(e,t,n){let i=this.getFieldPolicy(e,t),s=i&&i.merge;return!s&&n&&(i=this.getTypePolicy(n),s=i&&i.merge),s}runMergeFunction(e,t,{field:n,typename:i,merge:s,path:a},o,c){const u=e;if(s===tn)return Ti(o.store)(e,t);if(s===rn)return t;o.overwrite&&(e=void 0);const l=o.extensions?.[te]?.deref()?.peekArray(a);if(l){const{current:h,previous:f}=l;if(f&&F(f.incoming,t)&&F(f.streamFieldInfo,h))return f.result}const d=s(e,t,fo(this,void 0,{typename:i,fieldName:n.name.value,field:n,variables:o.variables,path:a},o,c||{},u));return l&&(l.previous={incoming:t,streamFieldInfo:l.current,result:d}),d}}function Ei(r,e,t,n,i){const s=r.getStoreFieldName(t),a=ke(s),o=t.variables||n.variables,{toReference:c,canRead:u}=n.store;return{args:Ht(t),field:t.field||null,fieldName:a,storeFieldName:s,variables:o,isReference:I,toReference:c,storage:i,cache:r.cache,canRead:u,readField(...l){return r.readField(pr(l,e,o),n)},mergeObjects:Ti(n.store)}}function fo(r,e,t,n,i,s){const a={...Ei(r,e,t,n,i),extensions:n.extensions,existingData:s},o=n.extensions;if(o&&te in o){const{[te]:c,...u}=o,l=c?.deref()?.peekArray(t.path);l&&(a.streamFieldInfo=l.current),a.extensions=Object.keys(u).length===0?void 0:u}return a}function pr(r,e,t){const{0:n,1:i,length:s}=r;let a;return typeof n=="string"?a={fieldName:n,from:s>1?i:e}:(a={...n},R.call(a,"from")||(a.from=e)),a.variables===void 0&&(a.variables=t),a}function Ti(r){return function(t,n){if(N(t)||N(n))throw q(106);if(A(t)&&A(n)){const i=r.getFieldValue(t,"__typename"),s=r.getFieldValue(n,"__typename");if(i&&s&&i!==s)return n;if(I(t)&&he(n))return r.merge(t.__ref,n),t;if(he(t)&&I(n))return r.merge(t,n.__ref),n;if(he(t)&&he(n))return{...t,...n}}return n}}function nn(r){return[r.selectionSet,r.objectOrReference,r.context]}class ho{executeSelectionSet;executeSubSelectedArray;config;knownResults=new WeakMap;constructor(e){this.config=e,this.executeSelectionSet=qe(t=>{const n=nn(t),i=this.executeSelectionSet.peek(...n);return i||(Gr(t.context.store,t.enclosingRef.__ref),this.execSelectionSetImpl(t))},{max:J["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:nn,makeCacheKey(t,n,i){if(Re(i.store))return i.store.makeCacheKey(t,I(n)?n.__ref:n,i.varString)}}),this.executeSubSelectedArray=qe(t=>(Gr(t.context.store,t.enclosingRef.__ref),this.execSubSelectedArrayImpl(t)),{max:J["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:t,array:n,context:i}){if(Re(i.store))return i.store.makeCacheKey(t,n,i.varString)}})}diffQueryAgainstStore({store:e,query:t,rootId:n="ROOT_QUERY",variables:i,returnPartialData:s=!0}){const a=this.config.cache.policies;i={...ar(oa(t)),...i};const o=pe(n),c=this.executeSelectionSet({selectionSet:Gn(t).selectionSet,objectOrReference:o,enclosingRef:o,context:{store:e,query:t,policies:a,variables:i,varString:G(i),...mi(t,this.config.fragments)}});let u;c.missing&&(u=new fr(po(c.missing),c.missing,t,i));const l=!u,{result:d}=c;return{result:l?d:s?Object.keys(d).length===0?null:d:null,complete:l,missing:u}}isFresh(e,t,n,i){if(Re(i.store)&&this.knownResults.get(e)===n){const s=this.executeSelectionSet.peek(n,t,i);if(s&&e===s.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:t,enclosingRef:n,context:i}){if(I(t)&&!i.policies.rootTypenamesById[t.__ref]&&!i.store.has(t.__ref))return{result:{},missing:`Dangling reference to missing ${t.__ref} object`};const{variables:s,policies:a,store:o}=i,c=o.getFieldValue(t,"__typename"),u=[];let l;const d=new Se;typeof c=="string"&&!a.rootIdsByTypename[c]&&u.push({__typename:c}
38);function h(g,v){return g.missing&&(l=d.merge(l,{[v]:g.missing})),g.result}const f=new Set(e.selections);f.forEach(g=>{if(lt(g,s))if(Be(g)){let v=a.readField({fieldName:g.name.value,field:g,variables:i.variables,from:t},i);const b=Te(g);v===void 0?fi.added(g)||(l=d.merge(l,{[b]:`Can't find field '${g.name.value}' on ${I(t)?t.__ref+" object":"object "+JSON.stringify(t,null,2)}`})):N(v)?v.length>0&&(v=h(this.executeSubSelectedArray({field:g,array:v,enclosingRef:n,context:i}),b)):g.selectionSet&&v!=null&&(v=h(this.executeSelectionSet({selectionSet:g.selectionSet,objectOrReference:v,enclosingRef:I(v)?v:n,context:i}),b)),v!==void 0&&u.push({[b]:v})}else{const v=ut(g,i.lookupFragment);if(!v&&g.kind===C.FRAGMENT_SPREAD)throw q(107,g.name.value);v&&a.fragmentMatches(v,c)&&v.selectionSet.selections.forEach(f.add,f)}});const y={result:da(u),missing:l},p=y;return p.result&&this.knownResults.set(p.result,e),p}execSubSelectedArrayImpl({field:e,array:t,enclosingRef:n,context:i}){let s,a=new Se;function o(c,u){return c.missing&&(s=a.merge(s,{[u]:c.missing})),c.result}return e.selectionSet&&(t=t.filter(c=>c===void 0||i.store.canRead(c))),t=t.map((c,u)=>c===null?null:N(c)?o(this.executeSubSelectedArray({field:e,array:c,enclosingRef:n,context:i}),u):e.selectionSet?o(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:c,enclosingRef:I(c)?c:n,context:i}),u):c),{result:t,missing:s}}}function po(r){try{JSON.stringify(r,(e,t)=>{if(typeof t=="string")throw t;return t})}catch(e){return e}}function Dt(r,e,t){const n=`${e}${t}`;let i=r.flavors.get(n);return i||r.flavors.set(n,i=r.clientOnly===e&&r.deferred===t?r:{...r,clientOnly:e,deferred:t}),i}class yo{cache;reader;fragments;constructor(e,t,n){this.cache=e,this.reader=t,this.fragments=n}writeToStore(e,{query:t,result:n,dataId:i,variables:s,overwrite:a,extensions:o}){const c=K(t),u=Ka();s={...ar(c),...s};const l={store:e,written:{}
38,merge(h,f){return u.merge(h,f)},variables:s,varString:G(s),...mi(t,this.fragments),overwrite:!!a,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map,extensions:o},d=this.processSelectionSet({result:n||{},dataId:i,selectionSet:c.selectionSet,mergeTree:{map:new Map},context:l,path:[]});if(!I(d))throw q(109,n);return l.incomingById.forEach(({storeObject:h,mergeTree:f,fieldNodeSet:m},y)=>{const p=pe(y);if(f&&f.map.size){const g=this.applyMerges(f,p,h,l);if(I(g))return;h=g}e.merge(y,h)}),e.retain(d.__ref),d}processSelectionSet({dataId:e,result:t,selectionSet:n,context:i,mergeTree:s,path:a}){const{policies:o}=this.cache;let c={};const u=e&&o.rootTypenamesById[e]||Yt(t,n,i.fragmentMap)||e&&i.store.get(e,"__typename");typeof u=="string"&&(c.__typename=u);const l=(...h)=>{const f=pr(h,c,i.variables);if(I(f.from)){const m=i.incomingById.get(f.from.__ref);if(m){const y=o.readField({...f,from:m.storeObject},i);if(y!==void 0)return y}}return o.readField(f,i)},d=new Set;this.flattenFields(n,t,i,u).forEach((h,f)=>{const m=Te(f),y=t[m],p=[...a,f.name.value];if(d.add(f),y!==void 0){const g=o.getStoreFieldName({typename:u,fieldName:f.name.value,field:f,variables:h.variables}),v=sn(s,g);let b=this.processFieldValue(y,f,f.selectionSet?Dt(h,!1,!1):h,v,p),S;f.selectionSet&&(I(b)||he(b))&&(S=l("__typename",b));const O=o.getMergeFunction(u,f.name.value,S);O?v.info={field:f,typename:u,merge:O,path:p}:fe(["stream"],f)&&Array.isArray(b)&&h.extensions?.[te]?v.info={field:f,typename:u,merge:uo,path:p}:an(s,g),c=h.merge(c,{[g]:b})}});try{const[h,f]=o.identify(t,{typename:u,selectionSet:n,fragmentMap:i.fragmentMap,storeObject:c,readField:l});
38e=e||h,f&&(c=i.merge(c,f))}catch(h){if(!e)throw h}if(typeof e=="string"){const h=pe(e),f=i.written[e]||(i.written[e]=[]);if(f.indexOf(n)>=0||(f.push(n),this.reader&&this.reader.isFresh(t,h,n,i)))return h;const m=i.incomingById.get(e);return m?(m.storeObject=i.merge(m.storeObject,c),m.mergeTree=Gt(m.mergeTree,s),d.forEach(y=>m.fieldNodeSet.add(y))):i.incomingById.set(e,{storeObject:c,mergeTree:it(s)?void 0:s,fieldNodeSet:d}),h}return c}processFieldValue(e,t,n,i,s){return!t.selectionSet||e===null?e:N(e)?e.map((a,o)=>{const c=this.processFieldValue(a,t,n,sn(i,o),[...s,o]);return an(i,o),c}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:i,path:s})}flattenFields(e,t,n,i=Yt(t,e,n.fragmentMap)){const s=new Map,{policies:a}=this.cache,o=new U(!1);return(function c(u,l){const d=o.lookup(u,l.clientOnly,l.deferred);d.visited||(d.visited=!0,u.selections.forEach(h=>{if(!lt(h,n.variables))return;let{clientOnly:f,deferred:m}=l;if(!(f&&m)&&or(h.directives)&&h.directives.forEach(y=>{const p=y.name.value;if(p==="client"&&(f=!0),p==="defer"){const g=ir(y,n.variables);(!g||g.if!==!1)&&(m=!0)}}),Be(h)){const y=s.get(h);y&&(f=f&&y.clientOnly,m=m&&y.deferred),s.set(h,Dt(n,f,m))}else{const y=ut(h,n.lookupFragment);if(!y&&h.kind===C.FRAGMENT_SPREAD)throw q(111,h.name.value);y&&a.fragmentMatches(y,i,t,n.variables)&&c(y.selectionSet,Dt(n,f,m))}}))})(e,n),s}applyMerges(e,t,n,i,s){if(e.map.size&&!I(n)){const a=!N(n)&&(I(t)||he(t))?t:void 0,o=n;a&&!s&&(s=[I(a)?a.__ref:a]);let c;const u=(l,d)=>N(l)?typeof d=="number"?l[d]:void 0:i.store.getFieldValue(l,String(d));e.map.forEach((l,d)=>{const h=u(a,d),f=u(o,d);if(f===void 0)return;s&&s.push(d);const m=this.applyMerges(l,h,f,i,s);m!==f&&(c=c||new Map,c.set(d,m)),s&&T(s.pop()===d)}),c&&(n=N(o)?o.slice(0):{...o},c.forEach((l,d)=>{n[d]=l}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,s&&i.store.getStorage(...s)):n}}const Ci=[];function sn({map:r},e){return r.has(e)||r.set(e,Ci.pop()||{map:new Map}),r.get(e)}function Gt(r,e){if(r===e||!e||it(e))return r;if(!r||it(r))return e;const t=r.info&&e.info?{...r.info,...e.info}:r.info||e.info,n=r.map.size&&e.map.size,i=n?new Map:r.map.size?r.map:e.map,s={info:t,map:i};if(n){const a=new Set(e.map.keys());r.map.forEach((o,c)=>{s.map.set(c,Gt(o,e.map.get(c))),a.delete(c)}),a.forEach(o=>{s.map.set(o,Gt(e.map.get(o),r.map.get(o)))})}return s}function it(r){return!r||!(r.info||r.map.size)}function an({map:r},e){const t=r.get(e);t&&it(t)&&(Ci.push(t),r.delete(e))}function Yt(r,e,t){let n;for(const i of e.selections)if(Be(i)){if(i.name.value==="__typename")return r[Te(i)]}else n?n.push(i):n=[i];if(typeof r.__typename=="string")return r.__typename;if(n)for(const i of n){const s=Yt(r,ut(i,t).selectionSet,t);if(typeof s=="string")return s}}class Jo extends $a{data;optimisticData;config;watches=new Set;storeReader;storeWriter;addTypenameTransform=new H(fi);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=ao;constructor(e={}){super(),this.config=Ja(e),this.policies=new lo({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const e=this.data=new pt.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){const{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new yo(this,this.storeReader=new ho({cache:this,fragments:e}),e),this.maybeBroadcastWatch=qe((t,n)=>this.broadcastWatch(t,n),{max:J["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:t=>{const n=t.optimistic?this.optimisticData:this.data;if(Re(n)){const{optimistic:i,id:s,variables:a}=t;return n.makeCacheKey(t.query,t.callback,G({optimistic:i,id:s,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(t=>t.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){const{returnPartialData:t=!1}=e;return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:t}).result}write(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}modify(e){if(R.call(e,"id")&&!e.id)return!1;const t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config})}watch(e){return this.watches.size||so(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&Zr(this),this.maybeBroadcastWatch.forget(e)}}gc(e){G.reset(),ye.reset();const t=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),t}retain(e,t){return(t?this.optimisticData:this.data).retain(e)}release(e,t){return(t?this.optimisticData:this.data).release(e)}identify(e){if(I(e))return e.__ref;try{return this.policies.identify(e)[0]}catch{}}evict(e){if(!e.id){if(R.call(e,"id"))return!1;e={...e,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}reset(e){return this.init(),G.reset(),e&&e.discardWatches?(this.watches.forEac
38h(t=>this.maybeBroadcastWatch.forget(t)),this.watches.clear(),Zr(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){const t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}txCount=0;batch(e){const{update:t,optimistic:n=!0,removeOptimistic:i,onWatchUpdated:s}=e;let a;const o=u=>{const{data:l,optimisticData:d}=this;++this.txCount,u&&(this.data=this.optimisticData=u);try{return a=t(this)}finally{--this.txCount,this.data=l,this.optimisticData=d}},c=new Set;return s&&!this.txCount&&this.broadcastWatches({...e,onWatchUpdated(u){return c.add(u),!1}}),typeof n=="string"?this.optimisticData=this.optimisticData.addLayer(n,o):n===!1?o(this.data):o(),typeof i=="string"&&(this.optimisticData=this.optimisticData.removeLayer(i)),s&&c.size?(this.broadcastWatches({...e,onWatchUpdated(u,l){const d=s.call(this,u,l);return d!==!1&&c.delete(u),d}}),c.size&&c.forEach(u=>this.maybeBroadcastWatch.dirty(u))):this.broadcastWatches(e),a}performTransaction(e,t){return this.batch({update:e,optimistic:t||t!==null})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,t){return this.policies.fragmentMatches(e,t)}lookupFragment(e){return this.config.fragments?.lookup(e)||null}resolvesClientField(e,t){return!!this.policies.getReadFunction(e,t)}broadcastWatches(e){if(!this.txCount){const t=this.onAfterBroadcast,n=new Set;this.onAfterBroadcast=i=>{n.add(i)};try{this.watches.forEach(i=>this.maybeBroadcastWatch(i,e)),n.forEach(i=>i())}finally{this.onAfterBroadcast=t}}}addFragmentsToDocument(e){const{fragments:t}=this.config;return t?t.transform(e):e}broadcastWatch(e,t){const{lastDiff:n}=e,i=this.diff(e);t&&(e.optimistic&&typeof t.optimistic=="string"&&(i.fromOptimisticTransaction=!0),t.onWatchUpdated&&t.onWatchUpdated.call(this,e,i,n)===!1)||(!n||!F(n.result,i.result))&&e.callback(e.lastDiff=i,n)}}function Ue(r,e){return typeof r=="object"&&r!==null&&r[Symbol.for("apollo.error")]===e}function $e(r){Object.defineProperty(r,Symbol.for("apollo.error"),{value:r.name,enumerable:!1,writable:!1,configurable:!1})}function on(r){return r.map(e=>e.message||"Error message not found.").join(`
39`)}class Le extends Error{static is(e){return Ue(e,"CombinedProtocolErrors")}static formatMessage=on;errors;constructor(e){super(Le.formatMessage(e,{defaultFormatMessage:on})),this.name="CombinedProtocolErrors",this.errors=e,$e(this),Object.setPrototypeOf(this,Le.prototype)}}function mo(r){return r!==null&&typeof r=="object"&&typeof r.message=="string"&&typeof r.name=="string"&&(typeof r.stack=="string"||typeof r.stack>"u")}class yr extends Error{static is(e){return Ue(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}),this.name="UnconventionalError",$e(this),Object.setPrototypeOf(this,yr.prototype)}}function cn(r){return r.filter(e=>e).map(e=>e.message||"Error message not found.").join(`
40`)}class X extends Error{static is(e){return Ue(e,"CombinedGraphQLErrors")}static formatMessage=cn;errors;data;extensions;constructor(e,t=e.errors||[]){super(X.formatMessage(t,{result:e,defaultFormatMessage:cn})),this.errors=t,this.data=e.data,this.extensions=e.extensions,this.name="CombinedGraphQLErrors",$e(this),Object.setPrototypeOf(this,X.prototype)}}const go=new WeakSet;function vo(r){go.add(r)}class yt extends Error{static is(e){return Ue(e,"ServerError")}response;statusCode;bodyText;constructor(e,t){super(e),this.name="ServerError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,$e(this),Object.setPrototypeOf(this,yt.prototype)}}class mt extends Error{static is(e){return Ue(e,"ServerParseError")}response;statusCode;bodyText;constructor(e,t){super(e instanceof Error?e.message:"Could not parse server response",{cause:e}),this.name="ServerParseError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,$e(this),Object.setPrototypeOf(this,mt.prototype)}}const st=Symbol();function bo(r){return"extensions"in r?Le.is(r.extensions[st]):!1}function wo(r){return mo(r)?r:typeof r=="string"?new Error(r,{cause:r}):new yr(r)}var k;(function(r){r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error",r[r.streaming=9]="streaming"})(k||(k={}));const{assign:un}=Object,ce={loading:!0,networkStatus:k.loading,data:void 0,dataState:"empty",partial:!0},Nt={loading:!1,networkStatus:k.ready,data:void 0,dataState:"empty",partial:!0};class Rt{options;queryName;variablesUnknown=!1;_lastWrite;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor({queryManager:e,options:t,transformedQuery:n=e.transform(t.query)}){this.queryManager=e,this.waitForNetworkResult=t.fetchPolicy==="network-only",this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);
40const{watchQuery:{fetchPolicy:i="cache-first"}={}}=e.defaultOptions,{fetchPolicy:s=i,initialFetchPolicy:a=s==="standby"?i:s}=t;t[Fa]&&(T(s==="standby",80),this.variablesUnknown=!0),this.lastQuery=n,this.options={...t,initialFetchPolicy:a,fetchPolicy:s,variables:this.getVariablesWithDefaults(t.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const o=K(this.query);this.queryName=o&&o.name&&o.name.value}initializeObservablesQueue(){this.subject=new as({query:this.query,variables:this.variables,result:ce,meta:{}});const e=this.subject.pipe(je({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),zt(({query:t,variables:n,result:i,meta:s},a)=>{const{shouldEmit:o}=s;if(i===ce&&(a.previous=void 0,a.previousVariables=void 0),this.options.fetchPolicy==="standby"||o===2)return;if(o===1)return l();const{previous:c,previousVariables:u}=a;if(c){const d=this.queryManager.getDocumentInfo(t),h=this.queryManager.dataMasking,f=h?d.nonReactiveQuery:t;if((h||d.hasNonreactiveDirective?Kn(f,c,i,n):F(c,i))&&F(u,n))return}if(o===3&&(!this.options.notifyOnNetworkStatusChange||F(c,i)))return;return l();function l(){return a.previous=i,a.previousVariables=n,i}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new Ee,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:e=!0}={}){return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e})}getInitialResult(e){let t=e||this.options.fetchPolicy;this.queryManager.prioritizeCacheValues&&(t==="network-only"||t==="cache-and-network")&&(t="cache-first");const n=()=>{const i=this.getCacheDiff(),s=this.options.returnPartialData||i.complete?i.result??void 0:void 0;return this.maskResult({data:s,dataState:i.complete?"complete":s===void 0?"empty":"partial",loading:!i.complete,networkStatus:i.complete?k.ready:k.loading,partial:!i.complete})};switch(t){case"cache-only":return{...n(),loading:!1,networkStatus:k.ready};case"cache-first":return n();case"cache-and-network":return{...n(),loading:!0,networkStatus:k.loading};case"standby":return Nt;default:return ce}}resubscribeCache(){const{variables:e,fetchPolicy:t}=this.options,n=this.query,i=t==="standby"||t==="no-cache"||this.waitForNetworkResult,s=!Fe({query:n,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((i||s)&&this.unsubscribeFromCache?.(),i||!s)return;const a={query:n,variables:e,optimistic:!0,watcher:this,callback:c=>{const u=this.queryManager.getDocumentInfo(n);if((u.hasClientExports||u.hasForcedResolvers)&&(a.lastDiff=void 0),a.lastOwnDiff===c)return;const{result:l}=this.subject.getValue();!c.complete&&(l.error||l===ce||l===Nt)||F(l.data,c.result)||this.scheduleNotify()}},o=this.cache.watch(a);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,o()},{query:n,variables:e})}stableLastResult;getCurrentResult(){const{result:e}=this.subject.getValue();let t=e.networkStatus===k.error||this.hasObservers()||this.options.fetchPolicy==="no-cache"?e:this.getInitialResult();return t===ce&&(t=this.getInitialResult()),F(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){const{fetchPolicy:t}=this.options,n={pollInterval:0};return t==="no-cache"?n.fetchPolicy="no-cache":n.fetchPolicy="network-only",e&&!F(this.variables,e)&&(n.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...e})),this._lastWrite=void 0,this._reobserve(n,{newNetworkStatus:k.refetch})}fetchMore({query:e,variables:t,context:n,errorPolicy:i,updateQuery:s}){T(this.options.fetchPolicy!=="cache-only",82,we(this.query,"(anonymous)"));const a={...j(this.options,{errorPolicy:"none"},{query:e,context:n,errorPolicy:i}),variables:e?t:{...this.variables,...t},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};
40a.query=this.transformDocument(a.query),this.lastQuery=e?this.transformDocument(this.options.query):a.query;let o=!1;const c=this.options.fetchPolicy!=="no-cache";c||T(s,83);const{finalize:u,pushNotification:l}=this.pushOperation(k.fetchMore);l({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const{promise:d,operator:h}=ln(),{observable:f}=this.queryManager.fetchObservableWithInfo(a,{networkStatus:k.fetchMore,exposeExtensions:!0}),m=f.pipe(h,Ln(y=>y.kind==="N"&&y.source==="network")).subscribe({next:y=>{o=!1;const p=y.value,g=p[Xn];if(di(y.value.networkStatus)&&u(),c){const v=this.getCacheDiff();this.cache.batch({update:b=>{s?b.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:g},S=>s(S,{fetchMoreResult:p.data,variables:a.variables})):b.writeQuery({query:a.query,variables:a.variables,data:p.data,extensions:g})},onWatchUpdated:(b,S)=>{if(b.watcher===this&&!F(S.result,v.result)){o=!0;const O=this.getCurrentResult();Ze(p.networkStatus)&&l({kind:"N",source:"network",value:{...O,networkStatus:p.networkStatus===k.error?k.ready:p.networkStatus,loading:!1,data:S.result,dataState:p.dataState==="streaming"?"streaming":"complete"}})}}})}else{const v=this.getCurrentResult(),b=s(v.data,{fetchMoreResult:p.data,variables:a.variables});l({kind:"N",value:{...v,networkStatus:k.ready,loading:!1,data:b,dataState:v.dataState==="streaming"?"streaming":"complete"},source:"network"})}}});return Rr(d.then(y=>De(this.maskResult(y))).finally(()=>{if(m.unsubscribe(),u(),c&&!o){const y=this.getCurrentResult();y.dataState==="streaming"?l({kind:"N",source:"network",value:{...y,dataState:"complete",networkStatus:k.ready}}):l({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(e){const t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:n=>{const{updateQuery:i,onError:s}=e,{error:a}=n;if(a){s?s(a):T.error(84,a);return}i&&this.updateQuery((o,c)=>i(o,{subscriptionData:n,...c}))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){const t=j(this.options,e||{});un(this.options,t),this.updatePolling()}async setVariables(e){return e=this.getVariablesWithDefaults(e),F(this.variables,e)?De(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:k.setVariables}):De(this.getCurrentResult()))}updateQuery(e){const{queryManager:t}=this,{result:n,complete:i}=this.getCacheDiff({optimistic:!1}),s=e(n,{variables:this.variables,complete:!!i,previousData:n});s&&(this.cache.writeQuery({query:this.options.query,data:s,variables:this.variables}),t.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,t){if(t.nextFetchPolicy){const{fetchPolicy:n="cache-first",initialFetchPolicy:i=n}=t;n==="standby"||(typeof t.nextFetchPolicy=="function"?t.fetchPolicy=t.nextFetchPolicy.call(t,n,{reason:e,options:t,observable:this,initialFetchPolicy:i}):e==="variables-changed"?t.fetchPolicy=i:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,n,i){const s=this.options.fetchPolicy;e.context??={};let a=!1;const o=()=>{a=!0},c=p=>new _(g=>{try{return p.subscribe({next(v){a=!0,g.next(v)},error:v=>g.error(v),complete:()=>g.complete()})}finally{a||(f.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:d,variables:h,meta:{shouldEmit:3,fetchPolicy:s}}))}});let{observable:u,fromLink:l}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:n,onCacheHit:o,fetchQueryOperator:c,observableQuery:this});const{query:d,variables:h}=this,f={abort:()=>{y.unsubscribe()},query:d,variables:h};this.activeOperations.add(f);let m=t==k.refetch||t==k.setVariables;u=u.pipe(i,Pe());const y=u.pipe(je({next:p=>{p.source==="newNetworkStatus"||p.kind==="N"&&p.value.loading?f.override=t:delete f.override},finalize:()=>this.activeOperations.delete(f)})).subscribe({next:p=>{const g={};m&&p.kind==="N"&&"loading"in p.value&&!p.value.loading&&(m=!1,g.shouldEmit=1),this.input.next({...p,query:d,variables:h,meta:g})}});return{fromLink:l,subscription:y,observable:u}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:e,options:{fetchPolicy:t,pollInterval:n}}=this,i=()=>{const{options:c}=this;return!c.pollInterval||!this.hasObservers()||c.fetchPolicy==="cache-only"||c.fetchPolicy==="standby"};if(i()){this.cancelPolling();return}if(e?.interval===n)return;const s=e||(this.pollingInfo={});s.interval=n;const a=()=>
40{if(i())return this.cancelPolling();this.pollingInfo&&(!Ze(this.networkStatus)&&!this.options.skipPollAttempt?.()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},{newNetworkStatus:k.poll}).then(o,o):o())},o=()=>{const c=this.pollingInfo;c&&(clearTimeout(c.timeout),c.timeout=setTimeout(a,c.interval))};o()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let{newNetworkStatus:n}=t||{};this.queryManager.obsQueries.add(this);const i=n===k.refetch||n===k.poll,s=this.variables,a=this.options.fetchPolicy,o=j(this.options,e||{});this.variablesUnknown&&=o.fetchPolicy==="standby";const c=i?o:un(this.options,o),u=this.transformDocument(c.query);this.lastQuery=u,e&&"variables"in e&&(c.variables=this.getVariablesWithDefaults(e.variables)),i||(this.updatePolling(),e&&e.variables&&!F(e.variables,s)&&c.fetchPolicy!=="standby"&&(c.fetchPolicy===a||typeof c.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",c),n===void 0&&(n=k.setVariables)));const l=this.networkStatus;n||(n=k.loading,l!==k.loading&&e?.variables&&!F(e.variables,s)&&(n=k.setVariables),c.fetchPolicy==="standby"&&(n=k.ready)),c.fetchPolicy==="standby"&&this.cancelPolling(),this.resubscribeCache();const{promise:d,operator:h}=ln(c.fetchPolicy==="standby"?{data:void 0}:void 0),{subscription:f,observable:m,fromLink:y}=this.fetch(c,n,u,h);!i&&(y||!this.linkSubscription)&&(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=f);const p=Object.assign(Rr(d.then(g=>De(this.maskResult(g))).finally(()=>{!this.hasObservers()&&this.activeOperations.size===0&&this.tearDownQuery()})),{retain:()=>{const g=m.subscribe({}),v=()=>g.unsubscribe();return d.then(v,v),p}});return p}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){const t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:{...e,data:t}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(e=!1){if(!e){const n=this.queryManager.getDocumentInfo(this.query);if(n.hasClientExports||n.hasForcedResolvers)return}const{dirty:t}=this;if(this.resetNotifications(),t&&(this.options.fetchPolicy==="cache-only"||this.options.fetchPolicy==="cache-and-network"||!this.activeOperations.size)){const n=this.getCacheDiff();F(n.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:n.result,dataState:n.complete?"complete":n.result?"partial":"empty",networkStatus:k.ready,loading:!1,error:void 0,partial:!n.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=new Set;pushOperation(e){let t=!1;const{query:n,variables:i}=this,s=()=>{this.activeOperations.delete(a)},a={override:e,abort:()=>{t=!0,s()},query:n,variables:i};return this.activeOperations.add(a),{finalize:s,pushNotification:(o,c)=>{t||this.input.next({...o,query:n,variables:i,meta:{...c}})}}}calculateNetworkStatus(e){return e===k.streaming?e:Array.from(this.activeOperations.values()).reverse().find(n=>Fe(n,this)&&n.override!==void 0)?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){const e=this.options.fetchPolicy==="cache-only";this.setResult(e?Nt:ce,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,t){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:{...t}})}operator=zt(e=>{const{query:t,variables:n,meta:i}=e;if(e.source==="setResult")return{query:t,variables:n,result:e.value,meta:i};if(e.kind==="C"||!Fe(e,this))return;let s;const a=this.subject.getValue();if(e.source==="cache"){if(s=e.value,s.networkStatus===k.ready&&s.partial&&(!this.options.returnPartialData||a.result.networkStatus===k.error)&&this.options.fetchPolicy!=="cache-only")return}else if(e.source==="network")this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),s=e.kind==="E"?{...Fe(a,e)?a.result:{data:void 0,dataState:"empty",partial:!0},error:e.error,networkStatus:k.error,loading:!1}:e.value,e.kind==="E"&&s.dataState==="streaming"&&(s.dataState="complete"),s.error&&(i.shouldEmit=1);else if(e.source==="newNetworkStatus"){const o=Fe(a,e)?a.result:this.getInitialResult(i.fetchPolicy),{resetError:c}=e.value,u=c?void 0:o.error,l=u?k.error:k.ready;s={...o,error:u,networkStatus:l}}return T(s),s.error||delete s.error,s.networkStatus=this.calculateNetworkStatus(s.networkStatus),s.loading=Ze(s.networkStatus),s=this.maskResult(s),{query:t,variables:n,result:s,meta:i}});reobserveCacheFirst(){const{fetchPolicy:e,nextFetchPolicy:t}=this.options;e==="cache-and-network"||e==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(n,i){return this.nextFetchPolicy=t,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(n,i):e}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}}function Fe(r,e){return!!(r&&e&&r.query===e.query&&F(r.variables,e.variables))}function ln(r){let e=r,t,n;const i=new Promise((a,o)=>{t=a,n=o}),s=je({next(a){if(a.kind==="E")return n(a.error);a.kind==="N"&&a.source!=="newNetworkStatus"&&!a.value.loading&&(e=a.value)},finalize:()=>{if(e)t(e);else{const a="The operation was aborted.",o="AbortError";n(typeof DOMException<"u"?new DOMException(a,o):Object.assign(new Error(a),{name:o}))}}});return{promise:i,operator:s}}const fn={},de=new WeakMap;function xt(r,e){const t=r[e];typeof t=="function"&&(r[e]=function(){return de.set(r,(de.get(r)+1)%1e15),t.apply(this,arguments)})}const hn=new WeakMap;class Mt{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(e,t){const n=this.cache=e.cache,i=(hn.get(e)||0)+1;hn.set(e,i),this.id=i+"",this.observableQuery=t,this.queryManager=e,de.has(n)||(de.set(n,0),xt(n,"evict"),xt(n,"modify"),xt(n,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,t){const{lastWrite:n}=this;return!(n&&n.dmCount===de.get(this.cache)&&F(t,n.variables)&&F(e.data,n.result.data)&&e.extensions?.[te]===n.result.extensions?.[te])}get hasNext(){return this.incremental?this.incremental.hasNext:!1}maybeHandleIncrementalResult(e,t,n){const{incrementalHandler:i}=this.queryManager;return i.isIncrementalResult(t)?(this.incremental||=i.startRequest
40({query:n}),this.incremental.handle(e,t)):t}markQueryResult(e,{document:t,variables:n,errorPolicy:i,cacheWriteBehavior:s}){const a={query:t,variables:n,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();const o=s===0,c=o?void 0:this.cache.diff(a);let u=this.maybeHandleIncrementalResult(c?.result,e,t);return o||(At(u,i)?this.cache.batch({onWatchUpdated:(l,d)=>{l.watcher===this.observableQuery&&(l.lastOwnDiff=d)},update:l=>{if(this.shouldWrite(u,n))l.writeQuery({query:t,data:u.data,variables:n,overwrite:s===1,extensions:u.extensions}),this.lastWrite={result:u,variables:n,dmCount:de.get(this.cache)};else if(c&&c.complete){u={...u,data:c.result};return}const d=l.diff(a);d.complete&&(u={...u,data:d.result})}}):this.lastWrite=void 0),u}markMutationResult(e,t,n=this.cache){const i=[],s=t.cacheWriteBehavior===0;let a=this.maybeHandleIncrementalResult(s?void 0:n.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if(t.errorPolicy==="ignore"&&(a={...a,errors:[]}),le(a)&&t.errorPolicy==="none")return Promise.resolve(a);const o=()=>({...a,dataState:this.hasNext?"streaming":"complete"});if(!s&&At(a,t.errorPolicy)){i.push({result:a.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables,extensions:a.extensions});const{updateQueries:u}=t;u&&this.queryManager.getObservableQueries("all").forEach(l=>{const d=l&&l.queryName;if(!d||!Object.hasOwnProperty.call(u,d))return;const h=u[d],{query:f,variables:m}=l,{result:y,complete:p}=l.getCacheDiff({optimistic:!1});if(p&&y){const g=h(y,{mutationResult:o(),queryName:f&&we(f)||void 0,queryVariables:m});g&&i.push({result:g,dataId:"ROOT_QUERY",query:f,variables:m})}})}let c=t.refetchQueries;if(typeof c=="function"&&(c=c(o())),i.length>0||(c||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){const u=[];if(this.queryManager.refetchQueries({updateCache:l=>{s||i.forEach(h=>l.write(h));const{update:d}=t;if(d){if(!s){const h=l.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});h.complete&&(a={...a,data:h.result})}this.hasNext||d(l,a,{context:t.context,variables:t.variables})}!s&&!t.keepRootFields&&!this.hasNext&&l.modify({id:"ROOT_MUTATION",fields(h,{fieldName:f,DELETE:m}){return f==="__typename"?h:m}})},include:c,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(l=>u.push(l)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(u).then(()=>a)}return Promise.resolve(a)}markMutationOptimistic(e,t){const n=typeof e=="function"?e(t.variables,{IGNORE:fn}):e;return n===fn?!1:(this.cache.recordOptimisticTransaction(i=>{try{this.markMutationResult({data:n},t,i)}catch(s){T.error(s)}},this.id),!0)}markSubscriptionResult(e,{document:t,variables:n,errorPolicy:i,cacheWriteBehavior:s}){s!==0&&(At(e,i)&&this.cache.write({query:t,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:n,extensions:e.extensions}),this.queryManager.broadcastQueries())}}function At(r,e="none"){const t=e==="ignore"||e==="all";let n=!le(r);return!n&&t&&r.data&&(n=!0),n}class So{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=new Set;fetchCancelFns=new Map;constructor(e){const t=new H(i=>this.cache.transformDocument(i),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;const n=e.documentTransform;this.documentTransform=n?t.concat(n).concat(t):t,this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}
40stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(q(87))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}async mutate({mutation:e,variables:t,optimisticResponse:n,updateQueries:i,refetchQueries:s=[],awaitRefetchQueries:a=!1,update:o,onQueryUpdated:c,fetchPolicy:u,errorPolicy:l,keepRootFields:d,context:h}){const f=new Mt(this);e=this.cache.transformForLink(this.transform(e));const{hasClientExports:m}=this.getDocumentInfo(e);t=this.getVariables(e,t),m&&(t=await this.localState.getExportedVariables({client:this.client,document:e,variables:t,context:h}));const y=this.mutationStore&&(this.mutationStore[f.id]={mutation:e,variables:t,loading:!0,error:null}),p=n&&f.markMutationOptimistic(n,{document:e,variables:t,cacheWriteBehavior:u==="no-cache"?0:2,errorPolicy:l,context:h,updateQueries:i,update:o,keepRootFields:d});return this.broadcastQueries(),new Promise((g,v)=>{const b={};return this.getObservableFromLink(e,{...h,optimisticResponse:p?n:void 0},t,u,{},!1).observable.pipe(dn(),ue(S=>{const O={...S};return se(f.markMutationResult(O,{document:e,variables:t,cacheWriteBehavior:u==="no-cache"?0:2,errorPolicy:l,context:h,update:o,updateQueries:i,awaitRefetchQueries:a,refetchQueries:s,removeOptimistic:p?f.id:void 0,onQueryUpdated:c,keepRootFields:d}))})).pipe(Z(S=>{if(le(S)&&l==="none")throw new X(Pt(S));return y&&(y.loading=!1,y.error=null),S})).subscribe({next:S=>{if(this.broadcastQueries(),!f.hasNext){const O={data:this.maskOperation({document:e,data:S.data,fetchPolicy:u,cause:b})};le(S)&&(O.error=new X(S)),Object.keys(S.extensions||{}).length&&(O.extensions=S.extensions),g(O)}},error:S=>{if(y&&(y.loading=!1,y.error=S),p&&this.cache.removeOptimistic(f.id),this.broadcastQueries(),l==="ignore")return g({data:void 0});if(l==="all")return g({data:void 0,error:S});v(S)}})})}fetchQuery(e,t){return ee(e.query,ae.QUERY),(async()=>Rs(this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(zt(n=>{switch(n.kind){case"E":throw n.error;case"N":if(n.source!=="newNetworkStatus")return De(n.value)}})),{defaultValue:{data:void 0}}))()}transform(e){return this.documentTransform.transformDocument(e)}transformCache=new sr(J["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(e){const{transformCache:t}=this;if(!t.has(e)){const i=K(e),s={hasClientExports:fe(["client","export"],e,!0),hasForcedResolvers:fa(e),hasNonreactiveDirective:fe(["nonreactive"],e),hasIncrementalDirective:fe(["defer"],e),nonReactiveQuery:Oo(e),clientQuery:fe(["client"],e)?e:null,serverQuery:pa([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:i?.operation,defaultVars:ar(i),asQuery:{...e,definitions:e.definitions.map(a=>a.kind==="OperationDefinition"&&a.operation!=="query"?{...a,operation:"query"}:a)}};t.set(e,s)}const n=t.get(e);if(n.violation)throw n.violation;return n}getVariables(e,t){const n=this.getDocumentInfo(e).defaultVars,i=Object.entries(t??{}).map(([s,a])=>[s,a===void 0?n[s]:a]);return{...n,...Object.fromEntries(i)}}watchQuery(e){ee(e.query,ae.QUERY);const t=this.transform(e.query);return e={...e,variables:this.getVariables(t,e.variables)},typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!0),new Rt({queryManager:this,options:e,transformedQuery:t})}query(e){const t=this.transform(e.query);return this.fetchQuery({...e,query:t}).then(n=>({...n,data:this.maskOperation({document:t,data:n?.data,fetchPolicy:e.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(q(89)),this.obsQueries.forEach(t=>{t.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){const t=new Set,n=new Map,i=new Map,s=new Set;return Array.isArray(e)&&e.forEach(a=>{if(typeof a=="string")n.set(a,a),i.set(a,!1);else if(ha(a)){const o=ye(this.transform(a));n.set(o,we(a)),i.set(o,!1)}else A(a)&&a.query&&s.add(a)}),this.obsQueries.forEach(a=>{const o=ye(this.transform(a.options.query));if(e==="all"){t.add(a);return}const{queryName:c,options:{fetchPolicy:u}}=a;e==="active"&&u==="standby"||(e==="active"||c&&i.has(c)||o&&i.has(o))&&(t.add(a),c&&i.set(c,!0),o&&i.set(o,!0))}
40),s.size&&s.forEach(a=>{const o=new Rt({queryManager:this,options:{...Ke(this.defaultOptions.watchQuery,a),fetchPolicy:"network-only"}});t.add(o)}),t}refetchObservableQueries(e=!1){const t=[];return this.getObservableQueries(e?"all":"active").forEach(n=>{const{fetchPolicy:i}=n.options;(e||i!=="standby")&&i!=="cache-only"&&t.push(n.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let{query:t,variables:n}=e;const{fetchPolicy:i="cache-first",errorPolicy:s="none",context:a={},extensions:o={}}=e;ee(t,ae.SUBSCRIPTION),t=this.transform(t),n=this.getVariables(t,n);let c;const u=(this.getDocumentInfo(t).hasClientExports?se(this.localState.getExportedVariables({client:this.client,document:t,variables:n,context:a})):ie(n)).pipe(ue(l=>{const{observable:d,restart:h}=this.getObservableFromLink(t,a,l,i,o),f=new Mt(this);return c=h,d.pipe(Z(m=>{f.markSubscriptionResult(m,{document:t,variables:l,errorPolicy:s,cacheWriteBehavior:i==="no-cache"?0:2});const y={data:m.data??void 0};return le(m)?y.error=new X(m):bo(m)&&(y.error=m.extensions[st],delete m.extensions[st]),m.extensions&&Object.keys(m.extensions).length&&(y.extensions=m.extensions),y.error&&s==="none"&&(y.data=void 0),s==="ignore"&&delete y.error,y}),Je(m=>ie(s==="ignore"?{data:void 0}:{data:void 0,error:m}
40)),Ln(m=>!!(m.data||m.error)))}));return Object.assign(u,{restart:()=>c?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}inFlightLinkObservables=new U(!1);getObservableFromLink(e,t,n,i,s,a=t?.queryDeduplication??this.queryDeduplication){let o={};const{serverQuery:c,clientQuery:u,operationType:l,hasIncrementalDirective:d}=this.getDocumentInfo(e),h=we(e),f={client:this.client};if(c){const{inFlightLinkObservables:m,link:y}=this;try{let g=function(v){return new _(b=>{function S(){return v.subscribe({next:b.next.bind(b),complete:b.complete.bind(b),error:b.error.bind(b)})}let O=S();return o.restart||=()=>{O.unsubscribe(),O=S()},()=>{O.unsubscribe(),o.restart=void 0}})};const p=this.incrementalHandler.prepareRequest({query:c,variables:n,context:{...this.defaultContext,...t,queryDeduplication:a},extensions:s});if(t=p.context,a){const v=ye(c),b=G(n);o=m.lookup(v,b),o.observable||(o.observable=Ut(y,p,f).pipe(g,Ls(()=>{m.peek(v,b)===o&&m.remove(v,b)}),l===ae.SUBSCRIPTION?Pe():tr({refCount:!0})))}else o.observable=Ut(y,p,f).pipe(g)}catch(p){o.observable=qn(()=>p)}}else o.observable=ie({data:{}});if(u){const{operation:m}=K(e);T(!d,94,m[0].toUpperCase()+m.slice(1),h??"(anonymous)"),o.observable=o.observable.pipe(ue(y=>se(this.localState.execute({client:this.client,document:u,remoteResult:y,context:t,variables:n,fetchPolicy:i}))))}return{restart:()=>o.restart?.(),observable:o.observable.pipe(Je(m=>{throw m=wo(m),vo(m),m}))}}getResultsFromLink(e,{queryInfo:t,cacheWriteBehavior:n,observableQuery:i,exposeExtensions:s}){const a=t.lastRequestId=this.generateRequestId(),{errorPolicy:o}=e,c=this.cache.transformForLink(e.query);return this.getObservableFromLink(c,e.context,e.variables,e.fetchPolicy).observable.pipe(Z(u=>{const l=t.markQueryResult(u,{...e,document:c,cacheWriteBehavior:n}),d=le(l);if(d&&o==="none")throw t.resetLastWrite(),i?.resetNotifications(),new X(Pt(l));const h={data:l.data,...t.hasNext?{loading:!0,networkStatus:k.streaming,dataState:"streaming",partial:!0}:{dataState:l.data?"complete":"empty",loading:!1,networkStatus:k.ready,partial:!l.data}};return s&&"extensions"in l&&(h[Xn]=l.extensions),d&&(o==="none"&&(h.data=void 0,h.dataState="empty"),o!=="ignore"&&(h.error=new X(Pt(l)),h.dataState!=="streaming"&&(h.networkStatus=k.error))),h}),Je(u=>{if(a>=t.lastRequestId&&o==="none")throw t.resetLastWrite(),i?.resetNotifications(),u;const l={data:void 0,dataState:"empty",loading:!1,networkStatus:k.ready,partial:!0};return o!=="ignore"&&(l.error=u,l.networkStatus=k.error),ie(l)}))}fetchObservableWithInfo(e,{networkStatus:t=k.loading,query:n=e.query,fetchQueryOperator:i=c=>c,onCacheHit:s=()=>{},observableQuery:a,exposeExtensions:o}){const c=this.getVariables(n,e.variables);let{fetchPolicy:u="cache-first",errorPolicy:l="none",returnPartialData:d=!1,notifyOnNetworkStatusChange:h=!0,context:f={}}=e;this.prioritizeCacheValues&&(u==="network-only"||u==="cache-and-network")&&(u="cache-first");const m=Object.assign({},e,{query:n,variables:c,fetchPolicy:u,errorPolicy:l,returnPartialData:d,notifyOnNetworkStatusChange:h,context:f}),y=new Mt(this,a),p=O=>{m.variables=O;const V=u==="no-cache"?0:t===k.refetch&&m.refetchWritePolicy!=="merge"?1:2,M=this.fetchQueryByPolicy(m,{queryInfo:y,cacheWriteBehavior:V,onCacheHit:s,observableQuery:a,exposeExtensions:o});return M.observable=M.observable.pipe(i),m.fetchPolicy!=="standby"&&a?.applyNextFetchPolicy("after-fetch",e),M},g=()=>{this.fetchCancelFns.delete(y.id)};this.fetchCancelFns.set(y.id,O=>{v.next({kind:"E",error:O,source:"network"})});const v=new Ee;let b,S;if(this.getDocumentInfo(m.query).hasClientExports)b=se(this.localState.getExportedVariables({client:this.client,document:m.query,variables:m.variables,context:m.context})).pipe(ue(O=>p(O).observable)),S=!0;else{const O=p(m.variables);S=O.fromLink,b=O.observable}return{observable:new _(O=>{O.add(g),b.subscribe(O),v.subscribe(O)}).pipe(Pe()),fromLink:S}}refetchQueries({updateCache:e,include:t,optimistic:n=!1,removeOptimistic:i=n?zn("refetchQueries"):void 0,onQueryUpdated:s}){const a=new Map;t&&this.getObservableQueries(t).forEach(c=>{if(c.options.fetchPolicy==="cache-only"||c.variablesUnknown)return;const u=c.getCurrentResult();a.set(c,{oq:c,lastDiff:{result:u?.data,complete:!u?.partial}})});const o=new Map;if(e){const c=new Set;this.cache.batch({update:e,optimistic:n&&i||!1,removeOptimistic:i,onWatchUpdated(u,l,d){const h=u.watcher;if(h instanceof Rt&&!c.has(h)){if(c.add(h),s){a.delete(h);let f=s(h,l,d);return f===!0&&(f=h.refetch().retain()),f!==!1&&o.set(h,f),f}s!==null&&h.options.fetchPolicy!=="cache-only"&&a.set(h,{oq:h,lastDiff:d,diff:l})}}})}return a.size&&a.forEach(({oq:c,lastDiff:u,diff:l})=>{let d;s&&(l||(l=c.getCacheDiff()),d=s(c,l,u)),(!s||d===!0)&&(d=c.refetch().retain()),d!==!1&&o.set(c,d)}),i&&this.cache.removeOptimistic(i),o}noCacheWarningsByCause=new WeakSet;maskOperation(e){const{document:t,data:n}=e;return this.dataMasking?io(n,t,this.cache):n}maskFragment(e){const{data:t,fragment:n,fragmentName:i}=e;return this.dataMasking?no(t,n,this.cache,i):t}fetchQueryByPolicy({query:e,variables:t,fetchPolicy:n,errorPolicy:i,returnPartialData:s,context:a},{cacheWriteBehavior:o,onCacheHit:c,queryInfo:u,observableQuery:l,expose
40Extensions:d}){const h=()=>this.cache.diff({query:e,variables:t,returnPartialData:!0,optimistic:!0}),f=(y,p)=>{const g=y.result,v=S=>(!y.complete&&!s&&(S=void 0),{data:S,dataState:y.complete?"complete":S?"partial":"empty",loading:Ze(p),networkStatus:p,partial:!y.complete}),b=S=>ie({kind:"N",value:v(S),source:"cache"});return(y.complete||s)&&this.getDocumentInfo(e).hasForcedResolvers?(c(),se(this.localState.execute({client:this.client,document:e,remoteResult:g?{data:g}:void 0,context:a,variables:t,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:n}).then(S=>({kind:"N",value:v(S.data||void 0),source:"cache"})))):i==="none"&&p===k.refetch&&y.missing?b(void 0):b(g||void 0)},m=()=>this.getResultsFromLink({query:e,variables:t,context:a,fetchPolicy:n,errorPolicy:i},{cacheWriteBehavior:o,queryInfo:u,observableQuery:l,exposeExtensions:d}).pipe(dn(),Qs(),Z(y=>({...y,source:"network"})));switch(n){default:case"cache-first":{const y=h();return y.complete?{fromLink:!1,observable:f(y,k.ready)}:s?{fromLink:!0,observable:Ot(f(y,k.loading),m())}:{fromLink:!0,observable:m()}}case"cache-and-network":{const y=h();return y.complete||s?{fromLink:!0,observable:Ot(f(y,k.loading),m())}:{fromLink:!0,observable:m()}}case"cache-only":return{fromLink:!1,observable:Ot(f(h(),k.ready))};case"network-only":return{fromLink:!0,observable:m()};case"no-cache":return{fromLink:!0,observable:m()};case"standby":return{fromLink:!1,observable:Ae}}}}function dn(){let r=!1;return je({next(){r=!0},complete(){T(r,98)}})}function Oo(r){return B(r,{FragmentSpread:e=>{if(!e.directives?.some(t=>t.name.value==="unmask"))return{...e,directives:[...e.directives||[],{kind:C.DIRECTIVE,name:{kind:C.NAME,value:"nonreactive"}}
40]}}})}function Pt(r){if(r.extensions?.[te]==null)return r;const{extensions:{[te]:e,...t},...n}=r;return Object.keys(t).length>0&&(n.extensions=t),n}class Ko{link;cache;disableNetworkFetches;set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(e){const{cache:t,documentTransform:n,ssrMode:i=!1,ssrForceFetchDelay:s=0,queryDeduplication:a=!0,defaultOptions:o,defaultContext:c,assumeImmutableResults:u=t.assumeImmutableResults,localState:l,devtools:d,dataMasking:h,link:f,incrementalHandler:m=new La,experiments:y=[]}=e;this.link=f,this.cache=t,this.queryDeduplication=a,this.defaultOptions=o||{},this.devtoolsConfig={...d,enabled:d?.enabled??Qn},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=this.refetchObservableQueries.bind(this),this.version=rr,this.queryManager=new So({client:this,defaultOptions:this.defaultOptions,defaultContext:c,documentTransform:n,queryDeduplication:a,ssrMode:i,dataMasking:!!h,clientOptions:e,incrementalHandler:m,assumeImmutableResults:u,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:l}),this.prioritizeCacheValues=i||s>0,s&&setTimeout(()=>{this.prioritizeCacheValues=!1},s),this.devtoolsConfig.enabled&&this.connectToDevTools(),y.forEach(p=>p.call(this,e))}connectToDevTools(){if(typeof window>"u")return;const e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop()}watchQuery(e){return this.defaultOptions.watchQuery&&(e=Ke(this.defaultOptions.watchQuery,e)),this.queryManager.watchQuery(e)}query(e){return this.defaultOptions.query&&(e=Ke(this.defaultOptions.query,e)),this.queryManager.query(e)}mutate(e){const t=Ke(j({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return ee(t.mutation,ae.MUTATION),this.queryManager.mutate(t)}subscribe(e){const t={},n=this.queryManager.startGraphQLSubscription(e),i=n.pipe(Z(s=>({...s,data:this.queryManager.maskOperation({document:e.query,data:s.data,fetchPolicy:e.fetchPolicy,cause:t})})));return Object.assign(i,{restart:n.restart})}readQuery(e,t=!1){return this.cache.readQuery({...e,query:this.transform(e.query)},t)}watchFragment(e){const t=this.queryManager.dataMasking;return this.cache.watchFragment({...e,fragment:this.transform(e.fragment,t)})}readFragment(e,t=!1){return this.cache.readFragment({...e,fragment:this.transform(e.fragment)},t)}writeQuery(e){const t=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t}writeFragment(e){const t=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return Ut(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(t=>t!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(t=>t!==e)}}reFetchObservableQueries;refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){const t=this.queryManager.refetchQueries(e),n=[],i=[];t.forEach((a,o)=>{n.push(o),i.push(a)});const s=Promise.all(i);return s.queries=n,s.results=i,s.catch(a=>{}),s}getObservableQueries(e="active"){return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new H(ga);transform(e,t=!1){const n=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(n):n}}const{hasOwnProperty:pn}=Object.prototype;function ko(r){return A(r)&&"payload"in r}async function*Eo(r){const e=new TextDecoder("utf-8"),n=r.headers?.get("content-type")?.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),i=`\r
41--`+(n?n[1]??n[2]??n[3]??"-":"-");let s="";T(r.body&&typeof r.body.getReader=="function",62);const o=r.body.getReader();let c=!1,u=!1,l;const d=()=>u&&s[0]=="-"&&s[1]=="-";try{for(;!c;){({value:l,done:c}=await o.read());const h=typeof l=="string"?l:e.decode(l),f=s.length-i.length+1;s+=h;let m=s.indexOf(i,f);for(;m>-1&&!d();){u=!0;let y;[y,s]=[s.slice(0,m),s.slice(m+i.length)];const p=y.indexOf(`\r
42\r
43`),v=Co(y.slice(0,p))["content-type"];if(v&&v.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");const b=y.slice(p);b&&(yield b),m=s.indexOf(i)}if(d())return}throw new Error("premature end of multipart body")}finally{o.cancel()}}async function To(r,e){for await(const t of Eo(r)){const n=Ii(r,t);if(Object.keys(n).length!=0)if(ko(n)){if(Object.keys(n).length===1&&n.payload===null)return;let i={...n.payload};
43"errors"in n&&(i.extensions={...i.extensions,[st]:new Le(n.errors??[])}),e(i)}else e(n)}}function Co(r){const e={};return r.split(`
44`).forEach(t=>{const n=t.indexOf(":");if(n>-1){const i=t.slice(0,n).trim().toLowerCase(),s=t.slice(n+1).trim();e[i]=s}}),e}function Ii(r,e){if(r.status>=300)throw new yt(`Response not successful: Received status code ${r.status}`,{response:r,bodyText:e});try{return JSON.parse(e)}catch(t){throw new mt(t,{response:r,bodyText:e})}}function Io(r,e){try{return JSON.parse(e)}catch(t){throw new mt(t,{response:r,bodyText:e})}}function Fo(r,e){return r.headers.get("content-type")?.includes("application/graphql-response+json")?Io(r,e):Ii(r,e)}function _o(r){return e=>e.text().then(t=>{const n=Fo(e,t);if(!Array.isArray(n)&&!pn.call(n,"data")&&!pn.call(n,"errors"))throw new yt(`Server response was malformed for query '${Array.isArray(r)?r.map(i=>i.operationName):r.operationName}'.`,{response:e,bodyText:t});return n})}const Do={includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},No={accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},Ro={method:"POST"},xo={http:Do,headers:No,options:Ro},Mo=(r,e)=>e(r);function Ao(r,e,...t){let n={},i={};t.forEach(l=>{n={...n,...l.options,headers:{...n.headers,...l.headers}},l.credentials&&(n.credentials=l.credentials),n.headers.accept=(l.http?.accept||[]).concat(n.headers.accept).join(","),i={...i,...l.http}}),n.headers=Po(n.headers,i.preserveHeaderCase);const{operationName:s,extensions:a,variables:o,query:c}=r,u={operationName:s,variables:o};return i.includeExtensions&&Object.keys(a||{}).length&&(u.extensions=a),i.includeQuery&&(u.query=e(c,ye)),{options:n,body:u}}function Po(r,e){if(!e){const i={};return Object.keys(Object(r)).forEach(s=>{i[s.toLowerCase()]=r[s]}),i}const t={};Object.keys(Object(r)).forEach(i=>{t[i.toLowerCase()]={originalName:i,value:r[i]}});const n={};return Object.keys(t).forEach(i=>{n[t[i].originalName]=t[i].value}),n}const jo=(r,e)=>{const n=r.getContext().uri;return n||(typeof e=="function"?e(r):e||"/graphql")};function Vo(r,e){const t=[],n=(u,l)=>{t.push(`${u}=${encodeURIComponent(l)}`)};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){let u;try{u=JSON.stringify(e.variables)}catch(l){return{parseError:l}}n("variables",u)}if(e.extensions){let u;try{u=JSON.stringify(e.extensions)}catch(l){return{parseError:l}}n("extensions",u)}let i="",s=r;const a=r.indexOf("#");a!==-1&&(i=r.substr(a),s=r.substr(0,a));const o=s.indexOf("?")===-1?"?":"&";return{newURI:s+o+t.join("&")+i}}const qo=$(()=>fetch);function Lo(){}class Qo extends P{constructor(e={}){let{uri:t="/graphql",fetch:n,print:i=Mo,includeExtensions:s,preserveHeaderCase:a,useGETForQueries:o,includeUnusedVariables:c=!1,...u}=e;const l={http:j({includeExtensions:s,preserveHeaderCase:a}),options:u.fetchOptions,credentials:u.credentials,headers:u.headers};super(d=>{let h=jo(d,t);const f=d.getContext(),m={...f.http};Ua(d.query)&&(m.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...m.accept||[]]);const y={http:m,options:f.fetchOptions,credentials:f.credentials,headers:f.headers},{options:p,body:g}=Ao(d,i,xo,l,y);g.variables&&!c&&(g.variables=za(g.variables,d.query));let v=new AbortController,b=()=>{v=void 0};if(p.signal){const S=p.signal,O=()=>{v?.abort(S.reason)};S.addEventListener("abort",O,{once:!0}),b=()=>{v?.signal.removeEventListener("abort",b),v=void 0,S.removeEventListener("abort",O),b=Lo},v.signal.addEventListener("abort",b,{once:!0})}return p.signal=v.signal,o&&!Ba(d.query)&&(p.method="GET"),new _(S=>{if(p.method==="GET"){const{newURI:M,parseError:Ce}=Vo(h,g);if(Ce)throw Ce;h=M}else p.body=JSON.stringify(g);const O=n||$(()=>fetch)||qo,V=S.next.bind(S);return O(h,p).then(M=>{d.setContext({response:M});const Ce=M.headers?.get("content-type");return Ce!==null&&/^multipart\/mixed/i.test(Ce)?To(M,V):_o(d)(M).then(V)}).then(()=>{b(),S.complete()}).catch(M=>{b(),S.error(M)}),()=>{v&&v.abort()}})})}}class zo extends P{constructor(e={}){super((t,n)=>{const i=t.client,s=i.queryManager.clientOptions,a=t.getContext();{const{name:o,version:c,transport:u="headers"}=j({},s.clientAwareness,e.clientAwareness,a.clientAwareness);u==="headers"&&t.setContext(({headers:l})=>({headers:j({"apollographql-client-name":o,"apollographql-client-version":c},l)}))}{const{transport:o="extensions"}=j({},s.enhancedClientAwareness,e.enhancedClientAwareness);o==="extensions"&&(t.extensions=j({clientLibrary:{name:"@apollo/client",version:i.version}},t.extensions)),o==="headers"&&t.setContext(({headers:c})=>({headers:j({"apollographql-library-name":"@apollo/client","apollographql-library-version":i.version},c)}))}return n(t)})}}class Xo extends P{constructor(e={}){const{left:t,right:n,request:i}=P.from([new zo(e),new Qo(e)]);super(i),Object.assign(this,{left:t,right:n})}}export{P as A,X as C,Xo as H,Jo as I,k as N,_ as O,st as P,yt as S,yr as U,$o as a,Ke as b,Uo as c,Bo as d,F as e,Le as f,bo as g,mt as h,T as i,$i as j,fi as k,Ko as l,$ as m,Z as n,Pn as o,Rr as p,wo as t,Fa as v};

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.