@squidcloud/client 1.0.48 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,4 +9,4 @@
9
9
  ${e.query}
10
10
  `,variables:e.variables})).data}async mutate(e){return(await this.client.mutate({mutation:i.gql`
11
11
  ${e.query}
12
- `})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r,n){this.clientId=e,this.rpcManager=t,this.lockManager=r,this.querySubscriptionManager=n}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={clientId:this.clientId,mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t,r){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.ongoingNamedQueryExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),s=new i.Subject;this.ongoingNamedQueryExecutions[o]=s;const a={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientId:this.clientId,clientRequestId:o};return this.rpcManager.post("named-query/execute",a).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),s.error(r),s.complete()})),s.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u{constructor(e,t,r,n,o,s,a){this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=s,this.queryBuilderFactory=a,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,s.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e).pipe((0,a.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,s=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=s?this.documentReferenceFactory.create(s,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),s=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{s.where(e,"==",t)})),s}get(e,t){return new s(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class s extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,s=o.data;if(t.has(s))delete e[r],t.delete(s);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new a(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=s;class a{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=a},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientId=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new s.BehaviorSubject(!0),this.onOrphanDocuments=new s.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new s.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e)).query}setGotResponseFromServer(e){(0,i.truthy)(this.ongoingQueries.get(e)).gotResponseFromServer=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&r.subject.error(t)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotResponseFromServer||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let s=!1;for(const t of e.supportedQueries)s=s||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let a=e;for(;!a.allObservables;)a=(0,i.truthy)(null==a?void 0:a.supportingOngoingQuery);s&&t.add(a),e.subject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}processQuery(e,t,r,n,i){const u=this.createOngoingQueryGraph(e,t,r,n,i,!0);this.sendQueryToServer(u),u.allObservables=new s.ReplaySubject(1);const c=u.allObservables.pipe((0,s.switchMap)((e=>(0,s.combineLatest)(e).pipe((0,a.map)((e=>this.joinResults(e,n,u)))))),(0,a.filter)((()=>this.allOngoingQueriesGotServerResult(u))),(0,s.startWith)(void 0),(0,s.pairwise)(),(0,a.filter)((([e,t])=>!o.isEqual(e,t))),(0,a.map)((([e,t])=>t)),i?(0,s.tap)():(0,s.take)(1),(0,s.finalize)((()=>{var e;u.subject.complete(),this.completeAllSupportedQueries(u),null===(e=u.allObservables)||void 0===e||e.complete()})),(0,s.share)()),l=this.collectAllObservables(u);return u.allObservables.next(l),c}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestId(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r),this.ongoingQueries.delete(e)}async waitForAllQueriesToFinish(){return(0,s.firstValueFrom)(this.inflightQueriesCount.pipe((0,a.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientId,t);e.subject.pipe((0,s.finalize)((()=>{if(this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientId:this.clientId,clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestId(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,a,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:a,alias:t,query:e,subscribe:o,subject:new s.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotResponseFromServer:!1,isEmptyForJoin:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const s=i.leftAlias;if(s!==t&&e!==t)continue;const a=s===t?e:s;if(s===t){const e=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.subject.pipe((0,a.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),s=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;s.has(r)||(s.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const s=Object.keys(e[0]),a=n[t];if(!a||!s.includes(a.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[a.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[a.leftAlias])||void 0===o?void 0:o[a.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),a=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(a);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotResponseFromServer:!1,subject:new s.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServer(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(a.conditions.push(...r),this.sendQueryToServer(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotServerResult(e){return!!e.isEmptyForJoin||!!e.gotResponseFromServer&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotServerResult(e))))}completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),e.subject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.subject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServer(e){const t=e.query,r=e.clientRequestId,n={query:t,clientRequestId:r,subscribe:e.subscribe,clientId:this.clientId},o=(0,i.getQuerySubscriptionId)(this.clientId,r);this.queryMappingManager.addQuery(c,t,o).then(),this.ongoingQueries.set(r,e),this.safeToSendQueriesToServer.pipe((0,a.filter)(Boolean),(0,s.take)(1)).subscribe((()=>{e.subject.closed||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),this.rpcManager.post("query/query",n).catch((t=>{e.subject.error(t)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1)})))}))}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const s=this.getConditionStatePath(t,o),a=[...this.stateService.getStateInPath(s)||[]];if((0,i.insertSorted)(a,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(s,a)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),s=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o){this.rpcEndpoint=e,this.socketManager=t,this.headers=n,this.staticHeaders={},this.onGoingRpcsCounter=new s.BehaviorSubject(0),this.authIdTokenSet=new s.BehaviorSubject(!1),this.authIdTokenObservableSubject=new s.Subject,this.shouldWaitForAuth=!1,(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);o&&this.setStaticHeader("Authorization",`ApiKey ${o}`),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authIdTokenObservableSubject.pipe((0,s.switchMap)((e=>e)),(0,s.takeUntil)(r.isDestructedObservable)).subscribe((e=>{e?this.setStaticHeader("Authorization",`Bearer ${e}`):this.deleteStaticHeader("Authorization"),this.authIdTokenSet.next(!0)})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,s.firstValueFrom)(this.onGoingRpcsCounter.pipe((0,s.filter)((e=>0===e))))}setAuthIdToken(e){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1),this.authIdTokenObservableSubject.next(e&&"string"!=typeof e?(0,s.from)(e):(0,s.of)(e))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){await(0,s.firstValueFrom)(this.socketManager.observeConnectionReady().pipe((0,s.filter)(Boolean))),this.shouldWaitForAuth&&await(0,s.firstValueFrom)(this.authIdTokenSet.asObservable().pipe((0,s.filter)(Boolean)));let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders)),this.onGoingRpcsCounter.next(this.onGoingRpcsCounter.value+1);try{const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let s;try{s=await n.text()}catch(e){s="Cannot read body"}if(!n.ok)throw new a(n.status,n.statusText,n.headers,n.url,s);try{return JSON.parse(s)}catch(e){return s}}finally{this.onGoingRpcsCounter.next(this.onGoingRpcsCounter.value-1)}}};class a extends Error{constructor(e,t,r,n,i){super(`RPC error ${e} ${t} calling ${n}: ${i}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n,this.body=i}}t.RpcError=a},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),s=r(266);t.SocketManager=class{constructor(e,t,r=s.NOOP_FN,n,o={}){this.clientId=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{(0,n.truthy)(this.socket).emit("message",e)}))}connect(e){this.socket=(0,o.io)(this.socketIoEndpoint,{query:{clientId:this.clientId},reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("connect",(()=>{})),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("connect_error",(e=>{console.error("An error occurred while connecting to the socket with url: ",this.socketIoEndpoint,e)})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),s=r(4268),a=r(8862),u=r(1600),c=r(4967),l=r(7787),f=n.__importDefault(r(2256)),p=r(2417),d=r(5182),h=r(5621),y=r(7718),v=r(9194),m=r(9732),b=r(6891),g=r(4661),_=r(602),w=r(3474),O=r(4605);class S{constructor(e){this.destructManager=new l.DestructManager,this.setAuthIdToken=e=>{this.rpcManager.setAuthIdToken(e)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.distributedLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructed)return this.destructManager.destruct().finally((()=>{const e=Object.entries(S.squidInstancesMap).find((([,e])=>e===this));e&&delete S.squidInstancesMap[e[0]]}))},this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t=(0,i.getApplicationUrl)(e.region,e.appId),r=(0,i.getApplicationHttpHeaders)(e.region,e.appId);this.clientId=(0,i.generateId)(),this.socketManager=new w.SocketManager(this.clientId,t,e.messageNotificationWrapper,this.destructManager,r),this.rpcManager=new _.RpcManager(t,this.socketManager,this.destructManager,r,e.apiKey),this.documentStore=new d.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new O.DistributedLockManager(this.socketManager,this.clientId,this.destructManager),this.documentIdentityService=new f.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new p.DocumentReferenceFactory,this.querySubscriptionManager=new g.QuerySubscriptionManager(this.rpcManager,this.clientId,this.documentStore,this.destructManager,this.documentIdentityService);const n=new y.MutationSender(this.clientId,this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new b.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new m.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new u.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new c.DataManager(this.documentStore,n,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new a.BackendFunctionManager(this.clientId,this.rpcManager,this.socketManager),this.namedQueryManager=new v.NamedQueryManager(this.clientId,this.rpcManager,this.socketManager),this.apiManager=new s.ApiManager(this.clientId,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new h.GraphQLClientFactory(this.rpcManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=S.squidInstancesMap[t];return r||(r=new S(e),S.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(S.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructed,"The client was already destructed.")}}t.Squid=S,S.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return s(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return a(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function s(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const a=s(o,n);return a===o?e:u(e,r,a)}function a(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],s=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,a(f,l,s,n)):a(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),s=r(1496),a=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new a.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:s.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new a.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,s.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:s.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:s.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,a.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>T,__asyncGenerator:()=>E,__asyncValues:()=>j,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>k,__createBinding:()=>v,__decorate:()=>a,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>x,__makeTemplateObject:()=>P,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>b});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(f.get=a),(a=s(v.set))&&(f.set=a),(a=s(v.init))&&i.push(a)}else(a=s(v))&&("field"===u?i.push(a):f[c]=a)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return I(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function N(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),p=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(d+"\\."+d+"\\."+d+"\\."+d),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),w=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),O=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),T=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),j=r([m,b,g,_,w,O,S,E,T].join("|")),P=r(r(l+"|"+s)+"+"),I=(r(j+"\\%25"+P),r(j+r("\\%25|\\%(?!"+o+"{2})")+P)),x=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),A=r("\\["+r(I+"|"+j+"|"+x)+"\\]"),N=r(r(s+"|"+t(l,a))+"*"),k=r(A+"|"+h+"(?!"+N+")|"+N),M=r(i+"*"),D=r(r(p+"@")+"?"+k+r("\\:"+M)+"?"),R=r(s+"|"+t(l,a,"[\\:\\@]")),C=r(R+"*"),$=r(R+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r($+q)+"?"),B=r(F+q),U=r($+q),V="(?!"+R+")",z=(r(q+"|"+L+"|"+B+"|"+U+"|"+V),r(r(R+"|"+t("[\\/\\?]",c))+"*")),Q=r(r(R+"|[\\/\\?]")+"*"),Y=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+V),W=r(f+"\\:"+Y+r("\\?"+z)+"?"+r("\\#"+Q)+"?"),H=r(r("\\/\\/"+D+q)+"|"+L+"|"+B+"|"+V),K=r(H+r("\\?"+z)+"?"+r("\\#"+Q)+"?");return r(W+"|"+K),r(f+"\\:"+Y+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+B+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r("("+p+")@"),r("\\:("+M+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+j+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var s=o(!1),a=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,p=/[^\0-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},O=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=a>0?a+1:0;f<n;){for(var p=i,d=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/d))&&m("overflow"),i+=v*d;var b=h<=s?1:h>=s+26?26:h-s;if(v<b)break;var g=l-b;d>y(c/g)&&m("overflow"),d*=g}var _=r.length+1;s=w(i-p,_,0==p),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,s=!0,a=!1,u=void 0;try{for(var f,p=e[Symbol.iterator]();!(s=(f=p.next()).done);s=!0){var d=f.value;d<128&&t.push(v(d))}}catch(e){a=!0,u=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var O=c,S=!0,E=!1,T=void 0;try{for(var j,P=e[Symbol.iterator]();!(S=(j=P.next()).done);S=!0){var I=j.value;I>=n&&I<O&&(O=I)}}catch(e){E=!0,T=e}finally{try{!S&&P.return&&P.return()}finally{if(E)throw T}}var x=b+1;O-n>y((c-i)/x)&&m("overflow"),i+=(O-n)*x,n=O;var A=!0,N=!1,k=void 0;try{for(var M,D=e[Symbol.iterator]();!(A=(M=D.next()).done);A=!0){var R=M.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,$=l;;$+=l){var F=$<=o?1:$>=o+26?26:$-o;if(C<F)break;var q=C-F,L=l-F;t.push(v(_(F+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=w(i,x,b==h),i=0,++b}}}catch(e){N=!0,k=e}finally{try{!A&&D.return&&D.return()}finally{if(N)throw k}}++i,++n}return t.join("")},E=function(e){return b(e,(function(e){return p.test(e)?"xn--"+S(e):e}))},T=function(e){return b(e,(function(e){return f.test(e)?O(e.slice(4).toLowerCase()):e}))},j={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function I(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function x(e,t){function r(e){var r=I(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,i)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function N(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(A).join("."):e}function k(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=u(s,2),c=a[0],l=a[1],f=l?l.split(":").map(A):[],p=c.split(":").map(A),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,y=p.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||p[y+m]||"";d&&(v[h-1]=N(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),w=v.slice(b.index+b.length);g=_.join(":")+"::"+w.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){D?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=k(N(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=j[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)x(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E(r.host.replace(n.PCT_ENCODED,I).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function C(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(k(N(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var $=/^\.\.?\//,F=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function B(e){for(var t=[];e.length;)if(e.match($))e=e.replace($,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(q))e=e.replace(q,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(L);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=j[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?T(e.host):E(e.host.replace(r.PCT_ENCODED,I).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}x(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=C(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=B(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=R(U(e,r),r),t=R(U(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=B(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=B(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function z(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,I)}var Q={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Y={scheme:"https",domainHost:Q.domainHost,parse:Q.parse,serialize:Q.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=W(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(W(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=r(r("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+r("%"+Z+Z)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(X,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=I(e);return t.match(te)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,u=s.length;a<u;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)n.push(l[f]);break;case"subject":r.subject=z(c[1],t);break;case"body":r.body=z(c[1],t);break;default:i=!0,o[z(c[0],t)]=z(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,h=n.length;d<h;++d){var y=n[d].split("@");if(y[0]=z(y[0]),t.unicodeSupport)y[1]=z(y[1],t).toLowerCase();else try{y[1]=E(z(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var s=0,a=o.length;s<a;++s){var u=String(o[s]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(re,se).replace(re,i).replace(ne,P),f=u.slice(c+1);try{f=t.iri?T(f):E(z(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[s]=l+"@"+f}n.path=o.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==G[h]&&d.push(h.replace(re,se).replace(re,i).replace(ie,P)+"="+p[h].replace(re,se).replace(re,i).replace(oe,P));return d.length&&(n.query=d.join("&")),n}},ue=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ue),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),u=j[a];n.nid=o,n.nss=s,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=j[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,fe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};j[Q.scheme]=Q,j[Y.scheme]=Y,j[H.scheme]=H,j[K.scheme]=K,j[ae.scheme]=ae,j[ce.scheme]=ce,j[fe.scheme]=fe,e.SCHEMES=j,e.pctEncChar=P,e.pctDecChars=I,e.parse=R,e.removeDotSegments=B,e.serialize=U,e.resolveComponents=V,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return U(V(R(e,n),R(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(R(e,t),t):"object"===n(e)&&(e=R(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(R(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(R(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,P)},e.unescapeComponent=z,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>xn,ApolloClient:()=>In,ApolloError:()=>mr,ApolloLink:()=>be,Cache:()=>jn,HttpLink:()=>wt,InMemoryCache:()=>Ii,MissingFieldError:()=>An,NetworkStatus:()=>vr,Observable:()=>Q,ObservableQuery:()=>Tr,checkFetcher:()=>He,concat:()=>ki,createHttpLink:()=>_t,createSignalIfSupported:()=>vt,defaultDataIdFromObject:()=>Dn,defaultPrinter:()=>pt,disableExperimentalFragmentVariables:()=>To,disableFragmentWarnings:()=>So,empty:()=>xi,enableExperimentalFragmentVariables:()=>Eo,execute:()=>ge,fallbackHttpConfig:()=>ft,from:()=>Ai,fromError:()=>bt,fromPromise:()=>Di,gql:()=>wo,isApolloError:()=>yr,isReference:()=>J,makeReference:()=>G,makeVar:()=>yn,mergeOptions:()=>Tn,parseAndCheckHttpResponse:()=>We,resetCaches:()=>Oo,rewriteURIForGET:()=>mt,selectHttpOptionsAndBody:()=>dt,selectHttpOptionsAndBodyInternal:()=>ht,selectURI:()=>Re,serializeFetchParameter:()=>De,setLogVerbosity:()=>p,split:()=>Ni,throwServerError:()=>Ue,toPromise:()=>Mi});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,a=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,s(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new a(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l){var t=console[e]||console.log;return t.apply(console,arguments)}}}function p(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function d(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=d((function(){return globalThis}))||d((function(){return window}))||d((function(){return self}))||d((function(){return global}))||d((function(){return d.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==d((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){if(!Boolean(e))throw new Error(t)}function O(e){return S(e,[])}function S(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:S(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(S(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+S(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);class E{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||w(!1,`Body must be a string. Received: ${O(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||w(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||w(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var I=function(){return"function"==typeof Symbol},x=function(e){return I()&&Boolean(Symbol[e])},A=function(e){return x(e)?Symbol[e]:"@@"+e};I()&&!x("observable")&&(Symbol.observable=Symbol("observable"));var N=A("iterator"),k=A("observable"),M=A("species");function D(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function R(e){var t=e.constructor;return void 0!==t&&null===(t=t[M])&&(t=void 0),void 0!==t?t:Q}function C(e){return e instanceof Q}function $(e){$.log?$.log(e):setTimeout((function(){throw e}))}function F(e){Promise.resolve().then((function(){try{e()}catch(e){$(e)}}))}function q(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=D(t,"unsubscribe");r&&r.call(t)}}catch(e){$(e)}}function L(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function B(e,t,r){e._state="running";var n=e._observer;try{var i=D(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(L(e),!i)throw r;i.call(n,r);break;case"complete":L(e),i&&i.call(n)}}catch(e){$(e)}"closed"===e._state?q(e):"running"===e._state&&(e._state="ready")}function U(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void F((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(B(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void B(e,t,r);e._queue.push({type:t,value:r})}}var V=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new z(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(L(this),q(this))},P(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),z=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){U(this._subscription,"next",e)},t.error=function(e){U(this._subscription,"error",e)},t.complete=function(){U(this._subscription,"complete")},P(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Q=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new V(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this),n=arguments.length>1,i=!1,o=arguments[1],s=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(s),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=R(this);return new i((function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[k]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=D(t,k);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return C(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(x("iterator")&&(n=D(t,N)))return new r((function(e){F((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){F((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i="function"==typeof this?this:e;return new i((function(e){F((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},P(e,null,[{key:M,get:function(){return this}}]),e}();function Y(e){return null!==e&&"object"==typeof e}function W(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new a("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new a(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function H(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function K(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function G(e){return{__ref:String(e)}}function J(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Z(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return Z(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return Z(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new a('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new a(55);e[t.value]=null}}I()&&Object.defineProperty(Q,Symbol("extensions"),{value:{symbol:k,hostReportError:$},configurable:!0});var X=["connection","include","skip","client","rest","export"],ee=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(te(i),")")}return r.connection.key}var o=e;if(t){var s=te(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach((function(e){-1===X.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(te(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=te;return te=e,t}}),te=function(e){return JSON.stringify(e,re)};function re(e,t){return Y(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function ne(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return Z(r,n,i,t)})),r}return null}function ie(e){return e.alias?e.alias.value:e.name.value}function oe(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(se(o)){if("__typename"===o.name.value)return e[ie(o)]}else{var s=oe(e,K(o,r).selectionSet,r);if("string"==typeof s)return s}}}function se(e){return"Field"===e.kind}function ae(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new a('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new a(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function ue(e){return ae(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function ce(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function le(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function fe(e){var t=ue(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function pe(e){var t;ae(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new a("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new a(54)}function de(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&Z(t,e.variable.name,e.defaultValue)})),t}function he(e,t){return t?t(e):Q.of()}function ye(e){return"function"==typeof e?new be(e):e}function ve(e){return e.request.length<=1}var me=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),be=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Q.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(ye).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=ye(r),o=ye(n||new e(he));return ve(i)&&ve(o)?new e((function(e){return t(e)?i.request(e)||Q.of():o.request(e)||Q.of()})):new e((function(e,r){return t(e)?i.request(e,r)||Q.of():o.request(e,r)||Q.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?ce(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new a("illegal argument: ".concat(i)):new a(27)}return e}(t))))||Q.of()},e.concat=function(t,r){var n=ye(t);if(ve(n))return __DEV__&&u.warn(new me("You are calling concat on a terminating link, which will have no effect",n)),n;var i=ye(r);return ve(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||Q.of()}))||Q.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||Q.of()}))||Q.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(he)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new a("request is not implemented"):new a(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),ge=be.execute;class _e{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class we{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Oe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Se=new Set(Object.keys(Oe));function Ee(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Se.has(t)}var Te,je,Pe;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Te||(Te={})),(Pe=je||(je={})).NAME="Name",Pe.DOCUMENT="Document",Pe.OPERATION_DEFINITION="OperationDefinition",Pe.VARIABLE_DEFINITION="VariableDefinition",Pe.SELECTION_SET="SelectionSet",Pe.FIELD="Field",Pe.ARGUMENT="Argument",Pe.FRAGMENT_SPREAD="FragmentSpread",Pe.INLINE_FRAGMENT="InlineFragment",Pe.FRAGMENT_DEFINITION="FragmentDefinition",Pe.VARIABLE="Variable",Pe.INT="IntValue",Pe.FLOAT="FloatValue",Pe.STRING="StringValue",Pe.BOOLEAN="BooleanValue",Pe.NULL="NullValue",Pe.ENUM="EnumValue",Pe.LIST="ListValue",Pe.OBJECT="ObjectValue",Pe.OBJECT_FIELD="ObjectField",Pe.DIRECTIVE="Directive",Pe.NAMED_TYPE="NamedType",Pe.LIST_TYPE="ListType",Pe.NON_NULL_TYPE="NonNullType",Pe.SCHEMA_DEFINITION="SchemaDefinition",Pe.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Pe.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Pe.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Pe.FIELD_DEFINITION="FieldDefinition",Pe.INPUT_VALUE_DEFINITION="InputValueDefinition",Pe.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Pe.UNION_TYPE_DEFINITION="UnionTypeDefinition",Pe.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Pe.ENUM_VALUE_DEFINITION="EnumValueDefinition",Pe.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Pe.DIRECTIVE_DEFINITION="DirectiveDefinition",Pe.SCHEMA_EXTENSION="SchemaExtension",Pe.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Pe.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Pe.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Pe.UNION_TYPE_EXTENSION="UnionTypeExtension",Pe.ENUM_TYPE_EXTENSION="EnumTypeExtension",Pe.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const Ie=Object.freeze({});function xe(e,t,r=Oe){const n=new Map;for(const e of Object.values(je))n.set(e,Ae(t,e));let i,o,s,a=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],d=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===d.length?void 0:p[p.length-1],f=s,s=d.pop(),m)if(a){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(s){if(o=a?c:u[c],f=s[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var h,y;Ee(f)||w(!1,`Invalid AST Node: ${O(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,s,p,d),b===Ie)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Ee(b)){p.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?p.pop():(i={inArray:a,index:c,keys:u,edits:l,prev:i},a=Array.isArray(f),u=a?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],s&&d.push(s),s=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Ae(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ne(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function ke(e,t,r){var n=new Set(e),i=n.size;return xe(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ie}}),r?!n.size:n.size<i}function Me(e){return e&&ke(["client","export"],e,!0)}var De=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new a("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new a(24);throw n.parseError=e,n}return r},Re=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Ce="function"==typeof WeakMap&&"ReactNative"!==d((function(){return navigator.product})),$e="function"==typeof WeakSet,Fe="function"==typeof Symbol&&"function"==typeof Symbol.for,qe=Fe&&Symbol.asyncIterator;function Le(e){var t={next:function(){return e.read()}};return qe&&(t[Symbol.asyncIterator]=function(){return this}),t}function Be(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,qe&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Le(o.getReader());if(function(e){return!!e.stream}(o))return Le(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},qe&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function s(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function a(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",a),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return qe&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}d((function(){return window.document.createElement})),d((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var Ue=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Ve=Object.prototype.hasOwnProperty;function ze(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function Qe(e,t){e.status>=300&&Ue(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function Ye(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function We(e){return function(t){return t.text().then((function(e){return Qe(t,e)})).then((function(r){return t.status>=300&&Ue(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Ve.call(r,"data")||Ve.call(r,"errors")||Ue(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var He=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new a("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new a(23)};function Ke(e){return 9===e||32===e}function Ge(e){return e>=48&&e<=57}function Je(e){return e>=97&&e<=122||e>=65&&e<=90}function Ze(e){return Je(e)||95===e}function Xe(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const s=e[t],a=et(s);a!==s.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function et(e){let t=0;for(;t<e.length&&Ke(e.charCodeAt(t));)++t;return t}const tt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function rt(e){return nt[e.charCodeAt(0)]}const nt=["\\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"];function it(e){return xe(e,ot)}const ot={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>st(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=ut("(",st(e.variableDefinitions,", "),")"),r=st([e.operation,st([e.name,t]),st(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+ut(" = ",r)+ut(" ",st(n," "))},SelectionSet:{leave:({selections:e})=>at(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=ut("",e,": ")+t;let s=o+ut("(",st(r,", "),")");return s.length>80&&(s=o+ut("(\n",ct(st(r,"\n")),"\n)")),st([s,st(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ut(" ",st(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>st(["...",ut("on ",e),st(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${ut("(",st(r,", "),")")} on ${t} ${ut("",st(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Ke(e.charCodeAt(0)))),s=r.endsWith('\\"""'),a=e.endsWith('"')&&!s,u=e.endsWith("\\"),c=a||u,l=!i||e.length>70||c||o||s;let f="";const p=i&&Ke(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(tt,rt)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+st(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+st(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ut("(",st(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>ut("",e,"\n")+st(["schema",st(t," "),at(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+st(["scalar",t,st(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+st(["type",t,ut("implements ",st(r," & ")),st(n," "),at(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>ut("",e,"\n")+t+(lt(r)?ut("(\n",ct(st(r,"\n")),"\n)"):ut("(",st(r,", "),")"))+": "+n+ut(" ",st(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>ut("",e,"\n")+st([t+": "+r,ut("= ",n),st(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+st(["interface",t,ut("implements ",st(r," & ")),st(n," "),at(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>ut("",e,"\n")+st(["union",t,st(r," "),ut("= ",st(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>ut("",e,"\n")+st(["enum",t,st(r," "),at(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+st([t,st(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>ut("",e,"\n")+st(["input",t,st(r," "),at(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>ut("",e,"\n")+"directive @"+t+(lt(r)?ut("(\n",ct(st(r,"\n")),"\n)"):ut("(",st(r,", "),")"))+(n?" repeatable":"")+" on "+st(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>st(["extend schema",st(e," "),at(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>st(["extend scalar",e,st(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>st(["extend type",e,ut("implements ",st(t," & ")),st(r," "),at(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>st(["extend interface",e,ut("implements ",st(t," & ")),st(r," "),at(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>st(["extend union",e,st(t," "),ut("= ",st(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>st(["extend enum",e,st(t," "),at(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>st(["extend input",e,st(t," "),at(r)]," ")}};function st(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function at(e){return ut("{\n",ct(st(e,"\n")),"\n}")}function ut(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ct(e){return ut(" ",e.replace(/\n/g,"\n "))}function lt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var ft={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},pt=function(e,t){return t(e)};function dt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),ht.apply(void 0,(0,n.__spreadArray)([e,pt],r,!1))}function ht(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},s={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.__assign)((0,n.__assign)({},s),e.http)})),o.headers&&(o.headers=yt(o.headers,s.preserveHeaderCase));var a=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:a,variables:c};return s.includeExtensions&&(f.extensions=u),s.includeQuery&&(f.query=t(l,it)),{options:o,body:f}}function yt(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}var vt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function mt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=De(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=De(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",a=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),a=e.substr(0,u));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+r.join("&")+s}}function bt(e){return new Q((function(t){t.error(e)}))}var gt=d((function(){return fetch})),_t=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,s=void 0===o?pt:o,a=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,p=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&He(i||gt);var h={http:{includeExtensions:a,preserveHeaderCase:u},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new be((function(e){var t=Re(e,r),o=e.getContext(),a={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,p=u.version;l&&(a["apollographql-client-name"]=l),p&&(a["apollographql-client-version"]=p)}var y,v=(0,n.__assign)((0,n.__assign)({},a),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=ht(e,s,ft,h,m),g=b.options,_=b.body;if(_.variables&&!f){var w=new Set(Object.keys(_.variables));xe(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,n.__assign)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var O=vt(),S=O.controller,E=O.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),ke(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var T=mt(t,_),j=T.newURI,P=T.parseError;if(P)return bt(P);t=j}else try{g.body=De(_,"Payload")}catch(P){return bt(P)}return new Q((function(r){return(i||d((function(){return fetch}))||gt)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var s,a,u,c,l,f,p,d,h,y,v,m,b,g,_,w,O,S,E,T;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),a=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==a?void 0:a.includes(u))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(u))+u.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Be(e),d=!0,n.label=1;case 1:return d?[4,p.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:s.decode(y),d=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,T=[f.slice(0,b),f.slice(b+l.length)],f=T[1],(g=T[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=ze(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=Qe(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){Ye(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){We(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return Ye(e,r)}))}(t,e,r)})).catch((function(e){return Ye(e,r)})),function(){y&&y.abort()}}))}))},wt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,_t(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(be),Ot=Object.prototype,St=Ot.toString,Et=Ot.hasOwnProperty,Tt=Function.prototype.toString,jt=new Map;function Pt(e,t){try{return It(e,t)}finally{jt.clear()}}function It(e,t){if(e===t)return!0;var r,n,i,o=St.call(e);if(o!==St.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(kt(e,t))return!0;var s=xt(e),a=xt(t),u=s.length;if(u!==a.length)return!1;for(var c=0;c<u;++c)if(!Et.call(t,s[c]))return!1;for(c=0;c<u;++c){var l=s[c];if(!It(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(kt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!It(v,t.get(y)))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]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Tt.call(e);return b===Tt.call(t)&&(n=Nt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function xt(e){return Object.keys(e).filter(At,e)}function At(e){return void 0!==this[e]}var Nt="{ [native code] }";function kt(e,t){var r=jt.get(e);if(r){if(r.has(t))return!0}else jt.set(e,r=new Set);return r.add(t),!1}var Mt=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var Rt=Object.prototype.hasOwnProperty;function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $t(e)}function $t(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new qt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var Ft=function(e,t,r){return this.merge(e[r],t[r])},qt=function(){function e(e){void 0===e&&(e=Ft),this.reconciler=e,this.isObject=Y,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Y(t)&&Y(e)?(Object.keys(t).forEach((function(o){if(Rt.call(e,o)){var s=e[o];if(t[o]!==s){var a=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));a!==s&&((e=r.shallowCopyForMerge(e))[o]=a)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Y(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Lt(e){return"incremental"in e}function Bt(e,t){var r=e,n=new qt;return Lt(t)&&Dt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)})),r}var Ut,Vt,zt=function(){return Object.create(null)},Qt=Array.prototype,Yt=Qt.forEach,Wt=Qt.slice,Ht=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=zt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Yt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Wt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Kt=function(){function e(){this.known=new($e?WeakSet:Set),this.pool=new Ht(Ce),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Y(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Y(e)){var t=function(e){return Y(e)?Mt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Y(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(a=this.pool.lookupArray(n)).array||(this.known.add(a.array=n),__DEV__&&Object.freeze(n)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],s=this.sortedKeys(e);o.push(s.json);var a,u=o.length;if(s.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(a=this.pool.lookupArray(o)).object){var c=a.object=Object.create(i);this.known.add(c),s.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Gt=Object.assign((function(e){if(Y(e)){void 0===Ut&&Jt();var t=Ut.admit(e),r=Vt.get(t);return void 0===r&&Vt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Jt});function Jt(){Ut=new Kt,Vt=new(Ce?WeakMap:Map)}function Zt(e,t,r){return new Q((function(n){var i=n.next,o=n.error,s=n.complete,a=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++a;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--a,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--a,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,a||s&&s.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function Xt(e){return Dt(er(e))}function er(e){var t=Dt(e.errors)?e.errors.slice(0):[];return Lt(e)&&Dt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var tr={kind:je.FIELD,name:{kind:je.NAME,value:"__typename"}};function rr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===je.FRAGMENT_SPREAD&&rr(t[e.name.value],t)}))}function nr(e){return rr(ue(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),H(le(e)))?null:e}function ir(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function or(e,t){for(var r=ir(""),i=ir(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Mt(n)){if(n.kind===je.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===je.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},s=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===je.OPERATION_DEFINITION&&++s;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},p=new Map,d=!1,h={enter:function(e){if(f(e.directives))return d=!0,null}},y=xe(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var s=o(i);s&&s.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return d=!0,null;var s=o(i);s&&s.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:s>0&&e.selectionSet.selections.every((function(e){return e.kind===je.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return d=!0,null}}});if(!d)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===je.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==je.FRAGMENT_DEFINITION||0!==s||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return nr(xe(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var sr=Object.assign((function(e){return xe(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==je.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return se(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(se(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[tr],!1)})}}}}})}),{added:function(e){return e===tr}}),ar={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function ur(e){return"query"===pe(e).operation?e:xe(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var cr=new Map;function lr(e){var t=cr.get(e)||1;return cr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function fr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function pr(e){function t(t){Object.defineProperty(e,t,{value:Q})}return Fe&&Symbol.species&&t(Symbol.species),t("@@species"),e}function dr(e){return e&&"function"==typeof e.then}var hr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),fr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),fr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?dr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),fr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new Q(t)]),dr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(Q);function yr(e){return e.hasOwnProperty("graphQLErrors")}pr(hr);var vr,mr=function(e){function t(r){var n,i,o=r.graphQLErrors,s=r.clientErrors,a=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=s||[],l.networkError=a||null,l.message=u||(i="",(Dt((n=l).graphQLErrors)||Dt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function br(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(vr||(vr={}));var gr=Object.prototype.toString;function _r(e){return wr(e)}function wr(e,t){switch(gr.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=wr(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=wr(e[r],t)})),n;default:return e}}function Or(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Sr=Object.assign,Er=Object.hasOwnProperty,Tr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,s=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Pr)}catch(e){}var r=!s.observers.size;s.observers.add(e);var n=s.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&s.reobserve().catch((function(){})),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}}))||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=i,s.queryManager=r,s.isTornDown=!1;var a=r.defaultOptions.watchQuery,u=(void 0===a?{}:a).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,p=o.initialFetchPolicy,d=void 0===p?"standby"===f?c:f:p;s.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:d,fetchPolicy:f}),s.queryId=i.queryId||r.generateQueryId();var h=ue(s.query);return s.queryName=h&&h.name&&h.name.value,s}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||vr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:br(r),networkStatus:r}),o=this.options.fetchPolicy,s=void 0===o?"cache-first":o;if("network-only"===s||"no-cache"===s||"standby"===s||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(i.data=a.result),Pt(i.data,{})&&(i.data=void 0),a.complete?(delete i.partial,!a.complete||i.networkStatus!==vr.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=vr.ready,i.loading=!1)):i.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||i.loading||i.data||i.error||Ir(a.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!Pt(this.last.result,e)||t&&!Pt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||Pt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Er.call(e,"variables")){var o=fe(this.query),s=o.variableDefinitions;s&&s.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!Pt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,vr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,s=o.networkStatus;o.networkStatus=vr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var a=new Set;return this.queryManager.fetchQuery(i,r,vr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===vr.fetchMore&&(o.networkStatus=s),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){a.add(e.query)}}),n})).finally((function(){a.has(t.query)||jr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Pt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},vr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(br(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},vr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:_r(e),variables:t}),Dt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===vr.refetch||t===vr.fetchMore||t===vr.poll,o=this.options.variables,s=this.options.fetchPolicy,a=Or(this.options,e||{}),u=i?a:Sr(this.options,a);i||(this.updatePolling(),e&&e.variables&&!Pt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=vr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),fr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:vr.error,loading:!1});this.updateLastResult(r,t),fr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Q);function jr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Pr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function Ir(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function xr(e){return e.kind===je.FIELD||e.kind===je.FRAGMENT_SPREAD||e.kind===je.INLINE_FRAGMENT}pr(Tr);var Ar=null,Nr={},kr=1;function Mr(e){try{return e()}catch(e){}}var Dr="@wry/context:Slot",Rr=Mr((function(){return globalThis}))||Mr((function(){return r.g}))||Object.create(null),Cr=Rr[Dr]||Array[Dr]||function(e){try{Object.defineProperty(Rr,Dr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",kr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Ar;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Nr)break;return e!==Ar&&(Ar.slots[this.id]=t),!0}return Ar&&(Ar.slots[this.id]=Nr),!1},e.prototype.getValue=function(){if(this.hasValue())return Ar.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),s=Ar;Ar={parent:s,slots:o};try{return t.apply(n,r)}finally{Ar=s}},e.bind=function(e){var t=Ar;return function(){var r=Ar;try{return Ar=t,e.apply(this,arguments)}finally{Ar=r}}},e.noContext=function(e,t,r){if(!Ar)return e.apply(r,t);var n=Ar;try{return Ar=null,e.apply(r,t)}finally{Ar=n}},e}());function $r(){}Cr.bind,Cr.noContext;var Fr,qr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=$r),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var 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)},e}(),Lr=new Cr,Br=Object.prototype.hasOwnProperty,Ur=void 0===(Fr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Fr;function Vr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var zr=[];function Qr(e,t){if(!e)throw new Error(t||"assertion failure")}function Yr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Wr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Gr(this))return Hr(this),this.value[0]},e.prototype.recompute=function(e){return Qr(!this.recomputing,"already recomputing"),Hr(this),Gr(this)?function(e,t){return nn(e),Lr.withValue(e,Kr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Vr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Gr(e)||Zr(e)}(e),Yr(e.value)}(this,e):Yr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Jr(this),Vr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),nn(this),Xr(this,(function(t,r){t.setDirty(),on(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=zr.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Ur(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),zr.push(this.deps),this.deps=null)},e.count=0,e}();function Hr(e){var t=Lr.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Gr(e)?en(t,e):tn(t,e),t}function Kr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Gr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Jr(e){Xr(e,en)}function Zr(e){Xr(e,tn)}function Xr(e,t){var r=e.parents.size;if(r)for(var n=Ur(e.parents),i=0;i<r;++i)t(n[i],e)}function en(e,t){Qr(e.childValues.has(t)),Qr(Gr(t));var r=!Gr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=zr.pop()||new Set;e.dirtyChildren.add(t),r&&Jr(e)}function tn(e,t){Qr(e.childValues.has(t)),Qr(!Gr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),rn(e,t),Gr(e)||Zr(e)}function rn(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(zr.length<100&&zr.push(r),e.dirtyChildren=null))}function nn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){on(e,r)})),e.forgetDeps(),Qr(null===e.dirtyChildren)}function on(e,t){t.parents.delete(e),e.childValues.delete(t),rn(e,t)}var sn={setDirty:!0,dispose:!0,forget:!0};function an(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Lr.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(Vr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Br.call(sn,r)?r:"setDirty";Ur(n).forEach((function(e){return e[i]()})),t.delete(e),Vr(n)}},n}function un(){var e=new Ht("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}un();var cn=new Set;function ln(e,t){void 0===t&&(t=Object.create(null));var r=new qr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||un(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var s=r.get(o);s||(r.set(o,s=new Wr(e)),s.subscribe=t.subscribe,s.forget=function(){return r.delete(o)});var a=s.recompute(Array.prototype.slice.call(arguments));return r.set(o,s),cn.add(r),Lr.hasValue()||(cn.forEach((function(e){return e.clean()})),cn.clear()),a};function s(e){var t=r.get(e);t&&t.setDirty()}function a(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=s,o.dirty=function(){s(i.apply(null,arguments))},o.peekKey=a,o.peek=function(){return a(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var fn=new Cr,pn=new WeakMap;function dn(e){var t=pn.get(e);return t||pn.set(e,t={vars:new Set,dep:an()}),t}function hn(e){dn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function yn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){dn(e).dep.dirty(n),vn(e)}));var s=Array.from(r);r.clear(),s.forEach((function(t){return t(e)}))}}else{var a=fn.getValue();a&&(i(a),dn(a).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),dn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function vn(e){e.broadcastWatches&&e.broadcastWatches()}var mn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Ct(t.resolvers,e)})):this.resolvers=Ct(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,a).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return ke(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return ae(e),or([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return xe(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Ie}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:ur(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===s&&(s=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var a,u,c,l,f,p,d,h,y,v;return(0,n.__generator)(this,(function(m){return a=pe(e),u=le(e),c=H(u),l=this.collectSelectionsToResolve(a,c),f=a.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(d=this).cache,y=d.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,c,l,f=this;return(0,n.__generator)(this,(function(p){return o=i.fragmentMap,s=i.context,a=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&Ne(e,a)?se(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[ie(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return $t(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,u,c,l,f,p,d,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,s=e.name.value,a=ie(e),u=s!==a,c=r[a]||r[s],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?s:a])&&(l=Promise.resolve(fn.withValue(this.cache,d,[r,ne(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var s=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||s,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||s,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),xe(i,{Directive:function(e,t,n,i,s){"client"===e.name.value&&s.forEach((function(e){r(e)&&xr(e)&&o.add(e)}))},FragmentSpread:function(n,i,s,a,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&xr(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),bn=new(Ce?WeakMap:Map);function gn(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return bn.set(e,(bn.get(e)+1)%1e15),r.apply(this,arguments)})}function _n(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var wn=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;bn.has(r)||(bn.set(r,0),gn(r,"evict"),gn(r,"modify"),gn(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||vr.loading;return this.variables&&this.networkStatus!==vr.loading&&!Pt(this.variables,e.variables)&&(t=vr.setVariables),Pt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){_n(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Pt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Pt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():jr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;_n(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(br(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Pt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===bn.get(this.cache)&&Pt(t,r.variables)&&Pt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new qt,s=Dt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Dt(e.incremental)){var a=Bt(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(On(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:bn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var s=i.getDiffOptions(r.variables),a=o.diff(s);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=vr.ready},e.prototype.markError=function(e){return this.networkStatus=vr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function On(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!Xt(e);return!n&&r&&e.data&&(n=!0),n}var Sn=Object.prototype.hasOwnProperty,En=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,s=e.onBroadcast,a=e.ssrMode,u=void 0!==a&&a,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ce?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new mn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new a("QueryManager stopped while query was in flight"):new a(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,s=e.optimisticResponse,a=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,p=void 0!==f&&f,d=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:a,update:d,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Zt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:s}),o,!1),(function(t){if(Xt(t)&&"none"===b)throw new mr({graphQLErrors:er(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&Xt(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:d,updateQueries:a,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:s?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),s&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof mr?t:new mr({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],s="no-cache"===e.fetchPolicy;if(!s&&On(i,e.errorPolicy)){if(Lt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Lt(i)&&Dt(i.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=Bt(a.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&Sn.call(c,a)){var u=c[a],l=r.queries.get(n),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&ce(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){s||o.forEach((function(e){return t.write(e)}));var a,u=e.update,c=!(Lt(a=i)||function(e){return"hasNext"in e&&"data"in e}(a))||Lt(i)&&!i.hasNext;if(u){if(!s){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}s||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=or([ar],ae(r)),o=this.localState.clientQuery(r),s=i&&this.localState.serverQuery(i),a={document:r,hasClientExports:Me(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:s,defaultVars:de(ue(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(o),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new wn(this),r=new Tr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new a("Store reset while query was in flight (not completed in link chain)"):new a(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=vr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):Y(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):Y(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,s=t.document;if(o){if("all"===e)return void r.set(n,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&i.has(a)||s&&i.has(s))&&(r.set(n,o),a&&i.set(a,!0),s&&i.set(s,!0))}})),o.size&&o.forEach((function(e){var i=lr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),s=new Tr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(s.queryId===i),o.setObservableQuery(s),r.set(i,s)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,s=e.context,a=void 0===s?{}:s;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,a,e).map((function(o){if("no-cache"!==n&&(On(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Xt(o))throw new mr({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,a).then(u);return new Q((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,s,a=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:ce(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=c.get(u)||new Map;c.set(u,p);var d=Gt(r);if(!(s=p.get(d))){var h=new hr([ge(l,f)]);p.set(d,s=h),h.beforeNext((function(){p.delete(d)&&p.size<1&&c.delete(u)}))}}else s=new hr([ge(l,f)])}else s=new hr([Q.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(s=Zt(s,(function(e){return a.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),s},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Zt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var s=er(o),a=s.length>0;if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new mr({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:vr.ready};return a&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=vr.error),u}),(function(t){var r=yr(t)?t:new mr({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=vr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),s=this.getQuery(e),a=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?a&&a.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?a&&a.errorPolicy||"none":l,p=t.returnPartialData,d=void 0!==p&&p,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:d,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(s,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new hr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?lr("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof wn&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(u){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=u(i,s,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),a&&this.cache.removeOptimistic(a),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,a=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(o).document,variables:s,networkStatus:r});var h=function(){return e.getDiff(s)},y=function(t,r){void 0===r&&(r=e.networkStatus||vr.loading);var a=t.result;!__DEV__||l||Pt(a,{})||Ir(t.missing);var u=function(e){return Q.of((0,n.__assign)({data:e,loading:br(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:a},context:f,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===vr.refetch&&Array.isArray(t.missing)?u(void 0):u(a)},v="no-cache"===a?0:r===vr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:s,context:f,fetchPolicy:a,errorPolicy:c})},b=p&&"number"==typeof d&&d!==r&&br(r);switch(a){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new wn(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Tn(e,t){return Or(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var jn,Pn=!1,In=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,s=e.ssrMode,c=void 0!==s&&s,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,d=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,S=e.version,E=e.link;if(E||(E=r?new wt({uri:r,credentials:n,headers:i}):be.empty()),!o)throw __DEV__?new a("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new a(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),d&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Pn&&d&&__DEV__&&(Pn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var T=window.navigator,j=T&&T.userAgent,P=void 0;"string"==typeof j&&(j.indexOf("Chrome/")>-1?P="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":j.indexOf("Firefox/")>-1&&(P="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),P&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+P)}this.version="3.7.9",this.localState=new mn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new En({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:O,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:d?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Tn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Tn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Tn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return ge(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();jn||(jn={});var xn=function(){function e(){this.getFragmentDoc=ln(W)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,s=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),An=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var u=a.path.length-1;u>=0;--u)a.missing=((s={})[a.path[u]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error);function Nn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){Y(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Y(e[t])&&r.add(e[t])}))}))),e;var t,r}var kn=Object.prototype.hasOwnProperty;function Mn(e){return null==e}function Dn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Mn(n)?Mn(i)?void 0:{_id:i}:{id:n}),Mn(n)&&!Mn(i)&&(n=i),!Mn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Rn={dataIdFromObject:Dn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Cn(e){var t=e.canonizeResults;return void 0===t?Rn.canonizeResults:t}var $n=/^[_a-z][_0-9a-z]*/i;function Fn(e){var t=e.match($n);return t?t[0]:e}function qn(e,t,r){return!!Y(t)&&(Mt(t)?t.every((function(t){return qn(e,t,r)})):e.selections.every((function(e){if(se(e)&&Ne(e,r)){var n=ie(e);return kn.call(t,n)&&(!e.selectionSet||qn(e.selectionSet,t[n],r))}return!0})))}function Ln(e){return Y(e)&&!J(e)&&!Mt(e)}function Bn(e,t){var r=H(le(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Un=Object.create(null),Vn=function(){return Un},zn=Object.create(null),Qn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Nn(J(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return J(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return G(e);if(J(e))return e;var n=r.policies.identify(e)[0];if(n){var i=G(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kn.call(this.data,e)){var r=this.data[e];if(r&&kn.call(r,t))return r[t]}return"__typename"===t&&kn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Kn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kn.call(this.data,e)?this.data[e]:this instanceof Kn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;J(e)&&(e=e.__ref),J(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var s=new qt(Jn).merge(i,o);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){var a=Object.create(null);i||(a.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==s[e]){a[e]=1;var t=Fn(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(a[t]=1),void 0!==s[e]||n instanceof Kn||delete s[e]}})),!a.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete a.__typename,Object.keys(a).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),s=!1,a=!0,u={DELETE:Un,INVALIDATE:zn,isReference:J,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||G(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=Fn(c),f=i[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var d=p===Vn?Un:p(Nn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===zn?r.group.dirty(e,c):(d===Un&&(d=void 0),d!==f&&(o[c]=d,s=!0,f=d))}void 0!==f&&(a=!1)}})),s)return this.merge(e,o),a&&(this instanceof Kn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=Vn,n):Vn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(kn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Kn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){kn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&kn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Kn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){kn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Kn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!kn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){J(e)&&(t[e.__ref]=!0),Y(e)&&Object.keys(e).forEach((function(t){var r=e[t];Y(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Yn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?an():null,this.keyMaker=new Ht(Ce)},e.prototype.depend=function(e,t){if(this.d){this.d(Wn(e,t));var r=Fn(t);r!==t&&this.d(Wn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Wn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Wn(e,t){return t+"#"+e}function Hn(e,t){Zn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,s=e.call(this,r,new Yn(i))||this;return s.stump=new Gn(s),s.storageTrie=new Ht(Ce),o&&s.replace(o),s}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Qn||(Qn={}));var Kn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){Pt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return kn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Qn),Gn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Yn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Kn);function Jn(e,t,r){var n=e[r],i=t[r];return Pt(n,i)?n:i}function Zn(e){return!!(e instanceof Qn&&e.group.caching)}function Xn(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ei=function(){function e(e){var t=this;this.knownResults=new(Ce?WeakMap:Map),this.config=Or(e,{addTypename:!1!==e.addTypename,canonizeResults:Cn(e)}),this.canon=e.canon||new Kt,this.executeSelectionSet=ln((function(e){var r,i=e.context.canonizeResults,o=Xn(e);o[3]=!i;var s=(r=t.executeSelectionSet).peek.apply(r,o);return s?i?(0,n.__assign)((0,n.__assign)({},s),{result:t.canon.admit(s.result)}):s:(Hn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Xn,makeCacheKey:function(e,t,r,n){if(Zn(r.store))return r.store.makeCacheKey(e,J(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=ln((function(e){return Hn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Zn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Kt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,s=e.variables,a=e.returnPartialData,u=void 0===a||a,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;s=(0,n.__assign)((0,n.__assign)({},de(fe(r))),s);var p,d=G(o),h=this.executeSelectionSet({selectionSet:pe(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,n.__assign)({store:t,query:r,policies:f,variables:s,varString:Gt(s),canonizeResults:l},Bn(r,this.config.fragments))});if(h.missing&&(p=[new An(ti(h.missing),h.missing,r,s)],!u))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(Zn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(J(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var s,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],p=new qt;function d(e,t){var r;return e.missing&&(s=p.merge(s,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(Ne(e,u))if(se(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=ie(e);void 0===v?sr.added(e)||(s=p.merge(s,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(J(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Mt(v)?v=d(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:J(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=K(e,o.lookupFragment);if(!b&&e.kind===je.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(e.name.value)):new a(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:$t(f),missing:s},v=o.canonizeResults?this.canon.admit(y):Nn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,s=e.context,a=new qt;function c(e,r){var n;return e.missing&&(t=a.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map((function(e,t){return null===e?null:Mt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:s}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:J(e)?e:o,context:s}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){Y(r)&&(__DEV__?u(!J(r),"Missing selection set for object of type ".concat(function(e,t){return J(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!J(r),6),Object.values(r).forEach(n.add,n))}))}}(s.store,n,e),e)})),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ti(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ri=Object.create(null);function ni(e){var t=JSON.stringify(e);return ri[t]||(ri[t]=Object.create(null))}function ii(e){var t=ni(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=si(e,(function(e){var i=ci(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&kn.call(t,e[0])&&(i=ci(t,e,ui)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function oi(e){var t=ni(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=si(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return ci(t,e)}else{var s=r.slice(1);if(i&&kn.call(i,s)){var a=e.slice(0);return a[0]=s,ci(i,a)}}else if(n&&Dt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&ne(c,i);return l&&ci(l,e.slice(1))}})),a=JSON.stringify(s);return(t||"{}"!==a)&&(o+=":"+a),o})}function si(e,t){var r=new qt;return ai(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function ai(e){var t=ni(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Mt(t)?(ai(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Mt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ui(e,t){return e[t]}function ci(e,t,r){return r=r||ui,li(t.reduce((function e(t,n){return Mt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function li(e){return Y(e)?Mt(e)?e.map(li):si(Object.keys(e).sort(),(function(t){return ci(e,t)})):e}function fi(e){return void 0!==e.args?e.args:e.field?ne(e.field,e.variables):null}ee.setStringify(Gt);var pi=function(){},di=function(e,t){return t.fieldName},hi=function(e,t,r){return(0,r.mergeObjects)(e,t)},yi=function(e,t){return t},vi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Dn},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)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s,a=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=bi(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Mt(f)){s=f;break}l=ii(f)}return s=s?String(s):void 0,u.keyObject?[s,u.keyObject]:[s]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,s=i.mutationType,a=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),s&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),kn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?hi:!1===t?yi:e.merge}s(n,t.merge),n.keyFn=!1===i?pi:Mt(i)?ii(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===a?di:Mt(a)?oi(a):"function"==typeof a?a:n.keyFn,"function"==typeof u&&(n.read=u),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||di)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match($n);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,s=(0,n.__rest)(i,["fields"]);Object.assign(r,s),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),a=[s],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&a.indexOf(t)<0&&a.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,p=0;p<a.length;++p){var d=a[p];if(d.has(o))return s.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),s.add(o)),!0;d.forEach(c),l&&p===a.length-1&&qn(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},a=fi(e);o;){var u=o(a,s);if(!Mt(u)){t=u||n;break}o=oi(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return Z(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return Z(n,r,i,t)}))),ee(e.name.value,n,r)}(e.field,e.variables):ee(n,fi(e))),!1===t?n:n===Fn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=Fn(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),u=a&&a.read;if(u){var c=mi(this,r,e,t,t.store.getStorage(J(r)?r.__ref:r,i));return fn.withValue(this.cache,u,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===hi?gi(n.store)(e,t):a===yi?t:(n.overwrite&&(e=void 0),a(e,t,mi(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function mi(e,t,r,n,i){var o=e.getStoreFieldName(r),s=Fn(o),a=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:fi(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:J,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(bi(arguments,t,a),n)},mergeObjects:gi(n.store)}}function bi(e,t,r){var i,o,s,a=e[0],c=e[1],l=e.length;return"string"==typeof a?i={fieldName:a,from:l>1?c:t}:(i=(0,n.__assign)({},a),kn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),s=lr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?s:t})).split(JSON.stringify(s)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function gi(e){return function(t,r){if(Mt(t)||Mt(r))throw __DEV__?new a("Cannot automatically merge arrays"):new a(4);if(Y(t)&&Y(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(J(t)&&Ln(r))return e.merge(t.__ref,r),t;if(Ln(t)&&J(r))return e.merge(t,r.__ref),r;if(Ln(t)&&Ln(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function _i(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var wi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,s=t.dataId,c=t.variables,l=t.overwrite,f=ue(i),p=new qt;c=(0,n.__assign)((0,n.__assign)({},de(f)),c);var d=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:Gt(c)},Bn(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:s,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!J(h))throw __DEV__?new a("Could not identify object ".concat(JSON.stringify(o))):new a(7);return d.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,a=G(n);if(o&&o.map.size){var c=r.applyMerges(o,a,i,d);if(J(c))return;i=c}if(__DEV__&&!d.overwrite){var l=Object.create(null);s.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[Fn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(s&&!J(o)&&!Pt(o,s)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(s,e)}))){var a=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=Fn(r),l="".concat(a,".").concat(c);if(!Pi.has(l)){Pi.add(l);var f=[];Mt(o)||Mt(s)||[o,s].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(a," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(s).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(a,i,e,d.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,s=e.context,a=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||oe(i,o,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=bi(arguments,l,s.variables);if(J(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return c.readField(e,s)},d=new Set;this.flattenFields(o,i,s,f).forEach((function(e,r){var n,o=ie(r),s=i[o];if(d.add(r),void 0!==s){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Si(a,h),v=t.processFieldValue(s,r,r.selectionSet?_i(e,!1,!1):e,y),m=void 0;r.selectionSet&&(J(v)||Ln(v))&&(m=p("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:ji(a,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||sr.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(ie(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:s.fragmentMap,storeObject:l,readField:p}),y=h[0],v=h[1];r=r||y,v&&(l=s.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=G(r),b=s.written[r]||(s.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,s))return m;var g=s.incomingById.get(r);return g?(g.storeObject=s.merge(g.storeObject,l),g.mergeTree=Ei(g.mergeTree,a),d.forEach((function(e){return g.fieldNodeSet.add(e)}))):s.incomingById.set(r,{storeObject:l,mergeTree:Ti(a)?void 0:a,fieldNodeSet:d}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Mt(e)?e.map((function(e,o){var s=i.processFieldValue(e,t,r,Si(n,o));return ji(n,o),s})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?_r(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=oe(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,s=new Ht(!1);return function e(u,c){var l=s.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(s){if(Ne(s,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Dt(s.directives)||s.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=ne(e,r.variables);n&&!1===n.if||(l=!0)}})),se(s)){var f=i.get(s);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(s,_i(r,u,l))}else{var p=K(s,r.lookupFragment);if(!p&&s.kind===je.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(s.name.value)):new a(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,_i(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var s,a=this;if(e.map.size&&!J(r)){var c,l=Mt(r)||!J(t)&&!Ln(t)?void 0:t,f=r;l&&!o&&(o=[J(l)?l.__ref:l]);var p=function(e,t){return Mt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=p(l,t),n=p(f,t);if(void 0!==n){o&&o.push(t);var s=a.applyMerges(e,r,n,i,o);s!==n&&(c=c||new Map).set(t,s),o&&u(o.pop()===t)}})),c&&(r=Mt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(s=i.store).getStorage.apply(s,o)):r},e}(),Oi=[];function Si(e,t){var r=e.map;return r.has(t)||r.set(t,Oi.pop()||{map:new Map}),r.get(t)}function Ei(e,t){if(e===t||!t||Ti(t))return e;if(!e||Ti(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var s=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ei(e,t.map.get(r))),s.delete(r)})),s.forEach((function(r){o.map.set(r,Ei(t.map.get(r),e.map.get(r)))}))}return o}function Ti(e){return!e||!(e.info||e.map.size)}function ji(e,t){var r=e.map,n=r.get(t);n&&Ti(n)&&(Oi.push(n),r.delete(t))}var Pi=new Set,Ii=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=yn,r.txCount=0,r.config=function(e){return Or(Rn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new vi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Qn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new wi(this,this.storeReader=new ei({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Cn(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=ln((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Zn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Gt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof An)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||dn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&hn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Gt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(J(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Gt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),hn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,s=void 0===o||o,a=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,s=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=s}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=sr(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&Pt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(xn),xi=be.empty,Ai=be.from,Ni=be.split,ki=be.concat;function Mi(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Di(e){return new Q((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ri(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const Ci=/\r\n|[\n\r]/g;function $i(e,t){let r=0,n=1;for(const i of e.body.matchAll(Ci)){if("number"==typeof i.index||Ri(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function Fi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?r:0,u=t.column+a,c=`${e.name}:${s}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+qi([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+qi([[s-1+" |",l[i-1]],[`${s} |`,f],["|","^".padStart(u)],[`${s+1} |`,l[i+1]]])}function qi(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Li extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:s,positions:a,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Bi(Array.isArray(o)?o:o?[o]:void 0);const f=Bi(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==f?void 0:f.map((e=>e.start)),this.locations=a&&s?a.map((e=>$i(s,e))):null==f?void 0:f.map((e=>$i(e.source,e.start)));const p="object"==typeof(d=null==c?void 0:c.extensions)&&null!==d?null==c?void 0:c.extensions:void 0;var d;this.extensions=null!==(i=null!=l?l:p)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Li):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+Fi((t=r.loc).source,$i(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Fi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Bi(e){return void 0===e||0===e.length?void 0:e}function Ui(e,t,r){return new Li(`Syntax Error: ${r}`,{source:e,positions:[t]})}var Vi,zi,Qi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Vi||(Vi={})),(Qi=zi||(zi={})).SOF="<SOF>",Qi.EOF="<EOF>",Qi.BANG="!",Qi.DOLLAR="$",Qi.AMP="&",Qi.PAREN_L="(",Qi.PAREN_R=")",Qi.SPREAD="...",Qi.COLON=":",Qi.EQUALS="=",Qi.AT="@",Qi.BRACKET_L="[",Qi.BRACKET_R="]",Qi.BRACE_L="{",Qi.PIPE="|",Qi.BRACE_R="}",Qi.NAME="Name",Qi.INT="Int",Qi.FLOAT="Float",Qi.STRING="String",Qi.BLOCK_STRING="BlockString",Qi.COMMENT="Comment";class Yi{constructor(e){const t=new we(zi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==zi.EOF)do{if(e.next)e=e.next;else{const t=Xi(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===zi.COMMENT);return e}}function Wi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Hi(e,t){return Ki(e.charCodeAt(t))&&Gi(e.charCodeAt(t+1))}function Ki(e){return e>=55296&&e<=56319}function Gi(e){return e>=56320&&e<=57343}function Ji(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return zi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Zi(e,t,r,n,i){const o=e.line,s=1+r-e.lineStart;return new we(t,r,n,o,s,i)}function Xi(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return eo(e,i);case 33:return Zi(e,zi.BANG,i,i+1);case 36:return Zi(e,zi.DOLLAR,i,i+1);case 38:return Zi(e,zi.AMP,i,i+1);case 40:return Zi(e,zi.PAREN_L,i,i+1);case 41:return Zi(e,zi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Zi(e,zi.SPREAD,i,i+3);break;case 58:return Zi(e,zi.COLON,i,i+1);case 61:return Zi(e,zi.EQUALS,i,i+1);case 64:return Zi(e,zi.AT,i,i+1);case 91:return Zi(e,zi.BRACKET_L,i,i+1);case 93:return Zi(e,zi.BRACKET_R,i,i+1);case 123:return Zi(e,zi.BRACE_L,i,i+1);case 124:return Zi(e,zi.PIPE,i,i+1);case 125:return Zi(e,zi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?co(e,i):no(e,i)}if(Ge(t)||45===t)return to(e,i,t);if(Ze(t))return lo(e,i);throw Ui(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Wi(t)||Hi(r,i)?`Unexpected character: ${Ji(e,i)}.`:`Invalid character: ${Ji(e,i)}.`)}return Zi(e,zi.EOF,n,n)}function eo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Wi(e))++i;else{if(!Hi(r,i))break;i+=2}}return Zi(e,zi.COMMENT,t,i,r.slice(t+1,i))}function to(e,t,r){const n=e.source.body;let i=t,o=r,s=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ge(o))throw Ui(e.source,i,`Invalid number, unexpected digit after 0: ${Ji(e,i)}.`)}else i=ro(e,i,o),o=n.charCodeAt(i);if(46===o&&(s=!0,o=n.charCodeAt(++i),i=ro(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(s=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=ro(e,i,o),o=n.charCodeAt(i)),46===o||Ze(o))throw Ui(e.source,i,`Invalid number, expected digit but got: ${Ji(e,i)}.`);return Zi(e,s?zi.FLOAT:zi.INT,t,i,n.slice(t,i))}function ro(e,t,r){if(!Ge(r))throw Ui(e.source,t,`Invalid number, expected digit but got: ${Ji(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ge(n.charCodeAt(i));)++i;return i}function no(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,s="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return s+=r.slice(o,i),Zi(e,zi.STRING,t,i+1,s);if(92!==n){if(10===n||13===n)break;if(Wi(n))++i;else{if(!Hi(r,i))throw Ui(e.source,i,`Invalid character within String: ${Ji(e,i)}.`);i+=2}}else{s+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?io(e,i):oo(e,i):uo(e,i);s+=t.value,i+=t.size,o=i}}throw Ui(e.source,i,"Unterminated string.")}function io(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Wi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|ao(e),n<0)break}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function oo(e,t){const r=e.source.body,n=so(r,t+2);if(Wi(n))return{value:String.fromCodePoint(n),size:6};if(Ki(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=so(r,t+8);if(Gi(e))return{value:String.fromCodePoint(n,e),size:12}}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function so(e,t){return ao(e.charCodeAt(t))<<12|ao(e.charCodeAt(t+1))<<8|ao(e.charCodeAt(t+2))<<4|ao(e.charCodeAt(t+3))}function ao(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function uo(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Ui(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function co(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,s=o,a="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){a+=r.slice(s,o),u.push(a);const n=Zi(e,zi.BLOCK_STRING,t,o+3,Xe(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Wi(n))++o;else{if(!Hi(r,o))throw Ui(e.source,o,`Invalid character within String: ${Ji(e,o)}.`);o+=2}else a+=r.slice(s,o),u.push(a),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,a="",s=o,i=o;else a+=r.slice(s,o),s=o+1,o+=4}throw Ui(e.source,o,"Unterminated string.")}function lo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Je(o=r.charCodeAt(i))||Ge(o)||95===o);)++i;var o;return Zi(e,zi.NAME,t,i,r.slice(t,i))}class fo{constructor(e,t={}){const r=function(e){return e instanceof E}(e)?e:new E(e);this._lexer=new Yi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(zi.NAME);return this.node(e,{kind:je.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:je.DOCUMENT,definitions:this.many(zi.SOF,this.parseDefinition,zi.EOF)})}parseDefinition(){if(this.peek(zi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===zi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ui(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(zi.BRACE_L))return this.node(e,{kind:je.OPERATION_DEFINITION,operation:Te.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(zi.NAME)&&(r=this.parseName()),this.node(e,{kind:je.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(zi.NAME);switch(e.value){case"query":return Te.QUERY;case"mutation":return Te.MUTATION;case"subscription":return Te.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(zi.PAREN_L,this.parseVariableDefinition,zi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:je.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(zi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(zi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(zi.DOLLAR),this.node(e,{kind:je.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:je.SELECTION_SET,selections:this.many(zi.BRACE_L,this.parseSelection,zi.BRACE_R)})}parseSelection(){return this.peek(zi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(zi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:je.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(zi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(zi.PAREN_L,t,zi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(zi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(zi.NAME)?this.node(e,{kind:je.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:je.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case zi.BRACKET_L:return this.parseList(e);case zi.BRACE_L:return this.parseObject(e);case zi.INT:return this.advanceLexer(),this.node(t,{kind:je.INT,value:t.value});case zi.FLOAT:return this.advanceLexer(),this.node(t,{kind:je.FLOAT,value:t.value});case zi.STRING:case zi.BLOCK_STRING:return this.parseStringLiteral();case zi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:je.BOOLEAN,value:!0});case"false":return this.node(t,{kind:je.BOOLEAN,value:!1});case"null":return this.node(t,{kind:je.NULL});default:return this.node(t,{kind:je.ENUM,value:t.value})}case zi.DOLLAR:if(e){if(this.expectToken(zi.DOLLAR),this._lexer.token.kind===zi.NAME){const e=this._lexer.token.value;throw Ui(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:je.STRING,value:e.value,block:e.kind===zi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:je.LIST,values:this.any(zi.BRACKET_L,(()=>this.parseValueLiteral(e)),zi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:je.OBJECT,fields:this.any(zi.BRACE_L,(()=>this.parseObjectField(e)),zi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(zi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(zi.AT),this.node(t,{kind:je.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(zi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(zi.BRACKET_R),t=this.node(e,{kind:je.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(zi.BANG)?this.node(e,{kind:je.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:je.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(zi.STRING)||this.peek(zi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);return this.node(e,{kind:je.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(zi.COLON);const r=this.parseNamedType();return this.node(e,{kind:je.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:je.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(zi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseFieldDefinition,zi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(zi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:je.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(zi.PAREN_L,this.parseInputValueDef,zi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(zi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(zi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:je.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:je.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(zi.EQUALS)?this.delimitedMany(zi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:je.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(zi.BRACE_L,this.parseEnumValueDefinition,zi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:je.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Ui(this._lexer.source,this._lexer.token.start,`${po(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseInputValueDef,zi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===zi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(zi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:je.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(zi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Vi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new _e(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ui(this._lexer.source,t.start,`Expected ${ho(e)}, found ${po(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==zi.NAME||t.value!==e)throw Ui(this._lexer.source,t.start,`Expected "${e}", found ${po(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===zi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Ui(this._lexer.source,t.start,`Unexpected ${po(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==zi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Ui(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function po(e){const t=e.value;return ho(e.kind)+(null!=t?` "${t}"`:"")}function ho(e){return function(e){return e===zi.BANG||e===zi.DOLLAR||e===zi.AMP||e===zi.PAREN_L||e===zi.PAREN_R||e===zi.SPREAD||e===zi.COLON||e===zi.EQUALS||e===zi.AT||e===zi.BRACKET_L||e===zi.BRACKET_R||e===zi.BRACE_L||e===zi.PIPE||e===zi.BRACE_R}(e)?`"${e}"`:e}var yo=new Map,vo=new Map,mo=!0,bo=!1;function go(e){return e.replace(/[\s,]+/g," ").trim()}function _o(e){var t,r,i,o=go(e);if(!yo.has(o)){var s=function(e,t){return new fo(e,t).parseDocument()}(e,{experimentalFragmentVariables:bo,allowLegacyFragmentVariables:bo});if(!s||"Document"!==s.kind)throw new Error("Not a valid GraphQL document.");yo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=s,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=go((s=e.loc).source.body.substring(s.start,s.end)),o=vo.get(t);o&&!o.has(n)?mo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||vo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var s})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return yo.get(o)}function wo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),_o(n)}function Oo(){yo.clear(),vo.clear()}function So(){mo=!1}function Eo(){bo=!0}function To(){bo=!1}var jo,Po=wo,Io=Oo,xo=So,Ao=Eo,No=To;(jo=wo||(wo={})).gql=Po,jo.resetCaches=Io,jo.disableFragmentWarnings=xo,jo.enableExperimentalFragmentVariables=Ao,jo.disableExperimentalFragmentVariables=No,wo.default=wo,p(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var s=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return s.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return s.QueryBuilder}});var a=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return a.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
12
+ `})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r,n){this.clientId=e,this.rpcManager=t,this.lockManager=r,this.querySubscriptionManager=n}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={clientId:this.clientId,mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t,r){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.ongoingNamedQueryExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),s=new i.Subject;this.ongoingNamedQueryExecutions[o]=s;const a={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientId:this.clientId,clientRequestId:o};return this.rpcManager.post("named-query/execute",a).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),s.error(r),s.complete()})),s.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u{constructor(e,t,r,n,o,s,a){this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=s,this.queryBuilderFactory=a,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,s.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e).pipe((0,a.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,s=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=s?this.documentReferenceFactory.create(s,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),s=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{s.where(e,"==",t)})),s}get(e,t){return new s(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class s extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,s=o.data;if(t.has(s))delete e[r],t.delete(s);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new a(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=s;class a{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=a},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientId=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new s.BehaviorSubject(!0),this.onOrphanDocuments=new s.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new s.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e)).query}setGotResponseFromServer(e){(0,i.truthy)(this.ongoingQueries.get(e)).gotResponseFromServer=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&r.subject.error(t)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotResponseFromServer||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let s=!1;for(const t of e.supportedQueries)s=s||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let a=e;for(;!a.allObservables;)a=(0,i.truthy)(null==a?void 0:a.supportingOngoingQuery);s&&t.add(a),e.subject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}processQuery(e,t,r,n,i){return(0,s.defer)((()=>{const u=this.createOngoingQueryGraph(e,t,r,n,i,!0);this.sendQueryToServer(u),u.allObservables=new s.ReplaySubject(1);const c=u.allObservables.pipe((0,s.switchMap)((e=>(0,s.combineLatest)(e).pipe((0,a.map)((e=>this.joinResults(e,n,u)))))),(0,a.filter)((()=>this.allOngoingQueriesGotServerResult(u))),(0,s.startWith)(void 0),(0,s.pairwise)(),(0,a.filter)((([e,t])=>!o.isEqual(e,t))),(0,a.map)((([e,t])=>t)),i?(0,s.tap)():(0,s.take)(1),(0,s.finalize)((()=>{var e;u.subject.complete(),this.completeAllSupportedQueries(u),null===(e=u.allObservables)||void 0===e||e.complete()}))),l=this.collectAllObservables(u);return u.allObservables.next(l),c})).pipe((0,s.share)())}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestId(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r),this.ongoingQueries.delete(e)}async waitForAllQueriesToFinish(){return(0,s.firstValueFrom)(this.inflightQueriesCount.pipe((0,a.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientId,t);e.subject.pipe((0,s.finalize)((()=>{if(this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientId:this.clientId,clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestId(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,a,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:a,alias:t,query:e,subscribe:o,subject:new s.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotResponseFromServer:!1,isEmptyForJoin:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const s=i.leftAlias;if(s!==t&&e!==t)continue;const a=s===t?e:s;if(s===t){const e=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.subject.pipe((0,a.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),s=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;s.has(r)||(s.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const s=Object.keys(e[0]),a=n[t];if(!a||!s.includes(a.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[a.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[a.leftAlias])||void 0===o?void 0:o[a.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),a=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(a);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotResponseFromServer:!1,subject:new s.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServer(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(a.conditions.push(...r),this.sendQueryToServer(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotServerResult(e){return!!e.isEmptyForJoin||!!e.gotResponseFromServer&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotServerResult(e))))}completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),e.subject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.subject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServer(e){const t=e.query,r=e.clientRequestId,n={query:t,clientRequestId:r,subscribe:e.subscribe,clientId:this.clientId},o=(0,i.getQuerySubscriptionId)(this.clientId,r);this.queryMappingManager.addQuery(c,t,o).then(),this.ongoingQueries.set(r,e),this.safeToSendQueriesToServer.pipe((0,a.filter)(Boolean),(0,s.take)(1)).subscribe((()=>{e.subject.closed||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),this.rpcManager.post("query/query",n).catch((t=>{e.subject.error(t)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1)})))}))}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const s=this.getConditionStatePath(t,o),a=[...this.stateService.getStateInPath(s)||[]];if((0,i.insertSorted)(a,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(s,a)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),s=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o){this.rpcEndpoint=e,this.socketManager=t,this.headers=n,this.staticHeaders={},this.onGoingRpcsCounter=new s.BehaviorSubject(0),this.authIdTokenSet=new s.BehaviorSubject(!1),this.authIdTokenObservableSubject=new s.Subject,this.shouldWaitForAuth=!1,(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);o&&this.setStaticHeader("Authorization",`ApiKey ${o}`),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authIdTokenObservableSubject.pipe((0,s.switchMap)((e=>e)),(0,s.takeUntil)(r.isDestructedObservable)).subscribe((e=>{e?this.setStaticHeader("Authorization",`Bearer ${e}`):this.deleteStaticHeader("Authorization"),this.authIdTokenSet.next(!0)})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,s.firstValueFrom)(this.onGoingRpcsCounter.pipe((0,s.filter)((e=>0===e))))}setAuthIdToken(e){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1),this.authIdTokenObservableSubject.next(e&&"string"!=typeof e?(0,s.from)(e):(0,s.of)(e))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){this.onGoingRpcsCounter.next(this.onGoingRpcsCounter.value+1);try{await(0,s.firstValueFrom)(this.socketManager.observeConnectionReady().pipe((0,s.filter)(Boolean))),this.shouldWaitForAuth&&await(0,s.firstValueFrom)(this.authIdTokenSet.asObservable().pipe((0,s.filter)(Boolean)));let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders));const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let u;try{u=await n.text()}catch(e){u="Cannot read body"}if(!n.ok)throw new a(n.status,n.statusText,n.headers,n.url,u);try{return JSON.parse(u)}catch(e){return u}}finally{this.onGoingRpcsCounter.next(this.onGoingRpcsCounter.value-1)}}};class a extends Error{constructor(e,t,r,n,i){super(`RPC error ${e} ${t} calling ${n}: ${i}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n,this.body=i}}t.RpcError=a},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),s=r(266);t.SocketManager=class{constructor(e,t,r=s.NOOP_FN,n,o={}){this.clientId=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{(0,n.truthy)(this.socket).emit("message",e)}))}connect(e){this.socket=(0,o.io)(this.socketIoEndpoint,{query:{clientId:this.clientId},reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("connect",(()=>{})),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("connect_error",(e=>{console.error("An error occurred while connecting to the socket with url: ",this.socketIoEndpoint,e)})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),s=r(4268),a=r(8862),u=r(1600),c=r(4967),l=r(7787),f=n.__importDefault(r(2256)),p=r(2417),d=r(5182),h=r(5621),y=r(7718),v=r(9194),m=r(9732),b=r(6891),g=r(4661),_=r(602),w=r(3474),O=r(4605);class S{constructor(e){this.destructManager=new l.DestructManager,this.setAuthIdToken=e=>{this.rpcManager.setAuthIdToken(e)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.distributedLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructed)return this.destructManager.destruct().finally((()=>{const e=Object.entries(S.squidInstancesMap).find((([,e])=>e===this));e&&delete S.squidInstancesMap[e[0]]}))},this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t=(0,i.getApplicationUrl)(e.region,e.appId),r=(0,i.getApplicationHttpHeaders)(e.region,e.appId);this.clientId=(0,i.generateId)(),this.socketManager=new w.SocketManager(this.clientId,t,e.messageNotificationWrapper,this.destructManager,r),this.rpcManager=new _.RpcManager(t,this.socketManager,this.destructManager,r,e.apiKey),this.documentStore=new d.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new O.DistributedLockManager(this.socketManager,this.clientId,this.destructManager),this.documentIdentityService=new f.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new p.DocumentReferenceFactory,this.querySubscriptionManager=new g.QuerySubscriptionManager(this.rpcManager,this.clientId,this.documentStore,this.destructManager,this.documentIdentityService);const n=new y.MutationSender(this.clientId,this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new b.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new m.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new u.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new c.DataManager(this.documentStore,n,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new a.BackendFunctionManager(this.clientId,this.rpcManager,this.socketManager),this.namedQueryManager=new v.NamedQueryManager(this.clientId,this.rpcManager,this.socketManager),this.apiManager=new s.ApiManager(this.clientId,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new h.GraphQLClientFactory(this.rpcManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=S.squidInstancesMap[t];return r||(r=new S(e),S.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(S.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructed,"The client was already destructed.")}}t.Squid=S,S.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return s(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return a(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function s(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const a=s(o,n);return a===o?e:u(e,r,a)}function a(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],s=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,a(f,l,s,n)):a(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),s=r(1496),a=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new a.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:s.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new a.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,s.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:s.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:s.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,a.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>T,__asyncGenerator:()=>E,__asyncValues:()=>j,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>k,__createBinding:()=>v,__decorate:()=>a,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>x,__makeTemplateObject:()=>P,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>b});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(f.get=a),(a=s(v.set))&&(f.set=a),(a=s(v.init))&&i.push(a)}else(a=s(v))&&("field"===u?i.push(a):f[c]=a)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return I(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function N(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),p=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(d+"\\."+d+"\\."+d+"\\."+d),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),w=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),O=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),T=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),j=r([m,b,g,_,w,O,S,E,T].join("|")),P=r(r(l+"|"+s)+"+"),I=(r(j+"\\%25"+P),r(j+r("\\%25|\\%(?!"+o+"{2})")+P)),x=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),A=r("\\["+r(I+"|"+j+"|"+x)+"\\]"),N=r(r(s+"|"+t(l,a))+"*"),k=r(A+"|"+h+"(?!"+N+")|"+N),M=r(i+"*"),D=r(r(p+"@")+"?"+k+r("\\:"+M)+"?"),R=r(s+"|"+t(l,a,"[\\:\\@]")),C=r(R+"*"),$=r(R+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r($+q)+"?"),B=r(F+q),U=r($+q),V="(?!"+R+")",z=(r(q+"|"+L+"|"+B+"|"+U+"|"+V),r(r(R+"|"+t("[\\/\\?]",c))+"*")),Q=r(r(R+"|[\\/\\?]")+"*"),Y=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+V),W=r(f+"\\:"+Y+r("\\?"+z)+"?"+r("\\#"+Q)+"?"),H=r(r("\\/\\/"+D+q)+"|"+L+"|"+B+"|"+V),K=r(H+r("\\?"+z)+"?"+r("\\#"+Q)+"?");return r(W+"|"+K),r(f+"\\:"+Y+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+B+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r("("+p+")@"),r("\\:("+M+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+j+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var s=o(!1),a=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,p=/[^\0-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},O=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=a>0?a+1:0;f<n;){for(var p=i,d=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/d))&&m("overflow"),i+=v*d;var b=h<=s?1:h>=s+26?26:h-s;if(v<b)break;var g=l-b;d>y(c/g)&&m("overflow"),d*=g}var _=r.length+1;s=w(i-p,_,0==p),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,s=!0,a=!1,u=void 0;try{for(var f,p=e[Symbol.iterator]();!(s=(f=p.next()).done);s=!0){var d=f.value;d<128&&t.push(v(d))}}catch(e){a=!0,u=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var O=c,S=!0,E=!1,T=void 0;try{for(var j,P=e[Symbol.iterator]();!(S=(j=P.next()).done);S=!0){var I=j.value;I>=n&&I<O&&(O=I)}}catch(e){E=!0,T=e}finally{try{!S&&P.return&&P.return()}finally{if(E)throw T}}var x=b+1;O-n>y((c-i)/x)&&m("overflow"),i+=(O-n)*x,n=O;var A=!0,N=!1,k=void 0;try{for(var M,D=e[Symbol.iterator]();!(A=(M=D.next()).done);A=!0){var R=M.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,$=l;;$+=l){var F=$<=o?1:$>=o+26?26:$-o;if(C<F)break;var q=C-F,L=l-F;t.push(v(_(F+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=w(i,x,b==h),i=0,++b}}}catch(e){N=!0,k=e}finally{try{!A&&D.return&&D.return()}finally{if(N)throw k}}++i,++n}return t.join("")},E=function(e){return b(e,(function(e){return p.test(e)?"xn--"+S(e):e}))},T=function(e){return b(e,(function(e){return f.test(e)?O(e.slice(4).toLowerCase()):e}))},j={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function I(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function x(e,t){function r(e){var r=I(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,i)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function N(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(A).join("."):e}function k(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=u(s,2),c=a[0],l=a[1],f=l?l.split(":").map(A):[],p=c.split(":").map(A),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,y=p.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||p[y+m]||"";d&&(v[h-1]=N(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),w=v.slice(b.index+b.length);g=_.join(":")+"::"+w.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){D?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=k(N(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=j[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)x(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E(r.host.replace(n.PCT_ENCODED,I).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function C(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(k(N(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var $=/^\.\.?\//,F=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function B(e){for(var t=[];e.length;)if(e.match($))e=e.replace($,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(q))e=e.replace(q,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(L);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=j[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?T(e.host):E(e.host.replace(r.PCT_ENCODED,I).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}x(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=C(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=B(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=R(U(e,r),r),t=R(U(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=B(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=B(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function z(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,I)}var Q={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Y={scheme:"https",domainHost:Q.domainHost,parse:Q.parse,serialize:Q.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=W(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(W(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=r(r("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+r("%"+Z+Z)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(X,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=I(e);return t.match(te)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,u=s.length;a<u;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)n.push(l[f]);break;case"subject":r.subject=z(c[1],t);break;case"body":r.body=z(c[1],t);break;default:i=!0,o[z(c[0],t)]=z(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,h=n.length;d<h;++d){var y=n[d].split("@");if(y[0]=z(y[0]),t.unicodeSupport)y[1]=z(y[1],t).toLowerCase();else try{y[1]=E(z(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var s=0,a=o.length;s<a;++s){var u=String(o[s]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(re,se).replace(re,i).replace(ne,P),f=u.slice(c+1);try{f=t.iri?T(f):E(z(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[s]=l+"@"+f}n.path=o.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==G[h]&&d.push(h.replace(re,se).replace(re,i).replace(ie,P)+"="+p[h].replace(re,se).replace(re,i).replace(oe,P));return d.length&&(n.query=d.join("&")),n}},ue=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ue),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),u=j[a];n.nid=o,n.nss=s,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=j[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,fe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};j[Q.scheme]=Q,j[Y.scheme]=Y,j[H.scheme]=H,j[K.scheme]=K,j[ae.scheme]=ae,j[ce.scheme]=ce,j[fe.scheme]=fe,e.SCHEMES=j,e.pctEncChar=P,e.pctDecChars=I,e.parse=R,e.removeDotSegments=B,e.serialize=U,e.resolveComponents=V,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return U(V(R(e,n),R(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(R(e,t),t):"object"===n(e)&&(e=R(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(R(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(R(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,P)},e.unescapeComponent=z,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>xn,ApolloClient:()=>In,ApolloError:()=>mr,ApolloLink:()=>be,Cache:()=>jn,HttpLink:()=>wt,InMemoryCache:()=>Ii,MissingFieldError:()=>An,NetworkStatus:()=>vr,Observable:()=>Q,ObservableQuery:()=>Tr,checkFetcher:()=>He,concat:()=>ki,createHttpLink:()=>_t,createSignalIfSupported:()=>vt,defaultDataIdFromObject:()=>Dn,defaultPrinter:()=>pt,disableExperimentalFragmentVariables:()=>To,disableFragmentWarnings:()=>So,empty:()=>xi,enableExperimentalFragmentVariables:()=>Eo,execute:()=>ge,fallbackHttpConfig:()=>ft,from:()=>Ai,fromError:()=>bt,fromPromise:()=>Di,gql:()=>wo,isApolloError:()=>yr,isReference:()=>J,makeReference:()=>G,makeVar:()=>yn,mergeOptions:()=>Tn,parseAndCheckHttpResponse:()=>We,resetCaches:()=>Oo,rewriteURIForGET:()=>mt,selectHttpOptionsAndBody:()=>dt,selectHttpOptionsAndBodyInternal:()=>ht,selectURI:()=>Re,serializeFetchParameter:()=>De,setLogVerbosity:()=>p,split:()=>Ni,throwServerError:()=>Ue,toPromise:()=>Mi});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,a=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,s(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new a(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l){var t=console[e]||console.log;return t.apply(console,arguments)}}}function p(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function d(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=d((function(){return globalThis}))||d((function(){return window}))||d((function(){return self}))||d((function(){return global}))||d((function(){return d.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==d((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){if(!Boolean(e))throw new Error(t)}function O(e){return S(e,[])}function S(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:S(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(S(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+S(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);class E{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||w(!1,`Body must be a string. Received: ${O(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||w(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||w(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var I=function(){return"function"==typeof Symbol},x=function(e){return I()&&Boolean(Symbol[e])},A=function(e){return x(e)?Symbol[e]:"@@"+e};I()&&!x("observable")&&(Symbol.observable=Symbol("observable"));var N=A("iterator"),k=A("observable"),M=A("species");function D(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function R(e){var t=e.constructor;return void 0!==t&&null===(t=t[M])&&(t=void 0),void 0!==t?t:Q}function C(e){return e instanceof Q}function $(e){$.log?$.log(e):setTimeout((function(){throw e}))}function F(e){Promise.resolve().then((function(){try{e()}catch(e){$(e)}}))}function q(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=D(t,"unsubscribe");r&&r.call(t)}}catch(e){$(e)}}function L(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function B(e,t,r){e._state="running";var n=e._observer;try{var i=D(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(L(e),!i)throw r;i.call(n,r);break;case"complete":L(e),i&&i.call(n)}}catch(e){$(e)}"closed"===e._state?q(e):"running"===e._state&&(e._state="ready")}function U(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void F((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(B(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void B(e,t,r);e._queue.push({type:t,value:r})}}var V=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new z(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(L(this),q(this))},P(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),z=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){U(this._subscription,"next",e)},t.error=function(e){U(this._subscription,"error",e)},t.complete=function(){U(this._subscription,"complete")},P(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Q=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new V(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this),n=arguments.length>1,i=!1,o=arguments[1],s=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(s),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=R(this);return new i((function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[k]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=D(t,k);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return C(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(x("iterator")&&(n=D(t,N)))return new r((function(e){F((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){F((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i="function"==typeof this?this:e;return new i((function(e){F((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},P(e,null,[{key:M,get:function(){return this}}]),e}();function Y(e){return null!==e&&"object"==typeof e}function W(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new a("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new a(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function H(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function K(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function G(e){return{__ref:String(e)}}function J(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Z(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return Z(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return Z(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new a('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new a(55);e[t.value]=null}}I()&&Object.defineProperty(Q,Symbol("extensions"),{value:{symbol:k,hostReportError:$},configurable:!0});var X=["connection","include","skip","client","rest","export"],ee=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(te(i),")")}return r.connection.key}var o=e;if(t){var s=te(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach((function(e){-1===X.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(te(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=te;return te=e,t}}),te=function(e){return JSON.stringify(e,re)};function re(e,t){return Y(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function ne(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return Z(r,n,i,t)})),r}return null}function ie(e){return e.alias?e.alias.value:e.name.value}function oe(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(se(o)){if("__typename"===o.name.value)return e[ie(o)]}else{var s=oe(e,K(o,r).selectionSet,r);if("string"==typeof s)return s}}}function se(e){return"Field"===e.kind}function ae(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new a('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new a(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function ue(e){return ae(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function ce(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function le(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function fe(e){var t=ue(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function pe(e){var t;ae(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new a("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new a(54)}function de(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&Z(t,e.variable.name,e.defaultValue)})),t}function he(e,t){return t?t(e):Q.of()}function ye(e){return"function"==typeof e?new be(e):e}function ve(e){return e.request.length<=1}var me=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),be=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Q.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(ye).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=ye(r),o=ye(n||new e(he));return ve(i)&&ve(o)?new e((function(e){return t(e)?i.request(e)||Q.of():o.request(e)||Q.of()})):new e((function(e,r){return t(e)?i.request(e,r)||Q.of():o.request(e,r)||Q.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?ce(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new a("illegal argument: ".concat(i)):new a(27)}return e}(t))))||Q.of()},e.concat=function(t,r){var n=ye(t);if(ve(n))return __DEV__&&u.warn(new me("You are calling concat on a terminating link, which will have no effect",n)),n;var i=ye(r);return ve(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||Q.of()}))||Q.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||Q.of()}))||Q.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(he)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new a("request is not implemented"):new a(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),ge=be.execute;class _e{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class we{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Oe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Se=new Set(Object.keys(Oe));function Ee(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Se.has(t)}var Te,je,Pe;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Te||(Te={})),(Pe=je||(je={})).NAME="Name",Pe.DOCUMENT="Document",Pe.OPERATION_DEFINITION="OperationDefinition",Pe.VARIABLE_DEFINITION="VariableDefinition",Pe.SELECTION_SET="SelectionSet",Pe.FIELD="Field",Pe.ARGUMENT="Argument",Pe.FRAGMENT_SPREAD="FragmentSpread",Pe.INLINE_FRAGMENT="InlineFragment",Pe.FRAGMENT_DEFINITION="FragmentDefinition",Pe.VARIABLE="Variable",Pe.INT="IntValue",Pe.FLOAT="FloatValue",Pe.STRING="StringValue",Pe.BOOLEAN="BooleanValue",Pe.NULL="NullValue",Pe.ENUM="EnumValue",Pe.LIST="ListValue",Pe.OBJECT="ObjectValue",Pe.OBJECT_FIELD="ObjectField",Pe.DIRECTIVE="Directive",Pe.NAMED_TYPE="NamedType",Pe.LIST_TYPE="ListType",Pe.NON_NULL_TYPE="NonNullType",Pe.SCHEMA_DEFINITION="SchemaDefinition",Pe.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Pe.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Pe.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Pe.FIELD_DEFINITION="FieldDefinition",Pe.INPUT_VALUE_DEFINITION="InputValueDefinition",Pe.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Pe.UNION_TYPE_DEFINITION="UnionTypeDefinition",Pe.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Pe.ENUM_VALUE_DEFINITION="EnumValueDefinition",Pe.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Pe.DIRECTIVE_DEFINITION="DirectiveDefinition",Pe.SCHEMA_EXTENSION="SchemaExtension",Pe.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Pe.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Pe.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Pe.UNION_TYPE_EXTENSION="UnionTypeExtension",Pe.ENUM_TYPE_EXTENSION="EnumTypeExtension",Pe.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const Ie=Object.freeze({});function xe(e,t,r=Oe){const n=new Map;for(const e of Object.values(je))n.set(e,Ae(t,e));let i,o,s,a=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],d=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===d.length?void 0:p[p.length-1],f=s,s=d.pop(),m)if(a){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(s){if(o=a?c:u[c],f=s[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var h,y;Ee(f)||w(!1,`Invalid AST Node: ${O(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,s,p,d),b===Ie)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Ee(b)){p.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?p.pop():(i={inArray:a,index:c,keys:u,edits:l,prev:i},a=Array.isArray(f),u=a?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],s&&d.push(s),s=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Ae(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ne(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function ke(e,t,r){var n=new Set(e),i=n.size;return xe(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ie}}),r?!n.size:n.size<i}function Me(e){return e&&ke(["client","export"],e,!0)}var De=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new a("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new a(24);throw n.parseError=e,n}return r},Re=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Ce="function"==typeof WeakMap&&"ReactNative"!==d((function(){return navigator.product})),$e="function"==typeof WeakSet,Fe="function"==typeof Symbol&&"function"==typeof Symbol.for,qe=Fe&&Symbol.asyncIterator;function Le(e){var t={next:function(){return e.read()}};return qe&&(t[Symbol.asyncIterator]=function(){return this}),t}function Be(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,qe&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Le(o.getReader());if(function(e){return!!e.stream}(o))return Le(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},qe&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function s(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function a(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",a),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return qe&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}d((function(){return window.document.createElement})),d((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var Ue=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Ve=Object.prototype.hasOwnProperty;function ze(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function Qe(e,t){e.status>=300&&Ue(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function Ye(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function We(e){return function(t){return t.text().then((function(e){return Qe(t,e)})).then((function(r){return t.status>=300&&Ue(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Ve.call(r,"data")||Ve.call(r,"errors")||Ue(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var He=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new a("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new a(23)};function Ke(e){return 9===e||32===e}function Ge(e){return e>=48&&e<=57}function Je(e){return e>=97&&e<=122||e>=65&&e<=90}function Ze(e){return Je(e)||95===e}function Xe(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const s=e[t],a=et(s);a!==s.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function et(e){let t=0;for(;t<e.length&&Ke(e.charCodeAt(t));)++t;return t}const tt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function rt(e){return nt[e.charCodeAt(0)]}const nt=["\\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"];function it(e){return xe(e,ot)}const ot={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>st(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=ut("(",st(e.variableDefinitions,", "),")"),r=st([e.operation,st([e.name,t]),st(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+ut(" = ",r)+ut(" ",st(n," "))},SelectionSet:{leave:({selections:e})=>at(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=ut("",e,": ")+t;let s=o+ut("(",st(r,", "),")");return s.length>80&&(s=o+ut("(\n",ct(st(r,"\n")),"\n)")),st([s,st(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ut(" ",st(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>st(["...",ut("on ",e),st(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${ut("(",st(r,", "),")")} on ${t} ${ut("",st(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Ke(e.charCodeAt(0)))),s=r.endsWith('\\"""'),a=e.endsWith('"')&&!s,u=e.endsWith("\\"),c=a||u,l=!i||e.length>70||c||o||s;let f="";const p=i&&Ke(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(tt,rt)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+st(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+st(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ut("(",st(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>ut("",e,"\n")+st(["schema",st(t," "),at(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+st(["scalar",t,st(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+st(["type",t,ut("implements ",st(r," & ")),st(n," "),at(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>ut("",e,"\n")+t+(lt(r)?ut("(\n",ct(st(r,"\n")),"\n)"):ut("(",st(r,", "),")"))+": "+n+ut(" ",st(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>ut("",e,"\n")+st([t+": "+r,ut("= ",n),st(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+st(["interface",t,ut("implements ",st(r," & ")),st(n," "),at(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>ut("",e,"\n")+st(["union",t,st(r," "),ut("= ",st(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>ut("",e,"\n")+st(["enum",t,st(r," "),at(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+st([t,st(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>ut("",e,"\n")+st(["input",t,st(r," "),at(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>ut("",e,"\n")+"directive @"+t+(lt(r)?ut("(\n",ct(st(r,"\n")),"\n)"):ut("(",st(r,", "),")"))+(n?" repeatable":"")+" on "+st(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>st(["extend schema",st(e," "),at(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>st(["extend scalar",e,st(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>st(["extend type",e,ut("implements ",st(t," & ")),st(r," "),at(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>st(["extend interface",e,ut("implements ",st(t," & ")),st(r," "),at(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>st(["extend union",e,st(t," "),ut("= ",st(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>st(["extend enum",e,st(t," "),at(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>st(["extend input",e,st(t," "),at(r)]," ")}};function st(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function at(e){return ut("{\n",ct(st(e,"\n")),"\n}")}function ut(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ct(e){return ut(" ",e.replace(/\n/g,"\n "))}function lt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var ft={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},pt=function(e,t){return t(e)};function dt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),ht.apply(void 0,(0,n.__spreadArray)([e,pt],r,!1))}function ht(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},s={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.__assign)((0,n.__assign)({},s),e.http)})),o.headers&&(o.headers=yt(o.headers,s.preserveHeaderCase));var a=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:a,variables:c};return s.includeExtensions&&(f.extensions=u),s.includeQuery&&(f.query=t(l,it)),{options:o,body:f}}function yt(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}var vt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function mt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=De(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=De(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",a=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),a=e.substr(0,u));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+r.join("&")+s}}function bt(e){return new Q((function(t){t.error(e)}))}var gt=d((function(){return fetch})),_t=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,s=void 0===o?pt:o,a=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,p=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&He(i||gt);var h={http:{includeExtensions:a,preserveHeaderCase:u},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new be((function(e){var t=Re(e,r),o=e.getContext(),a={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,p=u.version;l&&(a["apollographql-client-name"]=l),p&&(a["apollographql-client-version"]=p)}var y,v=(0,n.__assign)((0,n.__assign)({},a),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=ht(e,s,ft,h,m),g=b.options,_=b.body;if(_.variables&&!f){var w=new Set(Object.keys(_.variables));xe(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,n.__assign)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var O=vt(),S=O.controller,E=O.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),ke(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var T=mt(t,_),j=T.newURI,P=T.parseError;if(P)return bt(P);t=j}else try{g.body=De(_,"Payload")}catch(P){return bt(P)}return new Q((function(r){return(i||d((function(){return fetch}))||gt)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var s,a,u,c,l,f,p,d,h,y,v,m,b,g,_,w,O,S,E,T;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),a=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==a?void 0:a.includes(u))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(u))+u.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Be(e),d=!0,n.label=1;case 1:return d?[4,p.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:s.decode(y),d=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,T=[f.slice(0,b),f.slice(b+l.length)],f=T[1],(g=T[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=ze(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=Qe(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){Ye(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){We(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return Ye(e,r)}))}(t,e,r)})).catch((function(e){return Ye(e,r)})),function(){y&&y.abort()}}))}))},wt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,_t(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(be),Ot=Object.prototype,St=Ot.toString,Et=Ot.hasOwnProperty,Tt=Function.prototype.toString,jt=new Map;function Pt(e,t){try{return It(e,t)}finally{jt.clear()}}function It(e,t){if(e===t)return!0;var r,n,i,o=St.call(e);if(o!==St.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(kt(e,t))return!0;var s=xt(e),a=xt(t),u=s.length;if(u!==a.length)return!1;for(var c=0;c<u;++c)if(!Et.call(t,s[c]))return!1;for(c=0;c<u;++c){var l=s[c];if(!It(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(kt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!It(v,t.get(y)))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]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Tt.call(e);return b===Tt.call(t)&&(n=Nt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function xt(e){return Object.keys(e).filter(At,e)}function At(e){return void 0!==this[e]}var Nt="{ [native code] }";function kt(e,t){var r=jt.get(e);if(r){if(r.has(t))return!0}else jt.set(e,r=new Set);return r.add(t),!1}var Mt=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var Rt=Object.prototype.hasOwnProperty;function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $t(e)}function $t(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new qt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var Ft=function(e,t,r){return this.merge(e[r],t[r])},qt=function(){function e(e){void 0===e&&(e=Ft),this.reconciler=e,this.isObject=Y,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Y(t)&&Y(e)?(Object.keys(t).forEach((function(o){if(Rt.call(e,o)){var s=e[o];if(t[o]!==s){var a=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));a!==s&&((e=r.shallowCopyForMerge(e))[o]=a)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Y(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Lt(e){return"incremental"in e}function Bt(e,t){var r=e,n=new qt;return Lt(t)&&Dt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)})),r}var Ut,Vt,zt=function(){return Object.create(null)},Qt=Array.prototype,Yt=Qt.forEach,Wt=Qt.slice,Ht=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=zt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Yt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Wt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Kt=function(){function e(){this.known=new($e?WeakSet:Set),this.pool=new Ht(Ce),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Y(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Y(e)){var t=function(e){return Y(e)?Mt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Y(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(a=this.pool.lookupArray(n)).array||(this.known.add(a.array=n),__DEV__&&Object.freeze(n)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],s=this.sortedKeys(e);o.push(s.json);var a,u=o.length;if(s.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(a=this.pool.lookupArray(o)).object){var c=a.object=Object.create(i);this.known.add(c),s.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Gt=Object.assign((function(e){if(Y(e)){void 0===Ut&&Jt();var t=Ut.admit(e),r=Vt.get(t);return void 0===r&&Vt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Jt});function Jt(){Ut=new Kt,Vt=new(Ce?WeakMap:Map)}function Zt(e,t,r){return new Q((function(n){var i=n.next,o=n.error,s=n.complete,a=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++a;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--a,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--a,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,a||s&&s.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function Xt(e){return Dt(er(e))}function er(e){var t=Dt(e.errors)?e.errors.slice(0):[];return Lt(e)&&Dt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var tr={kind:je.FIELD,name:{kind:je.NAME,value:"__typename"}};function rr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===je.FRAGMENT_SPREAD&&rr(t[e.name.value],t)}))}function nr(e){return rr(ue(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),H(le(e)))?null:e}function ir(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function or(e,t){for(var r=ir(""),i=ir(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Mt(n)){if(n.kind===je.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===je.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},s=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===je.OPERATION_DEFINITION&&++s;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},p=new Map,d=!1,h={enter:function(e){if(f(e.directives))return d=!0,null}},y=xe(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var s=o(i);s&&s.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return d=!0,null;var s=o(i);s&&s.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:s>0&&e.selectionSet.selections.every((function(e){return e.kind===je.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return d=!0,null}}});if(!d)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===je.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==je.FRAGMENT_DEFINITION||0!==s||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return nr(xe(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var sr=Object.assign((function(e){return xe(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==je.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return se(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(se(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[tr],!1)})}}}}})}),{added:function(e){return e===tr}}),ar={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function ur(e){return"query"===pe(e).operation?e:xe(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var cr=new Map;function lr(e){var t=cr.get(e)||1;return cr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function fr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function pr(e){function t(t){Object.defineProperty(e,t,{value:Q})}return Fe&&Symbol.species&&t(Symbol.species),t("@@species"),e}function dr(e){return e&&"function"==typeof e.then}var hr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),fr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),fr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?dr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),fr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new Q(t)]),dr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(Q);function yr(e){return e.hasOwnProperty("graphQLErrors")}pr(hr);var vr,mr=function(e){function t(r){var n,i,o=r.graphQLErrors,s=r.clientErrors,a=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=s||[],l.networkError=a||null,l.message=u||(i="",(Dt((n=l).graphQLErrors)||Dt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function br(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(vr||(vr={}));var gr=Object.prototype.toString;function _r(e){return wr(e)}function wr(e,t){switch(gr.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=wr(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=wr(e[r],t)})),n;default:return e}}function Or(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Sr=Object.assign,Er=Object.hasOwnProperty,Tr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,s=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Pr)}catch(e){}var r=!s.observers.size;s.observers.add(e);var n=s.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&s.reobserve().catch((function(){})),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}}))||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=i,s.queryManager=r,s.isTornDown=!1;var a=r.defaultOptions.watchQuery,u=(void 0===a?{}:a).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,p=o.initialFetchPolicy,d=void 0===p?"standby"===f?c:f:p;s.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:d,fetchPolicy:f}),s.queryId=i.queryId||r.generateQueryId();var h=ue(s.query);return s.queryName=h&&h.name&&h.name.value,s}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||vr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:br(r),networkStatus:r}),o=this.options.fetchPolicy,s=void 0===o?"cache-first":o;if("network-only"===s||"no-cache"===s||"standby"===s||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(i.data=a.result),Pt(i.data,{})&&(i.data=void 0),a.complete?(delete i.partial,!a.complete||i.networkStatus!==vr.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=vr.ready,i.loading=!1)):i.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||i.loading||i.data||i.error||Ir(a.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!Pt(this.last.result,e)||t&&!Pt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||Pt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Er.call(e,"variables")){var o=fe(this.query),s=o.variableDefinitions;s&&s.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!Pt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,vr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,s=o.networkStatus;o.networkStatus=vr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var a=new Set;return this.queryManager.fetchQuery(i,r,vr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===vr.fetchMore&&(o.networkStatus=s),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){a.add(e.query)}}),n})).finally((function(){a.has(t.query)||jr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Pt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},vr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(br(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},vr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:_r(e),variables:t}),Dt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===vr.refetch||t===vr.fetchMore||t===vr.poll,o=this.options.variables,s=this.options.fetchPolicy,a=Or(this.options,e||{}),u=i?a:Sr(this.options,a);i||(this.updatePolling(),e&&e.variables&&!Pt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=vr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),fr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:vr.error,loading:!1});this.updateLastResult(r,t),fr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Q);function jr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Pr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function Ir(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function xr(e){return e.kind===je.FIELD||e.kind===je.FRAGMENT_SPREAD||e.kind===je.INLINE_FRAGMENT}pr(Tr);var Ar=null,Nr={},kr=1;function Mr(e){try{return e()}catch(e){}}var Dr="@wry/context:Slot",Rr=Mr((function(){return globalThis}))||Mr((function(){return r.g}))||Object.create(null),Cr=Rr[Dr]||Array[Dr]||function(e){try{Object.defineProperty(Rr,Dr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",kr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Ar;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Nr)break;return e!==Ar&&(Ar.slots[this.id]=t),!0}return Ar&&(Ar.slots[this.id]=Nr),!1},e.prototype.getValue=function(){if(this.hasValue())return Ar.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),s=Ar;Ar={parent:s,slots:o};try{return t.apply(n,r)}finally{Ar=s}},e.bind=function(e){var t=Ar;return function(){var r=Ar;try{return Ar=t,e.apply(this,arguments)}finally{Ar=r}}},e.noContext=function(e,t,r){if(!Ar)return e.apply(r,t);var n=Ar;try{return Ar=null,e.apply(r,t)}finally{Ar=n}},e}());function $r(){}Cr.bind,Cr.noContext;var Fr,qr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=$r),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var 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)},e}(),Lr=new Cr,Br=Object.prototype.hasOwnProperty,Ur=void 0===(Fr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Fr;function Vr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var zr=[];function Qr(e,t){if(!e)throw new Error(t||"assertion failure")}function Yr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Wr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Gr(this))return Hr(this),this.value[0]},e.prototype.recompute=function(e){return Qr(!this.recomputing,"already recomputing"),Hr(this),Gr(this)?function(e,t){return nn(e),Lr.withValue(e,Kr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Vr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Gr(e)||Zr(e)}(e),Yr(e.value)}(this,e):Yr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Jr(this),Vr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),nn(this),Xr(this,(function(t,r){t.setDirty(),on(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=zr.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Ur(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),zr.push(this.deps),this.deps=null)},e.count=0,e}();function Hr(e){var t=Lr.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Gr(e)?en(t,e):tn(t,e),t}function Kr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Gr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Jr(e){Xr(e,en)}function Zr(e){Xr(e,tn)}function Xr(e,t){var r=e.parents.size;if(r)for(var n=Ur(e.parents),i=0;i<r;++i)t(n[i],e)}function en(e,t){Qr(e.childValues.has(t)),Qr(Gr(t));var r=!Gr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=zr.pop()||new Set;e.dirtyChildren.add(t),r&&Jr(e)}function tn(e,t){Qr(e.childValues.has(t)),Qr(!Gr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),rn(e,t),Gr(e)||Zr(e)}function rn(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(zr.length<100&&zr.push(r),e.dirtyChildren=null))}function nn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){on(e,r)})),e.forgetDeps(),Qr(null===e.dirtyChildren)}function on(e,t){t.parents.delete(e),e.childValues.delete(t),rn(e,t)}var sn={setDirty:!0,dispose:!0,forget:!0};function an(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Lr.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(Vr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Br.call(sn,r)?r:"setDirty";Ur(n).forEach((function(e){return e[i]()})),t.delete(e),Vr(n)}},n}function un(){var e=new Ht("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}un();var cn=new Set;function ln(e,t){void 0===t&&(t=Object.create(null));var r=new qr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||un(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var s=r.get(o);s||(r.set(o,s=new Wr(e)),s.subscribe=t.subscribe,s.forget=function(){return r.delete(o)});var a=s.recompute(Array.prototype.slice.call(arguments));return r.set(o,s),cn.add(r),Lr.hasValue()||(cn.forEach((function(e){return e.clean()})),cn.clear()),a};function s(e){var t=r.get(e);t&&t.setDirty()}function a(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=s,o.dirty=function(){s(i.apply(null,arguments))},o.peekKey=a,o.peek=function(){return a(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var fn=new Cr,pn=new WeakMap;function dn(e){var t=pn.get(e);return t||pn.set(e,t={vars:new Set,dep:an()}),t}function hn(e){dn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function yn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){dn(e).dep.dirty(n),vn(e)}));var s=Array.from(r);r.clear(),s.forEach((function(t){return t(e)}))}}else{var a=fn.getValue();a&&(i(a),dn(a).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),dn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function vn(e){e.broadcastWatches&&e.broadcastWatches()}var mn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Ct(t.resolvers,e)})):this.resolvers=Ct(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,a).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return ke(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return ae(e),or([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return xe(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Ie}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:ur(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===s&&(s=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var a,u,c,l,f,p,d,h,y,v;return(0,n.__generator)(this,(function(m){return a=pe(e),u=le(e),c=H(u),l=this.collectSelectionsToResolve(a,c),f=a.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(d=this).cache,y=d.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,c,l,f=this;return(0,n.__generator)(this,(function(p){return o=i.fragmentMap,s=i.context,a=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&Ne(e,a)?se(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[ie(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return $t(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,u,c,l,f,p,d,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,s=e.name.value,a=ie(e),u=s!==a,c=r[a]||r[s],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?s:a])&&(l=Promise.resolve(fn.withValue(this.cache,d,[r,ne(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var s=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||s,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||s,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),xe(i,{Directive:function(e,t,n,i,s){"client"===e.name.value&&s.forEach((function(e){r(e)&&xr(e)&&o.add(e)}))},FragmentSpread:function(n,i,s,a,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&xr(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),bn=new(Ce?WeakMap:Map);function gn(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return bn.set(e,(bn.get(e)+1)%1e15),r.apply(this,arguments)})}function _n(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var wn=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;bn.has(r)||(bn.set(r,0),gn(r,"evict"),gn(r,"modify"),gn(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||vr.loading;return this.variables&&this.networkStatus!==vr.loading&&!Pt(this.variables,e.variables)&&(t=vr.setVariables),Pt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){_n(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Pt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Pt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():jr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;_n(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(br(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Pt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===bn.get(this.cache)&&Pt(t,r.variables)&&Pt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new qt,s=Dt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Dt(e.incremental)){var a=Bt(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(On(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:bn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var s=i.getDiffOptions(r.variables),a=o.diff(s);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=vr.ready},e.prototype.markError=function(e){return this.networkStatus=vr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function On(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!Xt(e);return!n&&r&&e.data&&(n=!0),n}var Sn=Object.prototype.hasOwnProperty,En=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,s=e.onBroadcast,a=e.ssrMode,u=void 0!==a&&a,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ce?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new mn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new a("QueryManager stopped while query was in flight"):new a(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,s=e.optimisticResponse,a=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,p=void 0!==f&&f,d=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:a,update:d,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Zt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:s}),o,!1),(function(t){if(Xt(t)&&"none"===b)throw new mr({graphQLErrors:er(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&Xt(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:d,updateQueries:a,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:s?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),s&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof mr?t:new mr({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],s="no-cache"===e.fetchPolicy;if(!s&&On(i,e.errorPolicy)){if(Lt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Lt(i)&&Dt(i.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=Bt(a.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&Sn.call(c,a)){var u=c[a],l=r.queries.get(n),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&ce(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){s||o.forEach((function(e){return t.write(e)}));var a,u=e.update,c=!(Lt(a=i)||function(e){return"hasNext"in e&&"data"in e}(a))||Lt(i)&&!i.hasNext;if(u){if(!s){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}s||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=or([ar],ae(r)),o=this.localState.clientQuery(r),s=i&&this.localState.serverQuery(i),a={document:r,hasClientExports:Me(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:s,defaultVars:de(ue(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(o),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new wn(this),r=new Tr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new a("Store reset while query was in flight (not completed in link chain)"):new a(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=vr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):Y(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):Y(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,s=t.document;if(o){if("all"===e)return void r.set(n,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&i.has(a)||s&&i.has(s))&&(r.set(n,o),a&&i.set(a,!0),s&&i.set(s,!0))}})),o.size&&o.forEach((function(e){var i=lr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),s=new Tr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(s.queryId===i),o.setObservableQuery(s),r.set(i,s)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,s=e.context,a=void 0===s?{}:s;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,a,e).map((function(o){if("no-cache"!==n&&(On(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Xt(o))throw new mr({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,a).then(u);return new Q((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,s,a=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:ce(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=c.get(u)||new Map;c.set(u,p);var d=Gt(r);if(!(s=p.get(d))){var h=new hr([ge(l,f)]);p.set(d,s=h),h.beforeNext((function(){p.delete(d)&&p.size<1&&c.delete(u)}))}}else s=new hr([ge(l,f)])}else s=new hr([Q.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(s=Zt(s,(function(e){return a.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),s},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Zt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var s=er(o),a=s.length>0;if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new mr({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:vr.ready};return a&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=vr.error),u}),(function(t){var r=yr(t)?t:new mr({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=vr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),s=this.getQuery(e),a=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?a&&a.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?a&&a.errorPolicy||"none":l,p=t.returnPartialData,d=void 0!==p&&p,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:d,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(s,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new hr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?lr("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof wn&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(u){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=u(i,s,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),a&&this.cache.removeOptimistic(a),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,a=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(o).document,variables:s,networkStatus:r});var h=function(){return e.getDiff(s)},y=function(t,r){void 0===r&&(r=e.networkStatus||vr.loading);var a=t.result;!__DEV__||l||Pt(a,{})||Ir(t.missing);var u=function(e){return Q.of((0,n.__assign)({data:e,loading:br(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:a},context:f,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===vr.refetch&&Array.isArray(t.missing)?u(void 0):u(a)},v="no-cache"===a?0:r===vr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:s,context:f,fetchPolicy:a,errorPolicy:c})},b=p&&"number"==typeof d&&d!==r&&br(r);switch(a){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new wn(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Tn(e,t){return Or(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var jn,Pn=!1,In=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,s=e.ssrMode,c=void 0!==s&&s,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,d=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,S=e.version,E=e.link;if(E||(E=r?new wt({uri:r,credentials:n,headers:i}):be.empty()),!o)throw __DEV__?new a("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new a(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),d&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Pn&&d&&__DEV__&&(Pn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var T=window.navigator,j=T&&T.userAgent,P=void 0;"string"==typeof j&&(j.indexOf("Chrome/")>-1?P="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":j.indexOf("Firefox/")>-1&&(P="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),P&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+P)}this.version="3.7.9",this.localState=new mn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new En({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:O,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:d?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Tn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Tn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Tn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return ge(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();jn||(jn={});var xn=function(){function e(){this.getFragmentDoc=ln(W)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,s=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),An=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var u=a.path.length-1;u>=0;--u)a.missing=((s={})[a.path[u]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error);function Nn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){Y(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Y(e[t])&&r.add(e[t])}))}))),e;var t,r}var kn=Object.prototype.hasOwnProperty;function Mn(e){return null==e}function Dn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Mn(n)?Mn(i)?void 0:{_id:i}:{id:n}),Mn(n)&&!Mn(i)&&(n=i),!Mn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Rn={dataIdFromObject:Dn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Cn(e){var t=e.canonizeResults;return void 0===t?Rn.canonizeResults:t}var $n=/^[_a-z][_0-9a-z]*/i;function Fn(e){var t=e.match($n);return t?t[0]:e}function qn(e,t,r){return!!Y(t)&&(Mt(t)?t.every((function(t){return qn(e,t,r)})):e.selections.every((function(e){if(se(e)&&Ne(e,r)){var n=ie(e);return kn.call(t,n)&&(!e.selectionSet||qn(e.selectionSet,t[n],r))}return!0})))}function Ln(e){return Y(e)&&!J(e)&&!Mt(e)}function Bn(e,t){var r=H(le(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Un=Object.create(null),Vn=function(){return Un},zn=Object.create(null),Qn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Nn(J(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return J(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return G(e);if(J(e))return e;var n=r.policies.identify(e)[0];if(n){var i=G(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kn.call(this.data,e)){var r=this.data[e];if(r&&kn.call(r,t))return r[t]}return"__typename"===t&&kn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Kn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kn.call(this.data,e)?this.data[e]:this instanceof Kn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;J(e)&&(e=e.__ref),J(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var s=new qt(Jn).merge(i,o);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){var a=Object.create(null);i||(a.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==s[e]){a[e]=1;var t=Fn(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(a[t]=1),void 0!==s[e]||n instanceof Kn||delete s[e]}})),!a.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete a.__typename,Object.keys(a).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),s=!1,a=!0,u={DELETE:Un,INVALIDATE:zn,isReference:J,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||G(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=Fn(c),f=i[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var d=p===Vn?Un:p(Nn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===zn?r.group.dirty(e,c):(d===Un&&(d=void 0),d!==f&&(o[c]=d,s=!0,f=d))}void 0!==f&&(a=!1)}})),s)return this.merge(e,o),a&&(this instanceof Kn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=Vn,n):Vn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(kn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Kn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){kn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&kn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Kn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){kn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Kn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!kn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){J(e)&&(t[e.__ref]=!0),Y(e)&&Object.keys(e).forEach((function(t){var r=e[t];Y(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Yn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?an():null,this.keyMaker=new Ht(Ce)},e.prototype.depend=function(e,t){if(this.d){this.d(Wn(e,t));var r=Fn(t);r!==t&&this.d(Wn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Wn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Wn(e,t){return t+"#"+e}function Hn(e,t){Zn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,s=e.call(this,r,new Yn(i))||this;return s.stump=new Gn(s),s.storageTrie=new Ht(Ce),o&&s.replace(o),s}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Qn||(Qn={}));var Kn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){Pt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return kn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Qn),Gn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Yn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Kn);function Jn(e,t,r){var n=e[r],i=t[r];return Pt(n,i)?n:i}function Zn(e){return!!(e instanceof Qn&&e.group.caching)}function Xn(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ei=function(){function e(e){var t=this;this.knownResults=new(Ce?WeakMap:Map),this.config=Or(e,{addTypename:!1!==e.addTypename,canonizeResults:Cn(e)}),this.canon=e.canon||new Kt,this.executeSelectionSet=ln((function(e){var r,i=e.context.canonizeResults,o=Xn(e);o[3]=!i;var s=(r=t.executeSelectionSet).peek.apply(r,o);return s?i?(0,n.__assign)((0,n.__assign)({},s),{result:t.canon.admit(s.result)}):s:(Hn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Xn,makeCacheKey:function(e,t,r,n){if(Zn(r.store))return r.store.makeCacheKey(e,J(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=ln((function(e){return Hn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Zn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Kt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,s=e.variables,a=e.returnPartialData,u=void 0===a||a,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;s=(0,n.__assign)((0,n.__assign)({},de(fe(r))),s);var p,d=G(o),h=this.executeSelectionSet({selectionSet:pe(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,n.__assign)({store:t,query:r,policies:f,variables:s,varString:Gt(s),canonizeResults:l},Bn(r,this.config.fragments))});if(h.missing&&(p=[new An(ti(h.missing),h.missing,r,s)],!u))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(Zn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(J(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var s,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],p=new qt;function d(e,t){var r;return e.missing&&(s=p.merge(s,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(Ne(e,u))if(se(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=ie(e);void 0===v?sr.added(e)||(s=p.merge(s,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(J(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Mt(v)?v=d(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:J(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=K(e,o.lookupFragment);if(!b&&e.kind===je.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(e.name.value)):new a(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:$t(f),missing:s},v=o.canonizeResults?this.canon.admit(y):Nn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,s=e.context,a=new qt;function c(e,r){var n;return e.missing&&(t=a.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map((function(e,t){return null===e?null:Mt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:s}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:J(e)?e:o,context:s}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){Y(r)&&(__DEV__?u(!J(r),"Missing selection set for object of type ".concat(function(e,t){return J(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!J(r),6),Object.values(r).forEach(n.add,n))}))}}(s.store,n,e),e)})),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ti(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ri=Object.create(null);function ni(e){var t=JSON.stringify(e);return ri[t]||(ri[t]=Object.create(null))}function ii(e){var t=ni(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=si(e,(function(e){var i=ci(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&kn.call(t,e[0])&&(i=ci(t,e,ui)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function oi(e){var t=ni(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=si(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return ci(t,e)}else{var s=r.slice(1);if(i&&kn.call(i,s)){var a=e.slice(0);return a[0]=s,ci(i,a)}}else if(n&&Dt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&ne(c,i);return l&&ci(l,e.slice(1))}})),a=JSON.stringify(s);return(t||"{}"!==a)&&(o+=":"+a),o})}function si(e,t){var r=new qt;return ai(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function ai(e){var t=ni(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Mt(t)?(ai(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Mt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ui(e,t){return e[t]}function ci(e,t,r){return r=r||ui,li(t.reduce((function e(t,n){return Mt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function li(e){return Y(e)?Mt(e)?e.map(li):si(Object.keys(e).sort(),(function(t){return ci(e,t)})):e}function fi(e){return void 0!==e.args?e.args:e.field?ne(e.field,e.variables):null}ee.setStringify(Gt);var pi=function(){},di=function(e,t){return t.fieldName},hi=function(e,t,r){return(0,r.mergeObjects)(e,t)},yi=function(e,t){return t},vi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Dn},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)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s,a=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=bi(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Mt(f)){s=f;break}l=ii(f)}return s=s?String(s):void 0,u.keyObject?[s,u.keyObject]:[s]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,s=i.mutationType,a=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),s&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),kn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?hi:!1===t?yi:e.merge}s(n,t.merge),n.keyFn=!1===i?pi:Mt(i)?ii(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===a?di:Mt(a)?oi(a):"function"==typeof a?a:n.keyFn,"function"==typeof u&&(n.read=u),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||di)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match($n);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,s=(0,n.__rest)(i,["fields"]);Object.assign(r,s),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),a=[s],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&a.indexOf(t)<0&&a.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,p=0;p<a.length;++p){var d=a[p];if(d.has(o))return s.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),s.add(o)),!0;d.forEach(c),l&&p===a.length-1&&qn(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},a=fi(e);o;){var u=o(a,s);if(!Mt(u)){t=u||n;break}o=oi(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return Z(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return Z(n,r,i,t)}))),ee(e.name.value,n,r)}(e.field,e.variables):ee(n,fi(e))),!1===t?n:n===Fn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=Fn(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),u=a&&a.read;if(u){var c=mi(this,r,e,t,t.store.getStorage(J(r)?r.__ref:r,i));return fn.withValue(this.cache,u,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===hi?gi(n.store)(e,t):a===yi?t:(n.overwrite&&(e=void 0),a(e,t,mi(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function mi(e,t,r,n,i){var o=e.getStoreFieldName(r),s=Fn(o),a=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:fi(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:J,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(bi(arguments,t,a),n)},mergeObjects:gi(n.store)}}function bi(e,t,r){var i,o,s,a=e[0],c=e[1],l=e.length;return"string"==typeof a?i={fieldName:a,from:l>1?c:t}:(i=(0,n.__assign)({},a),kn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),s=lr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?s:t})).split(JSON.stringify(s)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function gi(e){return function(t,r){if(Mt(t)||Mt(r))throw __DEV__?new a("Cannot automatically merge arrays"):new a(4);if(Y(t)&&Y(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(J(t)&&Ln(r))return e.merge(t.__ref,r),t;if(Ln(t)&&J(r))return e.merge(t,r.__ref),r;if(Ln(t)&&Ln(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function _i(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var wi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,s=t.dataId,c=t.variables,l=t.overwrite,f=ue(i),p=new qt;c=(0,n.__assign)((0,n.__assign)({},de(f)),c);var d=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:Gt(c)},Bn(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:s,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!J(h))throw __DEV__?new a("Could not identify object ".concat(JSON.stringify(o))):new a(7);return d.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,a=G(n);if(o&&o.map.size){var c=r.applyMerges(o,a,i,d);if(J(c))return;i=c}if(__DEV__&&!d.overwrite){var l=Object.create(null);s.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[Fn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(s&&!J(o)&&!Pt(o,s)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(s,e)}))){var a=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=Fn(r),l="".concat(a,".").concat(c);if(!Pi.has(l)){Pi.add(l);var f=[];Mt(o)||Mt(s)||[o,s].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(a," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(s).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(a,i,e,d.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,s=e.context,a=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||oe(i,o,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=bi(arguments,l,s.variables);if(J(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return c.readField(e,s)},d=new Set;this.flattenFields(o,i,s,f).forEach((function(e,r){var n,o=ie(r),s=i[o];if(d.add(r),void 0!==s){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Si(a,h),v=t.processFieldValue(s,r,r.selectionSet?_i(e,!1,!1):e,y),m=void 0;r.selectionSet&&(J(v)||Ln(v))&&(m=p("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:ji(a,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||sr.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(ie(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:s.fragmentMap,storeObject:l,readField:p}),y=h[0],v=h[1];r=r||y,v&&(l=s.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=G(r),b=s.written[r]||(s.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,s))return m;var g=s.incomingById.get(r);return g?(g.storeObject=s.merge(g.storeObject,l),g.mergeTree=Ei(g.mergeTree,a),d.forEach((function(e){return g.fieldNodeSet.add(e)}))):s.incomingById.set(r,{storeObject:l,mergeTree:Ti(a)?void 0:a,fieldNodeSet:d}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Mt(e)?e.map((function(e,o){var s=i.processFieldValue(e,t,r,Si(n,o));return ji(n,o),s})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?_r(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=oe(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,s=new Ht(!1);return function e(u,c){var l=s.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(s){if(Ne(s,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Dt(s.directives)||s.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=ne(e,r.variables);n&&!1===n.if||(l=!0)}})),se(s)){var f=i.get(s);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(s,_i(r,u,l))}else{var p=K(s,r.lookupFragment);if(!p&&s.kind===je.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(s.name.value)):new a(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,_i(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var s,a=this;if(e.map.size&&!J(r)){var c,l=Mt(r)||!J(t)&&!Ln(t)?void 0:t,f=r;l&&!o&&(o=[J(l)?l.__ref:l]);var p=function(e,t){return Mt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=p(l,t),n=p(f,t);if(void 0!==n){o&&o.push(t);var s=a.applyMerges(e,r,n,i,o);s!==n&&(c=c||new Map).set(t,s),o&&u(o.pop()===t)}})),c&&(r=Mt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(s=i.store).getStorage.apply(s,o)):r},e}(),Oi=[];function Si(e,t){var r=e.map;return r.has(t)||r.set(t,Oi.pop()||{map:new Map}),r.get(t)}function Ei(e,t){if(e===t||!t||Ti(t))return e;if(!e||Ti(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var s=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ei(e,t.map.get(r))),s.delete(r)})),s.forEach((function(r){o.map.set(r,Ei(t.map.get(r),e.map.get(r)))}))}return o}function Ti(e){return!e||!(e.info||e.map.size)}function ji(e,t){var r=e.map,n=r.get(t);n&&Ti(n)&&(Oi.push(n),r.delete(t))}var Pi=new Set,Ii=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=yn,r.txCount=0,r.config=function(e){return Or(Rn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new vi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Qn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new wi(this,this.storeReader=new ei({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Cn(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=ln((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Zn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Gt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof An)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||dn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&hn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Gt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(J(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Gt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),hn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,s=void 0===o||o,a=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,s=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=s}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=sr(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&Pt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(xn),xi=be.empty,Ai=be.from,Ni=be.split,ki=be.concat;function Mi(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Di(e){return new Q((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ri(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const Ci=/\r\n|[\n\r]/g;function $i(e,t){let r=0,n=1;for(const i of e.body.matchAll(Ci)){if("number"==typeof i.index||Ri(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function Fi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?r:0,u=t.column+a,c=`${e.name}:${s}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+qi([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+qi([[s-1+" |",l[i-1]],[`${s} |`,f],["|","^".padStart(u)],[`${s+1} |`,l[i+1]]])}function qi(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Li extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:s,positions:a,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Bi(Array.isArray(o)?o:o?[o]:void 0);const f=Bi(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==f?void 0:f.map((e=>e.start)),this.locations=a&&s?a.map((e=>$i(s,e))):null==f?void 0:f.map((e=>$i(e.source,e.start)));const p="object"==typeof(d=null==c?void 0:c.extensions)&&null!==d?null==c?void 0:c.extensions:void 0;var d;this.extensions=null!==(i=null!=l?l:p)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Li):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+Fi((t=r.loc).source,$i(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Fi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Bi(e){return void 0===e||0===e.length?void 0:e}function Ui(e,t,r){return new Li(`Syntax Error: ${r}`,{source:e,positions:[t]})}var Vi,zi,Qi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Vi||(Vi={})),(Qi=zi||(zi={})).SOF="<SOF>",Qi.EOF="<EOF>",Qi.BANG="!",Qi.DOLLAR="$",Qi.AMP="&",Qi.PAREN_L="(",Qi.PAREN_R=")",Qi.SPREAD="...",Qi.COLON=":",Qi.EQUALS="=",Qi.AT="@",Qi.BRACKET_L="[",Qi.BRACKET_R="]",Qi.BRACE_L="{",Qi.PIPE="|",Qi.BRACE_R="}",Qi.NAME="Name",Qi.INT="Int",Qi.FLOAT="Float",Qi.STRING="String",Qi.BLOCK_STRING="BlockString",Qi.COMMENT="Comment";class Yi{constructor(e){const t=new we(zi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==zi.EOF)do{if(e.next)e=e.next;else{const t=Xi(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===zi.COMMENT);return e}}function Wi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Hi(e,t){return Ki(e.charCodeAt(t))&&Gi(e.charCodeAt(t+1))}function Ki(e){return e>=55296&&e<=56319}function Gi(e){return e>=56320&&e<=57343}function Ji(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return zi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Zi(e,t,r,n,i){const o=e.line,s=1+r-e.lineStart;return new we(t,r,n,o,s,i)}function Xi(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return eo(e,i);case 33:return Zi(e,zi.BANG,i,i+1);case 36:return Zi(e,zi.DOLLAR,i,i+1);case 38:return Zi(e,zi.AMP,i,i+1);case 40:return Zi(e,zi.PAREN_L,i,i+1);case 41:return Zi(e,zi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Zi(e,zi.SPREAD,i,i+3);break;case 58:return Zi(e,zi.COLON,i,i+1);case 61:return Zi(e,zi.EQUALS,i,i+1);case 64:return Zi(e,zi.AT,i,i+1);case 91:return Zi(e,zi.BRACKET_L,i,i+1);case 93:return Zi(e,zi.BRACKET_R,i,i+1);case 123:return Zi(e,zi.BRACE_L,i,i+1);case 124:return Zi(e,zi.PIPE,i,i+1);case 125:return Zi(e,zi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?co(e,i):no(e,i)}if(Ge(t)||45===t)return to(e,i,t);if(Ze(t))return lo(e,i);throw Ui(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Wi(t)||Hi(r,i)?`Unexpected character: ${Ji(e,i)}.`:`Invalid character: ${Ji(e,i)}.`)}return Zi(e,zi.EOF,n,n)}function eo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Wi(e))++i;else{if(!Hi(r,i))break;i+=2}}return Zi(e,zi.COMMENT,t,i,r.slice(t+1,i))}function to(e,t,r){const n=e.source.body;let i=t,o=r,s=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ge(o))throw Ui(e.source,i,`Invalid number, unexpected digit after 0: ${Ji(e,i)}.`)}else i=ro(e,i,o),o=n.charCodeAt(i);if(46===o&&(s=!0,o=n.charCodeAt(++i),i=ro(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(s=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=ro(e,i,o),o=n.charCodeAt(i)),46===o||Ze(o))throw Ui(e.source,i,`Invalid number, expected digit but got: ${Ji(e,i)}.`);return Zi(e,s?zi.FLOAT:zi.INT,t,i,n.slice(t,i))}function ro(e,t,r){if(!Ge(r))throw Ui(e.source,t,`Invalid number, expected digit but got: ${Ji(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ge(n.charCodeAt(i));)++i;return i}function no(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,s="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return s+=r.slice(o,i),Zi(e,zi.STRING,t,i+1,s);if(92!==n){if(10===n||13===n)break;if(Wi(n))++i;else{if(!Hi(r,i))throw Ui(e.source,i,`Invalid character within String: ${Ji(e,i)}.`);i+=2}}else{s+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?io(e,i):oo(e,i):uo(e,i);s+=t.value,i+=t.size,o=i}}throw Ui(e.source,i,"Unterminated string.")}function io(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Wi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|ao(e),n<0)break}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function oo(e,t){const r=e.source.body,n=so(r,t+2);if(Wi(n))return{value:String.fromCodePoint(n),size:6};if(Ki(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=so(r,t+8);if(Gi(e))return{value:String.fromCodePoint(n,e),size:12}}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function so(e,t){return ao(e.charCodeAt(t))<<12|ao(e.charCodeAt(t+1))<<8|ao(e.charCodeAt(t+2))<<4|ao(e.charCodeAt(t+3))}function ao(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function uo(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Ui(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function co(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,s=o,a="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){a+=r.slice(s,o),u.push(a);const n=Zi(e,zi.BLOCK_STRING,t,o+3,Xe(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Wi(n))++o;else{if(!Hi(r,o))throw Ui(e.source,o,`Invalid character within String: ${Ji(e,o)}.`);o+=2}else a+=r.slice(s,o),u.push(a),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,a="",s=o,i=o;else a+=r.slice(s,o),s=o+1,o+=4}throw Ui(e.source,o,"Unterminated string.")}function lo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Je(o=r.charCodeAt(i))||Ge(o)||95===o);)++i;var o;return Zi(e,zi.NAME,t,i,r.slice(t,i))}class fo{constructor(e,t={}){const r=function(e){return e instanceof E}(e)?e:new E(e);this._lexer=new Yi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(zi.NAME);return this.node(e,{kind:je.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:je.DOCUMENT,definitions:this.many(zi.SOF,this.parseDefinition,zi.EOF)})}parseDefinition(){if(this.peek(zi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===zi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ui(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(zi.BRACE_L))return this.node(e,{kind:je.OPERATION_DEFINITION,operation:Te.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(zi.NAME)&&(r=this.parseName()),this.node(e,{kind:je.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(zi.NAME);switch(e.value){case"query":return Te.QUERY;case"mutation":return Te.MUTATION;case"subscription":return Te.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(zi.PAREN_L,this.parseVariableDefinition,zi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:je.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(zi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(zi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(zi.DOLLAR),this.node(e,{kind:je.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:je.SELECTION_SET,selections:this.many(zi.BRACE_L,this.parseSelection,zi.BRACE_R)})}parseSelection(){return this.peek(zi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(zi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:je.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(zi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(zi.PAREN_L,t,zi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(zi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(zi.NAME)?this.node(e,{kind:je.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:je.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case zi.BRACKET_L:return this.parseList(e);case zi.BRACE_L:return this.parseObject(e);case zi.INT:return this.advanceLexer(),this.node(t,{kind:je.INT,value:t.value});case zi.FLOAT:return this.advanceLexer(),this.node(t,{kind:je.FLOAT,value:t.value});case zi.STRING:case zi.BLOCK_STRING:return this.parseStringLiteral();case zi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:je.BOOLEAN,value:!0});case"false":return this.node(t,{kind:je.BOOLEAN,value:!1});case"null":return this.node(t,{kind:je.NULL});default:return this.node(t,{kind:je.ENUM,value:t.value})}case zi.DOLLAR:if(e){if(this.expectToken(zi.DOLLAR),this._lexer.token.kind===zi.NAME){const e=this._lexer.token.value;throw Ui(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:je.STRING,value:e.value,block:e.kind===zi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:je.LIST,values:this.any(zi.BRACKET_L,(()=>this.parseValueLiteral(e)),zi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:je.OBJECT,fields:this.any(zi.BRACE_L,(()=>this.parseObjectField(e)),zi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(zi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(zi.AT),this.node(t,{kind:je.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(zi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(zi.BRACKET_R),t=this.node(e,{kind:je.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(zi.BANG)?this.node(e,{kind:je.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:je.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(zi.STRING)||this.peek(zi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);return this.node(e,{kind:je.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(zi.COLON);const r=this.parseNamedType();return this.node(e,{kind:je.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:je.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(zi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseFieldDefinition,zi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(zi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:je.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(zi.PAREN_L,this.parseInputValueDef,zi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(zi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(zi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:je.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:je.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(zi.EQUALS)?this.delimitedMany(zi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:je.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(zi.BRACE_L,this.parseEnumValueDefinition,zi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:je.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Ui(this._lexer.source,this._lexer.token.start,`${po(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseInputValueDef,zi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===zi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(zi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:je.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(zi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Vi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new _e(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ui(this._lexer.source,t.start,`Expected ${ho(e)}, found ${po(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==zi.NAME||t.value!==e)throw Ui(this._lexer.source,t.start,`Expected "${e}", found ${po(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===zi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Ui(this._lexer.source,t.start,`Unexpected ${po(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==zi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Ui(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function po(e){const t=e.value;return ho(e.kind)+(null!=t?` "${t}"`:"")}function ho(e){return function(e){return e===zi.BANG||e===zi.DOLLAR||e===zi.AMP||e===zi.PAREN_L||e===zi.PAREN_R||e===zi.SPREAD||e===zi.COLON||e===zi.EQUALS||e===zi.AT||e===zi.BRACKET_L||e===zi.BRACKET_R||e===zi.BRACE_L||e===zi.PIPE||e===zi.BRACE_R}(e)?`"${e}"`:e}var yo=new Map,vo=new Map,mo=!0,bo=!1;function go(e){return e.replace(/[\s,]+/g," ").trim()}function _o(e){var t,r,i,o=go(e);if(!yo.has(o)){var s=function(e,t){return new fo(e,t).parseDocument()}(e,{experimentalFragmentVariables:bo,allowLegacyFragmentVariables:bo});if(!s||"Document"!==s.kind)throw new Error("Not a valid GraphQL document.");yo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=s,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=go((s=e.loc).source.body.substring(s.start,s.end)),o=vo.get(t);o&&!o.has(n)?mo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||vo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var s})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return yo.get(o)}function wo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),_o(n)}function Oo(){yo.clear(),vo.clear()}function So(){mo=!1}function Eo(){bo=!0}function To(){bo=!1}var jo,Po=wo,Io=Oo,xo=So,Ao=Eo,No=To;(jo=wo||(wo={})).gql=Po,jo.resetCaches=Io,jo.disableFragmentWarnings=xo,jo.enableExperimentalFragmentVariables=Ao,jo.disableExperimentalFragmentVariables=No,wo.default=wo,p(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var s=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return s.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return s.QueryBuilder}});var a=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return a.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();