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MglB,GAAQE,EAAQ,EAAGA,EAAQF,EAAOE,IACrFD,EAAMC,GAASzP,UAAUyP,GAI3B,OAAO,IADiB,mBAATpjB,KAAsBA,KAAO6f,IAC/B,SAAUzd,GACrB4d,GAAQ,WACN,IAAI5d,EAASogB,OAAb,CAEA,IAAK,IAAIlT,EAAI,EAAGA,EAAI6T,EAAMpjB,SAAUuP,EAElC,GADAlN,EAAShB,KAAK+hB,EAAM7T,IAChBlN,EAASogB,OAAQ,OAGvBpgB,EAASwE,UAPkB,CAQ7B,GACF,GACF,EAEAoY,EAAaa,EAAY,KAAM,CAAC,CAC9B/iB,IAAK2iB,EACLzjB,IAAK,WACH,OAAOgE,IACT,KAGK6f,CACT,CA9T8B,GAgU1BT,KACF7kB,OAAO2G,eAAe2e,EAAY9hB,OAAO,cAAe,CACtDnD,MAAO,CACLyoB,OAAQ7D,EACRO,gBAAiBA,GAEnBjB,cAAc,G","sources":["webpack://customer-portal/./node_modules/rehackt/index.js","webpack://customer-portal/./node_modules/@apollo/src/cache/inmemory/helpers.ts","webpack://customer-portal/./node_modules/@apollo/src/core/networkStatus.ts","webpack://customer-portal/./node_modules/@apollo/src/errors/index.ts","webpack://customer-portal/./node_modules/@apollo/src/link/core/ApolloLink.ts","webpack://customer-portal/./node_modules/@apollo/src/link/utils/createOperation.ts","webpack://customer-portal/./node_modules/@apollo/src/link/utils/transformOperation.ts","webpack://customer-portal/./node_modules/@apollo/src/link/utils/validateOperation.ts","webpack://customer-portal/./node_modules/@apollo/src/react/context/ApolloContext.ts","webpack://customer-portal/./node_modules/@apollo/src/react/hooks/internal/wrapHook.ts","webpack://customer-portal/./node_modules/@apollo/src/react/hooks/useApolloClient.ts","webpack://customer-portal/./node_modules/@apollo/src/react/hooks/useMutation.ts","webpack://customer-portal/./node_modules/@apollo/src/react/hooks/useQuery.ts","webpack://customer-portal/./node_modules/@apollo/src/react/hooks/useSyncExternalStore.ts","webpack://customer-portal/./node_modules/@apollo/src/react/parser/index.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/caching/caches.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/caching/getMemoryInternals.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/caching/sizes.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/arrays.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/canUse.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/canonicalStringify.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/compact.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/makeUniqueId.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/maybeDeepFreeze.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/mergeDeep.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/mergeOptions.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/objects.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/common/stringifyForDisplay.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/globals/global.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/globals/index.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/globals/invariantWrappers.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/globals/maybe.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/graphql/directives.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/graphql/fragments.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/graphql/getFromAST.ts","webpack://customer-portal/./node_modules/@apollo/src/utilities/graphql/storeUtils.ts","webpack://customer-portal/./node_modules/@apollo/src/version.ts","webpack://customer-portal/./node_modules/@wry/caches/src/strong.ts","webpack://customer-portal/./node_modules/@wry/caches/src/weak.ts","webpack://customer-portal/./node_modules/@wry/equality/src/index.ts","webpack://customer-portal/./node_modules/ts-invariant/src/invariant.ts","webpack://customer-portal/./node_modules/tslib/tslib.es6.mjs","webpack://customer-portal/./node_modules/zen-observable-ts/module.js"],"sourcesContent":["\"use strict\";\nif (0) {\n // Trick cjs-module-lexer into adding named exports for all React exports.\n // (if imported with `import()`, they will appear in `.default` as well.)\n // This way, cjs-module-lexer will let all of react's (named) exports through unchanged.\n module.exports = require(\"react\");\n}\n// We don't want bundlers to error when they encounter usage of any of these exports.\n// It's up to the package author to ensure that if they access React internals,\n// they do so in a safe way that won't break if React changes how they use these internals.\n// (e.g. only access them in development, and only in an optional way that won't\n// break if internals are not there or do not have the expected structure)\n// @ts-ignore\nmodule.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = undefined;\n// @ts-ignore\nmodule.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = undefined;\n// @ts-ignore\nmodule.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = undefined;\n// Here we actually pull in the React library and add everything\n// it exports to our own `module.exports`.\n// If React suddenly were to add one of the above \"polyfilled\" exports,\n// the React version would overwrite our version, so this should be\n// future-proof.\nObject.assign(module.exports, require(\"react\"));\n","import type {\n DocumentNode,\n FragmentDefinitionNode,\n SelectionSetNode,\n} from \"graphql\";\n\nimport type { NormalizedCache, InMemoryCacheConfig } from \"./types.js\";\n\nimport type { KeyFieldsContext } from \"./policies.js\";\nimport type { FragmentRegistryAPI } from \"./fragmentRegistry.js\";\n\nimport type {\n Reference,\n StoreValue,\n StoreObject,\n FragmentMap,\n FragmentMapFunction,\n} from \"../../utilities/index.js\";\nimport {\n isReference,\n isField,\n DeepMerger,\n resultKeyNameFromField,\n shouldInclude,\n isNonNullObject,\n compact,\n createFragmentMap,\n getFragmentDefinitions,\n isArray,\n} from \"../../utilities/index.js\";\n\nexport const { hasOwnProperty: hasOwn } = Object.prototype;\n\nexport function isNullish(value: any): value is null | undefined {\n return value === null || value === void 0;\n}\n\nexport { isArray };\n\nexport function defaultDataIdFromObject(\n { __typename, id, _id }: Readonly,\n context?: KeyFieldsContext\n): string | undefined {\n if (typeof __typename === \"string\") {\n if (context) {\n context.keyObject =\n !isNullish(id) ? { id }\n : !isNullish(_id) ? { _id }\n : void 0;\n }\n\n // If there is no object.id, fall back to object._id.\n if (isNullish(id) && !isNullish(_id)) {\n id = _id;\n }\n\n if (!isNullish(id)) {\n return `${__typename}:${\n typeof id === \"number\" || typeof id === \"string\" ?\n id\n : JSON.stringify(id)\n }`;\n }\n }\n}\n\nconst defaultConfig = {\n dataIdFromObject: defaultDataIdFromObject,\n addTypename: true,\n resultCaching: true,\n // Thanks to the shouldCanonizeResults helper, this should be the only line\n // you have to change to reenable canonization by default in the future.\n canonizeResults: false,\n};\n\nexport function normalizeConfig(config: InMemoryCacheConfig) {\n return compact(defaultConfig, config);\n}\n\nexport function shouldCanonizeResults(\n config: Pick\n): boolean {\n const value = config.canonizeResults;\n return value === void 0 ? defaultConfig.canonizeResults : value;\n}\n\nexport function getTypenameFromStoreObject(\n store: NormalizedCache,\n objectOrReference: StoreObject | Reference\n): string | undefined {\n return isReference(objectOrReference) ?\n (store.get(objectOrReference.__ref, \"__typename\") as string)\n : objectOrReference && objectOrReference.__typename;\n}\n\nexport const TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;\n\nexport function fieldNameFromStoreName(storeFieldName: string): string {\n const match = storeFieldName.match(TypeOrFieldNameRegExp);\n return match ? match[0] : storeFieldName;\n}\n\nexport function selectionSetMatchesResult(\n selectionSet: SelectionSetNode,\n result: Record,\n variables?: Record\n): boolean {\n if (isNonNullObject(result)) {\n return isArray(result) ?\n result.every((item) =>\n selectionSetMatchesResult(selectionSet, item, variables)\n )\n : selectionSet.selections.every((field) => {\n if (isField(field) && shouldInclude(field, variables)) {\n const key = resultKeyNameFromField(field);\n return (\n hasOwn.call(result, key) &&\n (!field.selectionSet ||\n selectionSetMatchesResult(\n field.selectionSet,\n result[key],\n variables\n ))\n );\n }\n // If the selection has been skipped with @skip(true) or\n // @include(false), it should not count against the matching. If\n // the selection is not a field, it must be a fragment (inline or\n // named). We will determine if selectionSetMatchesResult for that\n // fragment when we get to it, so for now we return true.\n return true;\n });\n }\n return false;\n}\n\nexport function storeValueIsStoreObject(\n value: StoreValue\n): value is StoreObject {\n return isNonNullObject(value) && !isReference(value) && !isArray(value);\n}\n\nexport function makeProcessedFieldsMerger() {\n return new DeepMerger();\n}\n\nexport function extractFragmentContext(\n document: DocumentNode,\n fragments?: FragmentRegistryAPI\n): {\n fragmentMap: FragmentMap;\n lookupFragment: FragmentMapFunction;\n} {\n // FragmentMap consisting only of fragments defined directly in document, not\n // including other fragments registered in the FragmentRegistry.\n const fragmentMap = createFragmentMap(getFragmentDefinitions(document));\n return {\n fragmentMap,\n lookupFragment(name) {\n let def: FragmentDefinitionNode | null = fragmentMap[name];\n if (!def && fragments) {\n def = fragments.lookup(name);\n }\n return def || null;\n },\n };\n}\n","/**\n * The current status of a query’s execution in our system.\n */\nexport enum NetworkStatus {\n /**\n * The query has never been run before and the query is now currently running. A query will still\n * have this network status even if a partial data result was returned from the cache, but a\n * query was dispatched anyway.\n */\n loading = 1,\n\n /**\n * If `setVariables` was called and a query was fired because of that then the network status\n * will be `setVariables` until the result of that query comes back.\n */\n setVariables = 2,\n\n /**\n * Indicates that `fetchMore` was called on this query and that the query created is currently in\n * flight.\n */\n fetchMore = 3,\n\n /**\n * Similar to the `setVariables` network status. It means that `refetch` was called on a query\n * and the refetch request is currently in flight.\n */\n refetch = 4,\n\n /**\n * Indicates that a polling query is currently in flight. So for example if you are polling a\n * query every 10 seconds then the network status will switch to `poll` every 10 seconds whenever\n * a poll request has been sent but not resolved.\n */\n poll = 6,\n\n /**\n * No request is in flight for this query, and no errors happened. Everything is OK.\n */\n ready = 7,\n\n /**\n * No request is in flight for this query, but one or more errors were detected.\n */\n error = 8,\n}\n\n/**\n * Returns true if there is currently a network request in flight according to a given network\n * status.\n */\nexport function isNetworkRequestInFlight(\n networkStatus?: NetworkStatus\n): boolean {\n return networkStatus ? networkStatus < 7 : false;\n}\n\n/**\n * Returns true if the network request is in ready or error state according to a given network\n * status.\n */\nexport function isNetworkRequestSettled(\n networkStatus?: NetworkStatus\n): boolean {\n return networkStatus === 7 || networkStatus === 8;\n}\n","import \"../utilities/globals/index.js\";\n\nimport type { GraphQLError, GraphQLErrorExtensions } from \"graphql\";\n\nimport { isNonNullObject } from \"../utilities/index.js\";\nimport type { ServerParseError } from \"../link/http/index.js\";\nimport type { ServerError } from \"../link/utils/index.js\";\nimport type { FetchResult } from \"../link/core/index.js\";\n\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nexport const PROTOCOL_ERRORS_SYMBOL: unique symbol = Symbol();\n\ntype FetchResultWithSymbolExtensions = FetchResult & {\n extensions: Record;\n};\n\nexport interface ApolloErrorOptions {\n graphQLErrors?: ReadonlyArray;\n protocolErrors?: ReadonlyArray<{\n message: string;\n extensions?: GraphQLErrorExtensions[];\n }>;\n clientErrors?: ReadonlyArray;\n networkError?: Error | ServerParseError | ServerError | null;\n errorMessage?: string;\n extraInfo?: any;\n}\n\nexport function graphQLResultHasProtocolErrors(\n result: FetchResult\n): result is FetchResultWithSymbolExtensions {\n if (result.extensions) {\n return Array.isArray(\n (result as FetchResultWithSymbolExtensions).extensions[\n PROTOCOL_ERRORS_SYMBOL\n ]\n );\n }\n return false;\n}\n\nexport function isApolloError(err: Error): err is ApolloError {\n return err.hasOwnProperty(\"graphQLErrors\");\n}\n\n// Sets the error message on this error according to the\n// the GraphQL and network errors that are present.\n// If the error message has already been set through the\n// constructor or otherwise, this function is a nop.\nconst generateErrorMessage = (err: ApolloError) => {\n const errors = [\n ...err.graphQLErrors,\n ...err.clientErrors,\n ...err.protocolErrors,\n ];\n if (err.networkError) errors.push(err.networkError);\n return (\n errors\n // The rest of the code sometimes unsafely types non-Error objects as GraphQLErrors\n .map(\n (err) =>\n (isNonNullObject(err) && err.message) || \"Error message not found.\"\n )\n .join(\"\\n\")\n );\n};\n\nexport type GraphQLErrors = ReadonlyArray;\n\nexport type NetworkError = Error | ServerParseError | ServerError | null;\n\nexport class ApolloError extends Error {\n public name: string;\n public message: string;\n public graphQLErrors: GraphQLErrors;\n public protocolErrors: ReadonlyArray<{\n message: string;\n extensions?: GraphQLErrorExtensions[];\n }>;\n public clientErrors: ReadonlyArray;\n public networkError: Error | ServerParseError | ServerError | null;\n\n // An object that can be used to provide some additional information\n // about an error, e.g. specifying the type of error this is. Used\n // internally within Apollo Client.\n public extraInfo: any;\n\n // Constructs an instance of ApolloError given a GraphQLError\n // or a network error. Note that one of these has to be a valid\n // value or the constructed error will be meaningless.\n constructor({\n graphQLErrors,\n protocolErrors,\n clientErrors,\n networkError,\n errorMessage,\n extraInfo,\n }: ApolloErrorOptions) {\n super(errorMessage);\n this.name = \"ApolloError\";\n this.graphQLErrors = graphQLErrors || [];\n this.protocolErrors = protocolErrors || [];\n this.clientErrors = clientErrors || [];\n this.networkError = networkError || null;\n this.message = errorMessage || generateErrorMessage(this);\n this.extraInfo = extraInfo;\n\n // We're not using `Object.setPrototypeOf` here as it isn't fully\n // supported on Android (see issue #3236).\n (this as any).__proto__ = ApolloError.prototype;\n }\n}\n","import { newInvariantError, invariant } from \"../../utilities/globals/index.js\";\n\nimport type { Observer } from \"../../utilities/index.js\";\nimport { Observable } from \"../../utilities/index.js\";\nimport type {\n NextLink,\n Operation,\n RequestHandler,\n FetchResult,\n GraphQLRequest,\n} from \"./types.js\";\nimport {\n validateOperation,\n createOperation,\n transformOperation,\n} from \"../utils/index.js\";\n\nfunction passthrough(op: Operation, forward: NextLink) {\n return (forward ? forward(op) : Observable.of()) as Observable;\n}\n\nfunction toLink(handler: RequestHandler | ApolloLink) {\n return typeof handler === \"function\" ? new ApolloLink(handler) : handler;\n}\n\nfunction isTerminating(link: ApolloLink): boolean {\n return link.request.length <= 1;\n}\n\nexport class ApolloLink {\n public static empty(): ApolloLink {\n return new ApolloLink(() => Observable.of());\n }\n\n public static from(links: (ApolloLink | RequestHandler)[]): ApolloLink {\n if (links.length === 0) return ApolloLink.empty();\n return links.map(toLink).reduce((x, y) => x.concat(y)) as ApolloLink;\n }\n\n public static split(\n test: (op: Operation) => boolean,\n left: ApolloLink | RequestHandler,\n right?: ApolloLink | RequestHandler\n ): ApolloLink {\n const leftLink = toLink(left);\n const rightLink = toLink(right || new ApolloLink(passthrough));\n\n let ret: ApolloLink;\n if (isTerminating(leftLink) && isTerminating(rightLink)) {\n ret = new ApolloLink((operation) => {\n return test(operation) ?\n leftLink.request(operation) || Observable.of()\n : rightLink.request(operation) || Observable.of();\n });\n } else {\n ret = new ApolloLink((operation, forward) => {\n return test(operation) ?\n leftLink.request(operation, forward) || Observable.of()\n : rightLink.request(operation, forward) || Observable.of();\n });\n }\n return Object.assign(ret, { left: leftLink, right: rightLink });\n }\n\n public static execute(\n link: ApolloLink,\n operation: GraphQLRequest\n ): Observable {\n return (\n link.request(\n createOperation(\n operation.context,\n transformOperation(validateOperation(operation))\n )\n ) || Observable.of()\n );\n }\n\n public static concat(\n first: ApolloLink | RequestHandler,\n second: ApolloLink | RequestHandler\n ) {\n const firstLink = toLink(first);\n if (isTerminating(firstLink)) {\n invariant.warn(\n `You are calling concat on a terminating link, which will have no effect %o`,\n firstLink\n );\n return firstLink;\n }\n const nextLink = toLink(second);\n\n let ret: ApolloLink;\n if (isTerminating(nextLink)) {\n ret = new ApolloLink(\n (operation) =>\n firstLink.request(\n operation,\n (op) => nextLink.request(op) || Observable.of()\n ) || Observable.of()\n );\n } else {\n ret = new ApolloLink((operation, forward) => {\n return (\n firstLink.request(operation, (op) => {\n return nextLink.request(op, forward) || Observable.of();\n }) || Observable.of()\n );\n });\n }\n return Object.assign(ret, { left: firstLink, right: nextLink });\n }\n\n constructor(request?: RequestHandler) {\n if (request) this.request = request;\n }\n\n public split(\n test: (op: Operation) => boolean,\n left: ApolloLink | RequestHandler,\n right?: ApolloLink | RequestHandler\n ): ApolloLink {\n return this.concat(\n ApolloLink.split(test, left, right || new ApolloLink(passthrough))\n );\n }\n\n public concat(next: ApolloLink | RequestHandler): ApolloLink {\n return ApolloLink.concat(this, next);\n }\n\n public request(\n operation: Operation,\n forward?: NextLink\n ): Observable | null {\n throw newInvariantError(\"request is not implemented\");\n }\n\n protected onError(\n error: any,\n observer?: Observer\n ): false | void {\n if (observer && observer.error) {\n observer.error(error);\n // Returning false indicates that observer.error does not need to be\n // called again, since it was already called (on the previous line).\n // Calling observer.error again would not cause any real problems,\n // since only the first call matters, but custom onError functions\n // might have other reasons for wanting to prevent the default\n // behavior by returning false.\n return false;\n }\n // Throw errors will be passed to observer.error.\n throw error;\n }\n\n public setOnError(fn: ApolloLink[\"onError\"]): this {\n this.onError = fn;\n return this;\n }\n\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n */\n readonly left?: ApolloLink;\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n */\n readonly right?: ApolloLink;\n\n /**\n * @internal\n * Can be provided by a link that has an internal cache to report it's memory details.\n */\n getMemoryInternals?: () => unknown;\n}\n","import type { GraphQLRequest, Operation } from \"../core/index.js\";\n\nexport function createOperation(\n starting: any,\n operation: GraphQLRequest\n): Operation {\n let context = { ...starting };\n const setContext: Operation[\"setContext\"] = (next) => {\n if (typeof next === \"function\") {\n context = { ...context, ...next(context) };\n } else {\n context = { ...context, ...next };\n }\n };\n const getContext: Operation[\"getContext\"] = () => ({ ...context });\n\n Object.defineProperty(operation, \"setContext\", {\n enumerable: false,\n value: setContext,\n });\n\n Object.defineProperty(operation, \"getContext\", {\n enumerable: false,\n value: getContext,\n });\n\n return operation as Operation;\n}\n","import type { GraphQLRequest, Operation } from \"../core/index.js\";\nimport { getOperationName } from \"../../utilities/index.js\";\n\nexport function transformOperation(operation: GraphQLRequest): GraphQLRequest {\n const transformedOperation: GraphQLRequest = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n\n // Best guess at an operation name\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== \"string\" ?\n getOperationName(transformedOperation.query) || undefined\n : \"\";\n }\n\n return transformedOperation as Operation;\n}\n","import { newInvariantError } from \"../../utilities/globals/index.js\";\nimport type { GraphQLRequest } from \"../core/index.js\";\n\nexport function validateOperation(operation: GraphQLRequest): GraphQLRequest {\n const OPERATION_FIELDS = [\n \"query\",\n \"operationName\",\n \"variables\",\n \"extensions\",\n \"context\",\n ];\n for (let key of Object.keys(operation)) {\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw newInvariantError(`illegal argument: %s`, key);\n }\n }\n\n return operation;\n}\n","import * as React from \"rehackt\";\nimport type * as ReactTypes from \"react\";\nimport type { ApolloClient } from \"../../core/index.js\";\nimport { canUseSymbol } from \"../../utilities/index.js\";\nimport type { RenderPromises } from \"../ssr/index.js\";\nimport { invariant } from \"../../utilities/globals/index.js\";\n\nexport interface ApolloContextValue {\n client?: ApolloClient;\n renderPromises?: RenderPromises;\n}\n\n// To make sure Apollo Client doesn't create more than one React context\n// (which can lead to problems like having an Apollo Client instance added\n// in one context, then attempting to retrieve it from another different\n// context), a single Apollo context is created and tracked in global state.\nconst contextKey =\n canUseSymbol ? Symbol.for(\"__APOLLO_CONTEXT__\") : \"__APOLLO_CONTEXT__\";\n\nexport function getApolloContext(): ReactTypes.Context {\n invariant(\n \"createContext\" in React,\n \"Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\n\" +\n \"The Apollo Client functionality you are trying to use is only available in React Client Components.\\n\" +\n 'Please make sure to add \"use client\" at the top of your file.\\n' +\n // TODO: change to React documentation once React documentation contains information about Client Components\n \"For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components\"\n );\n\n let context = (React.createContext as any)[\n contextKey\n ] as React.Context;\n if (!context) {\n Object.defineProperty(React.createContext, contextKey, {\n value: (context = React.createContext({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = \"ApolloContext\";\n }\n return context;\n}\n\n/**\n * @deprecated This function has no \"resetting\" effect since Apollo Client 3.4.12,\n * and will be removed in the next major version of Apollo Client.\n * If you want to get the Apollo Context, use `getApolloContext` instead.\n */\nexport const resetApolloContext = getApolloContext;\n","import type {\n useQuery,\n useSuspenseQuery,\n useBackgroundQuery,\n useReadQuery,\n useFragment,\n useQueryRefHandlers,\n} from \"../index.js\";\nimport type { QueryManager } from \"../../../core/QueryManager.js\";\nimport type { ApolloClient } from \"../../../core/ApolloClient.js\";\nimport type { ObservableQuery } from \"../../../core/ObservableQuery.js\";\n\nconst wrapperSymbol = Symbol.for(\"apollo.hook.wrappers\");\n\ninterface WrappableHooks {\n useQuery: typeof useQuery;\n useSuspenseQuery: typeof useSuspenseQuery;\n useBackgroundQuery: typeof useBackgroundQuery;\n useReadQuery: typeof useReadQuery;\n useFragment: typeof useFragment;\n useQueryRefHandlers: typeof useQueryRefHandlers;\n}\n\n/**\n * @internal\n * Can be used to correctly type the [Symbol.for(\"apollo.hook.wrappers\")] property of\n * `QueryManager`, to override/wrap hook functionality.\n */\nexport type HookWrappers = {\n [K in keyof WrappableHooks]?: (\n originalHook: WrappableHooks[K]\n ) => WrappableHooks[K];\n};\n\ninterface QueryManagerWithWrappers extends QueryManager {\n [wrapperSymbol]?: HookWrappers;\n}\n\n/**\n * @internal\n *\n * Makes an Apollo Client hook \"wrappable\".\n * That means that the Apollo Client instance can expose a \"wrapper\" that will be\n * used to wrap the original hook implementation with additional logic.\n * @example\n * ```tsx\n * // this is already done in `@apollo/client` for all wrappable hooks (see `WrappableHooks`)\n * // following this pattern\n * function useQuery() {\n * return wrapHook('useQuery', _useQuery, options.client)(query, options);\n * }\n * function _useQuery(query, options) {\n * // original implementation\n * }\n *\n * // this is what a library like `@apollo/client-react-streaming` would do\n * class ApolloClientWithStreaming extends ApolloClient {\n * constructor(options) {\n * super(options);\n * this.queryManager[Symbol.for(\"apollo.hook.wrappers\")] = {\n * useQuery: (original) => (query, options) => {\n * console.log(\"useQuery was called with options\", options);\n * return original(query, options);\n * }\n * }\n * }\n * }\n *\n * // this will now log the options and then call the original `useQuery`\n * const client = new ApolloClientWithStreaming({ ... });\n * useQuery(query, { client });\n * ```\n */\nexport function wrapHook any>(\n hookName: keyof WrappableHooks,\n useHook: Hook,\n clientOrObsQuery: ObservableQuery | ApolloClient\n): Hook {\n const queryManager = (\n clientOrObsQuery as unknown as {\n // both `ApolloClient` and `ObservableQuery` have a `queryManager` property\n // but they're both `private`, so we have to cast around for a bit here.\n queryManager: QueryManagerWithWrappers;\n }\n )[\"queryManager\"];\n const wrappers = queryManager && queryManager[wrapperSymbol];\n const wrapper: undefined | ((wrap: Hook) => Hook) =\n wrappers && (wrappers[hookName] as any);\n return wrapper ? wrapper(useHook) : useHook;\n}\n","import { invariant } from \"../../utilities/globals/index.js\";\nimport * as React from \"rehackt\";\nimport type { ApolloClient } from \"../../core/index.js\";\nimport { getApolloContext } from \"../context/index.js\";\n\n/**\n * @example\n * ```jsx\n * import { useApolloClient } from '@apollo/client';\n *\n * function SomeComponent() {\n * const client = useApolloClient();\n * // `client` is now set to the `ApolloClient` instance being used by the\n * // application (that was configured using something like `ApolloProvider`)\n * }\n * ```\n *\n * @since 3.0.0\n * @returns The `ApolloClient` instance being used by the application.\n */\nexport function useApolloClient(\n override?: ApolloClient\n): ApolloClient {\n const context = React.useContext(getApolloContext());\n const client = override || context.client;\n invariant(\n !!client,\n 'Could not find \"client\" in the context or passed in as an option. ' +\n \"Wrap the root component in an , or pass an ApolloClient \" +\n \"instance in via options.\"\n );\n\n return client;\n}\n","import * as React from \"rehackt\";\nimport type { DocumentNode } from \"graphql\";\nimport type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport type {\n MutationFunctionOptions,\n MutationHookOptions,\n MutationResult,\n MutationTuple,\n NoInfer,\n} from \"../types/types.js\";\n\nimport type {\n ApolloCache,\n DefaultContext,\n MutationOptions,\n OperationVariables,\n} from \"../../core/index.js\";\nimport { mergeOptions } from \"../../utilities/index.js\";\nimport { equal } from \"@wry/equality\";\nimport { DocumentType, verifyDocumentType } from \"../parser/index.js\";\nimport { ApolloError } from \"../../errors/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\n/**\n *\n *\n * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.\n *\n * @example\n * ```jsx\n * import { gql, useMutation } from '@apollo/client';\n *\n * const ADD_TODO = gql`\n * mutation AddTodo($type: String!) {\n * addTodo(type: $type) {\n * id\n * type\n * }\n * }\n * `;\n *\n * function AddTodo() {\n * let input;\n * const [addTodo, { data }] = useMutation(ADD_TODO);\n *\n * return (\n *
\n * {\n * e.preventDefault();\n * addTodo({ variables: { type: input.value } });\n * input.value = '';\n * }}\n * >\n * {\n * input = node;\n * }}\n * />\n * \n * \n *
\n * );\n * }\n * ```\n * @since 3.0.0\n * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.\n * @param options - Options to control how the mutation is executed.\n * @returns A tuple in the form of `[mutate, result]`\n */\nexport function useMutation<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n>(\n mutation: DocumentNode | TypedDocumentNode,\n options?: MutationHookOptions<\n NoInfer,\n NoInfer,\n TContext,\n TCache\n >\n): MutationTuple {\n const client = useApolloClient(options?.client);\n verifyDocumentType(mutation, DocumentType.Mutation);\n const [result, setResult] = React.useState>({\n called: false,\n loading: false,\n client,\n });\n\n const ref = React.useRef({\n result,\n mutationId: 0,\n isMounted: true,\n client,\n mutation,\n options,\n });\n\n // TODO: Trying to assign these in a useEffect or useLayoutEffect breaks\n // higher-order components.\n {\n Object.assign(ref.current, { client, options, mutation });\n }\n\n const execute = React.useCallback(\n (\n executeOptions: MutationFunctionOptions<\n TData,\n TVariables,\n TContext,\n TCache\n > = {}\n ) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n\n if (\n !ref.current.result.loading &&\n !baseOptions.ignoreResults &&\n ref.current.isMounted\n ) {\n setResult(\n (ref.current.result = {\n loading: true,\n error: void 0,\n data: void 0,\n called: true,\n client,\n })\n );\n }\n\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, executeOptions);\n\n return client\n .mutate(clientOptions as MutationOptions)\n .then((response) => {\n const { data, errors } = response;\n const error =\n errors && errors.length > 0 ?\n new ApolloError({ graphQLErrors: errors })\n : void 0;\n\n const onError =\n executeOptions.onError || ref.current.options?.onError;\n\n if (error && onError) {\n onError(\n error,\n clientOptions as MutationOptions\n );\n }\n\n if (\n mutationId === ref.current.mutationId &&\n !clientOptions.ignoreResults\n ) {\n const result = {\n called: true,\n loading: false,\n data,\n error,\n client,\n };\n\n if (ref.current.isMounted && !equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n\n const onCompleted =\n executeOptions.onCompleted || ref.current.options?.onCompleted;\n\n if (!error) {\n onCompleted?.(\n response.data!,\n clientOptions as MutationOptions\n );\n }\n\n return response;\n })\n .catch((error) => {\n if (mutationId === ref.current.mutationId && ref.current.isMounted) {\n const result = {\n loading: false,\n error,\n data: void 0,\n called: true,\n client,\n };\n\n if (!equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n\n const onError =\n executeOptions.onError || ref.current.options?.onError;\n\n if (onError) {\n onError(\n error,\n clientOptions as MutationOptions\n );\n\n // TODO(brian): why are we returning this here???\n return { data: void 0, errors: error };\n }\n\n throw error;\n });\n },\n []\n );\n\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = { called: false, loading: false, client };\n Object.assign(ref.current, { mutationId: 0, result });\n setResult(result);\n }\n }, []);\n\n React.useEffect(() => {\n ref.current.isMounted = true;\n\n return () => {\n ref.current.isMounted = false;\n };\n }, []);\n\n return [execute, { reset, ...result }];\n}\n","import { invariant } from \"../../utilities/globals/index.js\";\n\nimport * as React from \"rehackt\";\nimport { useSyncExternalStore } from \"./useSyncExternalStore.js\";\nimport { equal } from \"@wry/equality\";\n\nimport type {\n OperationVariables,\n WatchQueryFetchPolicy,\n} from \"../../core/index.js\";\nimport { mergeOptions } from \"../../utilities/index.js\";\nimport type { ApolloContextValue } from \"../context/index.js\";\nimport { getApolloContext } from \"../context/index.js\";\nimport { ApolloError } from \"../../errors/index.js\";\nimport type {\n ApolloClient,\n ApolloQueryResult,\n ObservableQuery,\n DocumentNode,\n TypedDocumentNode,\n WatchQueryOptions,\n} from \"../../core/index.js\";\nimport { NetworkStatus } from \"../../core/index.js\";\nimport type {\n QueryHookOptions,\n QueryResult,\n ObservableQueryFields,\n NoInfer,\n} from \"../types/types.js\";\n\nimport { DocumentType, verifyDocumentType } from \"../parser/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport {\n canUseWeakMap,\n compact,\n isNonEmptyArray,\n maybeDeepFreeze,\n} from \"../../utilities/index.js\";\nimport { wrapHook } from \"./internal/index.js\";\n\nconst {\n prototype: { hasOwnProperty },\n} = Object;\n\n/**\n * A hook for executing queries in an Apollo application.\n *\n * To run a query within a React component, call `useQuery` and pass it a GraphQL query document.\n *\n * When your component renders, `useQuery` returns an object from Apollo Client that contains `loading`, `error`, and `data` properties you can use to render your UI.\n *\n * > Refer to the [Queries](https://www.apollographql.com/docs/react/data/queries) section for a more in-depth overview of `useQuery`.\n *\n * @example\n * ```jsx\n * import { gql, useQuery } from '@apollo/client';\n *\n * const GET_GREETING = gql`\n * query GetGreeting($language: String!) {\n * greeting(language: $language) {\n * message\n * }\n * }\n * `;\n *\n * function Hello() {\n * const { loading, error, data } = useQuery(GET_GREETING, {\n * variables: { language: 'english' },\n * });\n * if (loading) return

Loading ...

;\n * return

Hello {data.greeting.message}!

;\n * }\n * ```\n * @since 3.0.0\n * @param query - A GraphQL query document parsed into an AST by `gql`.\n * @param options - Options to control how the query is executed.\n * @returns Query result object\n */\nexport function useQuery<\n TData = any,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode,\n options: QueryHookOptions<\n NoInfer,\n NoInfer\n > = Object.create(null)\n): QueryResult {\n return wrapHook(\n \"useQuery\",\n _useQuery,\n useApolloClient(options && options.client)\n )(query, options);\n}\n\nfunction _useQuery<\n TData = any,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode,\n options: QueryHookOptions, NoInfer>\n) {\n return useInternalState(useApolloClient(options.client), query).useQuery(\n options\n );\n}\n\nexport function useInternalState(\n client: ApolloClient,\n query: DocumentNode | TypedDocumentNode\n): InternalState {\n const stateRef = React.useRef>();\n if (\n !stateRef.current ||\n client !== stateRef.current.client ||\n query !== stateRef.current.query\n ) {\n stateRef.current = new InternalState(client, query, stateRef.current);\n }\n const state = stateRef.current;\n\n // By default, InternalState.prototype.forceUpdate is an empty function, but\n // we replace it here (before anyone has had a chance to see this state yet)\n // with a function that unconditionally forces an update, using the latest\n // setTick function. Updating this state by calling state.forceUpdate is the\n // only way we trigger React component updates (no other useState calls within\n // the InternalState class).\n state.forceUpdateState = React.useReducer((tick) => tick + 1, 0)[1];\n\n return state;\n}\n\nclass InternalState {\n constructor(\n public readonly client: ReturnType,\n public readonly query: DocumentNode | TypedDocumentNode,\n previous?: InternalState\n ) {\n verifyDocumentType(query, DocumentType.Query);\n\n // Reuse previousData from previous InternalState (if any) to provide\n // continuity of previousData even if/when the query or client changes.\n const previousResult = previous && previous.result;\n const previousData = previousResult && previousResult.data;\n if (previousData) {\n this.previousData = previousData;\n }\n }\n\n /**\n * Forces an update using local component state.\n * As this is not batched with `useSyncExternalStore` updates,\n * this is only used as a fallback if the `useSyncExternalStore` \"force update\"\n * method is not registered at the moment.\n * See https://github.com/facebook/react/issues/25191\n * */\n forceUpdateState() {\n // Replaced (in useInternalState) with a method that triggers an update.\n invariant.warn(\n \"Calling default no-op implementation of InternalState#forceUpdate\"\n );\n }\n\n /**\n * Will be overwritten by the `useSyncExternalStore` \"force update\" method\n * whenever it is available and reset to `forceUpdateState` when it isn't.\n */\n forceUpdate = () => this.forceUpdateState();\n\n executeQuery(\n options: QueryHookOptions & {\n query?: DocumentNode;\n }\n ) {\n if (options.query) {\n Object.assign(this, { query: options.query });\n }\n\n this.watchQueryOptions = this.createWatchQueryOptions(\n (this.queryHookOptions = options)\n );\n\n const concast = this.observable.reobserveAsConcast(\n this.getObsQueryOptions()\n );\n\n // Make sure getCurrentResult returns a fresh ApolloQueryResult,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n this.previousData = this.result?.data || this.previousData;\n this.result = void 0;\n this.forceUpdate();\n\n return new Promise>((resolve) => {\n let result: ApolloQueryResult;\n\n // Subscribe to the concast independently of the ObservableQuery in case\n // the component gets unmounted before the promise resolves. This prevents\n // the concast from terminating early and resolving with `undefined` when\n // there are no more subscribers for the concast.\n concast.subscribe({\n next: (value) => {\n result = value;\n },\n error: () => {\n resolve(this.toQueryResult(this.observable.getCurrentResult()));\n },\n complete: () => {\n resolve(this.toQueryResult(result));\n },\n });\n });\n }\n\n // Methods beginning with use- should be called according to the standard\n // rules of React hooks: only at the top level of the calling function, and\n // without any dynamic conditional logic.\n useQuery(options: QueryHookOptions) {\n // The renderPromises field gets initialized here in the useQuery method, at\n // the beginning of everything (for a given component rendering, at least),\n // so we can safely use this.renderPromises in other/later InternalState\n // methods without worrying it might be uninitialized. Even after\n // initialization, this.renderPromises is usually undefined (unless SSR is\n // happening), but that's fine as long as it has been initialized that way,\n // rather than left uninitialized.\n this.renderPromises = React.useContext(getApolloContext()).renderPromises;\n\n this.useOptions(options);\n\n const obsQuery = this.useObservableQuery();\n\n const result = useSyncExternalStore(\n React.useCallback(\n (handleStoreChange) => {\n if (this.renderPromises) {\n return () => {};\n }\n\n this.forceUpdate = handleStoreChange;\n\n const onNext = () => {\n const previousResult = this.result;\n // We use `getCurrentResult()` instead of the onNext argument because\n // the values differ slightly. Specifically, loading results will have\n // an empty object for data instead of `undefined` for some reason.\n const result = obsQuery.getCurrentResult();\n // Make sure we're not attempting to re-render similar results\n if (\n previousResult &&\n previousResult.loading === result.loading &&\n previousResult.networkStatus === result.networkStatus &&\n equal(previousResult.data, result.data)\n ) {\n return;\n }\n\n this.setResult(result);\n };\n\n const onError = (error: Error) => {\n subscription.unsubscribe();\n subscription = obsQuery.resubscribeAfterError(onNext, onError);\n\n if (!hasOwnProperty.call(error, \"graphQLErrors\")) {\n // The error is not a GraphQL error\n throw error;\n }\n\n const previousResult = this.result;\n if (\n !previousResult ||\n (previousResult && previousResult.loading) ||\n !equal(error, previousResult.error)\n ) {\n this.setResult({\n data: (previousResult && previousResult.data) as TData,\n error: error as ApolloError,\n loading: false,\n networkStatus: NetworkStatus.error,\n });\n }\n };\n\n let subscription = obsQuery.subscribe(onNext, onError);\n\n // Do the \"unsubscribe\" with a short delay.\n // This way, an existing subscription can be reused without an additional\n // request if \"unsubscribe\" and \"resubscribe\" to the same ObservableQuery\n // happen in very fast succession.\n return () => {\n setTimeout(() => subscription.unsubscribe());\n this.forceUpdate = () => this.forceUpdateState();\n };\n },\n [\n // We memoize the subscribe function using useCallback and the following\n // dependency keys, because the subscribe function reference is all that\n // useSyncExternalStore uses internally as a dependency key for the\n // useEffect ultimately responsible for the subscription, so we are\n // effectively passing this dependency array to that useEffect buried\n // inside useSyncExternalStore, as desired.\n obsQuery,\n this.renderPromises,\n this.client.disableNetworkFetches,\n ]\n ),\n\n () => this.getCurrentResult(),\n () => this.getCurrentResult()\n );\n\n // TODO Remove this method when we remove support for options.partialRefetch.\n this.unsafeHandlePartialRefetch(result);\n\n return this.toQueryResult(result);\n }\n\n // These members (except for renderPromises) are all populated by the\n // useOptions method, which is called unconditionally at the beginning of the\n // useQuery method, so we can safely use these members in other/later methods\n // without worrying they might be uninitialized.\n private renderPromises: ApolloContextValue[\"renderPromises\"];\n private queryHookOptions!: QueryHookOptions;\n private watchQueryOptions!: WatchQueryOptions;\n\n private useOptions(options: QueryHookOptions) {\n const watchQueryOptions = this.createWatchQueryOptions(\n (this.queryHookOptions = options)\n );\n\n // Update this.watchQueryOptions, but only when they have changed, which\n // allows us to depend on the referential stability of\n // this.watchQueryOptions elsewhere.\n const currentWatchQueryOptions = this.watchQueryOptions;\n\n if (!equal(watchQueryOptions, currentWatchQueryOptions)) {\n this.watchQueryOptions = watchQueryOptions;\n\n if (currentWatchQueryOptions && this.observable) {\n // Though it might be tempting to postpone this reobserve call to the\n // useEffect block, we need getCurrentResult to return an appropriate\n // loading:true result synchronously (later within the same call to\n // useQuery). Since we already have this.observable here (not true for\n // the very first call to useQuery), we are not initiating any new\n // subscriptions, though it does feel less than ideal that reobserve\n // (potentially) kicks off a network request (for example, when the\n // variables have changed), which is technically a side-effect.\n this.observable.reobserve(this.getObsQueryOptions());\n\n // Make sure getCurrentResult returns a fresh ApolloQueryResult,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n this.previousData = this.result?.data || this.previousData;\n this.result = void 0;\n }\n }\n\n // Make sure state.onCompleted and state.onError always reflect the latest\n // options.onCompleted and options.onError callbacks provided to useQuery,\n // since those functions are often recreated every time useQuery is called.\n // Like the forceUpdate method, the versions of these methods inherited from\n // InternalState.prototype are empty no-ops, but we can override them on the\n // base state object (without modifying the prototype).\n this.onCompleted =\n options.onCompleted || InternalState.prototype.onCompleted;\n this.onError = options.onError || InternalState.prototype.onError;\n\n if (\n (this.renderPromises || this.client.disableNetworkFetches) &&\n this.queryHookOptions.ssr === false &&\n !this.queryHookOptions.skip\n ) {\n // If SSR has been explicitly disabled, and this function has been called\n // on the server side, return the default loading state.\n this.result = this.ssrDisabledResult;\n } else if (\n this.queryHookOptions.skip ||\n this.watchQueryOptions.fetchPolicy === \"standby\"\n ) {\n // When skipping a query (ie. we're not querying for data but still want to\n // render children), make sure the `data` is cleared out and `loading` is\n // set to `false` (since we aren't loading anything).\n //\n // NOTE: We no longer think this is the correct behavior. Skipping should\n // not automatically set `data` to `undefined`, but instead leave the\n // previous data in place. In other words, skipping should not mandate that\n // previously received data is all of a sudden removed. Unfortunately,\n // changing this is breaking, so we'll have to wait until Apollo Client 4.0\n // to address this.\n this.result = this.skipStandbyResult;\n } else if (\n this.result === this.ssrDisabledResult ||\n this.result === this.skipStandbyResult\n ) {\n this.result = void 0;\n }\n }\n\n private getObsQueryOptions(): WatchQueryOptions {\n const toMerge: Array>> = [];\n\n const globalDefaults = this.client.defaultOptions.watchQuery;\n if (globalDefaults) toMerge.push(globalDefaults);\n\n if (this.queryHookOptions.defaultOptions) {\n toMerge.push(this.queryHookOptions.defaultOptions);\n }\n\n // We use compact rather than mergeOptions for this part of the merge,\n // because we want watchQueryOptions.variables (if defined) to replace\n // this.observable.options.variables whole. This replacement allows\n // removing variables by removing them from the variables input to\n // useQuery. If the variables were always merged together (rather than\n // replaced), there would be no way to remove existing variables.\n // However, the variables from options.defaultOptions and globalDefaults\n // (if provided) should be merged, to ensure individual defaulted\n // variables always have values, if not otherwise defined in\n // observable.options or watchQueryOptions.\n toMerge.push(\n compact(\n this.observable && this.observable.options,\n this.watchQueryOptions\n )\n );\n\n return toMerge.reduce(mergeOptions) as WatchQueryOptions;\n }\n\n private ssrDisabledResult = maybeDeepFreeze({\n loading: true,\n data: void 0 as unknown as TData,\n error: void 0,\n networkStatus: NetworkStatus.loading,\n });\n\n private skipStandbyResult = maybeDeepFreeze({\n loading: false,\n data: void 0 as unknown as TData,\n error: void 0,\n networkStatus: NetworkStatus.ready,\n });\n\n // A function to massage options before passing them to ObservableQuery.\n private createWatchQueryOptions({\n skip,\n ssr,\n onCompleted,\n onError,\n defaultOptions,\n // The above options are useQuery-specific, so this ...otherOptions spread\n // makes otherOptions almost a WatchQueryOptions object, except for the\n // query property that we add below.\n ...otherOptions\n }: QueryHookOptions = {}): WatchQueryOptions<\n TVariables,\n TData\n > {\n // This Object.assign is safe because otherOptions is a fresh ...rest object\n // that did not exist until just now, so modifications are still allowed.\n const watchQueryOptions: WatchQueryOptions =\n Object.assign(otherOptions, { query: this.query });\n\n if (\n this.renderPromises &&\n (watchQueryOptions.fetchPolicy === \"network-only\" ||\n watchQueryOptions.fetchPolicy === \"cache-and-network\")\n ) {\n // this behavior was added to react-apollo without explanation in this PR\n // https://github.com/apollographql/react-apollo/pull/1579\n watchQueryOptions.fetchPolicy = \"cache-first\";\n }\n\n if (!watchQueryOptions.variables) {\n watchQueryOptions.variables = {} as TVariables;\n }\n\n if (skip) {\n const {\n fetchPolicy = this.getDefaultFetchPolicy(),\n initialFetchPolicy = fetchPolicy,\n } = watchQueryOptions;\n\n // When skipping, we set watchQueryOptions.fetchPolicy initially to\n // \"standby\", but we also need/want to preserve the initial non-standby\n // fetchPolicy that would have been used if not skipping.\n Object.assign(watchQueryOptions, {\n initialFetchPolicy,\n fetchPolicy: \"standby\",\n });\n } else if (!watchQueryOptions.fetchPolicy) {\n watchQueryOptions.fetchPolicy =\n this.observable?.options.initialFetchPolicy ||\n this.getDefaultFetchPolicy();\n }\n\n return watchQueryOptions;\n }\n\n getDefaultFetchPolicy(): WatchQueryFetchPolicy {\n return (\n this.queryHookOptions.defaultOptions?.fetchPolicy ||\n this.client.defaultOptions.watchQuery?.fetchPolicy ||\n \"cache-first\"\n );\n }\n\n // Defining these methods as no-ops on the prototype allows us to call\n // state.onCompleted and/or state.onError without worrying about whether a\n // callback was provided.\n private onCompleted(data: TData) {}\n private onError(error: ApolloError) {}\n\n private observable!: ObservableQuery;\n private obsQueryFields!: Omit<\n ObservableQueryFields,\n \"variables\"\n >;\n\n private useObservableQuery() {\n // See if there is an existing observable that was used to fetch the same\n // data and if so, use it instead since it will contain the proper queryId\n // to fetch the result set. This is used during SSR.\n const obsQuery = (this.observable =\n (this.renderPromises &&\n this.renderPromises.getSSRObservable(this.watchQueryOptions)) ||\n this.observable || // Reuse this.observable if possible (and not SSR)\n this.client.watchQuery(this.getObsQueryOptions()));\n\n this.obsQueryFields = React.useMemo(\n () => ({\n refetch: obsQuery.refetch.bind(obsQuery),\n reobserve: obsQuery.reobserve.bind(obsQuery),\n fetchMore: obsQuery.fetchMore.bind(obsQuery),\n updateQuery: obsQuery.updateQuery.bind(obsQuery),\n startPolling: obsQuery.startPolling.bind(obsQuery),\n stopPolling: obsQuery.stopPolling.bind(obsQuery),\n subscribeToMore: obsQuery.subscribeToMore.bind(obsQuery),\n }),\n [obsQuery]\n );\n\n const ssrAllowed = !(\n this.queryHookOptions.ssr === false || this.queryHookOptions.skip\n );\n\n if (this.renderPromises && ssrAllowed) {\n this.renderPromises.registerSSRObservable(obsQuery);\n\n if (obsQuery.getCurrentResult().loading) {\n // TODO: This is a legacy API which could probably be cleaned up\n this.renderPromises.addObservableQueryPromise(obsQuery);\n }\n }\n\n return obsQuery;\n }\n\n // These members are populated by getCurrentResult and setResult, and it's\n // okay/normal for them to be initially undefined.\n private result: undefined | ApolloQueryResult;\n private previousData: undefined | TData;\n\n private setResult(nextResult: ApolloQueryResult) {\n const previousResult = this.result;\n if (previousResult && previousResult.data) {\n this.previousData = previousResult.data;\n }\n this.result = nextResult;\n // Calling state.setResult always triggers an update, though some call sites\n // perform additional equality checks before committing to an update.\n this.forceUpdate();\n this.handleErrorOrCompleted(nextResult, previousResult);\n }\n\n private handleErrorOrCompleted(\n result: ApolloQueryResult,\n previousResult?: ApolloQueryResult\n ) {\n if (!result.loading) {\n const error = this.toApolloError(result);\n\n // wait a tick in case we are in the middle of rendering a component\n Promise.resolve()\n .then(() => {\n if (error) {\n this.onError(error);\n } else if (\n result.data &&\n previousResult?.networkStatus !== result.networkStatus &&\n result.networkStatus === NetworkStatus.ready\n ) {\n this.onCompleted(result.data);\n }\n })\n .catch((error) => {\n invariant.warn(error);\n });\n }\n }\n\n private toApolloError(\n result: ApolloQueryResult\n ): ApolloError | undefined {\n return isNonEmptyArray(result.errors) ?\n new ApolloError({ graphQLErrors: result.errors })\n : result.error;\n }\n\n private getCurrentResult(): ApolloQueryResult {\n // Using this.result as a cache ensures getCurrentResult continues returning\n // the same (===) result object, unless state.setResult has been called, or\n // we're doing server rendering and therefore override the result below.\n if (!this.result) {\n this.handleErrorOrCompleted(\n (this.result = this.observable.getCurrentResult())\n );\n }\n return this.result;\n }\n\n // This cache allows the referential stability of this.result (as returned by\n // getCurrentResult) to translate into referential stability of the resulting\n // QueryResult object returned by toQueryResult.\n private toQueryResultCache = new (canUseWeakMap ? WeakMap : Map)<\n ApolloQueryResult,\n QueryResult\n >();\n\n toQueryResult(\n result: ApolloQueryResult\n ): QueryResult {\n let queryResult = this.toQueryResultCache.get(result);\n if (queryResult) return queryResult;\n\n const { data, partial, ...resultWithoutPartial } = result;\n this.toQueryResultCache.set(\n result,\n (queryResult = {\n data, // Ensure always defined, even if result.data is missing.\n ...resultWithoutPartial,\n ...this.obsQueryFields,\n client: this.client,\n observable: this.observable,\n variables: this.observable.variables,\n called: !this.queryHookOptions.skip,\n previousData: this.previousData,\n })\n );\n\n if (!queryResult.error && isNonEmptyArray(result.errors)) {\n // Until a set naming convention for networkError and graphQLErrors is\n // decided upon, we map errors (graphQLErrors) to the error options.\n // TODO: Is it possible for both result.error and result.errors to be\n // defined here?\n queryResult.error = new ApolloError({ graphQLErrors: result.errors });\n }\n\n return queryResult;\n }\n\n private unsafeHandlePartialRefetch(result: ApolloQueryResult) {\n // WARNING: SIDE-EFFECTS IN THE RENDER FUNCTION\n //\n // TODO: This code should be removed when the partialRefetch option is\n // removed. I was unable to get this hook to behave reasonably in certain\n // edge cases when this block was put in an effect.\n if (\n result.partial &&\n this.queryHookOptions.partialRefetch &&\n !result.loading &&\n (!result.data || Object.keys(result.data).length === 0) &&\n this.observable.options.fetchPolicy !== \"cache-only\"\n ) {\n Object.assign(result, {\n loading: true,\n networkStatus: NetworkStatus.refetch,\n });\n this.observable.refetch();\n }\n }\n}\n","import { invariant } from \"../../utilities/globals/index.js\";\nimport * as React from \"rehackt\";\n\nimport { canUseLayoutEffect } from \"../../utilities/index.js\";\n\nlet didWarnUncachedGetSnapshot = false;\n\ntype RealUseSESHookType =\n // This import depends only on the @types/use-sync-external-store package, not\n // the actual use-sync-external-store package, which is not installed. It\n // might be nice to get this type from React 18, but it still needs to work\n // when only React 17 or earlier is installed.\n typeof import(\"use-sync-external-store\").useSyncExternalStore;\n\n// Prevent webpack from complaining about our feature detection of the\n// useSyncExternalStore property of the React namespace, which is expected not\n// to exist when using React 17 and earlier, and that's fine.\nconst uSESKey = \"useSyncExternalStore\" as keyof typeof React;\nconst realHook = React[uSESKey] as RealUseSESHookType | undefined;\n\n// Adapted from https://www.npmjs.com/package/use-sync-external-store, with\n// Apollo Client deviations called out by \"// DEVIATION ...\" comments.\n\n// When/if React.useSyncExternalStore is defined, delegate fully to it.\nexport const useSyncExternalStore: RealUseSESHookType =\n realHook ||\n ((subscribe, getSnapshot, getServerSnapshot) => {\n // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n const value = getSnapshot();\n if (\n // DEVIATION: Using __DEV__\n __DEV__ &&\n !didWarnUncachedGetSnapshot &&\n // DEVIATION: Not using Object.is because we know our snapshots will never\n // be exotic primitive values like NaN, which is !== itself.\n value !== getSnapshot()\n ) {\n didWarnUncachedGetSnapshot = true;\n // DEVIATION: Using invariant.error instead of console.error directly.\n invariant.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n );\n }\n\n // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n const [{ inst }, forceUpdate] = React.useState({\n inst: { value, getSnapshot },\n });\n\n // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n if (canUseLayoutEffect) {\n // DEVIATION: We avoid calling useLayoutEffect when !canUseLayoutEffect,\n // which may seem like a conditional hook, but this code ends up behaving\n // unconditionally (one way or the other) because canUseLayoutEffect is\n // constant.\n React.useLayoutEffect(() => {\n Object.assign(inst, { value, getSnapshot });\n // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n }, [subscribe, value, getSnapshot]);\n } else {\n Object.assign(inst, { value, getSnapshot });\n }\n\n React.useEffect(() => {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n\n // Subscribe to the store and return a clean-up function.\n return subscribe(function handleStoreChange() {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n });\n }, [subscribe]);\n\n return value;\n });\n\nfunction checkIfSnapshotChanged({\n value,\n getSnapshot,\n}: {\n value: Snapshot;\n getSnapshot: () => Snapshot;\n}): boolean {\n try {\n return value !== getSnapshot();\n } catch {\n return true;\n }\n}\n","import { invariant } from \"../../utilities/globals/index.js\";\n\nimport type {\n DocumentNode,\n DefinitionNode,\n VariableDefinitionNode,\n OperationDefinitionNode,\n} from \"graphql\";\nimport {\n AutoCleanedWeakCache,\n cacheSizes,\n defaultCacheSizes,\n} from \"../../utilities/index.js\";\nimport { registerGlobalCache } from \"../../utilities/caching/getMemoryInternals.js\";\n\nexport enum DocumentType {\n Query,\n Mutation,\n Subscription,\n}\n\nexport interface IDocumentDefinition {\n type: DocumentType;\n name: string;\n variables: ReadonlyArray;\n}\n\nlet cache:\n | undefined\n | AutoCleanedWeakCache<\n DocumentNode,\n {\n name: string;\n type: DocumentType;\n variables: readonly VariableDefinitionNode[];\n }\n >;\n\nexport function operationName(type: DocumentType) {\n let name;\n switch (type) {\n case DocumentType.Query:\n name = \"Query\";\n break;\n case DocumentType.Mutation:\n name = \"Mutation\";\n break;\n case DocumentType.Subscription:\n name = \"Subscription\";\n break;\n }\n return name;\n}\n\n// This parser is mostly used to safety check incoming documents.\nexport function parser(document: DocumentNode): IDocumentDefinition {\n if (!cache) {\n cache = new AutoCleanedWeakCache(\n cacheSizes.parser || defaultCacheSizes.parser\n );\n }\n const cached = cache.get(document);\n if (cached) return cached;\n\n let variables, type, name;\n\n invariant(\n !!document && !!document.kind,\n `Argument of %s passed to parser was not a valid GraphQL ` +\n `DocumentNode. You may need to use 'graphql-tag' or another method ` +\n `to convert your operation into a document`,\n document\n );\n\n const fragments: DefinitionNode[] = [];\n const queries: DefinitionNode[] = [];\n const mutations: DefinitionNode[] = [];\n const subscriptions: DefinitionNode[] = [];\n\n for (const x of document.definitions) {\n if (x.kind === \"FragmentDefinition\") {\n fragments.push(x);\n continue;\n }\n\n if (x.kind === \"OperationDefinition\") {\n switch (x.operation) {\n case \"query\":\n queries.push(x);\n break;\n case \"mutation\":\n mutations.push(x);\n break;\n case \"subscription\":\n subscriptions.push(x);\n break;\n }\n }\n }\n\n invariant(\n !fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length,\n `Passing only a fragment to 'graphql' is not yet supported. ` +\n `You must include a query, subscription or mutation as well`\n );\n\n invariant(\n queries.length + mutations.length + subscriptions.length <= 1,\n `react-apollo only supports a query, subscription, or a mutation per HOC. ` +\n `%s had %s queries, %s ` +\n `subscriptions and %s mutations. ` +\n `You can use 'compose' to join multiple operation types to a component`,\n document,\n queries.length,\n subscriptions.length,\n mutations.length\n );\n\n type = queries.length ? DocumentType.Query : DocumentType.Mutation;\n if (!queries.length && !mutations.length) type = DocumentType.Subscription;\n\n const definitions =\n queries.length ? queries\n : mutations.length ? mutations\n : subscriptions;\n\n invariant(\n definitions.length === 1,\n `react-apollo only supports one definition per HOC. %s had ` +\n `%s definitions. ` +\n `You can use 'compose' to join multiple operation types to a component`,\n document,\n definitions.length\n );\n\n const definition = definitions[0] as OperationDefinitionNode;\n variables = definition.variableDefinitions || [];\n\n if (definition.name && definition.name.kind === \"Name\") {\n name = definition.name.value;\n } else {\n name = \"data\"; // fallback to using data if no name\n }\n\n const payload = { name, type, variables };\n cache.set(document, payload);\n return payload;\n}\n\nparser.resetCache = () => {\n cache = undefined;\n};\n\nif (__DEV__) {\n registerGlobalCache(\"parser\", () => (cache ? cache.size : 0));\n}\n\nexport function verifyDocumentType(document: DocumentNode, type: DocumentType) {\n const operation = parser(document);\n const requiredOperationName = operationName(type);\n const usedOperationName = operationName(operation.type);\n invariant(\n operation.type === type,\n `Running a %s requires a graphql ` + `%s, but a %s was used instead.`,\n requiredOperationName,\n requiredOperationName,\n usedOperationName\n );\n}\n","import { WeakCache, StrongCache } from \"@wry/caches\";\n\ninterface CleanableCache {\n size: number;\n max?: number;\n clean: () => void;\n}\nconst scheduledCleanup = new WeakSet();\nfunction schedule(cache: CleanableCache) {\n if (cache.size <= (cache.max || -1)) {\n return;\n }\n if (!scheduledCleanup.has(cache)) {\n scheduledCleanup.add(cache);\n setTimeout(() => {\n cache.clean();\n scheduledCleanup.delete(cache);\n }, 100);\n }\n}\n/**\n * @internal\n * A version of WeakCache that will auto-schedule a cleanup of the cache when\n * a new item is added and the cache reached maximum size.\n * Throttled to once per 100ms.\n *\n * @privateRemarks\n * Should be used throughout the rest of the codebase instead of WeakCache,\n * with the notable exception of usage in `wrap` from `optimism` - that one\n * already handles cleanup and should remain a `WeakCache`.\n */\nexport const AutoCleanedWeakCache = function (\n max?: number | undefined,\n dispose?: ((value: any, key: any) => void) | undefined\n) {\n /*\n Some builds of `WeakCache` are function prototypes, some are classes.\n This library still builds with an ES5 target, so we can't extend the\n real classes.\n Instead, we have to use this workaround until we switch to a newer build\n target.\n */\n const cache = new WeakCache(max, dispose);\n cache.set = function (key: any, value: any) {\n const ret = WeakCache.prototype.set.call(this, key, value);\n schedule(this as any as CleanableCache);\n return ret;\n };\n return cache;\n} as any as typeof WeakCache;\n/**\n * @internal\n */\nexport type AutoCleanedWeakCache = WeakCache;\n\n/**\n * @internal\n * A version of StrongCache that will auto-schedule a cleanup of the cache when\n * a new item is added and the cache reached maximum size.\n * Throttled to once per 100ms.\n *\n * @privateRemarks\n * Should be used throughout the rest of the codebase instead of StrongCache,\n * with the notable exception of usage in `wrap` from `optimism` - that one\n * already handles cleanup and should remain a `StrongCache`.\n */\nexport const AutoCleanedStrongCache = function (\n max?: number | undefined,\n dispose?: ((value: any, key: any) => void) | undefined\n) {\n /*\n Some builds of `StrongCache` are function prototypes, some are classes.\n This library still builds with an ES5 target, so we can't extend the\n real classes.\n Instead, we have to use this workaround until we switch to a newer build\n target.\n */\n const cache = new StrongCache(max, dispose);\n cache.set = function (key: any, value: any) {\n const ret = StrongCache.prototype.set.call(this, key, value);\n schedule(this as any as CleanableCache);\n return ret;\n };\n return cache;\n} as any as typeof StrongCache;\n/**\n * @internal\n */\nexport type AutoCleanedStrongCache = StrongCache;\n","import type { OptimisticWrapperFunction } from \"optimism\";\nimport type {\n InMemoryCache,\n DocumentTransform,\n ApolloLink,\n ApolloCache,\n} from \"../../core/index.js\";\nimport type { ApolloClient } from \"../../core/index.js\";\nimport type { CacheSizes } from \"./sizes.js\";\nimport { cacheSizes, defaultCacheSizes } from \"./sizes.js\";\n\nconst globalCaches: {\n print?: () => number;\n parser?: () => number;\n canonicalStringify?: () => number;\n} = {};\n\nexport function registerGlobalCache(\n name: keyof typeof globalCaches,\n getSize: () => number\n) {\n globalCaches[name] = getSize;\n}\n\n/**\n * Transformative helper type to turn a function of the form\n * ```ts\n * (this: any) => R\n * ```\n * into a function of the form\n * ```ts\n * () => R\n * ```\n * preserving the return type, but removing the `this` parameter.\n *\n * @remarks\n *\n * Further down in the definitions of `_getApolloClientMemoryInternals`,\n * `_getApolloCacheMemoryInternals` and `_getInMemoryCacheMemoryInternals`,\n * having the `this` parameter annotation is extremely useful for type checking\n * inside the function.\n *\n * If this is preserved in the exported types, though, it leads to a situation\n * where `ApolloCache.getMemoryInternals` is a function that requires a `this`\n * of the type `ApolloCache`, while the extending class `InMemoryCache` has a\n * `getMemoryInternals` function that requires a `this` of the type\n * `InMemoryCache`.\n * This is not compatible with TypeScript's inheritence system (although it is\n * perfectly correct), and so TypeScript will complain loudly.\n *\n * We still want to define our functions with the `this` annotation, though,\n * and have the return type inferred.\n * (This requirement for return type inference here makes it impossible to use\n * a function overload that is more explicit on the inner overload than it is\n * on the external overload.)\n *\n * So in the end, we use this helper to remove the `this` annotation from the\n * exported function types, while keeping it in the internal implementation.\n *\n */\ntype RemoveThis = T extends (this: any) => infer R ? () => R : never;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getApolloClientMemoryInternals =\n __DEV__ ?\n (_getApolloClientMemoryInternals as RemoveThis<\n typeof _getApolloClientMemoryInternals\n >)\n : undefined;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getInMemoryCacheMemoryInternals =\n __DEV__ ?\n (_getInMemoryCacheMemoryInternals as RemoveThis<\n typeof _getInMemoryCacheMemoryInternals\n >)\n : undefined;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getApolloCacheMemoryInternals =\n __DEV__ ?\n (_getApolloCacheMemoryInternals as RemoveThis<\n typeof _getApolloCacheMemoryInternals\n >)\n : undefined;\n\nfunction getCurrentCacheSizes() {\n // `defaultCacheSizes` is a `const enum` that will be inlined during build, so we have to reconstruct it's shape here\n const defaults: Record = {\n parser: defaultCacheSizes[\"parser\"],\n canonicalStringify: defaultCacheSizes[\"canonicalStringify\"],\n print: defaultCacheSizes[\"print\"],\n \"documentTransform.cache\": defaultCacheSizes[\"documentTransform.cache\"],\n \"queryManager.getDocumentInfo\":\n defaultCacheSizes[\"queryManager.getDocumentInfo\"],\n \"PersistedQueryLink.persistedQueryHashes\":\n defaultCacheSizes[\"PersistedQueryLink.persistedQueryHashes\"],\n \"fragmentRegistry.transform\":\n defaultCacheSizes[\"fragmentRegistry.transform\"],\n \"fragmentRegistry.lookup\": defaultCacheSizes[\"fragmentRegistry.lookup\"],\n \"fragmentRegistry.findFragmentSpreads\":\n defaultCacheSizes[\"fragmentRegistry.findFragmentSpreads\"],\n \"cache.fragmentQueryDocuments\":\n defaultCacheSizes[\"cache.fragmentQueryDocuments\"],\n \"removeTypenameFromVariables.getVariableDefinitions\":\n defaultCacheSizes[\"removeTypenameFromVariables.getVariableDefinitions\"],\n \"inMemoryCache.maybeBroadcastWatch\":\n defaultCacheSizes[\"inMemoryCache.maybeBroadcastWatch\"],\n \"inMemoryCache.executeSelectionSet\":\n defaultCacheSizes[\"inMemoryCache.executeSelectionSet\"],\n \"inMemoryCache.executeSubSelectedArray\":\n defaultCacheSizes[\"inMemoryCache.executeSubSelectedArray\"],\n };\n return Object.fromEntries(\n Object.entries(defaults).map(([k, v]) => [\n k,\n cacheSizes[k as keyof CacheSizes] || v,\n ])\n );\n}\n\nfunction _getApolloClientMemoryInternals(this: ApolloClient) {\n if (!__DEV__) throw new Error(\"only supported in development mode\");\n\n return {\n limits: getCurrentCacheSizes(),\n sizes: {\n print: globalCaches.print?.(),\n parser: globalCaches.parser?.(),\n canonicalStringify: globalCaches.canonicalStringify?.(),\n links: linkInfo(this.link),\n queryManager: {\n getDocumentInfo: this[\"queryManager\"][\"transformCache\"].size,\n documentTransforms: transformInfo(\n this[\"queryManager\"].documentTransform\n ),\n },\n ...(this.cache.getMemoryInternals?.() as Partial<\n ReturnType\n > &\n Partial>),\n },\n };\n}\n\nfunction _getApolloCacheMemoryInternals(this: ApolloCache) {\n return {\n cache: {\n fragmentQueryDocuments: getWrapperInformation(this[\"getFragmentDoc\"]),\n },\n };\n}\n\nfunction _getInMemoryCacheMemoryInternals(this: InMemoryCache) {\n const fragments = this.config.fragments as\n | undefined\n | {\n findFragmentSpreads?: Function;\n transform?: Function;\n lookup?: Function;\n };\n\n return {\n ..._getApolloCacheMemoryInternals.apply(this as any),\n addTypenameDocumentTransform: transformInfo(this[\"addTypenameTransform\"]),\n inMemoryCache: {\n executeSelectionSet: getWrapperInformation(\n this[\"storeReader\"][\"executeSelectionSet\"]\n ),\n executeSubSelectedArray: getWrapperInformation(\n this[\"storeReader\"][\"executeSubSelectedArray\"]\n ),\n maybeBroadcastWatch: getWrapperInformation(this[\"maybeBroadcastWatch\"]),\n },\n fragmentRegistry: {\n findFragmentSpreads: getWrapperInformation(\n fragments?.findFragmentSpreads\n ),\n lookup: getWrapperInformation(fragments?.lookup),\n transform: getWrapperInformation(fragments?.transform),\n },\n };\n}\n\nfunction isWrapper(f?: Function): f is OptimisticWrapperFunction {\n return !!f && \"dirtyKey\" in f;\n}\n\nfunction getWrapperInformation(f?: Function) {\n return isWrapper(f) ? f.size : undefined;\n}\n\nfunction isDefined(value: T | undefined | null): value is T {\n return value != null;\n}\n\nfunction transformInfo(transform?: DocumentTransform) {\n return recurseTransformInfo(transform).map((cache) => ({ cache }));\n}\n\nfunction recurseTransformInfo(transform?: DocumentTransform): number[] {\n return transform ?\n [\n getWrapperInformation(transform?.[\"performWork\"]),\n ...recurseTransformInfo(transform?.[\"left\"]),\n ...recurseTransformInfo(transform?.[\"right\"]),\n ].filter(isDefined)\n : [];\n}\n\nfunction linkInfo(link?: ApolloLink): unknown[] {\n return link ?\n [\n link?.getMemoryInternals?.(),\n ...linkInfo(link?.left),\n ...linkInfo(link?.right),\n ].filter(isDefined)\n : [];\n}\n","import { global } from \"../globals/index.js\";\n\ndeclare global {\n interface Window {\n [cacheSizeSymbol]?: Partial;\n }\n}\n\n/**\n * The cache sizes used by various Apollo Client caches.\n *\n * @remarks\n * All configurable caches hold memoized values. If an item is\n * cache-collected, it incurs only a small performance impact and\n * doesn't cause data loss. A smaller cache size might save you memory.\n *\n * You should choose cache sizes appropriate for storing a reasonable\n * number of values rather than every value. To prevent too much recalculation,\n * choose cache sizes that are at least large enough to hold memoized values for\n * all hooks/queries on the screen at any given time.\n */\n/*\n * We assume a \"base value\" of 1000 here, which is already very generous.\n * In most applications, it will be very unlikely that 1000 different queries\n * are on screen at the same time.\n */\nexport interface CacheSizes {\n /**\n * Cache size for the [`print`](https://github.com/apollographql/apollo-client/blob/main/src/utilities/graphql/print.ts) function.\n *\n * It is called with transformed `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `2000`.\n *\n * @remarks\n * This method is called to transform a GraphQL query AST parsed by `gql`\n * back into a GraphQL string.\n *\n * @privateRemarks\n * This method is called from the `QueryManager` and various `ApolloLink`s,\n * always with the \"serverQuery\", so the server-facing part of a transformed\n * `DocumentNode`.\n */\n print: number;\n /**\n * Cache size for the [`parser`](https://github.com/apollographql/apollo-client/blob/main/src/react/parser/index.ts) function.\n *\n * It is called with user-provided `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `1000`.\n *\n * @remarks\n * This method is called by HOCs and hooks.\n *\n * @privateRemarks\n * This function is used directly in HOCs, and nowadays mainly accessed by\n * calling `verifyDocumentType` from various hooks.\n * It is called with a user-provided DocumentNode.\n */\n parser: number;\n /**\n * Cache size for the cache of [`DocumentTransform`](https://github.com/apollographql/apollo-client/blob/main/src/utilities/graphql/DocumentTransform.ts)\n * instances with the `cache` option set to `true`.\n *\n * Can be called with user-defined or already-transformed `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `2000`.\n *\n * @remarks\n * The cache size here should be chosen with other `DocumentTransform`s in mind.\n * For example, if there was a `DocumentTransform` that would take `x` `DocumentNode`s,\n * and returned a differently-transformed `DocumentNode` depending if the app is\n * online or offline, then we assume that the cache returns `2*x` documents.\n * If that were concatenated with another `DocumentTransform` that would\n * also duplicate the cache size, you'd need to account for `4*x` documents\n * returned by the second transform.\n *\n * Due to an implementation detail of Apollo Client, if you use custom document\n * transforms you should always add `n` (the \"base\" number of user-provided\n * Documents) to the resulting cache size.\n *\n * If we assume that the user-provided transforms receive `n` documents and\n * return `n` documents, the cache size should be `2*n`.\n *\n * If we assume that the chain of user-provided transforms receive `n` documents and\n * return `4*n` documents, the cache size should be `5*n`.\n *\n * This size should also then be used in every other cache that mentions that\n * it operates on a \"transformed\" `DocumentNode`.\n *\n * @privateRemarks\n * Cache size for the `performWork` method of each [`DocumentTransform`](https://github.com/apollographql/apollo-client/blob/main/src/utilities/graphql/DocumentTransform.ts).\n *\n * No user-provided DocumentNode will actually be \"the last one\", as we run the\n * `defaultDocumentTransform` before *and* after the user-provided transforms.\n * For that reason, we need the extra `n` here - `n` for \"before transformation\"\n * plus the actual maximum cache size of the user-provided transform chain.\n *\n * This method is called from `transformDocument`, which is called from\n * `QueryManager` with a user-provided DocumentNode.\n * It is also called with already-transformed DocumentNodes, assuming the\n * user provided additional transforms.\n *\n */\n \"documentTransform.cache\": number;\n /**\n * A cache inside of [`QueryManager`](https://github.com/apollographql/apollo-client/blob/main/src/core/QueryManager.ts).\n *\n * It is called with transformed `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `2000`.\n *\n * @privateRemarks\n * Cache size for the `transformCache` used in the `getDocumentInfo` method of `QueryManager`.\n * Called throughout the `QueryManager` with transformed DocumentNodes.\n */\n \"queryManager.getDocumentInfo\": number;\n /**\n * A cache inside of [`PersistedQueryLink`](https://github.com/apollographql/apollo-client/blob/main/src/link/persisted-queries/index.ts).\n *\n * It is called with transformed `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `2000`.\n *\n * @remarks\n * This cache is used to cache the hashes of persisted queries.\n *\n * @privateRemarks\n * Cache size for the `hashesByQuery` cache in the `PersistedQueryLink`.\n */\n \"PersistedQueryLink.persistedQueryHashes\": number;\n /**\n * Cache used by [`canonicalStringify`](https://github.com/apollographql/apollo-client/blob/main/src/utilities/common/canonicalStringify.ts).\n *\n * @defaultValue\n * Defaults to `1000`.\n *\n * @remarks\n * This cache contains the sorted keys of objects that are stringified by\n * `canonicalStringify`.\n * It uses the stringified unsorted keys of objects as keys.\n * The cache will not grow beyond the size of different object **shapes**\n * encountered in an application, no matter how much actual data gets stringified.\n *\n * @privateRemarks\n * Cache size for the `sortingMap` in `canonicalStringify`.\n */\n canonicalStringify: number;\n /**\n * A cache inside of [`FragmentRegistry`](https://github.com/apollographql/apollo-client/blob/main/src/cache/inmemory/fragmentRegistry.ts).\n *\n * Can be called with user-defined or already-transformed `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `2000`.\n *\n * @privateRemarks\n *\n * Cache size for the `transform` method of FragmentRegistry.\n * This function is called as part of the `defaultDocumentTransform` which will be called with\n * user-provided and already-transformed DocumentNodes.\n *\n */\n \"fragmentRegistry.transform\": number;\n /**\n * A cache inside of [`FragmentRegistry`](https://github.com/apollographql/apollo-client/blob/main/src/cache/inmemory/fragmentRegistry.ts).\n *\n * This function is called with fragment names in the form of a string.\n *\n * @defaultValue\n * Defaults to `1000`.\n *\n * @remarks\n * The size of this case should be chosen with the number of fragments in\n * your application in mind.\n *\n * Note:\n * This function is a dependency of `fragmentRegistry.transform`, so having too small of a cache size here\n * might involuntarily invalidate values in the `transform` cache.\n *\n * @privateRemarks\n * Cache size for the `lookup` method of FragmentRegistry.\n */\n \"fragmentRegistry.lookup\": number;\n /**\n * Cache size for the `findFragmentSpreads` method of [`FragmentRegistry`](https://github.com/apollographql/apollo-client/blob/main/src/cache/inmemory/fragmentRegistry.ts).\n *\n * This function is called with transformed `DocumentNode`s, as well as recursively\n * with every fragment spread referenced within that, or a fragment referenced by a\n * fragment spread.\n *\n * @defaultValue\n * Defaults to `4000`.\n *\n * @remarks\n *\n * Note: This function is a dependency of `fragmentRegistry.transform`, so having too small of cache size here\n * might involuntarily invalidate values in the `transform` cache.\n */\n \"fragmentRegistry.findFragmentSpreads\": number;\n /**\n * Cache size for the `getFragmentDoc` method of [`ApolloCache`](https://github.com/apollographql/apollo-client/blob/main/src/cache/core/cache.ts).\n *\n * This function is called with user-provided fragment definitions.\n *\n * @defaultValue\n * Defaults to `1000`.\n *\n * @remarks\n * This function is called from `readFragment` with user-provided fragment definitions.\n */\n \"cache.fragmentQueryDocuments\": number;\n /**\n * Cache used in [`removeTypenameFromVariables`](https://github.com/apollographql/apollo-client/blob/main/src/link/remove-typename/removeTypenameFromVariables.ts).\n *\n * This function is called transformed `DocumentNode`s.\n *\n * @defaultValue\n * Defaults to `2000`.\n *\n * @privateRemarks\n * Cache size for the `getVariableDefinitions` function of `removeTypenameFromVariables`.\n */\n \"removeTypenameFromVariables.getVariableDefinitions\": number;\n /**\n * Cache size for the `maybeBroadcastWatch` method on [`InMemoryCache`](https://github.com/apollographql/apollo-client/blob/main/src/cache/inmemory/inMemoryCache.ts).\n *\n * Note: `maybeBroadcastWatch` will be set to the `resultCacheMaxSize` option and\n * will fall back to this configuration value if the option is not set.\n *\n * @defaultValue\n * Defaults to `5000`.\n *\n * @remarks\n * This method is used for dependency tracking in the `InMemoryCache` and\n * prevents from unnecessary re-renders.\n * It is recommended to keep this value significantly higher than the number of\n * possible subscribers you will have active at the same time in your application\n * at any time.\n */\n \"inMemoryCache.maybeBroadcastWatch\": number;\n /**\n * Cache size for the `executeSelectionSet` method on [`StoreReader`](https://github.com/apollographql/apollo-client/blob/main/src/cache/inmemory/readFromStore.ts).\n *\n * Note:\n * `executeSelectionSet` will be set to the `resultCacheMaxSize` option and\n * will fall back to this configuration value if the option is not set.\n *\n * @defaultValue\n * Defaults to `10000`.\n *\n * @remarks\n * Every object that is read from the cache will be cached here, so it is\n * recommended to set this to a high value.\n */\n \"inMemoryCache.executeSelectionSet\": number;\n /**\n * Cache size for the `executeSubSelectedArray` method on [`StoreReader`](https://github.com/apollographql/apollo-client/blob/main/src/cache/inmemory/readFromStore.ts).\n *\n * Note:\n * `executeSubSelectedArray` will be set to the `resultCacheMaxSize` option and\n * will fall back to this configuration value if the option is not set.\n *\n * @defaultValue\n * Defaults to `5000`.\n *\n * @remarks\n * Every array that is read from the cache will be cached here, so it is\n * recommended to set this to a high value.\n */\n \"inMemoryCache.executeSubSelectedArray\": number;\n}\n\nconst cacheSizeSymbol = Symbol.for(\"apollo.cacheSize\");\n/**\n *\n * The global cache size configuration for Apollo Client.\n *\n * @remarks\n *\n * You can directly modify this object, but any modification will\n * only have an effect on caches that are created after the modification.\n *\n * So for global caches, such as `parser`, `canonicalStringify` and `print`,\n * you might need to call `.reset` on them, which will essentially re-create them.\n *\n * Alternatively, you can set `globalThis[Symbol.for(\"apollo.cacheSize\")]` before\n * you load the Apollo Client package:\n *\n * @example\n * ```ts\n * globalThis[Symbol.for(\"apollo.cacheSize\")] = {\n * parser: 100\n * } satisfies Partial // the `satisfies` is optional if using TypeScript\n * ```\n */\nexport const cacheSizes: Partial = { ...global[cacheSizeSymbol] };\n\nexport const enum defaultCacheSizes {\n parser = 1000,\n canonicalStringify = 1000,\n print = 2000,\n \"documentTransform.cache\" = 2000,\n \"queryManager.getDocumentInfo\" = 2000,\n \"PersistedQueryLink.persistedQueryHashes\" = 2000,\n \"fragmentRegistry.transform\" = 2000,\n \"fragmentRegistry.lookup\" = 1000,\n \"fragmentRegistry.findFragmentSpreads\" = 4000,\n \"cache.fragmentQueryDocuments\" = 1000,\n \"removeTypenameFromVariables.getVariableDefinitions\" = 2000,\n \"inMemoryCache.maybeBroadcastWatch\" = 5000,\n \"inMemoryCache.executeSelectionSet\" = 50000,\n \"inMemoryCache.executeSubSelectedArray\" = 10000,\n}\n","// A version of Array.isArray that works better with readonly arrays.\nexport const isArray: (a: any) => a is any[] | readonly any[] = Array.isArray;\n\nexport function isNonEmptyArray(value?: ArrayLike): value is Array {\n return Array.isArray(value) && value.length > 0;\n}\n","import { maybe } from \"../globals/index.js\";\n\nexport const canUseWeakMap =\n typeof WeakMap === \"function\" &&\n !maybe(\n () => navigator.product == \"ReactNative\" && !(global as any).HermesInternal\n );\n\nexport const canUseWeakSet = typeof WeakSet === \"function\";\n\nexport const canUseSymbol =\n typeof Symbol === \"function\" && typeof Symbol.for === \"function\";\n\nexport const canUseAsyncIteratorSymbol = canUseSymbol && Symbol.asyncIterator;\n\nexport const canUseDOM =\n typeof maybe(() => window.document.createElement) === \"function\";\n\nconst usingJSDOM: boolean =\n // Following advice found in this comment from @domenic (maintainer of jsdom):\n // https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327\n //\n // Since we control the version of Jest and jsdom used when running Apollo\n // Client tests, and that version is recent enought to include \" jsdom/x.y.z\"\n // at the end of the user agent string, I believe this case is all we need to\n // check. Testing for \"Node.js\" was recommended for backwards compatibility\n // with older version of jsdom, but we don't have that problem.\n maybe(() => navigator.userAgent.indexOf(\"jsdom\") >= 0) || false;\n\n// Our tests should all continue to pass if we remove this !usingJSDOM\n// condition, thereby allowing useLayoutEffect when using jsdom. Unfortunately,\n// if we allow useLayoutEffect, then useSyncExternalStore generates many\n// warnings about useLayoutEffect doing nothing on the server. While these\n// warnings are harmless, this !usingJSDOM condition seems to be the best way to\n// prevent them (i.e. skipping useLayoutEffect when using jsdom).\nexport const canUseLayoutEffect = canUseDOM && !usingJSDOM;\n","import {\n AutoCleanedStrongCache,\n cacheSizes,\n defaultCacheSizes,\n} from \"../../utilities/caching/index.js\";\nimport { registerGlobalCache } from \"../caching/getMemoryInternals.js\";\n\n/**\n * Like JSON.stringify, but with object keys always sorted in the same order.\n *\n * To achieve performant sorting, this function uses a Map from JSON-serialized\n * arrays of keys (in any order) to sorted arrays of the same keys, with a\n * single sorted array reference shared by all permutations of the keys.\n *\n * As a drawback, this function will add a little bit more memory for every\n * object encountered that has different (more, less, a different order of) keys\n * than in the past.\n *\n * In a typical application, this extra memory usage should not play a\n * significant role, as `canonicalStringify` will be called for only a limited\n * number of object shapes, and the cache will not grow beyond a certain point.\n * But in some edge cases, this could be a problem, so we provide\n * canonicalStringify.reset() as a way of clearing the cache.\n * */\nexport const canonicalStringify = Object.assign(\n function canonicalStringify(value: any): string {\n return JSON.stringify(value, stableObjectReplacer);\n },\n {\n reset() {\n // Clearing the sortingMap will reclaim all cached memory, without\n // affecting the logical results of canonicalStringify, but potentially\n // sacrificing performance until the cache is refilled.\n sortingMap = new AutoCleanedStrongCache(\n cacheSizes.canonicalStringify || defaultCacheSizes.canonicalStringify\n );\n },\n }\n);\n\nif (__DEV__) {\n registerGlobalCache(\"canonicalStringify\", () => sortingMap.size);\n}\n\n// Values are JSON-serialized arrays of object keys (in any order), and values\n// are sorted arrays of the same keys.\nlet sortingMap!: AutoCleanedStrongCache;\ncanonicalStringify.reset();\n\n// The JSON.stringify function takes an optional second argument called a\n// replacer function. This function is called for each key-value pair in the\n// object being stringified, and its return value is used instead of the\n// original value. If the replacer function returns a new value, that value is\n// stringified as JSON instead of the original value of the property.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter\nfunction stableObjectReplacer(key: string, value: any) {\n if (value && typeof value === \"object\") {\n const proto = Object.getPrototypeOf(value);\n // We don't want to mess with objects that are not \"plain\" objects, which\n // means their prototype is either Object.prototype or null. This check also\n // prevents needlessly rearranging the indices of arrays.\n if (proto === Object.prototype || proto === null) {\n const keys = Object.keys(value);\n // If keys is already sorted, let JSON.stringify serialize the original\n // value instead of creating a new object with keys in the same order.\n if (keys.every(everyKeyInOrder)) return value;\n const unsortedKey = JSON.stringify(keys);\n let sortedKeys = sortingMap.get(unsortedKey);\n if (!sortedKeys) {\n keys.sort();\n const sortedKey = JSON.stringify(keys);\n // Checking for sortedKey in the sortingMap allows us to share the same\n // sorted array reference for all permutations of the same set of keys.\n sortedKeys = sortingMap.get(sortedKey) || keys;\n sortingMap.set(unsortedKey, sortedKeys);\n sortingMap.set(sortedKey, sortedKeys);\n }\n const sortedObject = Object.create(proto);\n // Reassigning the keys in sorted order will cause JSON.stringify to\n // serialize them in sorted order.\n sortedKeys.forEach((key) => {\n sortedObject[key] = value[key];\n });\n return sortedObject;\n }\n }\n return value;\n}\n\n// Since everything that happens in stableObjectReplacer benefits from being as\n// efficient as possible, we use a static function as the callback for\n// keys.every in order to test if the provided keys are already sorted without\n// allocating extra memory for a callback.\nfunction everyKeyInOrder(\n key: string,\n i: number,\n keys: readonly string[]\n): boolean {\n return i === 0 || keys[i - 1] <= key;\n}\n","import type { TupleToIntersection } from \"./mergeDeep.js\";\n\n/**\n * Merges the provided objects shallowly and removes\n * all properties with an `undefined` value\n */\nexport function compact(\n ...objects: TArgs\n): TupleToIntersection {\n const result = Object.create(null);\n\n objects.forEach((obj) => {\n if (!obj) return;\n Object.keys(obj).forEach((key) => {\n const value = (obj as any)[key];\n if (value !== void 0) {\n result[key] = value;\n }\n });\n });\n\n return result;\n}\n","const prefixCounts = new Map();\n\n// These IDs won't be globally unique, but they will be unique within this\n// process, thanks to the counter, and unguessable thanks to the random suffix.\nexport function makeUniqueId(prefix: string) {\n const count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return `${prefix}:${count}:${Math.random().toString(36).slice(2)}`;\n}\n","import { isNonNullObject } from \"./objects.js\";\n\nfunction deepFreeze(value: any) {\n const workSet = new Set([value]);\n workSet.forEach((obj) => {\n if (isNonNullObject(obj) && shallowFreeze(obj) === obj) {\n Object.getOwnPropertyNames(obj).forEach((name) => {\n if (isNonNullObject(obj[name])) workSet.add(obj[name]);\n });\n }\n });\n return value;\n}\n\nfunction shallowFreeze(obj: T): T | null {\n if (__DEV__ && !Object.isFrozen(obj)) {\n try {\n Object.freeze(obj);\n } catch (e) {\n // Some types like Uint8Array and Node.js's Buffer cannot be frozen, but\n // they all throw a TypeError when you try, so we re-throw any exceptions\n // that are not TypeErrors, since that would be unexpected.\n if (e instanceof TypeError) return null;\n throw e;\n }\n }\n return obj;\n}\n\nexport function maybeDeepFreeze(obj: T): T {\n if (__DEV__) {\n deepFreeze(obj);\n }\n return obj;\n}\n","import { isNonNullObject } from \"./objects.js\";\n\nconst { hasOwnProperty } = Object.prototype;\n\n// These mergeDeep and mergeDeepArray utilities merge any number of objects\n// together, sharing as much memory as possible with the source objects, while\n// remaining careful to avoid modifying any source objects.\n\n// Logically, the return type of mergeDeep should be the intersection of\n// all the argument types. The binary call signature is by far the most\n// common, but we support 0- through 5-ary as well. After that, the\n// resulting type is just the inferred array element type. Note to nerds:\n// there is a more clever way of doing this that converts the tuple type\n// first to a union type (easy enough: T[number]) and then converts the\n// union to an intersection type using distributive conditional type\n// inference, but that approach has several fatal flaws (boolean becomes\n// true & false, and the inferred type ends up as unknown in many cases),\n// in addition to being nearly impossible to explain/understand.\nexport type TupleToIntersection =\n T extends [infer A] ? A\n : T extends [infer A, infer B] ? A & B\n : T extends [infer A, infer B, infer C] ? A & B & C\n : T extends [infer A, infer B, infer C, infer D] ? A & B & C & D\n : T extends [infer A, infer B, infer C, infer D, infer E] ? A & B & C & D & E\n : T extends (infer U)[] ? U\n : any;\n\nexport function mergeDeep(\n ...sources: T\n): TupleToIntersection {\n return mergeDeepArray(sources);\n}\n\n// In almost any situation where you could succeed in getting the\n// TypeScript compiler to infer a tuple type for the sources array, you\n// could just use mergeDeep instead of mergeDeepArray, so instead of\n// trying to convert T[] to an intersection type we just infer the array\n// element type, which works perfectly when the sources array has a\n// consistent element type.\nexport function mergeDeepArray(sources: T[]): T {\n let target = sources[0] || ({} as T);\n const count = sources.length;\n if (count > 1) {\n const merger = new DeepMerger();\n for (let i = 1; i < count; ++i) {\n target = merger.merge(target, sources[i]);\n }\n }\n return target;\n}\n\nexport type ReconcilerFunction = (\n this: DeepMerger,\n target: Record,\n source: Record,\n property: string | number,\n ...context: TContextArgs\n) => any;\n\nconst defaultReconciler: ReconcilerFunction = function (\n target,\n source,\n property\n) {\n return this.merge(target[property], source[property]);\n};\n\nexport class DeepMerger {\n constructor(\n private reconciler: ReconcilerFunction = defaultReconciler as any as ReconcilerFunction\n ) {}\n\n public merge(target: any, source: any, ...context: TContextArgs): any {\n if (isNonNullObject(source) && isNonNullObject(target)) {\n Object.keys(source).forEach((sourceKey) => {\n if (hasOwnProperty.call(target, sourceKey)) {\n const targetValue = target[sourceKey];\n if (source[sourceKey] !== targetValue) {\n const result = this.reconciler(\n target,\n source,\n sourceKey,\n ...context\n );\n // A well-implemented reconciler may return targetValue to indicate\n // the merge changed nothing about the structure of the target.\n if (result !== targetValue) {\n target = this.shallowCopyForMerge(target);\n target[sourceKey] = result;\n }\n }\n } else {\n // If there is no collision, the target can safely share memory with\n // the source, and the recursion can terminate here.\n target = this.shallowCopyForMerge(target);\n target[sourceKey] = source[sourceKey];\n }\n });\n\n return target;\n }\n\n // If source (or target) is not an object, let source replace target.\n return source;\n }\n\n public isObject = isNonNullObject;\n\n private pastCopies = new Set();\n\n public shallowCopyForMerge(value: T): T {\n if (isNonNullObject(value)) {\n if (!this.pastCopies.has(value)) {\n if (Array.isArray(value)) {\n value = (value as any).slice(0);\n } else {\n value = {\n __proto__: Object.getPrototypeOf(value),\n ...value,\n };\n }\n this.pastCopies.add(value);\n }\n }\n return value;\n }\n}\n","import type {\n QueryOptions,\n WatchQueryOptions,\n MutationOptions,\n OperationVariables,\n} from \"../../core/index.js\";\n\nimport { compact } from \"./compact.js\";\n\ntype OptionsUnion =\n | WatchQueryOptions\n | QueryOptions\n | MutationOptions;\n\nexport function mergeOptions<\n TDefaultOptions extends Partial>,\n TOptions extends TDefaultOptions,\n>(\n defaults: TDefaultOptions | Partial | undefined,\n options: TOptions | Partial\n): TOptions & TDefaultOptions {\n return compact(\n defaults,\n options,\n options.variables && {\n variables: compact({\n ...(defaults && defaults.variables),\n ...options.variables,\n }),\n }\n );\n}\n","export function isNonNullObject(obj: any): obj is Record {\n return obj !== null && typeof obj === \"object\";\n}\n\nexport function isPlainObject(obj: any): obj is Record {\n return (\n obj !== null &&\n typeof obj === \"object\" &&\n (Object.getPrototypeOf(obj) === Object.prototype ||\n Object.getPrototypeOf(obj) === null)\n );\n}\n","import { makeUniqueId } from \"./makeUniqueId.js\";\n\nexport function stringifyForDisplay(value: any, space = 0): string {\n const undefId = makeUniqueId(\"stringifyForDisplay\");\n return JSON.stringify(\n value,\n (key, value) => {\n return value === void 0 ? undefId : value;\n },\n space\n )\n .split(JSON.stringify(undefId))\n .join(\"\");\n}\n","import { maybe } from \"./maybe.js\";\n\ndeclare global {\n const __DEV__: boolean; // will be removed in `dist` by the `postprocessDist` script\n interface Window {\n __DEV__?: boolean;\n }\n}\n\nexport default (maybe(() => globalThis) ||\n maybe(() => window) ||\n maybe(() => self) ||\n maybe(() => global) ||\n // We don't expect the Function constructor ever to be invoked at runtime, as\n // long as at least one of globalThis, window, self, or global is defined, so\n // we are under no obligation to make it easy for static analysis tools to\n // detect syntactic usage of the Function constructor. If you think you can\n // improve your static analysis to detect this obfuscation, think again. This\n // is an arms race you cannot win, at least not in JavaScript.\n maybe(function () {\n return maybe.constructor(\"return this\")();\n })) as typeof globalThis & Window;\n","import {\n invariant,\n newInvariantError,\n InvariantError,\n} from \"./invariantWrappers.js\";\n\nexport { maybe } from \"./maybe.js\";\nexport { default as global } from \"./global.js\";\nexport { invariant, newInvariantError, InvariantError };\n\n/**\n * @deprecated we do not use this internally anymore,\n * it is just exported for backwards compatibility\n */\n// this file is extempt from automatic `__DEV__` replacement\n// so we have to write it out here\n// @ts-ignore\nexport const DEV = globalThis.__DEV__ !== false;\nexport { DEV as __DEV__ };\n","import { invariant as originalInvariant, InvariantError } from \"ts-invariant\";\nimport { version } from \"../../version.js\";\nimport global from \"./global.js\";\nimport type { ErrorCodes } from \"../../invariantErrorCodes.js\";\nimport { stringifyForDisplay } from \"../common/stringifyForDisplay.js\";\n\nfunction wrap(fn: (msg?: string, ...args: any[]) => void) {\n return function (message?: string | number, ...args: any[]) {\n if (typeof message === \"number\") {\n const arg0 = message;\n message = getHandledErrorMsg(arg0);\n if (!message) {\n message = getFallbackErrorMsg(arg0, args);\n args = [];\n }\n }\n fn(...[message].concat(args));\n };\n}\n\ntype LogFunction = {\n /**\n * Logs a `$level` message if the user used `ts-invariant`'s `setVerbosity` to set\n * a verbosity level of `$level` or lower. (defaults to `\"log\"`).\n *\n * The user will either be presented with a link to the documentation for the message,\n * or they can use the `loadDevMessages` to add the message strings to the bundle.\n * The documentation will display the message without argument substitution.\n * Instead, the arguments will be printed on the console after the link.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n *\n * String substitutions like %s, %o, %d or %f are supported.\n */\n (message?: any, ...optionalParams: unknown[]): void;\n};\n\ntype WrappedInvariant = {\n /**\n * Throws and InvariantError with the given message if the condition is false.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n *\n * The user will either be presented with a link to the documentation for the message,\n * or they can use the `loadErrorMessages` to add the message strings to the bundle.\n * The documentation will display the message with the arguments substituted.\n *\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\n (\n condition: any,\n message?: string | number,\n ...optionalParams: unknown[]\n ): asserts condition;\n\n debug: LogFunction;\n log: LogFunction;\n warn: LogFunction;\n error: LogFunction;\n};\nconst invariant: WrappedInvariant = Object.assign(\n function invariant(\n condition: any,\n message?: string | number,\n ...args: unknown[]\n ): asserts condition {\n if (!condition) {\n originalInvariant(\n condition,\n getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args)\n );\n }\n },\n {\n debug: wrap(originalInvariant.debug),\n log: wrap(originalInvariant.log),\n warn: wrap(originalInvariant.warn),\n error: wrap(originalInvariant.error),\n }\n);\n\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(\n message?: string | number,\n ...optionalParams: unknown[]\n) {\n return new InvariantError(\n getHandledErrorMsg(message, optionalParams) ||\n getFallbackErrorMsg(message, optionalParams)\n );\n}\n\nconst ApolloErrorMessageHandler = Symbol.for(\n \"ApolloErrorMessageHandler_\" + version\n);\ndeclare global {\n interface Window {\n [ApolloErrorMessageHandler]?: {\n (message: string | number, args: string[]): string | undefined;\n } & ErrorCodes;\n }\n}\n\nfunction stringify(arg: any) {\n return typeof arg == \"string\" ? arg : (\n stringifyForDisplay(arg, 2).slice(0, 1000)\n );\n}\n\nfunction getHandledErrorMsg(\n message?: string | number,\n messageArgs: unknown[] = []\n) {\n if (!message) return;\n return (\n global[ApolloErrorMessageHandler] &&\n global[ApolloErrorMessageHandler](message, messageArgs.map(stringify))\n );\n}\n\nfunction getFallbackErrorMsg(\n message?: string | number,\n messageArgs: unknown[] = []\n) {\n if (!message) return;\n return `An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(\n JSON.stringify({\n version,\n message,\n args: messageArgs.map(stringify),\n })\n )}`;\n}\n\nexport {\n invariant,\n InvariantError,\n newInvariantError,\n ApolloErrorMessageHandler,\n};\n","export function maybe(thunk: () => T): T | undefined {\n try {\n return thunk();\n } catch {}\n}\n","import { invariant } from \"../globals/index.js\";\n\n// Provides the methods that allow QueryManager to handle the `skip` and\n// `include` directives within GraphQL.\nimport type {\n SelectionNode,\n VariableNode,\n BooleanValueNode,\n DirectiveNode,\n DocumentNode,\n ArgumentNode,\n ValueNode,\n ASTNode,\n} from \"graphql\";\nimport { visit, BREAK } from \"graphql\";\n\nexport type DirectiveInfo = {\n [fieldName: string]: { [argName: string]: any };\n};\n\nexport function shouldInclude(\n { directives }: SelectionNode,\n variables?: Record\n): boolean {\n if (!directives || !directives.length) {\n return true;\n }\n return getInclusionDirectives(directives).every(\n ({ directive, ifArgument }) => {\n let evaledValue: boolean = false;\n if (ifArgument.value.kind === \"Variable\") {\n evaledValue =\n variables && variables[(ifArgument.value as VariableNode).name.value];\n invariant(\n evaledValue !== void 0,\n `Invalid variable referenced in @%s directive.`,\n directive.name.value\n );\n } else {\n evaledValue = (ifArgument.value as BooleanValueNode).value;\n }\n return directive.name.value === \"skip\" ? !evaledValue : evaledValue;\n }\n );\n}\n\nexport function getDirectiveNames(root: ASTNode) {\n const names: string[] = [];\n\n visit(root, {\n Directive(node: DirectiveNode) {\n names.push(node.name.value);\n },\n });\n\n return names;\n}\n\nexport const hasAnyDirectives = (names: string[], root: ASTNode) =>\n hasDirectives(names, root, false);\n\nexport const hasAllDirectives = (names: string[], root: ASTNode) =>\n hasDirectives(names, root, true);\n\nexport function hasDirectives(names: string[], root: ASTNode, all?: boolean) {\n const nameSet = new Set(names);\n const uniqueCount = nameSet.size;\n\n visit(root, {\n Directive(node) {\n if (nameSet.delete(node.name.value) && (!all || !nameSet.size)) {\n return BREAK;\n }\n },\n });\n\n // If we found all the names, nameSet will be empty. If we only care about\n // finding some of them, the < condition is sufficient.\n return all ? !nameSet.size : nameSet.size < uniqueCount;\n}\n\nexport function hasClientExports(document: DocumentNode) {\n return document && hasDirectives([\"client\", \"export\"], document, true);\n}\n\nexport type InclusionDirectives = Array<{\n directive: DirectiveNode;\n ifArgument: ArgumentNode;\n}>;\n\nfunction isInclusionDirective({ name: { value } }: DirectiveNode): boolean {\n return value === \"skip\" || value === \"include\";\n}\n\nexport function getInclusionDirectives(\n directives: ReadonlyArray\n): InclusionDirectives {\n const result: InclusionDirectives = [];\n\n if (directives && directives.length) {\n directives.forEach((directive) => {\n if (!isInclusionDirective(directive)) return;\n\n const directiveArguments = directive.arguments;\n const directiveName = directive.name.value;\n\n invariant(\n directiveArguments && directiveArguments.length === 1,\n `Incorrect number of arguments for the @%s directive.`,\n directiveName\n );\n\n const ifArgument = directiveArguments![0];\n invariant(\n ifArgument.name && ifArgument.name.value === \"if\",\n `Invalid argument for the @%s directive.`,\n directiveName\n );\n\n const ifValue: ValueNode = ifArgument.value;\n\n // means it has to be a variable value if this is a valid @skip or @include directive\n invariant(\n ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\"),\n `Argument for the @%s directive must be a variable or a boolean value.`,\n directiveName\n );\n\n result.push({ directive, ifArgument });\n });\n }\n\n return result;\n}\n","import { invariant, newInvariantError } from \"../globals/index.js\";\n\nimport type {\n DocumentNode,\n FragmentDefinitionNode,\n InlineFragmentNode,\n SelectionNode,\n} from \"graphql\";\n\n// TODO(brian): A hack until this issue is resolved (https://github.com/graphql/graphql-js/issues/3356)\ntype Kind = any;\ntype OperationTypeNode = any;\n/**\n * Returns a query document which adds a single query operation that only\n * spreads the target fragment inside of it.\n *\n * So for example a document of:\n *\n * ```graphql\n * fragment foo on Foo { a b c }\n * ```\n *\n * Turns into:\n *\n * ```graphql\n * { ...foo }\n *\n * fragment foo on Foo { a b c }\n * ```\n *\n * The target fragment will either be the only fragment in the document, or a\n * fragment specified by the provided `fragmentName`. If there is more than one\n * fragment, but a `fragmentName` was not defined then an error will be thrown.\n */\nexport function getFragmentQueryDocument(\n document: DocumentNode,\n fragmentName?: string\n): DocumentNode {\n let actualFragmentName = fragmentName;\n\n // Build an array of all our fragment definitions that will be used for\n // validations. We also do some validations on the other definitions in the\n // document while building this list.\n const fragments: Array = [];\n document.definitions.forEach((definition) => {\n // Throw an error if we encounter an operation definition because we will\n // define our own operation definition later on.\n if (definition.kind === \"OperationDefinition\") {\n throw newInvariantError(\n `Found a %s operation%s. ` +\n \"No operations are allowed when using a fragment as a query. Only fragments are allowed.\",\n definition.operation,\n definition.name ? ` named '${definition.name.value}'` : \"\"\n );\n }\n // Add our definition to the fragments array if it is a fragment\n // definition.\n if (definition.kind === \"FragmentDefinition\") {\n fragments.push(definition);\n }\n });\n\n // If the user did not give us a fragment name then let us try to get a\n // name from a single fragment in the definition.\n if (typeof actualFragmentName === \"undefined\") {\n invariant(\n fragments.length === 1,\n `Found %s fragments. \\`fragmentName\\` must be provided when there is not exactly 1 fragment.`,\n fragments.length\n );\n actualFragmentName = fragments[0].name.value;\n }\n\n // Generate a query document with an operation that simply spreads the\n // fragment inside of it.\n const query: DocumentNode = {\n ...document,\n definitions: [\n {\n kind: \"OperationDefinition\" as Kind,\n // OperationTypeNode is an enum\n operation: \"query\" as OperationTypeNode,\n selectionSet: {\n kind: \"SelectionSet\" as Kind,\n selections: [\n {\n kind: \"FragmentSpread\" as Kind,\n name: {\n kind: \"Name\" as Kind,\n value: actualFragmentName,\n },\n },\n ],\n },\n },\n ...document.definitions,\n ],\n };\n\n return query;\n}\n\n/**\n * This is an interface that describes a map from fragment names to fragment definitions.\n */\nexport interface FragmentMap {\n [fragmentName: string]: FragmentDefinitionNode;\n}\n\nexport type FragmentMapFunction = (\n fragmentName: string\n) => FragmentDefinitionNode | null;\n\n// Utility function that takes a list of fragment definitions and makes a hash out of them\n// that maps the name of the fragment to the fragment definition.\nexport function createFragmentMap(\n fragments: FragmentDefinitionNode[] = []\n): FragmentMap {\n const symTable: FragmentMap = {};\n fragments.forEach((fragment) => {\n symTable[fragment.name.value] = fragment;\n });\n return symTable;\n}\n\nexport function getFragmentFromSelection(\n selection: SelectionNode,\n fragmentMap?: FragmentMap | FragmentMapFunction\n): InlineFragmentNode | FragmentDefinitionNode | null {\n switch (selection.kind) {\n case \"InlineFragment\":\n return selection;\n case \"FragmentSpread\": {\n const fragmentName = selection.name.value;\n if (typeof fragmentMap === \"function\") {\n return fragmentMap(fragmentName);\n }\n const fragment = fragmentMap && fragmentMap[fragmentName];\n invariant(fragment, `No fragment named %s`, fragmentName);\n return fragment || null;\n }\n default:\n return null;\n }\n}\n","import { invariant, newInvariantError } from \"../globals/index.js\";\n\nimport type {\n DocumentNode,\n OperationDefinitionNode,\n FragmentDefinitionNode,\n ValueNode,\n} from \"graphql\";\n\nimport { valueToObjectRepresentation } from \"./storeUtils.js\";\n\ntype OperationDefinitionWithName = OperationDefinitionNode & {\n name: NonNullable;\n};\n\n// Checks the document for errors and throws an exception if there is an error.\nexport function checkDocument(doc: DocumentNode) {\n invariant(\n doc && doc.kind === \"Document\",\n `Expecting a parsed GraphQL document. Perhaps you need to wrap the query \\\nstring in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql`\n );\n\n const operations = doc.definitions\n .filter((d) => d.kind !== \"FragmentDefinition\")\n .map((definition) => {\n if (definition.kind !== \"OperationDefinition\") {\n throw newInvariantError(\n `Schema type definitions not allowed in queries. Found: \"%s\"`,\n definition.kind\n );\n }\n return definition;\n });\n\n invariant(\n operations.length <= 1,\n `Ambiguous GraphQL document: contains %s operations`,\n operations.length\n );\n\n return doc;\n}\n\nexport function getOperationDefinition(\n doc: DocumentNode\n): OperationDefinitionNode | undefined {\n checkDocument(doc);\n return doc.definitions.filter(\n (definition): definition is OperationDefinitionNode =>\n definition.kind === \"OperationDefinition\"\n )[0];\n}\n\nexport function getOperationName(doc: DocumentNode): string | null {\n return (\n doc.definitions\n .filter(\n (definition): definition is OperationDefinitionWithName =>\n definition.kind === \"OperationDefinition\" && !!definition.name\n )\n .map((x) => x.name.value)[0] || null\n );\n}\n\n// Returns the FragmentDefinitions from a particular document as an array\nexport function getFragmentDefinitions(\n doc: DocumentNode\n): FragmentDefinitionNode[] {\n return doc.definitions.filter(\n (definition): definition is FragmentDefinitionNode =>\n definition.kind === \"FragmentDefinition\"\n );\n}\n\nexport function getQueryDefinition(doc: DocumentNode): OperationDefinitionNode {\n const queryDef = getOperationDefinition(doc)!;\n\n invariant(\n queryDef && queryDef.operation === \"query\",\n \"Must contain a query definition.\"\n );\n\n return queryDef;\n}\n\nexport function getFragmentDefinition(\n doc: DocumentNode\n): FragmentDefinitionNode {\n invariant(\n doc.kind === \"Document\",\n `Expecting a parsed GraphQL document. Perhaps you need to wrap the query \\\nstring in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql`\n );\n\n invariant(\n doc.definitions.length <= 1,\n \"Fragment must have exactly one definition.\"\n );\n\n const fragmentDef = doc.definitions[0] as FragmentDefinitionNode;\n\n invariant(\n fragmentDef.kind === \"FragmentDefinition\",\n \"Must be a fragment definition.\"\n );\n\n return fragmentDef as FragmentDefinitionNode;\n}\n\n/**\n * Returns the first operation definition found in this document.\n * If no operation definition is found, the first fragment definition will be returned.\n * If no definitions are found, an error will be thrown.\n */\nexport function getMainDefinition(\n queryDoc: DocumentNode\n): OperationDefinitionNode | FragmentDefinitionNode {\n checkDocument(queryDoc);\n\n let fragmentDefinition;\n\n for (let definition of queryDoc.definitions) {\n if (definition.kind === \"OperationDefinition\") {\n const operation = (definition as OperationDefinitionNode).operation;\n if (\n operation === \"query\" ||\n operation === \"mutation\" ||\n operation === \"subscription\"\n ) {\n return definition as OperationDefinitionNode;\n }\n }\n if (definition.kind === \"FragmentDefinition\" && !fragmentDefinition) {\n // we do this because we want to allow multiple fragment definitions\n // to precede an operation definition.\n fragmentDefinition = definition as FragmentDefinitionNode;\n }\n }\n\n if (fragmentDefinition) {\n return fragmentDefinition;\n }\n\n throw newInvariantError(\n \"Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.\"\n );\n}\n\nexport function getDefaultValues(\n definition: OperationDefinitionNode | undefined\n): Record {\n const defaultValues = Object.create(null);\n const defs = definition && definition.variableDefinitions;\n if (defs && defs.length) {\n defs.forEach((def) => {\n if (def.defaultValue) {\n valueToObjectRepresentation(\n defaultValues,\n def.variable.name,\n def.defaultValue as ValueNode\n );\n }\n });\n }\n return defaultValues;\n}\n","import { newInvariantError } from \"../globals/index.js\";\n\nimport type {\n DirectiveNode,\n FieldNode,\n IntValueNode,\n FloatValueNode,\n StringValueNode,\n BooleanValueNode,\n ObjectValueNode,\n ListValueNode,\n EnumValueNode,\n NullValueNode,\n VariableNode,\n InlineFragmentNode,\n ValueNode,\n SelectionNode,\n NameNode,\n SelectionSetNode,\n DocumentNode,\n FragmentSpreadNode,\n} from \"graphql\";\n\nimport { isNonNullObject } from \"../common/objects.js\";\nimport type { FragmentMap } from \"./fragments.js\";\nimport { getFragmentFromSelection } from \"./fragments.js\";\nimport { canonicalStringify } from \"../common/canonicalStringify.js\";\n\nexport interface Reference {\n readonly __ref: string;\n}\n\nexport function makeReference(id: string): Reference {\n return { __ref: String(id) };\n}\n\nexport function isReference(obj: any): obj is Reference {\n return Boolean(\n obj && typeof obj === \"object\" && typeof obj.__ref === \"string\"\n );\n}\n\nexport type StoreValue =\n | number\n | string\n | string[]\n | Reference\n | Reference[]\n | null\n | undefined\n | void\n | Object;\n\nexport interface StoreObject {\n __typename?: string;\n [storeFieldName: string]: StoreValue;\n}\n\n/**\n * Workaround for a TypeScript quirk:\n * types per default have an implicit index signature that makes them\n * assignable to `StoreObject`.\n * interfaces do not have that implicit index signature, so they cannot\n * be assigned to `StoreObject`.\n * This type just maps over a type or interface that is passed in,\n * implicitly adding the index signature.\n * That way, the result can be assigned to `StoreObject`.\n *\n * This is important if some user-defined interface is used e.g.\n * in cache.modify, where the `toReference` method expects a\n * `StoreObject` as input.\n */\nexport type AsStoreObject = {\n [K in keyof T]: T[K];\n};\n\nexport function isDocumentNode(value: any): value is DocumentNode {\n return (\n isNonNullObject(value) &&\n (value as DocumentNode).kind === \"Document\" &&\n Array.isArray((value as DocumentNode).definitions)\n );\n}\n\nfunction isStringValue(value: ValueNode): value is StringValueNode {\n return value.kind === \"StringValue\";\n}\n\nfunction isBooleanValue(value: ValueNode): value is BooleanValueNode {\n return value.kind === \"BooleanValue\";\n}\n\nfunction isIntValue(value: ValueNode): value is IntValueNode {\n return value.kind === \"IntValue\";\n}\n\nfunction isFloatValue(value: ValueNode): value is FloatValueNode {\n return value.kind === \"FloatValue\";\n}\n\nfunction isVariable(value: ValueNode): value is VariableNode {\n return value.kind === \"Variable\";\n}\n\nfunction isObjectValue(value: ValueNode): value is ObjectValueNode {\n return value.kind === \"ObjectValue\";\n}\n\nfunction isListValue(value: ValueNode): value is ListValueNode {\n return value.kind === \"ListValue\";\n}\n\nfunction isEnumValue(value: ValueNode): value is EnumValueNode {\n return value.kind === \"EnumValue\";\n}\n\nfunction isNullValue(value: ValueNode): value is NullValueNode {\n return value.kind === \"NullValue\";\n}\n\nexport function valueToObjectRepresentation(\n argObj: any,\n name: NameNode,\n value: ValueNode,\n variables?: Object\n) {\n if (isIntValue(value) || isFloatValue(value)) {\n argObj[name.value] = Number(value.value);\n } else if (isBooleanValue(value) || isStringValue(value)) {\n argObj[name.value] = value.value;\n } else if (isObjectValue(value)) {\n const nestedArgObj = {};\n value.fields.map((obj) =>\n valueToObjectRepresentation(nestedArgObj, obj.name, obj.value, variables)\n );\n argObj[name.value] = nestedArgObj;\n } else if (isVariable(value)) {\n const variableValue = (variables || ({} as any))[value.name.value];\n argObj[name.value] = variableValue;\n } else if (isListValue(value)) {\n argObj[name.value] = value.values.map((listValue) => {\n const nestedArgArrayObj = {};\n valueToObjectRepresentation(\n nestedArgArrayObj,\n name,\n listValue,\n variables\n );\n return (nestedArgArrayObj as any)[name.value];\n });\n } else if (isEnumValue(value)) {\n argObj[name.value] = (value as EnumValueNode).value;\n } else if (isNullValue(value)) {\n argObj[name.value] = null;\n } else {\n throw newInvariantError(\n `The inline argument \"%s\" of kind \"%s\"` +\n \"is not supported. Use variables instead of inline arguments to \" +\n \"overcome this limitation.\",\n name.value,\n (value as any).kind\n );\n }\n}\n\nexport function storeKeyNameFromField(\n field: FieldNode,\n variables?: Object\n): string {\n let directivesObj: any = null;\n if (field.directives) {\n directivesObj = {};\n field.directives.forEach((directive) => {\n directivesObj[directive.name.value] = {};\n\n if (directive.arguments) {\n directive.arguments.forEach(({ name, value }) =>\n valueToObjectRepresentation(\n directivesObj[directive.name.value],\n name,\n value,\n variables\n )\n );\n }\n });\n }\n\n let argObj: any = null;\n if (field.arguments && field.arguments.length) {\n argObj = {};\n field.arguments.forEach(({ name, value }) =>\n valueToObjectRepresentation(argObj, name, value, variables)\n );\n }\n\n return getStoreKeyName(field.name.value, argObj, directivesObj);\n}\n\nexport type Directives = {\n [directiveName: string]: {\n [argName: string]: any;\n };\n};\n\nconst KNOWN_DIRECTIVES: string[] = [\n \"connection\",\n \"include\",\n \"skip\",\n \"client\",\n \"rest\",\n \"export\",\n \"nonreactive\",\n];\n\n// Default stable JSON.stringify implementation used by getStoreKeyName. Can be\n// updated/replaced with something better by calling\n// getStoreKeyName.setStringify(newStringifyFunction).\nlet storeKeyNameStringify: (value: any) => string = canonicalStringify;\n\nexport const getStoreKeyName = Object.assign(\n function (\n fieldName: string,\n args?: Record | null,\n directives?: Directives\n ): string {\n if (\n args &&\n directives &&\n directives[\"connection\"] &&\n directives[\"connection\"][\"key\"]\n ) {\n if (\n directives[\"connection\"][\"filter\"] &&\n (directives[\"connection\"][\"filter\"] as string[]).length > 0\n ) {\n const filterKeys =\n directives[\"connection\"][\"filter\"] ?\n (directives[\"connection\"][\"filter\"] as string[])\n : [];\n filterKeys.sort();\n\n const filteredArgs = {} as { [key: string]: any };\n filterKeys.forEach((key) => {\n filteredArgs[key] = args[key];\n });\n\n return `${directives[\"connection\"][\"key\"]}(${storeKeyNameStringify(\n filteredArgs\n )})`;\n } else {\n return directives[\"connection\"][\"key\"];\n }\n }\n\n let completeFieldName: string = fieldName;\n\n if (args) {\n // We can't use `JSON.stringify` here since it's non-deterministic,\n // and can lead to different store key names being created even though\n // the `args` object used during creation has the same properties/values.\n const stringifiedArgs: string = storeKeyNameStringify(args);\n completeFieldName += `(${stringifiedArgs})`;\n }\n\n if (directives) {\n Object.keys(directives).forEach((key) => {\n if (KNOWN_DIRECTIVES.indexOf(key) !== -1) return;\n if (directives[key] && Object.keys(directives[key]).length) {\n completeFieldName += `@${key}(${storeKeyNameStringify(\n directives[key]\n )})`;\n } else {\n completeFieldName += `@${key}`;\n }\n });\n }\n\n return completeFieldName;\n },\n {\n setStringify(s: typeof storeKeyNameStringify) {\n const previous = storeKeyNameStringify;\n storeKeyNameStringify = s;\n return previous;\n },\n }\n);\n\nexport function argumentsObjectFromField(\n field: FieldNode | DirectiveNode,\n variables?: Record\n): Object | null {\n if (field.arguments && field.arguments.length) {\n const argObj: Object = {};\n field.arguments.forEach(({ name, value }) =>\n valueToObjectRepresentation(argObj, name, value, variables)\n );\n return argObj;\n }\n return null;\n}\n\nexport function resultKeyNameFromField(field: FieldNode): string {\n return field.alias ? field.alias.value : field.name.value;\n}\n\nexport function getTypenameFromResult(\n result: Record,\n selectionSet: SelectionSetNode,\n fragmentMap?: FragmentMap\n): string | undefined {\n let fragments: undefined | Array;\n for (const selection of selectionSet.selections) {\n if (isField(selection)) {\n if (selection.name.value === \"__typename\") {\n return result[resultKeyNameFromField(selection)];\n }\n } else if (fragments) {\n fragments.push(selection);\n } else {\n fragments = [selection];\n }\n }\n if (typeof result.__typename === \"string\") {\n return result.__typename;\n }\n if (fragments) {\n for (const selection of fragments) {\n const typename = getTypenameFromResult(\n result,\n getFragmentFromSelection(selection, fragmentMap)!.selectionSet,\n fragmentMap\n );\n if (typeof typename === \"string\") {\n return typename;\n }\n }\n }\n}\n\nexport function isField(selection: SelectionNode): selection is FieldNode {\n return selection.kind === \"Field\";\n}\n\nexport function isInlineFragment(\n selection: SelectionNode\n): selection is InlineFragmentNode {\n return selection.kind === \"InlineFragment\";\n}\n\nexport type VariableValue = (node: VariableNode) => any;\n","export const version = \"local\";\n","import type { CommonCache } from \"./common\";\n\ninterface Node {\n key: K;\n value: V;\n newer: Node | null;\n older: Node | null;\n}\n\nfunction defaultDispose() {}\n\nexport class StrongCache implements CommonCache {\n private map = new Map>();\n private newest: Node | null = null;\n private oldest: Node | null = null;\n\n constructor(\n private max = Infinity,\n public dispose: (value: V, key: K) => void = defaultDispose,\n ) {}\n\n public has(key: K): boolean {\n return this.map.has(key);\n }\n\n public get(key: K): V | undefined {\n const node = this.getNode(key);\n return node && node.value;\n }\n\n public get size() {\n return this.map.size;\n }\n\n private getNode(key: K): Node | undefined {\n const node = this.map.get(key);\n\n if (node && node !== this.newest) {\n const { older, newer } = node;\n\n if (newer) {\n newer.older = older;\n }\n\n if (older) {\n older.newer = newer;\n }\n\n node.older = this.newest;\n node.older!.newer = node;\n\n node.newer = null;\n this.newest = node;\n\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n\n return node;\n }\n\n public set(key: K, value: V): V {\n let node = this.getNode(key);\n if (node) {\n return node.value = value;\n }\n\n node = {\n key,\n value,\n newer: null,\n older: this.newest\n };\n\n if (this.newest) {\n this.newest.newer = node;\n }\n\n this.newest = node;\n this.oldest = this.oldest || node;\n\n this.map.set(key, node);\n\n return node.value;\n }\n\n public clean() {\n while (this.oldest && this.map.size > this.max) {\n this.delete(this.oldest.key);\n }\n }\n\n public delete(key: K): boolean {\n const node = this.map.get(key);\n if (node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n\n if (node.newer) {\n node.newer.older = node.older;\n }\n\n if (node.older) {\n node.older.newer = node.newer;\n }\n\n this.map.delete(key);\n this.dispose(node.value, key);\n\n return true;\n }\n\n return false;\n }\n}\n","import type { CommonCache } from \"./common\";\n\ninterface PartialNode {\n value: V;\n newer: Node | null;\n older: Node | null;\n}\n\ninterface UnfinalizedNode extends PartialNode {\n keyRef?: undefined;\n key: K;\n}\n\ninterface FullNode extends PartialNode {\n keyRef: WeakRef;\n key?: undefined;\n}\n\ntype Node = FullNode | UnfinalizedNode;\n\nfunction noop() {}\nconst defaultDispose = noop;\n\nconst _WeakRef =\n typeof WeakRef !== \"undefined\"\n ? WeakRef\n : (function (value: T) {\n return { deref: () => value } satisfies Omit<\n WeakRef,\n typeof Symbol.toStringTag\n >;\n } as any as typeof WeakRef);\nconst _WeakMap = typeof WeakMap !== \"undefined\" ? WeakMap : Map;\nconst _FinalizationRegistry =\n typeof FinalizationRegistry !== \"undefined\"\n ? FinalizationRegistry\n : (function () {\n return {\n register: noop,\n unregister: noop,\n } satisfies Omit, typeof Symbol.toStringTag>;\n } as any as typeof FinalizationRegistry);\n\nconst finalizationBatchSize = 10024;\n\nexport class WeakCache\n implements CommonCache\n{\n private map = new _WeakMap>();\n private registry: FinalizationRegistry>;\n private newest: Node | null = null;\n private oldest: Node | null = null;\n private unfinalizedNodes: Set> = new Set();\n private finalizationScheduled = false;\n public size = 0;\n\n constructor(\n private max = Infinity,\n public dispose: (value: V, key?: K) => void = defaultDispose\n ) {\n this.registry = new _FinalizationRegistry>(\n this.deleteNode.bind(this)\n );\n }\n\n public has(key: K): boolean {\n return this.map.has(key);\n }\n\n public get(key: K): V | undefined {\n const node = this.getNode(key);\n return node && node.value;\n }\n\n private getNode(key: K): Node | undefined {\n const node = this.map.get(key);\n\n if (node && node !== this.newest) {\n const { older, newer } = node;\n\n if (newer) {\n newer.older = older;\n }\n\n if (older) {\n older.newer = newer;\n }\n\n node.older = this.newest;\n node.older!.newer = node;\n\n node.newer = null;\n this.newest = node;\n\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n\n return node;\n }\n\n public set(key: K, value: V): V {\n let node = this.getNode(key);\n if (node) {\n return (node.value = value);\n }\n\n node = {\n key,\n value,\n newer: null,\n older: this.newest,\n };\n\n if (this.newest) {\n this.newest.newer = node;\n }\n\n this.newest = node;\n this.oldest = this.oldest || node;\n\n this.scheduleFinalization(node);\n this.map.set(key, node);\n this.size++;\n\n return node.value;\n }\n\n public clean() {\n while (this.oldest && this.size > this.max) {\n this.deleteNode(this.oldest);\n }\n }\n\n private deleteNode(node: Node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n\n if (node.newer) {\n node.newer.older = node.older;\n }\n\n if (node.older) {\n node.older.newer = node.newer;\n }\n\n this.size--;\n const key = node.key || (node.keyRef && node.keyRef.deref());\n this.dispose(node.value, key);\n if (!node.keyRef) {\n this.unfinalizedNodes.delete(node);\n } else {\n this.registry.unregister(node);\n }\n if (key) this.map.delete(key);\n }\n\n public delete(key: K): boolean {\n const node = this.map.get(key);\n if (node) {\n this.deleteNode(node);\n\n return true;\n }\n\n return false;\n }\n\n private scheduleFinalization(node: UnfinalizedNode) {\n this.unfinalizedNodes.add(node);\n if (!this.finalizationScheduled) {\n this.finalizationScheduled = true;\n queueMicrotask(this.finalize);\n }\n }\n\n private finalize = () => {\n const iterator = this.unfinalizedNodes.values();\n for (let i = 0; i < finalizationBatchSize; i++) {\n const node = iterator.next().value;\n if (!node) break;\n this.unfinalizedNodes.delete(node);\n const key = node.key;\n delete (node as unknown as FullNode).key;\n (node as unknown as FullNode).keyRef = new _WeakRef(key);\n this.registry.register(key, node, node);\n }\n if (this.unfinalizedNodes.size > 0) {\n queueMicrotask(this.finalize);\n } else {\n this.finalizationScheduled = false;\n }\n };\n}\n","const { toString, hasOwnProperty } = Object.prototype;\nconst fnToStr = Function.prototype.toString;\nconst previousComparisons = new Map>();\n\n/**\n * Performs a deep equality check on two JavaScript values, tolerating cycles.\n */\nexport function equal(a: any, b: any): boolean {\n try {\n return check(a, b);\n } finally {\n previousComparisons.clear();\n }\n}\n\n// Allow default imports as well.\nexport default equal;\n\nfunction check(a: any, b: any): boolean {\n // If the two values are strictly equal, our job is easy.\n if (a === b) {\n return true;\n }\n\n // Object.prototype.toString returns a representation of the runtime type of\n // the given value that is considerably more precise than typeof.\n const aTag = toString.call(a);\n const bTag = toString.call(b);\n\n // If the runtime types of a and b are different, they could maybe be equal\n // under some interpretation of equality, but for simplicity and performance\n // we just return false instead.\n if (aTag !== bTag) {\n return false;\n }\n\n switch (aTag) {\n case '[object Array]':\n // Arrays are a lot like other objects, but we can cheaply compare their\n // lengths as a short-cut before comparing their elements.\n if (a.length !== b.length) return false;\n // Fall through to object case...\n case '[object Object]': {\n if (previouslyCompared(a, b)) return true;\n\n const aKeys = definedKeys(a);\n const bKeys = definedKeys(b);\n\n // If `a` and `b` have a different number of enumerable keys, they\n // must be different.\n const keyCount = aKeys.length;\n if (keyCount !== bKeys.length) return false;\n\n // Now make sure they have the same keys.\n for (let k = 0; k < keyCount; ++k) {\n if (!hasOwnProperty.call(b, aKeys[k])) {\n return false;\n }\n }\n\n // Finally, check deep equality of all child properties.\n for (let k = 0; k < keyCount; ++k) {\n const key = aKeys[k];\n if (!check(a[key], b[key])) {\n return false;\n }\n }\n\n return true;\n }\n\n case '[object Error]':\n return a.name === b.name && a.message === b.message;\n\n case '[object Number]':\n // Handle NaN, which is !== itself.\n if (a !== a) return b !== b;\n // Fall through to shared +a === +b case...\n case '[object Boolean]':\n case '[object Date]':\n return +a === +b;\n\n case '[object RegExp]':\n case '[object String]':\n return a == `${b}`;\n\n case '[object Map]':\n case '[object Set]': {\n if (a.size !== b.size) return false;\n if (previouslyCompared(a, b)) return true;\n\n const aIterator = a.entries();\n const isMap = aTag === '[object Map]';\n\n while (true) {\n const info = aIterator.next();\n if (info.done) break;\n\n // If a instanceof Set, aValue === aKey.\n const [aKey, aValue] = info.value;\n\n // So this works the same way for both Set and Map.\n if (!b.has(aKey)) {\n return false;\n }\n\n // However, we care about deep equality of values only when dealing\n // with Map structures.\n if (isMap && !check(aValue, b.get(aKey))) {\n return false;\n }\n }\n\n return true;\n }\n\n case '[object Uint16Array]':\n case '[object Uint8Array]': // Buffer, in Node.js.\n case '[object Uint32Array]':\n case '[object Int32Array]':\n case '[object Int8Array]':\n case '[object Int16Array]':\n case '[object ArrayBuffer]':\n // DataView doesn't need these conversions, but the equality check is\n // otherwise the same.\n a = new Uint8Array(a);\n b = new Uint8Array(b);\n // Fall through...\n case '[object DataView]': {\n let len = a.byteLength;\n if (len === b.byteLength) {\n while (len-- && a[len] === b[len]) {\n // Keep looping as long as the bytes are equal.\n }\n }\n return len === -1;\n }\n\n case '[object AsyncFunction]':\n case '[object GeneratorFunction]':\n case '[object AsyncGeneratorFunction]':\n case '[object Function]': {\n const aCode = fnToStr.call(a);\n if (aCode !== fnToStr.call(b)) {\n return false;\n }\n\n // We consider non-native functions equal if they have the same code\n // (native functions require === because their code is censored).\n // Note that this behavior is not entirely sound, since !== function\n // objects with the same code can behave differently depending on\n // their closure scope. However, any function can behave differently\n // depending on the values of its input arguments (including this)\n // and its calling context (including its closure scope), even\n // though the function object is === to itself; and it is entirely\n // possible for functions that are not === to behave exactly the\n // same under all conceivable circumstances. Because none of these\n // factors are statically decidable in JavaScript, JS function\n // equality is not well-defined. This ambiguity allows us to\n // consider the best possible heuristic among various imperfect\n // options, and equating non-native functions that have the same\n // code has enormous practical benefits, such as when comparing\n // functions that are repeatedly passed as fresh function\n // expressions within objects that are otherwise deeply equal. Since\n // any function created from the same syntactic expression (in the\n // same code location) will always stringify to the same code\n // according to fnToStr.call, we can reasonably expect these\n // repeatedly passed function expressions to have the same code, and\n // thus behave \"the same\" (with all the caveats mentioned above),\n // even though the runtime function objects are !== to one another.\n return !endsWith(aCode, nativeCodeSuffix);\n }\n }\n\n // Otherwise the values are not equal.\n return false;\n}\n\nfunction definedKeys(obj: TObject) {\n // Remember that the second argument to Array.prototype.filter will be\n // used as `this` within the callback function.\n return Object.keys(obj).filter(isDefinedKey, obj);\n}\nfunction isDefinedKey(\n this: TObject,\n key: keyof TObject,\n) {\n return this[key] !== void 0;\n}\n\nconst nativeCodeSuffix = \"{ [native code] }\";\n\nfunction endsWith(full: string, suffix: string) {\n const fromIndex = full.length - suffix.length;\n return fromIndex >= 0 &&\n full.indexOf(suffix, fromIndex) === fromIndex;\n}\n\nfunction previouslyCompared(a: object, b: object): boolean {\n // Though cyclic references can make an object graph appear infinite from the\n // perspective of a depth-first traversal, the graph still contains a finite\n // number of distinct object references. We use the previousComparisons cache\n // to avoid comparing the same pair of object references more than once, which\n // guarantees termination (even if we end up comparing every object in one\n // graph to every object in the other graph, which is extremely unlikely),\n // while still allowing weird isomorphic structures (like rings with different\n // lengths) a chance to pass the equality test.\n let bSet = previousComparisons.get(a);\n if (bSet) {\n // Return true here because we can be sure false will be returned somewhere\n // else if the objects are not equivalent.\n if (bSet.has(b)) return true;\n } else {\n previousComparisons.set(a, bSet = new Set);\n }\n bSet.add(b);\n return false;\n}\n","const genericMessage = \"Invariant Violation\";\nconst {\n setPrototypeOf = function (obj: any, proto: any) {\n obj.__proto__ = proto;\n return obj;\n },\n} = Object as any;\n\nexport class InvariantError extends Error {\n framesToPop = 1;\n name = genericMessage;\n constructor(message: string | number = genericMessage) {\n super(\n typeof message === \"number\"\n ? `${genericMessage}: ${message} (see https://github.com/apollographql/invariant-packages)`\n : message\n );\n setPrototypeOf(this, InvariantError.prototype);\n }\n}\n\nexport function invariant(\n condition: any,\n message?: string | number,\n): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n\nconst verbosityLevels = [\"debug\", \"log\", \"warn\", \"error\", \"silent\"] as const;\nexport type VerbosityLevel = (typeof verbosityLevels)[number];\nexport type ConsoleMethodName = Exclude;\nlet verbosityLevel = verbosityLevels.indexOf(\"log\");\n\nfunction wrapConsoleMethod(name: M) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n const method = console[name] || console.log;\n return method.apply(console, arguments as any);\n }\n } as (typeof console)[M];\n}\n\nexport namespace invariant {\n export const debug = wrapConsoleMethod(\"debug\");\n export const log = wrapConsoleMethod(\"log\");\n export const warn = wrapConsoleMethod(\"warn\");\n export const error = wrapConsoleMethod(\"error\");\n}\n\nexport function setVerbosity(level: VerbosityLevel): VerbosityLevel {\n const old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\n\nexport default invariant;\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// === Symbol Support ===\nvar hasSymbols = function () {\n return typeof Symbol === 'function';\n};\n\nvar hasSymbol = function (name) {\n return hasSymbols() && Boolean(Symbol[name]);\n};\n\nvar getSymbol = function (name) {\n return hasSymbol(name) ? Symbol[name] : '@@' + name;\n};\n\nif (hasSymbols() && !hasSymbol('observable')) {\n Symbol.observable = Symbol('observable');\n}\n\nvar SymbolIterator = getSymbol('iterator');\nvar SymbolObservable = getSymbol('observable');\nvar SymbolSpecies = getSymbol('species'); // === Abstract Operations ===\n\nfunction getMethod(obj, key) {\n var value = obj[key];\n if (value == null) return undefined;\n if (typeof value !== 'function') throw new TypeError(value + ' is not a function');\n return value;\n}\n\nfunction getSpecies(obj) {\n var ctor = obj.constructor;\n\n if (ctor !== undefined) {\n ctor = ctor[SymbolSpecies];\n\n if (ctor === null) {\n ctor = undefined;\n }\n }\n\n return ctor !== undefined ? ctor : Observable;\n}\n\nfunction isObservable(x) {\n return x instanceof Observable; // SPEC: Brand check\n}\n\nfunction hostReportError(e) {\n if (hostReportError.log) {\n hostReportError.log(e);\n } else {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction enqueue(fn) {\n Promise.resolve().then(function () {\n try {\n fn();\n } catch (e) {\n hostReportError(e);\n }\n });\n}\n\nfunction cleanupSubscription(subscription) {\n var cleanup = subscription._cleanup;\n if (cleanup === undefined) return;\n subscription._cleanup = undefined;\n\n if (!cleanup) {\n return;\n }\n\n try {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n var unsubscribe = getMethod(cleanup, 'unsubscribe');\n\n if (unsubscribe) {\n unsubscribe.call(cleanup);\n }\n }\n } catch (e) {\n hostReportError(e);\n }\n}\n\nfunction closeSubscription(subscription) {\n subscription._observer = undefined;\n subscription._queue = undefined;\n subscription._state = 'closed';\n}\n\nfunction flushSubscription(subscription) {\n var queue = subscription._queue;\n\n if (!queue) {\n return;\n }\n\n subscription._queue = undefined;\n subscription._state = 'ready';\n\n for (var i = 0; i < queue.length; ++i) {\n notifySubscription(subscription, queue[i].type, queue[i].value);\n if (subscription._state === 'closed') break;\n }\n}\n\nfunction notifySubscription(subscription, type, value) {\n subscription._state = 'running';\n var observer = subscription._observer;\n\n try {\n var m = getMethod(observer, type);\n\n switch (type) {\n case 'next':\n if (m) m.call(observer, value);\n break;\n\n case 'error':\n closeSubscription(subscription);\n if (m) m.call(observer, value);else throw value;\n break;\n\n case 'complete':\n closeSubscription(subscription);\n if (m) m.call(observer);\n break;\n }\n } catch (e) {\n hostReportError(e);\n }\n\n if (subscription._state === 'closed') cleanupSubscription(subscription);else if (subscription._state === 'running') subscription._state = 'ready';\n}\n\nfunction onNotify(subscription, type, value) {\n if (subscription._state === 'closed') return;\n\n if (subscription._state === 'buffering') {\n subscription._queue.push({\n type: type,\n value: value\n });\n\n return;\n }\n\n if (subscription._state !== 'ready') {\n subscription._state = 'buffering';\n subscription._queue = [{\n type: type,\n value: value\n }];\n enqueue(function () {\n return flushSubscription(subscription);\n });\n return;\n }\n\n notifySubscription(subscription, type, value);\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(observer, subscriber) {\n // ASSERT: observer is an object\n // ASSERT: subscriber is callable\n this._cleanup = undefined;\n this._observer = observer;\n this._queue = undefined;\n this._state = 'initializing';\n var subscriptionObserver = new SubscriptionObserver(this);\n\n try {\n this._cleanup = subscriber.call(undefined, subscriptionObserver);\n } catch (e) {\n subscriptionObserver.error(e);\n }\n\n if (this._state === 'initializing') this._state = 'ready';\n }\n\n var _proto = Subscription.prototype;\n\n _proto.unsubscribe = function unsubscribe() {\n if (this._state !== 'closed') {\n closeSubscription(this);\n cleanupSubscription(this);\n }\n };\n\n _createClass(Subscription, [{\n key: \"closed\",\n get: function () {\n return this._state === 'closed';\n }\n }]);\n\n return Subscription;\n}();\n\nvar SubscriptionObserver = /*#__PURE__*/function () {\n function SubscriptionObserver(subscription) {\n this._subscription = subscription;\n }\n\n var _proto2 = SubscriptionObserver.prototype;\n\n _proto2.next = function next(value) {\n onNotify(this._subscription, 'next', value);\n };\n\n _proto2.error = function error(value) {\n onNotify(this._subscription, 'error', value);\n };\n\n _proto2.complete = function complete() {\n onNotify(this._subscription, 'complete');\n };\n\n _createClass(SubscriptionObserver, [{\n key: \"closed\",\n get: function () {\n return this._subscription._state === 'closed';\n }\n }]);\n\n return SubscriptionObserver;\n}();\n\nvar Observable = /*#__PURE__*/function () {\n function Observable(subscriber) {\n if (!(this instanceof Observable)) throw new TypeError('Observable cannot be called as a function');\n if (typeof subscriber !== 'function') throw new TypeError('Observable initializer must be a function');\n this._subscriber = subscriber;\n }\n\n var _proto3 = Observable.prototype;\n\n _proto3.subscribe = function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n observer = {\n next: observer,\n error: arguments[1],\n complete: arguments[2]\n };\n }\n\n return new Subscription(observer, this._subscriber);\n };\n\n _proto3.forEach = function forEach(fn) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n if (typeof fn !== 'function') {\n reject(new TypeError(fn + ' is not a function'));\n return;\n }\n\n function done() {\n subscription.unsubscribe();\n resolve();\n }\n\n var subscription = _this.subscribe({\n next: function (value) {\n try {\n fn(value, done);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n };\n\n _proto3.map = function map(fn) {\n var _this2 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this2.subscribe({\n next: function (value) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.filter = function filter(fn) {\n var _this3 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this3.subscribe({\n next: function (value) {\n try {\n if (!fn(value)) return;\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.reduce = function reduce(fn) {\n var _this4 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n var hasSeed = arguments.length > 1;\n var hasValue = false;\n var seed = arguments[1];\n var acc = seed;\n return new C(function (observer) {\n return _this4.subscribe({\n next: function (value) {\n var first = !hasValue;\n hasValue = true;\n\n if (!first || hasSeed) {\n try {\n acc = fn(acc, value);\n } catch (e) {\n return observer.error(e);\n }\n } else {\n acc = value;\n }\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (!hasValue && !hasSeed) return observer.error(new TypeError('Cannot reduce an empty sequence'));\n observer.next(acc);\n observer.complete();\n }\n });\n });\n };\n\n _proto3.concat = function concat() {\n var _this5 = this;\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscription;\n var index = 0;\n\n function startNext(next) {\n subscription = next.subscribe({\n next: function (v) {\n observer.next(v);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (index === sources.length) {\n subscription = undefined;\n observer.complete();\n } else {\n startNext(C.from(sources[index++]));\n }\n }\n });\n }\n\n startNext(_this5);\n return function () {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n });\n };\n\n _proto3.flatMap = function flatMap(fn) {\n var _this6 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscriptions = [];\n\n var outer = _this6.subscribe({\n next: function (value) {\n if (fn) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n }\n\n var inner = C.from(value).subscribe({\n next: function (value) {\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n var i = subscriptions.indexOf(inner);\n if (i >= 0) subscriptions.splice(i, 1);\n completeIfDone();\n }\n });\n subscriptions.push(inner);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n completeIfDone();\n }\n });\n\n function completeIfDone() {\n if (outer.closed && subscriptions.length === 0) observer.complete();\n }\n\n return function () {\n subscriptions.forEach(function (s) {\n return s.unsubscribe();\n });\n outer.unsubscribe();\n };\n });\n };\n\n _proto3[SymbolObservable] = function () {\n return this;\n };\n\n Observable.from = function from(x) {\n var C = typeof this === 'function' ? this : Observable;\n if (x == null) throw new TypeError(x + ' is not an object');\n var method = getMethod(x, SymbolObservable);\n\n if (method) {\n var observable = method.call(x);\n if (Object(observable) !== observable) throw new TypeError(observable + ' is not an object');\n if (isObservable(observable) && observable.constructor === C) return observable;\n return new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n\n if (hasSymbol('iterator')) {\n method = getMethod(x, SymbolIterator);\n\n if (method) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done;) {\n var item = _step.value;\n observer.next(item);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n }\n\n if (Array.isArray(x)) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < x.length; ++i) {\n observer.next(x[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n\n throw new TypeError(x + ' is not observable');\n };\n\n Observable.of = function of() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n var C = typeof this === 'function' ? this : Observable;\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < items.length; ++i) {\n observer.next(items[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n };\n\n _createClass(Observable, null, [{\n key: SymbolSpecies,\n get: function () {\n return this;\n }\n }]);\n\n return Observable;\n}();\n\nif (hasSymbols()) {\n Object.defineProperty(Observable, Symbol('extensions'), {\n value: {\n symbol: SymbolObservable,\n hostReportError: hostReportError\n },\n configurable: true\n });\n}\n\nexport { Observable };\n"],"names":["module","exports","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","undefined","__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE","__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE","Object","assign","hasOwn","prototype","isNullish","value","defaultDataIdFromObject","context","__typename","id","_id","keyObject","JSON","stringify","defaultConfig","dataIdFromObject","addTypename","resultCaching","canonizeResults","normalizeConfig","config","shouldCanonizeResults","getTypenameFromStoreObject","store","objectOrReference","get","__ref","TypeOrFieldNameRegExp","fieldNameFromStoreName","storeFieldName","match","selectionSetMatchesResult","selectionSet","result","variables","every","item","selections","field","key","call","storeValueIsStoreObject","makeProcessedFieldsMerger","extractFragmentContext","document","fragments","fragmentMap","lookupFragment","name","def","lookup","NetworkStatus","isNetworkRequestInFlight","networkStatus","isNetworkRequestSettled","PROTOCOL_ERRORS_SYMBOL","Symbol","graphQLResultHasProtocolErrors","extensions","Array","isArray","isApolloError","err","hasOwnProperty","errors","graphQLErrors","protocolErrors","clientErrors","networkError","errorMessage","extraInfo","message","push","map","join","__proto__","ApolloError","Error","passthrough","op","forward","of","toLink","handler","ApolloLink","isTerminating","link","request","length","this","empty","from","links","reduce","x","y","concat","split","test","left","right","ret","leftLink","rightLink","operation","execute","starting","defineProperty","enumerable","next","createOperation","transformedOperation","operationName","query","transformOperation","OPERATION_FIELDS","keys","indexOf","validateOperation","first","second","firstLink","nextLink","onError","error","observer","setOnError","fn","contextKey","for","getApolloContext","wrapperSymbol","wrapHook","hookName","useHook","clientOrObsQuery","queryManager","wrappers","wrapper","useApolloClient","override","client","useMutation","mutation","options","Mutation","called","loading","setResult","ref","mutationId","isMounted","current","executeOptions","baseOptions","ignoreResults","data","clientOptions","mutate","then","response","onCompleted","catch","reset","useQuery","create","_useQuery","useInternalState","stateRef","InternalState","state","forceUpdateState","tick","previous","forceUpdate","ssrDisabledResult","skipStandbyResult","ready","toQueryResultCache","WeakMap","Map","Query","previousResult","previousData","executeQuery","watchQueryOptions","createWatchQueryOptions","queryHookOptions","concast","observable","reobserveAsConcast","getObsQueryOptions","Promise","resolve","subscribe","toQueryResult","getCurrentResult","complete","renderPromises","useOptions","obsQuery","useObservableQuery","handleStoreChange","onNext","subscription","unsubscribe","resubscribeAfterError","setTimeout","disableNetworkFetches","unsafeHandlePartialRefetch","currentWatchQueryOptions","reobserve","ssr","skip","fetchPolicy","toMerge","globalDefaults","defaultOptions","watchQuery","otherOptions","getDefaultFetchPolicy","initialFetchPolicy","getSSRObservable","obsQueryFields","refetch","bind","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore","ssrAllowed","registerSSRObservable","addObservableQueryPromise","nextResult","handleErrorOrCompleted","toApolloError","queryResult","resultWithoutPartial","set","partial","partialRefetch","didWarnUncachedGetSnapshot","useSyncExternalStore","getSnapshot","getServerSnapshot","inst","checkIfSnapshotChanged","DocumentType","cache","type","Subscription","parser","A","cached","kind","queries","definition","scheduledCleanup","WeakSet","schedule","size","max","has","add","clean","delete","AutoCleanedWeakCache","dispose","AutoCleanedStrongCache","globalCaches","registerGlobalCache","getSize","getApolloClientMemoryInternals","limits","fromEntries","entries","canonicalStringify","print","k","v","sizes","linkInfo","getDocumentInfo","documentTransforms","transformInfo","documentTransform","getMemoryInternals","getInMemoryCacheMemoryInternals","_getApolloCacheMemoryInternals","apply","addTypenameDocumentTransform","inMemoryCache","executeSelectionSet","getWrapperInformation","executeSubSelectedArray","maybeBroadcastWatch","fragmentRegistry","findFragmentSpreads","transform","getApolloCacheMemoryInternals","fragmentQueryDocuments","f","isWrapper","isDefined","recurseTransformInfo","filter","cacheSizeSymbol","cacheSizes","isNonEmptyArray","canUseWeakMap","navigator","product","global","HermesInternal","canUseWeakSet","canUseSymbol","canUseAsyncIteratorSymbol","asyncIterator","canUseDOM","window","createElement","usingJSDOM","userAgent","canUseLayoutEffect","sortingMap","stableObjectReplacer","proto","getPrototypeOf","everyKeyInOrder","unsortedKey","sortedKeys","sort","sortedKey","forEach","i","compact","objects","obj","prefixCounts","makeUniqueId","prefix","count","Math","random","toString","slice","maybeDeepFreeze","workSet","Set","freeze","e","TypeError","shallowFreeze","getOwnPropertyNames","mergeDeep","mergeDeepArray","sources","target","merger","DeepMerger","merge","defaultReconciler","source","property","reconciler","isObject","pastCopies","sourceKey","targetValue","shallowCopyForMerge","mergeOptions","defaults","isNonNullObject","stringifyForDisplay","space","undefId","globalThis","self","__DEV__","wrap","arg0","getHandledErrorMsg","getFallbackErrorMsg","args","invariant","condition","debug","log","warn","newInvariantError","optionalParams","ApolloErrorMessageHandler","arg","messageArgs","encodeURIComponent","version","maybe","thunk","shouldInclude","directives","directive","isInclusionDirective","directiveArguments","arguments","directiveName","ifArgument","ifValue","getInclusionDirectives","evaledValue","hasDirectives","names","root","all","nameSet","uniqueCount","visit","Directive","node","BREAK","hasClientExports","getFragmentQueryDocument","fragmentName","actualFragmentName","definitions","checkDocument","doc","operations","d","getOperationDefinition","getOperationName","getFragmentDefinitions","getQueryDefinition","queryDef","getFragmentDefinition","fragmentDef","getMainDefinition","queryDoc","fragmentDefinition","getDefaultValues","defaultValues","defs","variableDefinitions","defaultValue","variable","makeReference","String","isReference","Boolean","isDocumentNode","valueToObjectRepresentation","argObj","isIntValue","isFloatValue","Number","isBooleanValue","isStringValue","isObjectValue","fields","isVariable","variableValue","isListValue","values","listValue","nestedArgArrayObj","isEnumValue","isNullValue","directivesObj","filterKeys","selection","typename","defaultDispose","StrongCache","constructor","Infinity","newest","oldest","getNode","older","newer","noop","_WeakRef","WeakRef","deref","_WeakMap","_FinalizationRegistry","FinalizationRegistry","register","unregister","WeakCache","unfinalizedNodes","finalizationScheduled","finalize","iterator","keyRef","registry","queueMicrotask","deleteNode","scheduleFinalization","fnToStr","Function","previousComparisons","equal","a","b","check","clear","aTag","previouslyCompared","aKeys","definedKeys","bKeys","keyCount","aIterator","isMap","info","done","aKey","aValue","Uint8Array","len","byteLength","aCode","full","suffix","fromIndex","endsWith","nativeCodeSuffix","isDefinedKey","bSet","genericMessage","setPrototypeOf","framesToPop","InvariantError","verbosityLevels","verbosityLevel","wrapConsoleMethod","console","setVerbosity","level","old","extendStatics","p","__extends","__","__assign","t","s","n","__rest","getOwnPropertySymbols","propertyIsEnumerable","__awaiter","thisArg","_arguments","P","generator","reject","fulfilled","step","rejected","__generator","body","g","_","label","sent","trys","ops","verb","pop","__spreadArray","to","pack","ar","l","SuppressedError","_arrayLikeToArray","arr","arr2","_defineProperties","props","descriptor","configurable","writable","_createClass","Constructor","protoProps","staticProps","hasSymbols","hasSymbol","getSymbol","SymbolIterator","SymbolObservable","SymbolSpecies","getMethod","getSpecies","ctor","Observable","isObservable","hostReportError","enqueue","cleanupSubscription","cleanup","_cleanup","closeSubscription","_observer","_queue","_state","notifySubscription","m","onNotify","queue","flushSubscription","subscriber","subscriptionObserver","SubscriptionObserver","_subscription","_proto2","_subscriber","_proto3","_this","_this2","_this3","_this4","C","hasSeed","hasValue","acc","_this5","_len","_key","index","startNext","flatMap","_this6","subscriptions","outer","inner","splice","completeIfDone","closed","method","_step","_iterator","o","allowArrayLike","it","minLen","_unsupportedIterableToArray","_createForOfIteratorHelperLoose","_len2","items","_key2","symbol"],"sourceRoot":""}