{"version":3,"file":"queryClient.cjs","names":["QueryCache","MutationCache","focusManager","onlineManager","resolveQueryValue","functionalUpdate","notifyManager","noop","hashKey","partialMatchKey","hashQueryKeyByOptions","skipToken"],"sources":["../../src/queryClient.ts"],"sourcesContent":["import {\n  functionalUpdate,\n  hashKey,\n  hashQueryKeyByOptions,\n  noop,\n  partialMatchKey,\n  resolveQueryValue,\n  skipToken,\n} from './utils'\nimport { QueryCache } from './queryCache'\nimport { MutationCache } from './mutationCache'\nimport { focusManager } from './focusManager'\nimport { onlineManager } from './onlineManager'\nimport { notifyManager } from './notifyManager'\nimport type {\n  CancelOptions,\n  DefaultError,\n  DefaultOptions,\n  DefaultedQueryObserverOptions,\n  EnsureInfiniteQueryDataOptions,\n  EnsureQueryDataOptions,\n  FetchInfiniteQueryOptions,\n  FetchQueryOptions,\n  InferDataFromTag,\n  InferErrorFromTag,\n  InfiniteData,\n  InfiniteQueryExecuteOptions,\n  InvalidateOptions,\n  InvalidateQueryFilters,\n  MutationKey,\n  MutationObserverOptions,\n  MutationOptions,\n  OmitKeyof,\n  QueryClientConfig,\n  QueryExecuteOptions,\n  QueryKey,\n  QueryObserverOptions,\n  QueryOptions,\n  RefetchOptions,\n  RefetchQueryFilters,\n  ResetOptions,\n  SetDataOptions,\n} from './types'\nimport type { QueryState } from './query'\nimport type { MutationFilters, QueryFilters, Updater } from './utils'\n\n// TYPES\n\ninterface QueryDefaults {\n  queryKey: QueryKey\n  defaultOptions: OmitKeyof<QueryOptions<any, any, any>, 'queryKey'>\n}\n\ninterface MutationDefaults {\n  mutationKey: MutationKey\n  defaultOptions: MutationOptions<any, any, any, any>\n}\n\n// CLASS\n\n/**\n * `QueryClient` is used to interact with a cache of queries and mutations. It owns a\n * `QueryCache` and a `MutationCache` (creating default ones if none are passed in) and holds\n * the default options that are applied to queries and mutations created through it.\n *\n * @example\n * ```ts\n * const queryClient = new QueryClient({\n *   defaultOptions: {\n *     queries: {\n *       staleTime: Infinity,\n *     },\n *   },\n * })\n *\n * await queryClient.query({ queryKey: ['posts'], queryFn: fetchPosts })\n * ```\n */\nexport class QueryClient {\n  #queryCache: QueryCache\n  #mutationCache: MutationCache\n  #defaultOptions: DefaultOptions\n  #queryDefaults: Map<string, QueryDefaults>\n  #mutationDefaults: Map<string, MutationDefaults>\n  #mountCount: number\n  #unsubscribeFocus?: () => void\n  #unsubscribeOnline?: () => void\n\n  constructor(config: QueryClientConfig = {}) {\n    this.#queryCache = config.queryCache || new QueryCache()\n    this.#mutationCache = config.mutationCache || new MutationCache()\n    this.#defaultOptions = config.defaultOptions || {}\n    this.#queryDefaults = new Map()\n    this.#mutationDefaults = new Map()\n    this.#mountCount = 0\n  }\n\n  /**\n   * Called by a framework adapter's `QueryClientProvider`-equivalent when it mounts, to start\n   * listening for focus/online events and resume paused mutations. Ref-counted via an internal\n   * mount count, so nested or multiple providers sharing the same `QueryClient` don't tear down\n   * the shared listeners until the last one unmounts.\n   */\n  mount(): void {\n    this.#mountCount++\n    if (this.#mountCount !== 1) return\n\n    this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n      if (focused) {\n        await this.resumePausedMutations()\n        this.#queryCache.onFocus()\n      }\n    })\n    this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n      if (online) {\n        await this.resumePausedMutations()\n        this.#queryCache.onOnline()\n      }\n    })\n  }\n\n  /**\n   * The inverse of {@link QueryClient#mount} — called by a framework adapter's\n   * `QueryClientProvider`-equivalent when it unmounts. Only tears down the focus/online\n   * listeners once the mount count returns to `0`.\n   */\n  unmount(): void {\n    this.#mountCount--\n    if (this.#mountCount !== 0) return\n\n    this.#unsubscribeFocus?.()\n    this.#unsubscribeFocus = undefined\n\n    this.#unsubscribeOnline?.()\n    this.#unsubscribeOnline = undefined\n  }\n\n  /**\n   * Returns the number of queries in the cache that are currently fetching, optionally\n   * matching a set of filters. This includes background-fetching, loading new pages, and\n   * loading more infinite query results.\n   *\n   * @example\n   * ```ts\n   * if (queryClient.isFetching()) {\n   *   console.log('At least one query is fetching!')\n   * }\n   * ```\n   */\n  isFetching<TQueryFilters extends QueryFilters<any> = QueryFilters>(\n    filters?: TQueryFilters,\n  ): number {\n    return this.#queryCache.findAll({ ...filters, fetchStatus: 'fetching' })\n      .length\n  }\n\n  /**\n   * Returns the number of mutations in the cache that are currently pending, optionally\n   * matching a set of filters.\n   *\n   * @example\n   * ```ts\n   * if (queryClient.isMutating()) {\n   *   console.log('At least one mutation is pending!')\n   * }\n   * ```\n   */\n  isMutating<\n    TMutationFilters extends MutationFilters<any, any> = MutationFilters,\n  >(filters?: TMutationFilters): number {\n    return this.#mutationCache.findAll({ ...filters, status: 'pending' }).length\n  }\n\n  /**\n   * Imperative (non-reactive) way to retrieve data for a QueryKey.\n   * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n   *\n   * Hint: Do not use this function inside a component, because it won't receive updates.\n   * Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n   *\n   * @returns The cached data for the query, or `undefined` if no query with this key has been observed yet.\n   * @see {@link QueryClient#getQueriesData}\n   */\n  getQueryData<\n    TQueryFnData = unknown,\n    TTaggedQueryKey extends QueryKey = QueryKey,\n    TInferredQueryFnData = InferDataFromTag<TQueryFnData, TTaggedQueryKey>,\n  >(queryKey: TTaggedQueryKey): TInferredQueryFnData | undefined {\n    const options = this.defaultQueryOptions({ queryKey })\n\n    return this.#queryCache.get<TInferredQueryFnData>(options.queryHash)?.state\n      .data\n  }\n\n  /**\n   * @deprecated Use queryClient.query({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n   */\n  ensureQueryData<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n  >(\n    options: EnsureQueryDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n  ): Promise<TData> {\n    const defaultedOptions = this.defaultQueryOptions(options)\n    const query = this.#queryCache.build(this, defaultedOptions)\n    const cachedData = query.state.data\n\n    if (cachedData === undefined) {\n      // eslint-disable-next-line no-restricted-syntax\n      return this.fetchQuery(options)\n    }\n\n    if (\n      options.revalidateIfStale &&\n      query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query))\n    ) {\n      // eslint-disable-next-line no-restricted-syntax\n      void this.prefetchQuery(defaultedOptions)\n    }\n\n    return Promise.resolve(cachedData)\n  }\n\n  /**\n   * Imperative (non-reactive) way to retrieve the cached data of multiple queries at once.\n   * Only queries matching the given filters are returned; if none match, an empty array is\n   * returned.\n   *\n   * Because the matched queries can hold data of different shapes (e.g. a broad filter can match\n   * queries with unrelated data types), the `TQueryFnData` generic defaults to `unknown` rather\n   * than being inferred. Passing a more specific type is a convenience for call sites that know\n   * every matched query holds the same shape — it is not checked against the actual cache\n   * contents.\n   *\n   * @returns An array of query key and data pairs. The data is `undefined` for a query with no cached data.\n   * @see {@link QueryClient#getQueryData}\n   * @example\n   * ```ts\n   * const data = queryClient.getQueriesData({ queryKey: ['posts'] })\n   * ```\n   */\n  getQueriesData<\n    TQueryFnData = unknown,\n    TQueryFilters extends QueryFilters<any> = QueryFilters,\n  >(filters: TQueryFilters): Array<[QueryKey, TQueryFnData | undefined]> {\n    return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n      const data = state.data as TQueryFnData | undefined\n      return [queryKey, data]\n    })\n  }\n\n  /**\n   * Synchronous way to immediately update a query's cached data. If the updater (or the value\n   * passed) resolves to `undefined`, the cache is left untouched and no query is created;\n   * otherwise, if the query does not exist yet, it will be created. To update multiple queries\n   * at once by partially matching query keys, use {@link QueryClient#setQueriesData} instead.\n   *\n   * Updates must be performed immutably: do not mutate `oldData`, or data previously retrieved\n   * via {@link QueryClient#getQueryData}, in place.\n   *\n   * @param queryKey - The query key to set data for.\n   * @param updater - Either the new data, or a function that receives the current data (which\n   * may be `undefined`) and returns the new data.\n   * @param options - Set `updatedAt` to override the timestamp the written data is recorded with.\n   * @returns The data that was written, or `undefined` if the updater returned `undefined` — in that case\n   * the write is skipped and the cache is left unchanged.\n   *\n   * @example\n   * ```ts\n   * queryClient.setQueryData(['posts'], newPosts)\n   *\n   * // Or, using an updater function that receives the current data:\n   * queryClient.setQueryData(['posts'], (oldPosts) => [...oldPosts, newPost])\n   * ```\n   */\n  setQueryData<\n    TQueryFnData = unknown,\n    TTaggedQueryKey extends QueryKey = QueryKey,\n    TInferredQueryFnData = InferDataFromTag<TQueryFnData, TTaggedQueryKey>,\n  >(\n    queryKey: TTaggedQueryKey,\n    updater: Updater<\n      NoInfer<TInferredQueryFnData> | undefined,\n      NoInfer<TInferredQueryFnData> | undefined\n    >,\n    options?: SetDataOptions,\n  ): NoInfer<TInferredQueryFnData> | undefined {\n    const defaultedOptions = this.defaultQueryOptions<\n      any,\n      any,\n      unknown,\n      any,\n      QueryKey\n    >({ queryKey })\n\n    const query = this.#queryCache.get<TInferredQueryFnData>(\n      defaultedOptions.queryHash,\n    )\n    const prevData = query?.state.data\n    const data = functionalUpdate(updater, prevData)\n\n    if (data === undefined) {\n      return undefined\n    }\n\n    return this.#queryCache\n      .build(this, defaultedOptions)\n      .setData(data, { ...options, manual: true })\n  }\n\n  /**\n   * Synchronous way to immediately update the cached data of multiple queries at once, using\n   * filters or partial query key matching. Only queries that already exist and match the given\n   * filters are updated; no new cache entries are created. Internally this calls\n   * {@link QueryClient#setQueryData} for each matching query.\n   *\n   * @returns One `[queryKey, data]` tuple per matched query, in the same shape and with the same\n   * `undefined` case as {@link QueryClient#setQueryData}.\n   * @example\n   * ```ts\n   * queryClient.setQueriesData({ queryKey: ['posts'] }, (oldPosts) =>\n   *   oldPosts ? oldPosts.filter((post) => post.id !== deletedId) : oldPosts,\n   * )\n   * ```\n   */\n  setQueriesData<\n    TQueryFnData,\n    TQueryFilters extends QueryFilters<any> = QueryFilters,\n  >(\n    filters: TQueryFilters,\n    updater: Updater<\n      NoInfer<TQueryFnData> | undefined,\n      NoInfer<TQueryFnData> | undefined\n    >,\n    options?: SetDataOptions,\n  ): Array<[QueryKey, TQueryFnData | undefined]> {\n    return notifyManager.batch(() =>\n      this.#queryCache\n        .findAll(filters)\n        .map(({ queryKey }) => [\n          queryKey,\n          this.setQueryData<TQueryFnData>(queryKey, updater, options),\n        ]),\n    )\n  }\n\n  /**\n   * Imperative (non-reactive) way to retrieve an existing query's state. If the query does not\n   * exist, `undefined` is returned.\n   *\n   * @example\n   * ```ts\n   * const state = queryClient.getQueryState(['posts'])\n   * console.log(state?.dataUpdatedAt)\n   * ```\n   */\n  getQueryState<\n    TQueryFnData = unknown,\n    TError = DefaultError,\n    TTaggedQueryKey extends QueryKey = QueryKey,\n    TInferredQueryFnData = InferDataFromTag<TQueryFnData, TTaggedQueryKey>,\n    TInferredError = InferErrorFromTag<TError, TTaggedQueryKey>,\n  >(\n    queryKey: TTaggedQueryKey,\n  ): QueryState<TInferredQueryFnData, TInferredError> | undefined {\n    const options = this.defaultQueryOptions({ queryKey })\n    return this.#queryCache.get<TInferredQueryFnData, TInferredError>(\n      options.queryHash,\n    )?.state\n  }\n\n  /**\n   * Removes queries from the cache that match the given filters. Unlike\n   * {@link QueryClient#invalidateQueries} or {@link QueryClient#refetchQueries}, this removes\n   * matching queries from the cache instead of refetching them. Without filters, every query in\n   * the cache is removed.\n   *\n   * @example\n   * ```ts\n   * queryClient.removeQueries({ queryKey: ['posts'], exact: true })\n   * ```\n   */\n  removeQueries<TTaggedQueryKey extends QueryKey = QueryKey>(\n    filters?: QueryFilters<TTaggedQueryKey>,\n  ): void {\n    const queryCache = this.#queryCache\n    notifyManager.batch(() => {\n      queryCache.findAll(filters).forEach((query) => {\n        queryCache.remove(query)\n      })\n    })\n  }\n\n  /**\n   * Resets queries matching the given filters back to their initial state (e.g. any\n   * `initialData`), notifying subscribers rather than removing them. Active queries among the\n   * matched set are then refetched, and the returned promise resolves once that refetch settles.\n   *\n   * @example\n   * ```ts\n   * await queryClient.resetQueries({ queryKey: ['posts'], exact: true })\n   * ```\n   */\n  resetQueries<TTaggedQueryKey extends QueryKey = QueryKey>(\n    filters?: QueryFilters<TTaggedQueryKey>,\n    options?: ResetOptions,\n  ): Promise<void> {\n    const queryCache = this.#queryCache\n\n    return notifyManager.batch(() => {\n      const matched = queryCache.findAll(filters)\n      const queriesToRefetch = new Set(matched)\n      matched.forEach((query) => {\n        query.reset()\n      })\n      return this.refetchQueries(\n        {\n          type: 'active',\n          predicate: (query) => queriesToRefetch.has(query),\n        },\n        options,\n      )\n    })\n  }\n\n  /**\n   * Cancels outgoing fetches for queries matching the given filters. Most useful when performing\n   * optimistic updates, since any outgoing refetch that resolves afterwards would otherwise\n   * overwrite the optimistic update. By default (`revert: true`), a cancelled query's data is\n   * reverted to its state before the outgoing fetch started.\n   *\n   * The returned promise never rejects, even if individual cancellations fail.\n   *\n   * @example\n   * ```ts\n   * await queryClient.cancelQueries({ queryKey: ['posts'], exact: true })\n   * ```\n   */\n  cancelQueries<TTaggedQueryKey extends QueryKey = QueryKey>(\n    filters?: QueryFilters<TTaggedQueryKey>,\n    cancelOptions: CancelOptions = {},\n  ): Promise<void> {\n    const defaultedCancelOptions = { revert: true, ...cancelOptions }\n\n    const promises = notifyManager.batch(() =>\n      this.#queryCache\n        .findAll(filters)\n        .map((query) => query.cancel(defaultedCancelOptions)),\n    )\n\n    return Promise.all(promises).then(noop).catch(noop)\n  }\n\n  /**\n   * Marks queries matching the given filters as invalidated. Unlike\n   * {@link QueryClient#removeQueries}, invalidated queries stay in the cache.\n   *\n   * Unless `filters.refetchType` is `'none'`, matching queries are then refetched via\n   * {@link QueryClient#refetchQueries}, using `filters.refetchType` if set, otherwise\n   * `filters.type`, otherwise `'active'`.\n   *\n   * @example\n   * ```ts\n   * await queryClient.invalidateQueries({ queryKey: ['posts'], refetchType: 'active' })\n   * ```\n   */\n  invalidateQueries<TTaggedQueryKey extends QueryKey = QueryKey>(\n    filters?: InvalidateQueryFilters<TTaggedQueryKey>,\n    options: InvalidateOptions = {},\n  ): Promise<void> {\n    return notifyManager.batch(() => {\n      this.#queryCache.findAll(filters).forEach((query) => {\n        query.invalidate()\n      })\n\n      if (filters?.refetchType === 'none') {\n        return Promise.resolve()\n      }\n      return this.refetchQueries(\n        {\n          ...filters,\n          type: filters?.refetchType ?? filters?.type ?? 'active',\n        },\n        options,\n      )\n    })\n  }\n\n  /**\n   * Refetches queries matching the given filters, regardless of whether they are stale. Without\n   * filters, every query in the cache is refetched. Queries that are disabled, or static (only\n   * have observers with a static `staleTime`), are never refetched.\n   *\n   * By default (`cancelRefetch: true`), a currently running fetch is cancelled before the new\n   * one starts. The returned promise resolves once all matching queries have settled; it does\n   * not reject on individual query failures unless `throwOnError` is set.\n   *\n   * @example\n   * ```ts\n   * // refetch all active queries partially matching a query key:\n   * await queryClient.refetchQueries({ queryKey: ['posts'], type: 'active' })\n   * ```\n   */\n  refetchQueries<TTaggedQueryKey extends QueryKey = QueryKey>(\n    filters?: RefetchQueryFilters<TTaggedQueryKey>,\n    options: RefetchOptions = {},\n  ): Promise<void> {\n    const fetchOptions = {\n      ...options,\n      cancelRefetch: options.cancelRefetch ?? true,\n    }\n    const promises = notifyManager.batch(() =>\n      this.#queryCache\n        .findAll(filters)\n        .filter((query) => !query.isDisabled() && !query.isStatic())\n        .map((query) => {\n          let promise = query.fetch(undefined, fetchOptions)\n          if (!fetchOptions.throwOnError) {\n            promise = promise.catch(noop)\n          }\n          return query.state.fetchStatus === 'paused'\n            ? Promise.resolve()\n            : promise\n        }),\n    )\n\n    return Promise.all(promises).then(noop)\n  }\n\n  /**\n   * Asynchronous method to fetch and cache a query, resolving with the data or throwing with\n   * the error.\n   *\n   * If the query already exists in the cache and its data is not stale (per the given\n   * `staleTime`), the cached data is returned without fetching. Otherwise, the query is fetched\n   * and the promise resolves once the fetch settles. If a `select` function is provided, it is\n   * applied to the data in both cases (cached or freshly fetched) before it is returned.\n   *\n   * Unlike a reactive observer, retries are disabled by default here (`retry: false`) unless\n   * explicitly configured, since there is no component to catch a thrown error and retry through\n   * re-render.\n   *\n   * The accepted options are `QueryObserverOptions` minus the fields that only make sense for a\n   * reactive observer — `enabled`, `refetchInterval`, `refetchIntervalInBackground`,\n   * `refetchOnWindowFocus`, `refetchOnReconnect`, `refetchOnMount`, `retryOnMount`,\n   * `notifyOnChangeProps`, `throwOnError`, `suspense`, and `placeholderData` are not part of this\n   * method's options.\n   *\n   * This method replaces the deprecated `fetchQuery`, and — combined with\n   * `{ staleTime: 'static' }` — the deprecated `ensureQueryData`.\n   *\n   * @example\n   * ```ts\n   * try {\n   *   const data = await queryClient.query({ queryKey, queryFn, staleTime: 10000 })\n   * } catch (error) {\n   *   console.log(error)\n   * }\n   * ```\n   */\n  async query<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = never,\n  >(\n    options: QueryExecuteOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryData,\n      TQueryKey,\n      TPageParam\n    >,\n  ): Promise<TData> {\n    const defaultedOptions = this.defaultQueryOptions(options)\n\n    // https://github.com/tannerlinsley/react-query/issues/652\n    if (defaultedOptions.retry === undefined) {\n      defaultedOptions.retry = false\n    }\n\n    const query = this.#queryCache.build(this, defaultedOptions)\n\n    const isStale = query.isStaleByTime(\n      resolveQueryValue(defaultedOptions.staleTime, query),\n    )\n\n    const queryData = isStale\n      ? await query.fetch(defaultedOptions)\n      : (query.state.data as TQueryData)\n\n    const select = defaultedOptions.select\n\n    if (select) {\n      return select(queryData)\n    }\n\n    return queryData as unknown as TData\n  }\n\n  /**\n   * @deprecated Use queryClient.query(options) instead. This method will be removed in the next major version.\n   */\n  fetchQuery<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = never,\n  >(\n    options: FetchQueryOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryKey,\n      TPageParam\n    >,\n  ): Promise<TData> {\n    const defaultedOptions = this.defaultQueryOptions(options)\n\n    // https://github.com/tannerlinsley/react-query/issues/652\n    if (defaultedOptions.retry === undefined) {\n      defaultedOptions.retry = false\n    }\n\n    const query = this.#queryCache.build(this, defaultedOptions)\n\n    return query.isStaleByTime(\n      resolveQueryValue(defaultedOptions.staleTime, query),\n    )\n      ? query.fetch(defaultedOptions)\n      : Promise.resolve(query.state.data as TData)\n  }\n\n  /**\n   * @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n   */\n  prefetchQuery<\n    TQueryFnData = unknown,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n  >(\n    options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n  ): Promise<void> {\n    // eslint-disable-next-line no-restricted-syntax\n    return this.fetchQuery(options).then(noop).catch(noop)\n  }\n\n  /**\n   * Asynchronous method to fetch and cache an infinite query, resolving with an\n   * {@link InfiniteData} object or throwing with the error.\n   *\n   * Behaves like {@link QueryClient#query}, accepting the same options (minus\n   * `initialPageParam`), plus the required `initialPageParam`, and an optional `pages` /\n   * `getNextPageParam` pair used to refetch a fixed number of pages from the start.\n   *\n   * This method replaces the deprecated `fetchInfiniteQuery`, and — combined with\n   * `{ staleTime: 'static' }` — the deprecated `ensureInfiniteQueryData`.\n   *\n   * @example\n   * ```ts\n   * try {\n   *   const data = await queryClient.infiniteQuery({ queryKey, queryFn, initialPageParam: 0 })\n   *   console.log(data.pages)\n   * } catch (error) {\n   *   console.log(error)\n   * }\n   * ```\n   */\n  infiniteQuery<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = InfiniteData<TQueryFnData>,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = unknown,\n  >(\n    options: InfiniteQueryExecuteOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryKey,\n      TPageParam\n    >,\n  ): Promise<\n    Array<TData> extends Array<InfiniteData<TQueryFnData>>\n      ? InfiniteData<TQueryFnData, TPageParam>\n      : TData\n  > {\n    options._type = 'infinite'\n    return this.query(options as any)\n  }\n\n  /**\n   * @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version.\n   */\n  fetchInfiniteQuery<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = unknown,\n  >(\n    options: FetchInfiniteQueryOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryKey,\n      TPageParam\n    >,\n  ): Promise<InfiniteData<TData, TPageParam>> {\n    options._type = 'infinite'\n    // eslint-disable-next-line no-restricted-syntax\n    return this.fetchQuery(options as any)\n  }\n\n  /**\n   * @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n   */\n  prefetchInfiniteQuery<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = unknown,\n  >(\n    options: FetchInfiniteQueryOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryKey,\n      TPageParam\n    >,\n  ): Promise<void> {\n    // eslint-disable-next-line no-restricted-syntax\n    return this.fetchInfiniteQuery(options).then(noop).catch(noop)\n  }\n\n  /**\n   * @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n   */\n  ensureInfiniteQueryData<\n    TQueryFnData,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = unknown,\n  >(\n    options: EnsureInfiniteQueryDataOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryKey,\n      TPageParam\n    >,\n  ): Promise<InfiniteData<TData, TPageParam>> {\n    options._type = 'infinite'\n\n    // eslint-disable-next-line no-restricted-syntax\n    return this.ensureQueryData(options as any)\n  }\n\n  /**\n   * Resumes mutations that were paused because there was no network connection. Does nothing\n   * (resolving immediately) if the client is currently offline.\n   *\n   * @example\n   * ```ts\n   * import { QueryClient } from '@tanstack/query-core'\n   *\n   * const queryClient = new QueryClient()\n   * await queryClient.resumePausedMutations()\n   * ```\n   */\n  resumePausedMutations(): Promise<unknown> {\n    if (onlineManager.isOnline()) {\n      return this.#mutationCache.resumePausedMutations()\n    }\n    return Promise.resolve()\n  }\n\n  /**\n   * Returns the query cache this client is connected to.\n   *\n   * @example\n   * ```ts\n   * import { QueryClient } from '@tanstack/query-core'\n   *\n   * const queryClient = new QueryClient()\n   * const queryCache = queryClient.getQueryCache()\n   * const queries = queryCache.findAll({ queryKey: ['posts'] })\n   * ```\n   */\n  getQueryCache(): QueryCache {\n    return this.#queryCache\n  }\n\n  /**\n   * Returns the mutation cache this client is connected to.\n   *\n   * @example\n   * ```ts\n   * import { QueryClient } from '@tanstack/query-core'\n   *\n   * const queryClient = new QueryClient()\n   * const mutationCache = queryClient.getMutationCache()\n   * const mutations = mutationCache.findAll({ status: 'pending' })\n   * ```\n   */\n  getMutationCache(): MutationCache {\n    return this.#mutationCache\n  }\n\n  /**\n   * Returns the default options that were set when creating the client, or via\n   * {@link QueryClient#setDefaultOptions}.\n   *\n   * @example\n   * ```ts\n   * import { QueryClient } from '@tanstack/query-core'\n   *\n   * const queryClient = new QueryClient()\n   * const defaultOptions = queryClient.getDefaultOptions()\n   * ```\n   */\n  getDefaultOptions(): DefaultOptions {\n    return this.#defaultOptions\n  }\n\n  /**\n   * Dynamically sets the default options for this client, overwriting any previously defined\n   * default options.\n   *\n   * @see {@link QueryClient#getDefaultOptions}\n   * @example\n   * ```ts\n   * import { QueryClient } from '@tanstack/query-core'\n   *\n   * const queryClient = new QueryClient()\n   * queryClient.setDefaultOptions({\n   *   queries: {\n   *     staleTime: Infinity,\n   *   },\n   * })\n   * ```\n   */\n  setDefaultOptions(options: DefaultOptions): void {\n    this.#defaultOptions = options\n  }\n\n  /**\n   * Sets default options for queries whose query key partially matches the given `queryKey`.\n   *\n   * If several registered query defaults match a given query key, they are merged together in\n   * registration order by {@link QueryClient#getQueryDefaults}, so register defaults from the\n   * most generic key to the least generic one — more specific defaults should be registered\n   * after more generic ones so they take precedence.\n   *\n   * @example\n   * ```ts\n   * queryClient.setQueryDefaults(['posts'], { queryFn: fetchPosts })\n   *\n   * await queryClient.query({ queryKey: ['posts'] })\n   * ```\n   */\n  setQueryDefaults<\n    TQueryFnData = unknown,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryData = TQueryFnData,\n  >(\n    queryKey: QueryKey,\n    options: Partial<\n      OmitKeyof<\n        QueryObserverOptions<TQueryFnData, TError, TData, TQueryData>,\n        'queryKey'\n      >\n    >,\n  ): void {\n    this.#queryDefaults.set(hashKey(queryKey), {\n      queryKey,\n      defaultOptions: options,\n    })\n  }\n\n  /**\n   * Returns the default options registered for queries whose query key partially matches the\n   * given `queryKey`, via {@link QueryClient#setQueryDefaults}. If multiple registered defaults\n   * match, they are merged together in registration order.\n   *\n   * @example\n   * ```ts\n   * const defaultOptions = queryClient.getQueryDefaults(['posts'])\n   * ```\n   */\n  getQueryDefaults(\n    queryKey: QueryKey,\n  ): OmitKeyof<QueryObserverOptions<any, any, any, any, any>, 'queryKey'> {\n    const defaults = [...this.#queryDefaults.values()]\n\n    const result: OmitKeyof<\n      QueryObserverOptions<any, any, any, any, any>,\n      'queryKey'\n    > = {}\n\n    defaults.forEach((queryDefault) => {\n      if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n        Object.assign(result, queryDefault.defaultOptions)\n      }\n    })\n    return result\n  }\n\n  /**\n   * Sets default options for mutations whose mutation key partially matches the given\n   * `mutationKey`. As with {@link QueryClient#setQueryDefaults}, the order of registration\n   * matters when several registered defaults match the same mutation key.\n   *\n   * @see {@link QueryClient#getMutationDefaults}\n   * @example\n   * ```ts\n   * queryClient.setMutationDefaults(['addPost'], { mutationFn: addPost })\n   * ```\n   */\n  setMutationDefaults<\n    TData = unknown,\n    TError = DefaultError,\n    TVariables = void,\n    TOnMutateResult = unknown,\n  >(\n    mutationKey: MutationKey,\n    options: OmitKeyof<\n      MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,\n      'mutationKey'\n    >,\n  ): void {\n    this.#mutationDefaults.set(hashKey(mutationKey), {\n      mutationKey,\n      defaultOptions: options,\n    })\n  }\n\n  /**\n   * Returns the default options registered for mutations whose mutation key partially matches\n   * the given `mutationKey`, via {@link QueryClient#setMutationDefaults}. If multiple registered\n   * defaults match, they are merged together in registration order.\n   *\n   * @example\n   * ```ts\n   * const defaultOptions = queryClient.getMutationDefaults(['addPost'])\n   * ```\n   */\n  getMutationDefaults(\n    mutationKey: MutationKey,\n  ): OmitKeyof<MutationObserverOptions<any, any, any, any>, 'mutationKey'> {\n    const defaults = [...this.#mutationDefaults.values()]\n\n    const result: OmitKeyof<\n      MutationObserverOptions<any, any, any, any>,\n      'mutationKey'\n    > = {}\n\n    defaults.forEach((queryDefault) => {\n      if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n        Object.assign(result, queryDefault.defaultOptions)\n      }\n    })\n\n    return result\n  }\n\n  /**\n   * Called by framework adapters (e.g. inside `useQuery`) to resolve the options passed by the\n   * caller into their final, defaulted form: merging `queryClient.setQueryDefaults` for the\n   * given `queryKey`, then the client's own `defaultOptions.queries`, then the caller's options\n   * on top. A no-op if the options are already defaulted (`_defaulted: true`).\n   */\n  defaultQueryOptions<\n    TQueryFnData = unknown,\n    TError = DefaultError,\n    TData = TQueryFnData,\n    TQueryData = TQueryFnData,\n    TQueryKey extends QueryKey = QueryKey,\n    TPageParam = never,\n  >(\n    options:\n      | QueryObserverOptions<\n          TQueryFnData,\n          TError,\n          TData,\n          TQueryData,\n          TQueryKey,\n          TPageParam\n        >\n      | DefaultedQueryObserverOptions<\n          TQueryFnData,\n          TError,\n          TData,\n          TQueryData,\n          TQueryKey\n        >,\n  ): DefaultedQueryObserverOptions<\n    TQueryFnData,\n    TError,\n    TData,\n    TQueryData,\n    TQueryKey\n  > {\n    if (options._defaulted) {\n      return options as DefaultedQueryObserverOptions<\n        TQueryFnData,\n        TError,\n        TData,\n        TQueryData,\n        TQueryKey\n      >\n    }\n\n    const defaultedOptions = {\n      ...this.#defaultOptions.queries,\n      ...this.getQueryDefaults(options.queryKey),\n      ...options,\n      _defaulted: true,\n    }\n\n    if (!defaultedOptions.queryHash) {\n      defaultedOptions.queryHash = hashQueryKeyByOptions(\n        defaultedOptions.queryKey,\n        defaultedOptions,\n      )\n    }\n\n    // dependent default values\n    if (defaultedOptions.refetchOnReconnect === undefined) {\n      defaultedOptions.refetchOnReconnect =\n        defaultedOptions.networkMode !== 'always'\n    }\n    if (defaultedOptions.throwOnError === undefined) {\n      defaultedOptions.throwOnError = !!defaultedOptions.suspense\n    }\n\n    if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n      defaultedOptions.networkMode = 'offlineFirst'\n    }\n\n    if (defaultedOptions.queryFn === skipToken) {\n      defaultedOptions.enabled = false\n    }\n\n    return defaultedOptions as DefaultedQueryObserverOptions<\n      TQueryFnData,\n      TError,\n      TData,\n      TQueryData,\n      TQueryKey\n    >\n  }\n\n  /**\n   * The mutation counterpart of {@link QueryClient#defaultQueryOptions}. Called by framework\n   * adapters (e.g. inside `useMutation`) to merge `queryClient.setMutationDefaults` for the\n   * given `mutationKey`, then the client's `defaultOptions.mutations`, then the caller's options\n   * on top. A no-op if the options are already defaulted (`_defaulted: true`).\n   */\n  defaultMutationOptions<T extends MutationOptions<any, any, any, any>>(\n    options?: T,\n  ): T {\n    if (options?._defaulted) {\n      return options\n    }\n    return {\n      ...this.#defaultOptions.mutations,\n      ...(options?.mutationKey &&\n        this.getMutationDefaults(options.mutationKey)),\n      ...options,\n      _defaulted: true,\n    } as T\n  }\n\n  /**\n   * Clears both the query cache and the mutation cache this client is connected to.\n   *\n   * @example\n   * ```ts\n   * import { QueryClient } from '@tanstack/query-core'\n   *\n   * const queryClient = new QueryClient()\n   * queryClient.clear()\n   * ```\n   */\n  clear(): void {\n    this.#queryCache.clear()\n    this.#mutationCache.clear()\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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