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AAiBmG,SAAjB,CAA6B/E,EAAM,KACpC,GACAZ,KANH,CAMU6B,AAAAA,IACNoF,EAAmB0C,UAAnB,GACAnK,AAAA,MAAAA,EAAiBuF,OAAjB,EAAAvF,EAAiBuF,OAAjB,CAA2BlD,GAC3BrC,AAAAA,MAAAA,EAAiBmG,SAAjB,EAAAnG,EAAiBmG,SAAjB,CAA6BvH,KAAAA,EAAWyD,EACzC,E,E","sources":["","node_modules/@tanstack/react-query/build/lib/useQuery.esm.js","node_modules/@tanstack/react-query/src/useQuery.ts","node_modules/@tanstack/query-core/build/lib/queryObserver.esm.js","node_modules/@tanstack/query-core/src/queryObserver.ts","node_modules/@tanstack/react-query/build/lib/useBaseQuery.esm.js","node_modules/@tanstack/react-query/src/useBaseQuery.ts","node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.esm.js","node_modules/@tanstack/react-query/src/useSyncExternalStore.ts","node_modules/use-sync-external-store/shim/index.js","node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.esm.js","node_modules/@tanstack/react-query/src/QueryErrorResetBoundary.tsx","node_modules/@tanstack/react-query/build/lib/isRestoring.esm.js","node_modules/@tanstack/react-query/src/isRestoring.tsx","node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.esm.js","node_modules/@tanstack/react-query/src/errorBoundaryUtils.ts","node_modules/@tanstack/react-query/build/lib/utils.esm.js","node_modules/@tanstack/react-query/src/utils.ts","node_modules/@tanstack/react-query/build/lib/suspense.esm.js","node_modules/@tanstack/react-query/src/suspense.ts"],"sourcesContent":["(function () {\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n var parcelRequire = $parcel$global[\"parcelRequire7bbe\"];\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"4cyLg\", function(module, exports) {\n\n$parcel$export(module.exports, \"useQuery\", function () { return $30f33f483acd6b41$export$dd0a697e1782aedd; });\n\nvar $4lSdh = parcelRequire(\"4lSdh\");\nvar $2b3d0 = parcelRequire(\"2b3d0\");\n\nvar $iEdqz = parcelRequire(\"iEdqz\");\n\"use client\";\nfunction $30f33f483acd6b41$export$dd0a697e1782aedd(arg1, arg2, arg3) {\n const parsedOptions = (0, $4lSdh.parseQueryArgs)(arg1, arg2, arg3);\n return (0, $iEdqz.useBaseQuery)(parsedOptions, (0, $2b3d0.QueryObserver));\n}\n\n});\nparcelRegister(\"2b3d0\", function(module, exports) {\n\n$parcel$export(module.exports, \"QueryObserver\", function () { return $195f1906c7f730cd$export$a06cf8c0066f0d4c; });\n\nvar $4lSdh = parcelRequire(\"4lSdh\");\n\nvar $kAzkl = parcelRequire(\"kAzkl\");\n\nvar $c1dhr = parcelRequire(\"c1dhr\");\n\nvar $kCwPK = parcelRequire(\"kCwPK\");\n\nvar $lu0Sm = parcelRequire(\"lu0Sm\");\nclass $195f1906c7f730cd$export$a06cf8c0066f0d4c extends (0, $kCwPK.Subscribable) {\n constructor(client, options){\n super();\n this.client = client;\n this.options = options;\n this.trackedProps = new Set();\n this.selectError = null;\n this.bindMethods();\n this.setOptions(options);\n }\n bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.currentQuery.addObserver(this);\n if ($195f1906c7f730cd$var$shouldFetchOnMount(this.currentQuery, this.options)) this.executeFetch();\n this.updateTimers();\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) this.destroy();\n }\n shouldFetchOnReconnect() {\n return $195f1906c7f730cd$var$shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n }\n shouldFetchOnWindowFocus() {\n return $195f1906c7f730cd$var$shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n }\n destroy() {\n this.listeners = new Set();\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n this.currentQuery.removeObserver(this);\n }\n setOptions(options, notifyOptions) {\n const prevOptions = this.options;\n const prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryOptions(options);\n if (!(0, $4lSdh.shallowEqualObjects)(prevOptions, this.options)) this.client.getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: this.currentQuery,\n observer: this\n });\n if (typeof this.options.enabled !== \"undefined\" && typeof this.options.enabled !== \"boolean\") throw new Error(\"Expected enabled to be a boolean\");\n // Keep previous query key if the user does not supply one\n if (!this.options.queryKey) this.options.queryKey = prevOptions.queryKey;\n this.updateQuery();\n const mounted = this.hasListeners(); // Fetch if there are subscribers\n if (mounted && $195f1906c7f730cd$var$shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) this.executeFetch();\n // Update result\n this.updateResult(notifyOptions); // Update stale interval if needed\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) this.updateStaleTimeout();\n const nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) this.updateRefetchInterval(nextRefetchInterval);\n }\n getOptimisticResult(options) {\n const query = this.client.getQueryCache().build(this.client, options);\n const result = this.createResult(query, options);\n if ($195f1906c7f730cd$var$shouldAssignObserverCurrentProperties(this, result, options)) {\n // this assigns the optimistic result to the current Observer\n // because if the query function changes, useQuery will be performing\n // an effect where it would fetch again.\n // When the fetch finishes, we perform a deep data cloning in order\n // to reuse objects references. This deep data clone is performed against\n // the `observer.currentResult.data` property\n // When QueryKey changes, we refresh the query and get new `optimistic`\n // result, while we leave the `observer.currentResult`, so when new data\n // arrives, it finds the old `observer.currentResult` which is related\n // to the old QueryKey. Which means that currentResult and selectData are\n // out of sync already.\n // To solve this, we move the cursor of the currentResult everytime\n // an observer reads an optimistic value.\n // When keeping the previous data, the result doesn't change until new\n // data arrives.\n this.currentResult = result;\n this.currentResultOptions = this.options;\n this.currentResultState = this.currentQuery.state;\n }\n return result;\n }\n getCurrentResult() {\n return this.currentResult;\n }\n trackResult(result) {\n const trackedResult = {};\n Object.keys(result).forEach((key)=>{\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: ()=>{\n this.trackedProps.add(key);\n return result[key];\n }\n });\n });\n return trackedResult;\n }\n getCurrentQuery() {\n return this.currentQuery;\n }\n remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n }\n refetch({ refetchPage: refetchPage, ...options } = {}) {\n return this.fetch({\n ...options,\n meta: {\n refetchPage: refetchPage\n }\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = this.client.defaultQueryOptions(options);\n const query = this.client.getQueryCache().build(this.client, defaultedOptions);\n query.isFetchingOptimistic = true;\n return query.fetch().then(()=>this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n var _fetchOptions$cancelR;\n return this.executeFetch({\n ...fetchOptions,\n cancelRefetch: (_fetchOptions$cancelR = fetchOptions.cancelRefetch) != null ? _fetchOptions$cancelR : true\n }).then(()=>{\n this.updateResult();\n return this.currentResult;\n });\n }\n executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n let promise = this.currentQuery.fetch(this.options, fetchOptions);\n if (!(fetchOptions != null && fetchOptions.throwOnError)) promise = promise.catch((0, $4lSdh.noop));\n return promise;\n }\n updateStaleTimeout() {\n this.clearStaleTimeout();\n if ((0, $4lSdh.isServer) || this.currentResult.isStale || !(0, $4lSdh.isValidTimeout)(this.options.staleTime)) return;\n const time = (0, $4lSdh.timeUntilStale)(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n const timeout = time + 1;\n this.staleTimeoutId = setTimeout(()=>{\n if (!this.currentResult.isStale) this.updateResult();\n }, timeout);\n }\n computeRefetchInterval() {\n var _this$options$refetch;\n return typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n }\n updateRefetchInterval(nextInterval) {\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n if ((0, $4lSdh.isServer) || this.options.enabled === false || !(0, $4lSdh.isValidTimeout)(this.currentRefetchInterval) || this.currentRefetchInterval === 0) return;\n this.refetchIntervalId = setInterval(()=>{\n if (this.options.refetchIntervalInBackground || (0, $c1dhr.focusManager).isFocused()) this.executeFetch();\n }, this.currentRefetchInterval);\n }\n updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n }\n clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n }\n clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n }\n createResult(query, options) {\n const prevQuery = this.currentQuery;\n const prevOptions = this.options;\n const prevResult = this.currentResult;\n const prevResultState = this.currentResultState;\n const prevResultOptions = this.currentResultOptions;\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n const prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n const { state: state } = query;\n let { dataUpdatedAt: dataUpdatedAt, error: error, errorUpdatedAt: errorUpdatedAt, fetchStatus: fetchStatus, status: status } = state;\n let isPreviousData = false;\n let isPlaceholderData = false;\n let data; // Optimistically set result in fetching state if needed\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && $195f1906c7f730cd$var$shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && $195f1906c7f730cd$var$shouldFetchOptionally(query, prevQuery, options, prevOptions);\n if (fetchOnMount || fetchOptionally) {\n fetchStatus = (0, $lu0Sm.canFetch)(query.options.networkMode) ? \"fetching\" : \"paused\";\n if (!dataUpdatedAt) status = \"loading\";\n }\n if (options._optimisticResults === \"isRestoring\") fetchStatus = \"idle\";\n } // Keep previous data if needed\n if (options.keepPreviousData && !state.dataUpdatedAt && prevQueryResult != null && prevQueryResult.isSuccess && status !== \"error\") {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } else if (options.select && typeof state.data !== \"undefined\") {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) data = this.selectResult;\n else try {\n this.selectFn = options.select;\n data = options.select(state.data);\n data = (0, $4lSdh.replaceData)(prevResult == null ? void 0 : prevResult.data, data, options);\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n this.selectError = selectError;\n }\n } else data = state.data;\n // Show placeholder data if needed\n if (typeof options.placeholderData !== \"undefined\" && typeof data === \"undefined\" && status === \"loading\") {\n let placeholderData; // Memoize placeholder data\n if (prevResult != null && prevResult.isPlaceholderData && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) placeholderData = prevResult.data;\n else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData() : options.placeholderData;\n if (options.select && typeof placeholderData !== \"undefined\") try {\n placeholderData = options.select(placeholderData);\n this.selectError = null;\n } catch (selectError) {\n this.selectError = selectError;\n }\n }\n if (typeof placeholderData !== \"undefined\") {\n status = \"success\";\n data = (0, $4lSdh.replaceData)(prevResult == null ? void 0 : prevResult.data, placeholderData, options);\n isPlaceholderData = true;\n }\n }\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = \"error\";\n }\n const isFetching = fetchStatus === \"fetching\";\n const isLoading = status === \"loading\";\n const isError = status === \"error\";\n const result = {\n status: status,\n fetchStatus: fetchStatus,\n isLoading: isLoading,\n isSuccess: status === \"success\",\n isError: isError,\n isInitialLoading: isLoading && isFetching,\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n failureReason: state.fetchFailureReason,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && !isLoading,\n isLoadingError: isError && state.dataUpdatedAt === 0,\n isPaused: fetchStatus === \"paused\",\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: isError && state.dataUpdatedAt !== 0,\n isStale: $195f1906c7f730cd$var$isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n }\n updateResult(notifyOptions) {\n const prevResult = this.currentResult;\n const nextResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify and update result if something has changed\n if ((0, $4lSdh.shallowEqualObjects)(nextResult, prevResult)) return;\n this.currentResult = nextResult; // Determine which callbacks to trigger\n const defaultNotifyOptions = {\n cache: true\n };\n const shouldNotifyListeners = ()=>{\n if (!prevResult) return true;\n const { notifyOnChangeProps: notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.trackedProps.size) return true;\n const includedProps = new Set(notifyOnChangePropsValue != null ? notifyOnChangePropsValue : this.trackedProps);\n if (this.options.useErrorBoundary) includedProps.add(\"error\");\n return Object.keys(this.currentResult).some((key)=>{\n const typedKey = key;\n const changed = this.currentResult[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && shouldNotifyListeners()) defaultNotifyOptions.listeners = true;\n this.notify({\n ...defaultNotifyOptions,\n ...notifyOptions\n });\n }\n updateQuery() {\n const query = this.client.getQueryCache().build(this.client, this.options);\n if (query === this.currentQuery) return;\n const prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n if (this.hasListeners()) {\n prevQuery == null || prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n }\n onQueryUpdate(action) {\n const notifyOptions = {};\n if (action.type === \"success\") notifyOptions.onSuccess = !action.manual;\n else if (action.type === \"error\" && !(0, $lu0Sm.isCancelledError)(action.error)) notifyOptions.onError = true;\n this.updateResult(notifyOptions);\n if (this.hasListeners()) this.updateTimers();\n }\n notify(notifyOptions) {\n (0, $kAzkl.notifyManager).batch(()=>{\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n var _this$options$onSucce, _this$options, _this$options$onSettl, _this$options2;\n (_this$options$onSucce = (_this$options = this.options).onSuccess) == null || _this$options$onSucce.call(_this$options, this.currentResult.data);\n (_this$options$onSettl = (_this$options2 = this.options).onSettled) == null || _this$options$onSettl.call(_this$options2, this.currentResult.data, null);\n } else if (notifyOptions.onError) {\n var _this$options$onError, _this$options3, _this$options$onSettl2, _this$options4;\n (_this$options$onError = (_this$options3 = this.options).onError) == null || _this$options$onError.call(_this$options3, this.currentResult.error);\n (_this$options$onSettl2 = (_this$options4 = this.options).onSettled) == null || _this$options$onSettl2.call(_this$options4, undefined, this.currentResult.error);\n } // Then trigger the listeners\n if (notifyOptions.listeners) this.listeners.forEach(({ listener: listener })=>{\n listener(this.currentResult);\n });\n // Then the cache listeners\n if (notifyOptions.cache) this.client.getQueryCache().notify({\n query: this.currentQuery,\n type: \"observerResultsUpdated\"\n });\n });\n }\n}\nfunction $195f1906c7f730cd$var$shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction $195f1906c7f730cd$var$shouldFetchOnMount(query, options) {\n return $195f1906c7f730cd$var$shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && $195f1906c7f730cd$var$shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction $195f1906c7f730cd$var$shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && $195f1906c7f730cd$var$isStale(query, options);\n }\n return false;\n}\nfunction $195f1906c7f730cd$var$shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== \"error\") && $195f1906c7f730cd$var$isStale(query, options);\n}\nfunction $195f1906c7f730cd$var$isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n} // this function would decide if we will update the observer's 'current'\n// properties after an optimistic reading via getOptimisticResult\nfunction $195f1906c7f730cd$var$shouldAssignObserverCurrentProperties(observer, optimisticResult, options) {\n // it is important to keep this condition like this for three reasons:\n // 1. It will get removed in the v5\n // 2. it reads: don't update the properties if we want to keep the previous\n // data.\n // 3. The opposite condition (!options.keepPreviousData) would fallthrough\n // and will result in a bad decision\n if (options.keepPreviousData) return false;\n // this means we want to put some placeholder data when pending and queryKey\n // changed.\n if (options.placeholderData !== undefined) // re-assign properties only if current data is placeholder data\n // which means that data did not arrive yet, so, if there is some cached data\n // we need to \"prepare\" to receive it\n return optimisticResult.isPlaceholderData;\n // if the newly created result isn't what the observer is holding as current,\n // then we'll need to update the properties as well\n if (!(0, $4lSdh.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) return true;\n // basically, just keep previous properties if nothing changed\n return false;\n}\n\n});\n\nparcelRegister(\"iEdqz\", function(module, exports) {\n\n$parcel$export(module.exports, \"useBaseQuery\", function () { return $d93660d5d6af82ef$export$fff0865807e996c5; });\n\nvar $dTCkE = parcelRequire(\"dTCkE\");\n\nvar $kAzkl = parcelRequire(\"kAzkl\");\n\nvar $auXUg = parcelRequire(\"auXUg\");\n\nvar $aRyCQ = parcelRequire(\"aRyCQ\");\n\nvar $jmhMM = parcelRequire(\"jmhMM\");\n\nvar $7G85E = parcelRequire(\"7G85E\");\n\nvar $cmvUK = parcelRequire(\"cmvUK\");\n\nvar $kBpcz = parcelRequire(\"kBpcz\");\n\"use client\";\nfunction $d93660d5d6af82ef$export$fff0865807e996c5(options, Observer) {\n const queryClient = (0, $jmhMM.useQueryClient)({\n context: options.context\n });\n const isRestoring = (0, $7G85E.useIsRestoring)();\n const errorResetBoundary = (0, $aRyCQ.useQueryErrorResetBoundary)();\n const defaultedOptions = queryClient.defaultQueryOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\"; // Include callbacks in batch renders\n if (defaultedOptions.onError) defaultedOptions.onError = (0, $kAzkl.notifyManager).batchCalls(defaultedOptions.onError);\n if (defaultedOptions.onSuccess) defaultedOptions.onSuccess = (0, $kAzkl.notifyManager).batchCalls(defaultedOptions.onSuccess);\n if (defaultedOptions.onSettled) defaultedOptions.onSettled = (0, $kAzkl.notifyManager).batchCalls(defaultedOptions.onSettled);\n (0, $kBpcz.ensureStaleTime)(defaultedOptions);\n (0, $cmvUK.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);\n (0, $cmvUK.useClearResetErrorBoundary)(errorResetBoundary);\n const [observer] = $dTCkE.useState(()=>new Observer(queryClient, defaultedOptions));\n const result = observer.getOptimisticResult(defaultedOptions);\n (0, $auXUg.useSyncExternalStore)($dTCkE.useCallback((onStoreChange)=>{\n const unsubscribe = isRestoring ? ()=>undefined : observer.subscribe((0, $kAzkl.notifyManager).batchCalls(onStoreChange)); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n observer.updateResult();\n return unsubscribe;\n }, [\n observer,\n isRestoring\n ]), ()=>observer.getCurrentResult(), ()=>observer.getCurrentResult());\n $dTCkE.useEffect(()=>{\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [\n defaultedOptions,\n observer\n ]); // Handle suspense\n if ((0, $kBpcz.shouldSuspend)(defaultedOptions, result, isRestoring)) throw (0, $kBpcz.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);\n // Handle error boundary\n if ((0, $cmvUK.getHasError)({\n result: result,\n errorResetBoundary: errorResetBoundary,\n useErrorBoundary: defaultedOptions.useErrorBoundary,\n query: observer.getCurrentQuery()\n })) throw result.error;\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n\n});\nparcelRegister(\"auXUg\", function(module, exports) {\n\n$parcel$export(module.exports, \"useSyncExternalStore\", function () { return $7a4b2ce328cfed83$export$306c0aa65ff9ec16; });\n\nvar $dgbaR = parcelRequire(\"dgbaR\");\n\"use client\";\nconst $7a4b2ce328cfed83$export$306c0aa65ff9ec16 = (0, $dgbaR.useSyncExternalStore);\n\n});\nparcelRegister(\"dgbaR\", function(module, exports) {\n\"use strict\";\n\nmodule.exports = (parcelRequire(\"9Io3D\"));\n\n});\nparcelRegister(\"9Io3D\", function(module, exports) {\n\n$parcel$export(module.exports, \"useSyncExternalStore\", function () { return $712ae26fc7eca999$export$306c0aa65ff9ec16; }, function (v) { return $712ae26fc7eca999$export$306c0aa65ff9ec16 = v; });\n/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */ var $712ae26fc7eca999$export$306c0aa65ff9ec16;\n\"use strict\";\n\nvar $dTCkE = parcelRequire(\"dTCkE\");\nfunction $712ae26fc7eca999$var$h(a, b) {\n return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;\n}\nvar $712ae26fc7eca999$var$k = \"function\" === typeof Object.is ? Object.is : $712ae26fc7eca999$var$h, $712ae26fc7eca999$var$l = $dTCkE.useState, $712ae26fc7eca999$var$m = $dTCkE.useEffect, $712ae26fc7eca999$var$n = $dTCkE.useLayoutEffect, $712ae26fc7eca999$var$p = $dTCkE.useDebugValue;\nfunction $712ae26fc7eca999$var$q(a, b) {\n var d = b(), f = $712ae26fc7eca999$var$l({\n inst: {\n value: d,\n getSnapshot: b\n }\n }), c = f[0].inst, g = f[1];\n $712ae26fc7eca999$var$n(function() {\n c.value = d;\n c.getSnapshot = b;\n $712ae26fc7eca999$var$r(c) && g({\n inst: c\n });\n }, [\n a,\n d,\n b\n ]);\n $712ae26fc7eca999$var$m(function() {\n $712ae26fc7eca999$var$r(c) && g({\n inst: c\n });\n return a(function() {\n $712ae26fc7eca999$var$r(c) && g({\n inst: c\n });\n });\n }, [\n a\n ]);\n $712ae26fc7eca999$var$p(d);\n return d;\n}\nfunction $712ae26fc7eca999$var$r(a) {\n var b = a.getSnapshot;\n a = a.value;\n try {\n var d = b();\n return !$712ae26fc7eca999$var$k(a, d);\n } catch (f) {\n return !0;\n }\n}\nfunction $712ae26fc7eca999$var$t(a, b) {\n return b();\n}\nvar $712ae26fc7eca999$var$u = \"undefined\" === typeof window || \"undefined\" === typeof window.document || \"undefined\" === typeof window.document.createElement ? $712ae26fc7eca999$var$t : $712ae26fc7eca999$var$q;\n$712ae26fc7eca999$export$306c0aa65ff9ec16 = void 0 !== $dTCkE.useSyncExternalStore ? $dTCkE.useSyncExternalStore : $712ae26fc7eca999$var$u;\n\n});\n\n\n\nparcelRegister(\"aRyCQ\", function(module, exports) {\n\n$parcel$export(module.exports, \"useQueryErrorResetBoundary\", function () { return $7e89b68bc0d89933$export$50dfac555130cafd; });\n\nvar $dTCkE = parcelRequire(\"dTCkE\");\n\"use client\";\nfunction $7e89b68bc0d89933$var$createValue() {\n let isReset = false;\n return {\n clearReset: ()=>{\n isReset = false;\n },\n reset: ()=>{\n isReset = true;\n },\n isReset: ()=>{\n return isReset;\n }\n };\n}\nconst $7e89b68bc0d89933$var$QueryErrorResetBoundaryContext = /*#__PURE__*/ $dTCkE.createContext($7e89b68bc0d89933$var$createValue()); // HOOK\nconst $7e89b68bc0d89933$export$50dfac555130cafd = ()=>$dTCkE.useContext($7e89b68bc0d89933$var$QueryErrorResetBoundaryContext); // COMPONENT\nconst $7e89b68bc0d89933$export$ddb9962d870f2330 = ({ children: children })=>{\n const [value] = $dTCkE.useState(()=>$7e89b68bc0d89933$var$createValue());\n return /*#__PURE__*/ $dTCkE.createElement($7e89b68bc0d89933$var$QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === \"function\" ? children(value) : children);\n};\n\n});\n\nparcelRegister(\"7G85E\", function(module, exports) {\n\n$parcel$export(module.exports, \"useIsRestoring\", function () { return $5972bb29fb0304ee$export$4da0178d6b5f553; });\n\nvar $dTCkE = parcelRequire(\"dTCkE\");\n\"use client\";\nconst $5972bb29fb0304ee$var$IsRestoringContext = /*#__PURE__*/ $dTCkE.createContext(false);\nconst $5972bb29fb0304ee$export$4da0178d6b5f553 = ()=>$dTCkE.useContext($5972bb29fb0304ee$var$IsRestoringContext);\nconst $5972bb29fb0304ee$export$593807d4e94f9621 = $5972bb29fb0304ee$var$IsRestoringContext.Provider;\n\n});\n\nparcelRegister(\"cmvUK\", function(module, exports) {\n\n$parcel$export(module.exports, \"ensurePreventErrorBoundaryRetry\", function () { return $90004b9b6418b8c2$export$ae8adb3de3d77633; });\n$parcel$export(module.exports, \"useClearResetErrorBoundary\", function () { return $90004b9b6418b8c2$export$b2b17ca3a1fb0229; });\n$parcel$export(module.exports, \"getHasError\", function () { return $90004b9b6418b8c2$export$1fbcf724762d607; });\n\nvar $dTCkE = parcelRequire(\"dTCkE\");\n\nvar $2VqoG = parcelRequire(\"2VqoG\");\n\"use client\";\nconst $90004b9b6418b8c2$export$ae8adb3de3d77633 = (options, errorResetBoundary)=>{\n if (options.suspense || options.useErrorBoundary) // Prevent retrying failed query if the error boundary has not been reset yet\n {\n if (!errorResetBoundary.isReset()) options.retryOnMount = false;\n }\n};\nconst $90004b9b6418b8c2$export$b2b17ca3a1fb0229 = (errorResetBoundary)=>{\n $dTCkE.useEffect(()=>{\n errorResetBoundary.clearReset();\n }, [\n errorResetBoundary\n ]);\n};\nconst $90004b9b6418b8c2$export$1fbcf724762d607 = ({ result: result, errorResetBoundary: errorResetBoundary, useErrorBoundary: useErrorBoundary, query: query })=>{\n return result.isError && !errorResetBoundary.isReset() && !result.isFetching && (0, $2VqoG.shouldThrowError)(useErrorBoundary, [\n result.error,\n query\n ]);\n};\n\n});\nparcelRegister(\"2VqoG\", function(module, exports) {\n\n$parcel$export(module.exports, \"shouldThrowError\", function () { return $22156195f56a4b26$export$2072f68e6c3507cf; });\nfunction $22156195f56a4b26$export$2072f68e6c3507cf(_useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === \"function\") return _useErrorBoundary(...params);\n return !!_useErrorBoundary;\n}\n\n});\n\n\nparcelRegister(\"kBpcz\", function(module, exports) {\n\n$parcel$export(module.exports, \"ensureStaleTime\", function () { return $effacfe2be7efba0$export$2c40a591ad2dafb1; });\n$parcel$export(module.exports, \"shouldSuspend\", function () { return $effacfe2be7efba0$export$88d3586dfed64df9; });\n$parcel$export(module.exports, \"fetchOptimistic\", function () { return $effacfe2be7efba0$export$defdc11a9c9acfcf; });\nconst $effacfe2be7efba0$export$2c40a591ad2dafb1 = (defaultedOptions)=>{\n if (defaultedOptions.suspense) // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n {\n if (typeof defaultedOptions.staleTime !== \"number\") defaultedOptions.staleTime = 1000;\n }\n};\nconst $effacfe2be7efba0$export$e0a3f29513afe430 = (result, isRestoring)=>result.isLoading && result.isFetching && !isRestoring;\nconst $effacfe2be7efba0$export$88d3586dfed64df9 = (defaultedOptions, result, isRestoring)=>(defaultedOptions == null ? void 0 : defaultedOptions.suspense) && $effacfe2be7efba0$export$e0a3f29513afe430(result, isRestoring);\nconst $effacfe2be7efba0$export$defdc11a9c9acfcf = (defaultedOptions, observer, errorResetBoundary)=>observer.fetchOptimistic(defaultedOptions).then(({ data: data })=>{\n defaultedOptions.onSuccess == null || defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null || defaultedOptions.onSettled(data, null);\n }).catch((error)=>{\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null || defaultedOptions.onError(error);\n defaultedOptions.onSettled == null || defaultedOptions.onSettled(undefined, error);\n });\n\n});\n\n\n\n})();\n//# sourceMappingURL=ObjectPage.44158478.js.map\n","'use client';\nimport { parseQueryArgs, QueryObserver } from '@tanstack/query-core';\nimport { useBaseQuery } from './useBaseQuery.esm.js';\n\nfunction useQuery(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}\n\nexport { useQuery };\n//# sourceMappingURL=useQuery.esm.js.map\n","'use client'\nimport { QueryObserver, parseQueryArgs } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type { QueryFunction, QueryKey } from '@tanstack/query-core'\nimport type {\n DefinedUseQueryResult,\n UseQueryOptions,\n UseQueryResult,\n} from './types'\n\n// HOOK\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: Omit<\n UseQueryOptions,\n 'initialData'\n > & { initialData?: () => undefined },\n): UseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: Omit<\n UseQueryOptions,\n 'initialData'\n > & { initialData: TQueryFnData | (() => TQueryFnData) },\n): DefinedUseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions,\n): UseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n queryKey: TQueryKey,\n options?: Omit<\n UseQueryOptions,\n 'queryKey' | 'initialData'\n > & { initialData?: () => undefined },\n): UseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n queryKey: TQueryKey,\n options?: Omit<\n UseQueryOptions,\n 'queryKey' | 'initialData'\n > & { initialData: TQueryFnData | (() => TQueryFnData) },\n): DefinedUseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n queryKey: TQueryKey,\n options?: Omit<\n UseQueryOptions,\n 'queryKey'\n >,\n): UseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n queryKey: TQueryKey,\n queryFn: QueryFunction,\n options?: Omit<\n UseQueryOptions,\n 'queryKey' | 'queryFn' | 'initialData'\n > & { initialData?: () => undefined },\n): UseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n queryKey: TQueryKey,\n queryFn: QueryFunction,\n options?: Omit<\n UseQueryOptions,\n 'queryKey' | 'queryFn' | 'initialData'\n > & { initialData: TQueryFnData | (() => TQueryFnData) },\n): DefinedUseQueryResult\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n queryKey: TQueryKey,\n queryFn: QueryFunction,\n options?: Omit<\n UseQueryOptions,\n 'queryKey' | 'queryFn'\n >,\n): UseQueryResult\n\nexport function useQuery<\n TQueryFnData,\n TError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n arg1: TQueryKey | UseQueryOptions,\n arg2?:\n | QueryFunction\n | UseQueryOptions,\n arg3?: UseQueryOptions,\n): UseQueryResult {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3)\n return useBaseQuery(parsedOptions, QueryObserver)\n}\n","import { shallowEqualObjects, noop, isServer, isValidTimeout, timeUntilStale, replaceData } from './utils.esm.js';\nimport { notifyManager } from './notifyManager.esm.js';\nimport { focusManager } from './focusManager.esm.js';\nimport { Subscribable } from './subscribable.esm.js';\nimport { canFetch, isCancelledError } from './retryer.esm.js';\n\nclass QueryObserver extends Subscribable {\n constructor(client, options) {\n super();\n this.client = client;\n this.options = options;\n this.trackedProps = new Set();\n this.selectError = null;\n this.bindMethods();\n this.setOptions(options);\n }\n\n bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n }\n\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n }\n\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n\n shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n }\n\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n }\n\n destroy() {\n this.listeners = new Set();\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n this.currentQuery.removeObserver(this);\n }\n\n setOptions(options, notifyOptions) {\n const prevOptions = this.options;\n const prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryOptions(options);\n\n if (process.env.NODE_ENV !== 'production' && typeof (options == null ? void 0 : options.isDataEqual) !== 'undefined') {\n this.client.getLogger().error(\"The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option\");\n }\n\n if (!shallowEqualObjects(prevOptions, this.options)) {\n this.client.getQueryCache().notify({\n type: 'observerOptionsUpdated',\n query: this.currentQuery,\n observer: this\n });\n }\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n const mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n const nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n }\n\n getOptimisticResult(options) {\n const query = this.client.getQueryCache().build(this.client, options);\n const result = this.createResult(query, options);\n\n if (shouldAssignObserverCurrentProperties(this, result, options)) {\n // this assigns the optimistic result to the current Observer\n // because if the query function changes, useQuery will be performing\n // an effect where it would fetch again.\n // When the fetch finishes, we perform a deep data cloning in order\n // to reuse objects references. This deep data clone is performed against\n // the `observer.currentResult.data` property\n // When QueryKey changes, we refresh the query and get new `optimistic`\n // result, while we leave the `observer.currentResult`, so when new data\n // arrives, it finds the old `observer.currentResult` which is related\n // to the old QueryKey. Which means that currentResult and selectData are\n // out of sync already.\n // To solve this, we move the cursor of the currentResult everytime\n // an observer reads an optimistic value.\n // When keeping the previous data, the result doesn't change until new\n // data arrives.\n this.currentResult = result;\n this.currentResultOptions = this.options;\n this.currentResultState = this.currentQuery.state;\n }\n\n return result;\n }\n\n getCurrentResult() {\n return this.currentResult;\n }\n\n trackResult(result) {\n const trackedResult = {};\n Object.keys(result).forEach(key => {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: () => {\n this.trackedProps.add(key);\n return result[key];\n }\n });\n });\n return trackedResult;\n }\n\n getCurrentQuery() {\n return this.currentQuery;\n }\n\n remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n }\n\n refetch({\n refetchPage,\n ...options\n } = {}) {\n return this.fetch({ ...options,\n meta: {\n refetchPage\n }\n });\n }\n\n fetchOptimistic(options) {\n const defaultedOptions = this.client.defaultQueryOptions(options);\n const query = this.client.getQueryCache().build(this.client, defaultedOptions);\n query.isFetchingOptimistic = true;\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n\n fetch(fetchOptions) {\n var _fetchOptions$cancelR;\n\n return this.executeFetch({ ...fetchOptions,\n cancelRefetch: (_fetchOptions$cancelR = fetchOptions.cancelRefetch) != null ? _fetchOptions$cancelR : true\n }).then(() => {\n this.updateResult();\n return this.currentResult;\n });\n }\n\n executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n let promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions != null && fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n }\n\n updateStaleTimeout() {\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n const time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n const timeout = time + 1;\n this.staleTimeoutId = setTimeout(() => {\n if (!this.currentResult.isStale) {\n this.updateResult();\n }\n }, timeout);\n }\n\n computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n }\n\n updateRefetchInterval(nextInterval) {\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n this.executeFetch();\n }\n }, this.currentRefetchInterval);\n }\n\n updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n }\n\n clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n }\n\n clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n }\n\n createResult(query, options) {\n const prevQuery = this.currentQuery;\n const prevOptions = this.options;\n const prevResult = this.currentResult;\n const prevResultState = this.currentResultState;\n const prevResultOptions = this.currentResultOptions;\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n const prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n const {\n state\n } = query;\n let {\n dataUpdatedAt,\n error,\n errorUpdatedAt,\n fetchStatus,\n status\n } = state;\n let isPreviousData = false;\n let isPlaceholderData = false;\n let data; // Optimistically set result in fetching state if needed\n\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n fetchStatus = canFetch(query.options.networkMode) ? 'fetching' : 'paused';\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n\n if (options._optimisticResults === 'isRestoring') {\n fetchStatus = 'idle';\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdatedAt && prevQueryResult != null && prevQueryResult.isSuccess && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options);\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n if (process.env.NODE_ENV !== 'production') {\n this.client.getLogger().error(selectError);\n }\n\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && status === 'loading') {\n let placeholderData; // Memoize placeholder data\n\n if (prevResult != null && prevResult.isPlaceholderData && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n this.selectError = null;\n } catch (selectError) {\n if (process.env.NODE_ENV !== 'production') {\n this.client.getLogger().error(selectError);\n }\n\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = replaceData(prevResult == null ? void 0 : prevResult.data, placeholderData, options);\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n const isFetching = fetchStatus === 'fetching';\n const isLoading = status === 'loading';\n const isError = status === 'error';\n const result = {\n status,\n fetchStatus,\n isLoading,\n isSuccess: status === 'success',\n isError,\n isInitialLoading: isLoading && isFetching,\n data,\n dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n failureReason: state.fetchFailureReason,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isLoading,\n isLoadingError: isError && state.dataUpdatedAt === 0,\n isPaused: fetchStatus === 'paused',\n isPlaceholderData,\n isPreviousData,\n isRefetchError: isError && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n }\n\n updateResult(notifyOptions) {\n const prevResult = this.currentResult;\n const nextResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify and update result if something has changed\n\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n\n this.currentResult = nextResult; // Determine which callbacks to trigger\n\n const defaultNotifyOptions = {\n cache: true\n };\n\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n\n const {\n notifyOnChangeProps\n } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === 'function' ? notifyOnChangeProps() : notifyOnChangeProps;\n\n if (notifyOnChangePropsValue === 'all' || !notifyOnChangePropsValue && !this.trackedProps.size) {\n return true;\n }\n\n const includedProps = new Set(notifyOnChangePropsValue != null ? notifyOnChangePropsValue : this.trackedProps);\n\n if (this.options.useErrorBoundary) {\n includedProps.add('error');\n }\n\n return Object.keys(this.currentResult).some(key => {\n const typedKey = key;\n const changed = this.currentResult[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && shouldNotifyListeners()) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify({ ...defaultNotifyOptions,\n ...notifyOptions\n });\n }\n\n updateQuery() {\n const query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n const prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n }\n\n onQueryUpdate(action) {\n const notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = !action.manual;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n }\n\n notify(notifyOptions) {\n notifyManager.batch(() => {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n var _this$options$onSucce, _this$options, _this$options$onSettl, _this$options2;\n\n (_this$options$onSucce = (_this$options = this.options).onSuccess) == null ? void 0 : _this$options$onSucce.call(_this$options, this.currentResult.data);\n (_this$options$onSettl = (_this$options2 = this.options).onSettled) == null ? void 0 : _this$options$onSettl.call(_this$options2, this.currentResult.data, null);\n } else if (notifyOptions.onError) {\n var _this$options$onError, _this$options3, _this$options$onSettl2, _this$options4;\n\n (_this$options$onError = (_this$options3 = this.options).onError) == null ? void 0 : _this$options$onError.call(_this$options3, this.currentResult.error);\n (_this$options$onSettl2 = (_this$options4 = this.options).onSettled) == null ? void 0 : _this$options$onSettl2.call(_this$options4, undefined, this.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n this.listeners.forEach(({\n listener\n }) => {\n listener(this.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n this.client.getQueryCache().notify({\n query: this.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n }\n\n}\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n const value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n} // this function would decide if we will update the observer's 'current'\n// properties after an optimistic reading via getOptimisticResult\n\n\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult, options) {\n // it is important to keep this condition like this for three reasons:\n // 1. It will get removed in the v5\n // 2. it reads: don't update the properties if we want to keep the previous\n // data.\n // 3. The opposite condition (!options.keepPreviousData) would fallthrough\n // and will result in a bad decision\n if (options.keepPreviousData) {\n return false;\n } // this means we want to put some placeholder data when pending and queryKey\n // changed.\n\n\n if (options.placeholderData !== undefined) {\n // re-assign properties only if current data is placeholder data\n // which means that data did not arrive yet, so, if there is some cached data\n // we need to \"prepare\" to receive it\n return optimisticResult.isPlaceholderData;\n } // if the newly created result isn't what the observer is holding as current,\n // then we'll need to update the properties as well\n\n\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n } // basically, just keep previous properties if nothing changed\n\n\n return false;\n}\n\nexport { QueryObserver };\n//# sourceMappingURL=queryObserver.esm.js.map\n","import {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n shallowEqualObjects,\n timeUntilStale,\n} from './utils'\nimport { notifyManager } from './notifyManager'\nimport { focusManager } from './focusManager'\nimport { Subscribable } from './subscribable'\nimport { canFetch, isCancelledError } from './retryer'\nimport type {\n PlaceholderDataFunction,\n QueryKey,\n QueryObserverBaseResult,\n QueryObserverOptions,\n QueryObserverResult,\n QueryOptions,\n RefetchOptions,\n} from './types'\nimport type { Action, FetchOptions, Query, QueryState } from './query'\nimport type { QueryClient } from './queryClient'\nimport type { DefaultedQueryObserverOptions, RefetchPageFilters } from './types'\n\ntype QueryObserverListener = (\n result: QueryObserverResult,\n) => void\n\nexport interface NotifyOptions {\n cache?: boolean\n listeners?: boolean\n onError?: boolean\n onSuccess?: boolean\n}\n\nexport interface ObserverFetchOptions extends FetchOptions {\n throwOnError?: boolean\n}\n\nexport class QueryObserver<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends Subscribable> {\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >\n\n private client: QueryClient\n private currentQuery!: Query\n private currentQueryInitialState!: QueryState\n private currentResult!: QueryObserverResult\n private currentResultState?: QueryState\n private currentResultOptions?: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >\n private previousQueryResult?: QueryObserverResult\n private selectError: TError | null\n private selectFn?: (data: TQueryData) => TData\n private selectResult?: TData\n private staleTimeoutId?: ReturnType\n private refetchIntervalId?: ReturnType\n private currentRefetchInterval?: number | false\n private trackedProps!: Set\n\n constructor(\n client: QueryClient,\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ) {\n super()\n\n this.client = client\n this.options = options\n this.trackedProps = new Set()\n this.selectError = null\n this.bindMethods()\n this.setOptions(options)\n }\n\n protected bindMethods(): void {\n this.remove = this.remove.bind(this)\n this.refetch = this.refetch.bind(this)\n }\n\n protected onSubscribe(): void {\n if (this.listeners.size === 1) {\n this.currentQuery.addObserver(this)\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch()\n }\n\n this.updateTimers()\n }\n }\n\n protected onUnsubscribe(): void {\n if (!this.hasListeners()) {\n this.destroy()\n }\n }\n\n shouldFetchOnReconnect(): boolean {\n return shouldFetchOn(\n this.currentQuery,\n this.options,\n this.options.refetchOnReconnect,\n )\n }\n\n shouldFetchOnWindowFocus(): boolean {\n return shouldFetchOn(\n this.currentQuery,\n this.options,\n this.options.refetchOnWindowFocus,\n )\n }\n\n destroy(): void {\n this.listeners = new Set()\n this.clearStaleTimeout()\n this.clearRefetchInterval()\n this.currentQuery.removeObserver(this)\n }\n\n setOptions(\n options?: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n notifyOptions?: NotifyOptions,\n ): void {\n const prevOptions = this.options\n const prevQuery = this.currentQuery\n\n this.options = this.client.defaultQueryOptions(options)\n\n if (\n process.env.NODE_ENV !== 'production' &&\n typeof options?.isDataEqual !== 'undefined'\n ) {\n this.client\n .getLogger()\n .error(\n `The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option`,\n )\n }\n\n if (!shallowEqualObjects(prevOptions, this.options)) {\n this.client.getQueryCache().notify({\n type: 'observerOptionsUpdated',\n query: this.currentQuery,\n observer: this,\n })\n }\n\n if (\n typeof this.options.enabled !== 'undefined' &&\n typeof this.options.enabled !== 'boolean'\n ) {\n throw new Error('Expected enabled to be a boolean')\n }\n\n // Keep previous query key if the user does not supply one\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey\n }\n\n this.updateQuery()\n\n const mounted = this.hasListeners()\n\n // Fetch if there are subscribers\n if (\n mounted &&\n shouldFetchOptionally(\n this.currentQuery,\n prevQuery,\n this.options,\n prevOptions,\n )\n ) {\n this.executeFetch()\n }\n\n // Update result\n this.updateResult(notifyOptions)\n\n // Update stale interval if needed\n if (\n mounted &&\n (this.currentQuery !== prevQuery ||\n this.options.enabled !== prevOptions.enabled ||\n this.options.staleTime !== prevOptions.staleTime)\n ) {\n this.updateStaleTimeout()\n }\n\n const nextRefetchInterval = this.computeRefetchInterval()\n\n // Update refetch interval if needed\n if (\n mounted &&\n (this.currentQuery !== prevQuery ||\n this.options.enabled !== prevOptions.enabled ||\n nextRefetchInterval !== this.currentRefetchInterval)\n ) {\n this.updateRefetchInterval(nextRefetchInterval)\n }\n }\n\n getOptimisticResult(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): QueryObserverResult {\n const query = this.client.getQueryCache().build(this.client, options)\n\n const result = this.createResult(query, options)\n\n if (shouldAssignObserverCurrentProperties(this, result, options)) {\n // this assigns the optimistic result to the current Observer\n // because if the query function changes, useQuery will be performing\n // an effect where it would fetch again.\n // When the fetch finishes, we perform a deep data cloning in order\n // to reuse objects references. This deep data clone is performed against\n // the `observer.currentResult.data` property\n // When QueryKey changes, we refresh the query and get new `optimistic`\n // result, while we leave the `observer.currentResult`, so when new data\n // arrives, it finds the old `observer.currentResult` which is related\n // to the old QueryKey. Which means that currentResult and selectData are\n // out of sync already.\n // To solve this, we move the cursor of the currentResult everytime\n // an observer reads an optimistic value.\n\n // When keeping the previous data, the result doesn't change until new\n // data arrives.\n this.currentResult = result\n this.currentResultOptions = this.options\n this.currentResultState = this.currentQuery.state\n }\n return result\n }\n\n getCurrentResult(): QueryObserverResult {\n return this.currentResult\n }\n\n trackResult(\n result: QueryObserverResult,\n ): QueryObserverResult {\n const trackedResult = {} as QueryObserverResult\n\n Object.keys(result).forEach((key) => {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: () => {\n this.trackedProps.add(key as keyof QueryObserverResult)\n return result[key as keyof QueryObserverResult]\n },\n })\n })\n\n return trackedResult\n }\n\n getCurrentQuery(): Query {\n return this.currentQuery\n }\n\n remove(): void {\n this.client.getQueryCache().remove(this.currentQuery)\n }\n\n refetch({\n refetchPage,\n ...options\n }: RefetchOptions & RefetchPageFilters = {}): Promise<\n QueryObserverResult\n > {\n return this.fetch({\n ...options,\n meta: { refetchPage },\n })\n }\n\n fetchOptimistic(\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): Promise> {\n const defaultedOptions = this.client.defaultQueryOptions(options)\n\n const query = this.client\n .getQueryCache()\n .build(this.client, defaultedOptions)\n query.isFetchingOptimistic = true\n\n return query.fetch().then(() => this.createResult(query, defaultedOptions))\n }\n\n protected fetch(\n fetchOptions: ObserverFetchOptions,\n ): Promise> {\n return this.executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true,\n }).then(() => {\n this.updateResult()\n return this.currentResult\n })\n }\n\n private executeFetch(\n fetchOptions?: ObserverFetchOptions,\n ): Promise {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery()\n\n // Fetch\n let promise: Promise = this.currentQuery.fetch(\n this.options as QueryOptions,\n fetchOptions,\n )\n\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop)\n }\n\n return promise\n }\n\n private updateStaleTimeout(): void {\n this.clearStaleTimeout()\n\n if (\n isServer ||\n this.currentResult.isStale ||\n !isValidTimeout(this.options.staleTime)\n ) {\n return\n }\n\n const time = timeUntilStale(\n this.currentResult.dataUpdatedAt,\n this.options.staleTime,\n )\n\n // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n const timeout = time + 1\n\n this.staleTimeoutId = setTimeout(() => {\n if (!this.currentResult.isStale) {\n this.updateResult()\n }\n }, timeout)\n }\n\n private computeRefetchInterval() {\n return typeof this.options.refetchInterval === 'function'\n ? this.options.refetchInterval(this.currentResult.data, this.currentQuery)\n : this.options.refetchInterval ?? false\n }\n\n private updateRefetchInterval(nextInterval: number | false): void {\n this.clearRefetchInterval()\n\n this.currentRefetchInterval = nextInterval\n\n if (\n isServer ||\n this.options.enabled === false ||\n !isValidTimeout(this.currentRefetchInterval) ||\n this.currentRefetchInterval === 0\n ) {\n return\n }\n\n this.refetchIntervalId = setInterval(() => {\n if (\n this.options.refetchIntervalInBackground ||\n focusManager.isFocused()\n ) {\n this.executeFetch()\n }\n }, this.currentRefetchInterval)\n }\n\n private updateTimers(): void {\n this.updateStaleTimeout()\n this.updateRefetchInterval(this.computeRefetchInterval())\n }\n\n private clearStaleTimeout(): void {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId)\n this.staleTimeoutId = undefined\n }\n }\n\n private clearRefetchInterval(): void {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId)\n this.refetchIntervalId = undefined\n }\n }\n\n protected createResult(\n query: Query,\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): QueryObserverResult {\n const prevQuery = this.currentQuery\n const prevOptions = this.options\n const prevResult = this.currentResult as\n | QueryObserverResult\n | undefined\n const prevResultState = this.currentResultState\n const prevResultOptions = this.currentResultOptions\n const queryChange = query !== prevQuery\n const queryInitialState = queryChange\n ? query.state\n : this.currentQueryInitialState\n const prevQueryResult = queryChange\n ? this.currentResult\n : this.previousQueryResult\n\n const { state } = query\n let { dataUpdatedAt, error, errorUpdatedAt, fetchStatus, status } = state\n let isPreviousData = false\n let isPlaceholderData = false\n let data: TData | undefined\n\n // Optimistically set result in fetching state if needed\n if (options._optimisticResults) {\n const mounted = this.hasListeners()\n\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options)\n\n const fetchOptionally =\n mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions)\n\n if (fetchOnMount || fetchOptionally) {\n fetchStatus = canFetch(query.options.networkMode)\n ? 'fetching'\n : 'paused'\n if (!dataUpdatedAt) {\n status = 'loading'\n }\n }\n if (options._optimisticResults === 'isRestoring') {\n fetchStatus = 'idle'\n }\n }\n\n // Keep previous data if needed\n if (\n options.keepPreviousData &&\n !state.dataUpdatedAt &&\n prevQueryResult?.isSuccess &&\n status !== 'error'\n ) {\n data = prevQueryResult.data\n dataUpdatedAt = prevQueryResult.dataUpdatedAt\n status = prevQueryResult.status\n isPreviousData = true\n }\n // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (\n prevResult &&\n state.data === prevResultState?.data &&\n options.select === this.selectFn\n ) {\n data = this.selectResult\n } else {\n try {\n this.selectFn = options.select\n data = options.select(state.data)\n data = replaceData(prevResult?.data, data, options)\n this.selectResult = data\n this.selectError = null\n } catch (selectError) {\n if (process.env.NODE_ENV !== 'production') {\n this.client.getLogger().error(selectError)\n }\n this.selectError = selectError as TError\n }\n }\n }\n // Use query data\n else {\n data = state.data as unknown as TData\n }\n\n // Show placeholder data if needed\n if (\n typeof options.placeholderData !== 'undefined' &&\n typeof data === 'undefined' &&\n status === 'loading'\n ) {\n let placeholderData\n\n // Memoize placeholder data\n if (\n prevResult?.isPlaceholderData &&\n options.placeholderData === prevResultOptions?.placeholderData\n ) {\n placeholderData = prevResult.data\n } else {\n placeholderData =\n typeof options.placeholderData === 'function'\n ? (options.placeholderData as PlaceholderDataFunction)()\n : options.placeholderData\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData)\n this.selectError = null\n } catch (selectError) {\n if (process.env.NODE_ENV !== 'production') {\n this.client.getLogger().error(selectError)\n }\n this.selectError = selectError as TError\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success'\n data = replaceData(prevResult?.data, placeholderData, options) as TData\n isPlaceholderData = true\n }\n }\n\n if (this.selectError) {\n error = this.selectError as any\n data = this.selectResult\n errorUpdatedAt = Date.now()\n status = 'error'\n }\n\n const isFetching = fetchStatus === 'fetching'\n const isLoading = status === 'loading'\n const isError = status === 'error'\n\n const result: QueryObserverBaseResult = {\n status,\n fetchStatus,\n isLoading,\n isSuccess: status === 'success',\n isError,\n isInitialLoading: isLoading && isFetching,\n data,\n dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n failureReason: state.fetchFailureReason,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount:\n state.dataUpdateCount > queryInitialState.dataUpdateCount ||\n state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isLoading,\n isLoadingError: isError && state.dataUpdatedAt === 0,\n isPaused: fetchStatus === 'paused',\n isPlaceholderData,\n isPreviousData,\n isRefetchError: isError && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove,\n }\n\n return result as QueryObserverResult\n }\n\n updateResult(notifyOptions?: NotifyOptions): void {\n const prevResult = this.currentResult as\n | QueryObserverResult\n | undefined\n\n const nextResult = this.createResult(this.currentQuery, this.options)\n this.currentResultState = this.currentQuery.state\n this.currentResultOptions = this.options\n\n // Only notify and update result if something has changed\n if (shallowEqualObjects(nextResult, prevResult)) {\n return\n }\n\n this.currentResult = nextResult\n\n // Determine which callbacks to trigger\n const defaultNotifyOptions: NotifyOptions = { cache: true }\n\n const shouldNotifyListeners = (): boolean => {\n if (!prevResult) {\n return true\n }\n\n const { notifyOnChangeProps } = this.options\n const notifyOnChangePropsValue =\n typeof notifyOnChangeProps === 'function'\n ? notifyOnChangeProps()\n : notifyOnChangeProps\n\n if (\n notifyOnChangePropsValue === 'all' ||\n (!notifyOnChangePropsValue && !this.trackedProps.size)\n ) {\n return true\n }\n\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.trackedProps,\n )\n\n if (this.options.useErrorBoundary) {\n includedProps.add('error')\n }\n\n return Object.keys(this.currentResult).some((key) => {\n const typedKey = key as keyof QueryObserverResult\n const changed = this.currentResult[typedKey] !== prevResult[typedKey]\n return changed && includedProps.has(typedKey)\n })\n }\n\n if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {\n defaultNotifyOptions.listeners = true\n }\n\n this.notify({ ...defaultNotifyOptions, ...notifyOptions })\n }\n\n private updateQuery(): void {\n const query = this.client.getQueryCache().build(this.client, this.options)\n\n if (query === this.currentQuery) {\n return\n }\n\n const prevQuery = this.currentQuery as\n | Query\n | undefined\n this.currentQuery = query\n this.currentQueryInitialState = query.state\n this.previousQueryResult = this.currentResult\n\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this)\n query.addObserver(this)\n }\n }\n\n onQueryUpdate(action: Action): void {\n const notifyOptions: NotifyOptions = {}\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = !action.manual\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true\n }\n\n this.updateResult(notifyOptions)\n\n if (this.hasListeners()) {\n this.updateTimers()\n }\n }\n\n private notify(notifyOptions: NotifyOptions): void {\n notifyManager.batch(() => {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n this.options.onSuccess?.(this.currentResult.data!)\n this.options.onSettled?.(this.currentResult.data!, null)\n } else if (notifyOptions.onError) {\n this.options.onError?.(this.currentResult.error!)\n this.options.onSettled?.(undefined, this.currentResult.error!)\n }\n\n // Then trigger the listeners\n if (notifyOptions.listeners) {\n this.listeners.forEach(({ listener }) => {\n listener(this.currentResult)\n })\n }\n\n // Then the cache listeners\n if (notifyOptions.cache) {\n this.client.getQueryCache().notify({\n query: this.currentQuery,\n type: 'observerResultsUpdated',\n })\n }\n })\n }\n}\n\nfunction shouldLoadOnMount(\n query: Query,\n options: QueryObserverOptions,\n): boolean {\n return (\n options.enabled !== false &&\n !query.state.dataUpdatedAt &&\n !(query.state.status === 'error' && options.retryOnMount === false)\n )\n}\n\nfunction shouldFetchOnMount(\n query: Query,\n options: QueryObserverOptions,\n): boolean {\n return (\n shouldLoadOnMount(query, options) ||\n (query.state.dataUpdatedAt > 0 &&\n shouldFetchOn(query, options, options.refetchOnMount))\n )\n}\n\nfunction shouldFetchOn(\n query: Query,\n options: QueryObserverOptions,\n field: typeof options['refetchOnMount'] &\n typeof options['refetchOnWindowFocus'] &\n typeof options['refetchOnReconnect'],\n) {\n if (options.enabled !== false) {\n const value = typeof field === 'function' ? field(query) : field\n\n return value === 'always' || (value !== false && isStale(query, options))\n }\n return false\n}\n\nfunction shouldFetchOptionally(\n query: Query,\n prevQuery: Query,\n options: QueryObserverOptions,\n prevOptions: QueryObserverOptions,\n): boolean {\n return (\n options.enabled !== false &&\n (query !== prevQuery || prevOptions.enabled === false) &&\n (!options.suspense || query.state.status !== 'error') &&\n isStale(query, options)\n )\n}\n\nfunction isStale(\n query: Query,\n options: QueryObserverOptions,\n): boolean {\n return query.isStaleByTime(options.staleTime)\n}\n\n// this function would decide if we will update the observer's 'current'\n// properties after an optimistic reading via getOptimisticResult\nfunction shouldAssignObserverCurrentProperties<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n observer: QueryObserver,\n optimisticResult: QueryObserverResult,\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n) {\n // it is important to keep this condition like this for three reasons:\n // 1. It will get removed in the v5\n // 2. it reads: don't update the properties if we want to keep the previous\n // data.\n // 3. The opposite condition (!options.keepPreviousData) would fallthrough\n // and will result in a bad decision\n if (options.keepPreviousData) {\n return false\n }\n\n // this means we want to put some placeholder data when pending and queryKey\n // changed.\n if (options.placeholderData !== undefined) {\n // re-assign properties only if current data is placeholder data\n // which means that data did not arrive yet, so, if there is some cached data\n // we need to \"prepare\" to receive it\n return optimisticResult.isPlaceholderData\n }\n\n // if the newly created result isn't what the observer is holding as current,\n // then we'll need to update the properties as well\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true\n }\n\n // basically, just keep previous properties if nothing changed\n return false\n}\n","'use client';\nimport * as React from 'react';\nimport { notifyManager } from '@tanstack/query-core';\nimport { useSyncExternalStore } from './useSyncExternalStore.esm.js';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary.esm.js';\nimport { useQueryClient } from './QueryClientProvider.esm.js';\nimport { useIsRestoring } from './isRestoring.esm.js';\nimport { ensurePreventErrorBoundaryRetry, useClearResetErrorBoundary, getHasError } from './errorBoundaryUtils.esm.js';\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense.esm.js';\n\nfunction useBaseQuery(options, Observer) {\n const queryClient = useQueryClient({\n context: options.context\n });\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const defaultedOptions = queryClient.defaultQueryOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions._optimisticResults = isRestoring ? 'isRestoring' : 'optimistic'; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n ensureStaleTime(defaultedOptions);\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);\n useClearResetErrorBoundary(errorResetBoundary);\n const [observer] = React.useState(() => new Observer(queryClient, defaultedOptions));\n const result = observer.getOptimisticResult(defaultedOptions);\n useSyncExternalStore(React.useCallback(onStoreChange => {\n const unsubscribe = isRestoring ? () => undefined : observer.subscribe(notifyManager.batchCalls(onStoreChange)); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return unsubscribe;\n }, [observer, isRestoring]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n } // Handle error boundary\n\n\n if (getHasError({\n result,\n errorResetBoundary,\n useErrorBoundary: defaultedOptions.useErrorBoundary,\n query: observer.getCurrentQuery()\n })) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n\nexport { useBaseQuery };\n//# sourceMappingURL=useBaseQuery.esm.js.map\n","'use client'\nimport * as React from 'react'\n\nimport { notifyManager } from '@tanstack/query-core'\nimport { useSyncExternalStore } from './useSyncExternalStore'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, fetchOptimistic, shouldSuspend } from './suspense'\nimport type { QueryKey, QueryObserver } from '@tanstack/query-core'\nimport type { UseBaseQueryOptions } from './types'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n) {\n const queryClient = useQueryClient({ context: options.context })\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = queryClient.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer(\n queryClient,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => {\n const unsubscribe = isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange))\n\n // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n observer.updateResult()\n\n return unsubscribe\n },\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n useErrorBoundary: defaultedOptions.useErrorBoundary,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n","'use client';\nimport { useSyncExternalStore as useSyncExternalStore$1 } from 'use-sync-external-store/shim/index.js';\n\nconst useSyncExternalStore = useSyncExternalStore$1;\n\nexport { useSyncExternalStore };\n//# sourceMappingURL=useSyncExternalStore.esm.js.map\n","'use client'\n// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601\nimport { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'\n\nexport const useSyncExternalStore = uSES\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use client';\nimport * as React from 'react';\n\nfunction createValue() {\n let isReset = false;\n return {\n clearReset: () => {\n isReset = false;\n },\n reset: () => {\n isReset = true;\n },\n isReset: () => {\n return isReset;\n }\n };\n}\n\nconst QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext); // COMPONENT\n\nconst QueryErrorResetBoundary = ({\n children\n}) => {\n const [value] = React.useState(() => createValue());\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};\n\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n//# sourceMappingURL=QueryErrorResetBoundary.esm.js.map\n","'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n \n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n \n )\n}\n","'use client';\nimport * as React from 'react';\n\nconst IsRestoringContext = /*#__PURE__*/React.createContext(false);\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\nconst IsRestoringProvider = IsRestoringContext.Provider;\n\nexport { IsRestoringProvider, useIsRestoring };\n//# sourceMappingURL=isRestoring.esm.js.map\n","'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n","'use client';\nimport * as React from 'react';\nimport { shouldThrowError } from './utils.esm.js';\n\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {\n if (options.suspense || options.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false;\n }\n }\n};\nconst useClearResetErrorBoundary = errorResetBoundary => {\n React.useEffect(() => {\n errorResetBoundary.clearReset();\n }, [errorResetBoundary]);\n};\nconst getHasError = ({\n result,\n errorResetBoundary,\n useErrorBoundary,\n query\n}) => {\n return result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(useErrorBoundary, [result.error, query]);\n};\n\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n//# sourceMappingURL=errorBoundaryUtils.esm.js.map\n","'use client'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n UseErrorBoundary,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n useErrorBoundary,\n query,\n}: {\n result: QueryObserverResult\n errorResetBoundary: QueryErrorResetBoundaryValue\n useErrorBoundary: UseErrorBoundary<\n TQueryFnData,\n TError,\n TQueryData,\n TQueryKey\n >\n query: Query\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(useErrorBoundary, [result.error, query])\n )\n}\n","function shouldThrowError(_useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(...params);\n }\n\n return !!_useErrorBoundary;\n}\n\nexport { shouldThrowError };\n//# sourceMappingURL=utils.esm.js.map\n","export function shouldThrowError boolean>(\n _useErrorBoundary: boolean | T | undefined,\n params: Parameters,\n): boolean {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(...params)\n }\n\n return !!_useErrorBoundary\n}\n","const ensureStaleTime = defaultedOptions => {\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n }\n }\n};\nconst willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;\nconst shouldSuspend = (defaultedOptions, result, isRestoring) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && willFetch(result, isRestoring);\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).then(({\n data\n}) => {\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n}).catch(error => {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n});\n\nexport { ensureStaleTime, fetchOptimistic, shouldSuspend, willFetch };\n//# sourceMappingURL=suspense.esm.js.map\n","import type { DefaultedQueryObserverOptions } from '@tanstack/query-core'\nimport type { QueryObserver } from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport type { QueryObserverResult } from '@tanstack/query-core'\nimport type { QueryKey } from '@tanstack/query-core'\n\nexport const ensureStaleTime = (\n defaultedOptions: DefaultedQueryObserverOptions,\n) => {\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions\n | undefined,\n result: QueryObserverResult,\n isRestoring: boolean,\n) => defaultedOptions?.suspense && willFetch(result, isRestoring)\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer\n .fetchOptimistic(defaultedOptions)\n .then(({ data }) => {\n defaultedOptions.onSuccess?.(data as TData)\n defaultedOptions.onSettled?.(data, null)\n })\n .catch((error) => {\n errorResetBoundary.clearReset()\n defaultedOptions.onError?.(error)\n defaultedOptions.onSettled?.(undefined, error)\n })\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","parcelRequire","$parcel$global","globalThis","self","window","global","parcelRegister","register","module","exports","$30f33f483acd6b41$export$dd0a697e1782aedd","$4lSdh","$2b3d0","$iEdqz","arg1","arg2","arg3","parsedOptions","parseQueryArgs","useBaseQuery","QueryObserver","$195f1906c7f730cd$export$a06cf8c0066f0d4c","$kAzkl","$c1dhr","$kCwPK","$lu0Sm","Subscribable","constructor","client","options","trackedProps","Set","selectError","bindMethods","setOptions","remove","bind","refetch","onSubscribe","listeners","size","currentQuery","addObserver","$195f1906c7f730cd$var$shouldFetchOnMount","executeFetch","updateTimers","onUnsubscribe","hasListeners","destroy","shouldFetchOnReconnect","$195f1906c7f730cd$var$shouldFetchOn","refetchOnReconnect","shouldFetchOnWindowFocus","refetchOnWindowFocus","clearStaleTimeout","clearRefetchInterval","removeObserver","notifyOptions","prevOptions","prevQuery","defaultQueryOptions","shallowEqualObjects","getQueryCache","notify","type","query","observer","enabled","Error","queryKey","updateQuery","mounted","$195f1906c7f730cd$var$shouldFetchOptionally","updateResult","staleTime","updateStaleTimeout","nextRefetchInterval","computeRefetchInterval","currentRefetchInterval","updateRefetchInterval","getOptimisticResult","build","result","createResult","keepPreviousData","undefined","placeholderData","optimisticResult","isPlaceholderData","getCurrentResult","currentResult","currentResultOptions","currentResultState","state","trackResult","trackedResult","keys","forEach","key","add","getCurrentQuery","refetchPage","fetch","meta","fetchOptimistic","defaultedOptions","isFetchingOptimistic","then","fetchOptions","_fetchOptions$cancelR","cancelRefetch","promise","throwOnError","catch","noop","isServer","isStale","isValidTimeout","time","timeUntilStale","dataUpdatedAt","staleTimeoutId","setTimeout","_this$options$refetch","refetchInterval","data","nextInterval","refetchIntervalId","setInterval","refetchIntervalInBackground","focusManager","isFocused","clearTimeout","clearInterval","prevResult","prevResultState","prevResultOptions","queryChange","queryInitialState","currentQueryInitialState","prevQueryResult","previousQueryResult","error","errorUpdatedAt","fetchStatus","status","isPreviousData","_optimisticResults","fetchOnMount","fetchOptionally","canFetch","networkMode","isSuccess","select","selectFn","selectResult","replaceData","Date","now","isFetching","isLoading","isError","isInitialLoading","failureCount","fetchFailureCount","failureReason","fetchFailureReason","errorUpdateCount","isFetched","dataUpdateCount","isFetchedAfterMount","isRefetching","isLoadingError","isPaused","isRefetchError","$195f1906c7f730cd$var$isStale","nextResult","defaultNotifyOptions","cache","shouldNotifyListeners","notifyOnChangeProps","notifyOnChangePropsValue","includedProps","useErrorBoundary","some","changed","has","onQueryUpdate","action","onSuccess","manual","isCancelledError","onError","notifyManager","batch","_this$options$onSucce","_this$options","_this$options$onSettl","_this$options2","_this$options$onError","_this$options3","_this$options$onSettl2","_this$options4","call","onSettled","listener","retryOnMount","refetchOnMount","field","value","suspense","isStaleByTime","$d93660d5d6af82ef$export$fff0865807e996c5","$dTCkE","$auXUg","$aRyCQ","$jmhMM","$7G85E","$cmvUK","$kBpcz","Observer","queryClient","useQueryClient","context","isRestoring","useIsRestoring","errorResetBoundary","useQueryErrorResetBoundary","batchCalls","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","useState","useSyncExternalStore","useCallback","onStoreChange","unsubscribe","subscribe","useEffect","shouldSuspend","getHasError","$7a4b2ce328cfed83$export$306c0aa65ff9ec16","$dgbaR","$712ae26fc7eca999$export$306c0aa65ff9ec16","$712ae26fc7eca999$var$k","is","a","b","$712ae26fc7eca999$var$l","$712ae26fc7eca999$var$m","$712ae26fc7eca999$var$n","useLayoutEffect","$712ae26fc7eca999$var$p","useDebugValue","$712ae26fc7eca999$var$r","getSnapshot","d","f","$712ae26fc7eca999$var$u","document","createElement","inst","c","g","isReset","$7e89b68bc0d89933$export$50dfac555130cafd","$7e89b68bc0d89933$var$QueryErrorResetBoundaryContext","createContext","clearReset","reset","useContext","$5972bb29fb0304ee$export$4da0178d6b5f553","$5972bb29fb0304ee$var$IsRestoringContext","Provider","$90004b9b6418b8c2$export$ae8adb3de3d77633","$90004b9b6418b8c2$export$b2b17ca3a1fb0229","$90004b9b6418b8c2$export$1fbcf724762d607","$2VqoG","shouldThrowError","$22156195f56a4b26$export$2072f68e6c3507cf","_useErrorBoundary","params","$effacfe2be7efba0$export$2c40a591ad2dafb1","$effacfe2be7efba0$export$88d3586dfed64df9","$effacfe2be7efba0$export$defdc11a9c9acfcf","$effacfe2be7efba0$export$e0a3f29513afe430","shouldFetchOnMount","shouldFetchOn","process","env","NODE_ENV","isDataEqual","getLogger","shouldFetchOptionally","shouldAssignObserverCurrentProperties","timeout","typedKey","shouldLoadOnMount","children","IsRestoringProvider","willFetch"],"version":3,"file":"ObjectPage.44158478.js.map"}