{"version":3,"file":"useQuery-De42L2bL.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.66.0/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../node_modules/.pnpm/@tanstack+vue-query@5.66.0_vue@3.5.13_typescript@5.7.3_/node_modules/@tanstack/vue-query/build/modern/useBaseQuery.js","../../../node_modules/.pnpm/@tanstack+vue-query@5.66.0_vue@3.5.13_typescript@5.7.3_/node_modules/@tanstack/vue-query/build/modern/useQuery.js"],"sourcesContent":["// src/queryObserver.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n timeUntilStale\n} from \"./utils.js\";\nvar QueryObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n this.options = options;\n this.#client = client;\n this.#selectError = null;\n this.#currentThenable = pendingThenable();\n if (!this.options.experimental_prefetchInRender) {\n this.#currentThenable.reject(\n new Error(\"experimental_prefetchInRender feature flag is not enabled\")\n );\n }\n this.bindMethods();\n this.setOptions(options);\n }\n #client;\n #currentQuery = void 0;\n #currentQueryInitialState = void 0;\n #currentResult = void 0;\n #currentResultState;\n #currentResultOptions;\n #currentThenable;\n #selectError;\n #selectFn;\n #selectResult;\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n #lastQueryWithDefinedData;\n #staleTimeoutId;\n #refetchIntervalId;\n #currentRefetchInterval;\n #trackedProps = /* @__PURE__ */ new Set();\n bindMethods() {\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.#currentQuery.addObserver(this);\n if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n this.#executeFetch();\n } else {\n this.updateResult();\n }\n this.#updateTimers();\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n shouldFetchOnReconnect() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnReconnect\n );\n }\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnWindowFocus\n );\n }\n destroy() {\n this.listeners = /* @__PURE__ */ 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 (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== \"boolean\") {\n throw new Error(\n \"Expected enabled to be a boolean or a callback that returns a boolean\"\n );\n }\n this.#updateQuery();\n this.#currentQuery.setOptions(this.options);\n if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: this.#currentQuery,\n observer: this\n });\n }\n const mounted = this.hasListeners();\n if (mounted && shouldFetchOptionally(\n this.#currentQuery,\n prevQuery,\n this.options,\n prevOptions\n )) {\n this.#executeFetch();\n }\n this.updateResult(notifyOptions);\n if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {\n this.#updateStaleTimeout();\n }\n const nextRefetchInterval = this.#computeRefetchInterval();\n if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {\n this.#updateRefetchInterval(nextRefetchInterval);\n }\n }\n getOptimisticResult(options) {\n const query = this.#client.getQueryCache().build(this.#client, options);\n const result = this.createResult(query, options);\n if (shouldAssignObserverCurrentProperties(this, result)) {\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, onPropTracked) {\n const trackedResult = {};\n Object.keys(result).forEach((key) => {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: () => {\n this.trackProp(key);\n onPropTracked?.(key);\n return result[key];\n }\n });\n });\n return trackedResult;\n }\n trackProp(key) {\n this.#trackedProps.add(key);\n }\n getCurrentQuery() {\n return this.#currentQuery;\n }\n refetch({ ...options } = {}) {\n return this.fetch({\n ...options\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = this.#client.defaultQueryOptions(options);\n const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n return this.#executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true\n }).then(() => {\n this.updateResult();\n return this.#currentResult;\n });\n }\n #executeFetch(fetchOptions) {\n this.#updateQuery();\n let promise = this.#currentQuery.fetch(\n this.options,\n fetchOptions\n );\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop);\n }\n return promise;\n }\n #updateStaleTimeout() {\n this.#clearStaleTimeout();\n const staleTime = resolveStaleTime(\n this.options.staleTime,\n this.#currentQuery\n );\n if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n return;\n }\n const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);\n const timeout = time + 1;\n this.#staleTimeoutId = setTimeout(() => {\n if (!this.#currentResult.isStale) {\n this.updateResult();\n }\n }, timeout);\n }\n #computeRefetchInterval() {\n return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n }\n #updateRefetchInterval(nextInterval) {\n this.#clearRefetchInterval();\n this.#currentRefetchInterval = nextInterval;\n if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {\n return;\n }\n this.#refetchIntervalId = setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n this.#executeFetch();\n }\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 = void 0;\n }\n }\n #clearRefetchInterval() {\n if (this.#refetchIntervalId) {\n clearInterval(this.#refetchIntervalId);\n this.#refetchIntervalId = void 0;\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 { state } = query;\n let newState = { ...state };\n let isPlaceholderData = false;\n let data;\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 if (fetchOnMount || fetchOptionally) {\n newState = {\n ...newState,\n ...fetchState(state.data, query.options)\n };\n }\n if (options._optimisticResults === \"isRestoring\") {\n newState.fetchStatus = \"idle\";\n }\n }\n let { error, errorUpdatedAt, status } = newState;\n if (options.select && newState.data !== void 0) {\n if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) {\n data = this.#selectResult;\n } else {\n try {\n this.#selectFn = options.select;\n data = options.select(newState.data);\n data = replaceData(prevResult?.data, data, options);\n this.#selectResult = data;\n this.#selectError = null;\n } catch (selectError) {\n this.#selectError = selectError;\n }\n }\n } else {\n data = newState.data;\n }\n if (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n let placeholderData;\n if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n this.#lastQueryWithDefinedData?.state.data,\n this.#lastQueryWithDefinedData\n ) : options.placeholderData;\n if (options.select && placeholderData !== void 0) {\n try {\n placeholderData = options.select(placeholderData);\n this.#selectError = null;\n } catch (selectError) {\n this.#selectError = selectError;\n }\n }\n }\n if (placeholderData !== void 0) {\n status = \"success\";\n data = replaceData(\n prevResult?.data,\n placeholderData,\n options\n );\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 = newState.fetchStatus === \"fetching\";\n const isPending = status === \"pending\";\n const isError = status === \"error\";\n const isLoading = isPending && isFetching;\n const hasData = data !== void 0;\n const result = {\n status,\n fetchStatus: newState.fetchStatus,\n isPending,\n isSuccess: status === \"success\",\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: newState.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: newState.fetchFailureCount,\n failureReason: newState.fetchFailureReason,\n errorUpdateCount: newState.errorUpdateCount,\n isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,\n isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && !hasData,\n isPaused: newState.fetchStatus === \"paused\",\n isPlaceholderData,\n isRefetchError: isError && hasData,\n isStale: isStale(query, options),\n refetch: this.refetch,\n promise: this.#currentThenable\n };\n const nextResult = result;\n if (this.options.experimental_prefetchInRender) {\n const finalizeThenableIfPossible = (thenable) => {\n if (nextResult.status === \"error\") {\n thenable.reject(nextResult.error);\n } else if (nextResult.data !== void 0) {\n thenable.resolve(nextResult.data);\n }\n };\n const recreateThenable = () => {\n const pending = this.#currentThenable = nextResult.promise = pendingThenable();\n finalizeThenableIfPossible(pending);\n };\n const prevThenable = this.#currentThenable;\n switch (prevThenable.status) {\n case \"pending\":\n if (query.queryHash === prevQuery.queryHash) {\n finalizeThenableIfPossible(prevThenable);\n }\n break;\n case \"fulfilled\":\n if (nextResult.status === \"error\" || nextResult.data !== prevThenable.value) {\n recreateThenable();\n }\n break;\n case \"rejected\":\n if (nextResult.status !== \"error\" || nextResult.error !== prevThenable.reason) {\n recreateThenable();\n }\n break;\n }\n }\n return nextResult;\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;\n if (this.#currentResultState.data !== void 0) {\n this.#lastQueryWithDefinedData = this.#currentQuery;\n }\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n this.#currentResult = nextResult;\n const defaultNotifyOptions = {};\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n const { notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) {\n return true;\n }\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.#trackedProps\n );\n if (this.options.throwOnError) {\n includedProps.add(\"error\");\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 if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {\n defaultNotifyOptions.listeners = true;\n }\n this.#notify({ ...defaultNotifyOptions, ...notifyOptions });\n }\n #updateQuery() {\n const query = this.#client.getQueryCache().build(this.#client, this.options);\n if (query === this.#currentQuery) {\n return;\n }\n const prevQuery = this.#currentQuery;\n this.#currentQuery = query;\n this.#currentQueryInitialState = query.state;\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this);\n query.addObserver(this);\n }\n }\n onQueryUpdate() {\n this.updateResult();\n if (this.hasListeners()) {\n this.#updateTimers();\n }\n }\n #notify(notifyOptions) {\n notifyManager.batch(() => {\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n }\n this.#client.getQueryCache().notify({\n query: this.#currentQuery,\n type: \"observerResultsUpdated\"\n });\n });\n }\n};\nfunction shouldLoadOnMount(query, options) {\n return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n if (resolveEnabled(options.enabled, query) !== false) {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && isStale(query, options);\n }\n return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n }\n return false;\n}\nexport {\n QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","// src/useBaseQuery.ts\nimport {\n computed,\n getCurrentScope,\n onScopeDispose,\n readonly,\n shallowReactive,\n shallowReadonly,\n toRefs,\n watch\n} from \"vue-demi\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref, shouldThrowError, updateState } from \"./utils.js\";\nfunction useBaseQuery(Observer, options, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n const defaultedOptions = computed(() => {\n const clonedOptions = cloneDeepUnref(options);\n if (typeof clonedOptions.enabled === \"function\") {\n clonedOptions.enabled = clonedOptions.enabled();\n }\n const defaulted = client.defaultQueryOptions(clonedOptions);\n defaulted._optimisticResults = client.isRestoring.value ? \"isRestoring\" : \"optimistic\";\n return defaulted;\n });\n const observer = new Observer(client, defaultedOptions.value);\n const state = shallowReactive(observer.getCurrentResult());\n let unsubscribe = () => {\n };\n watch(\n client.isRestoring,\n (isRestoring) => {\n if (!isRestoring) {\n unsubscribe();\n unsubscribe = observer.subscribe((result) => {\n updateState(state, result);\n });\n }\n },\n { immediate: true }\n );\n const updater = () => {\n observer.setOptions(defaultedOptions.value);\n updateState(state, observer.getCurrentResult());\n };\n watch(defaultedOptions, updater);\n onScopeDispose(() => {\n unsubscribe();\n });\n const refetch = (...args) => {\n updater();\n return state.refetch(...args);\n };\n const suspense = () => {\n return new Promise(\n (resolve, reject) => {\n let stopWatch = () => {\n };\n const run = () => {\n if (defaultedOptions.value.enabled !== false) {\n observer.setOptions(defaultedOptions.value);\n const optimisticResult = observer.getOptimisticResult(\n defaultedOptions.value\n );\n if (optimisticResult.isStale) {\n stopWatch();\n observer.fetchOptimistic(defaultedOptions.value).then(resolve, (error) => {\n if (shouldThrowError(defaultedOptions.value.throwOnError, [\n error,\n observer.getCurrentQuery()\n ])) {\n reject(error);\n } else {\n resolve(observer.getCurrentResult());\n }\n });\n } else {\n stopWatch();\n resolve(optimisticResult);\n }\n }\n };\n run();\n stopWatch = watch(defaultedOptions, run);\n }\n );\n };\n watch(\n () => state.error,\n (error) => {\n if (state.isError && !state.isFetching && shouldThrowError(defaultedOptions.value.throwOnError, [\n error,\n observer.getCurrentQuery()\n ])) {\n throw error;\n }\n }\n );\n const readonlyState = process.env.NODE_ENV === \"production\" ? state : (\n // @ts-expect-error\n defaultedOptions.value.shallow ? shallowReadonly(state) : readonly(state)\n );\n const object = toRefs(readonlyState);\n for (const key in state) {\n if (typeof state[key] === \"function\") {\n object[key] = state[key];\n }\n }\n object.suspense = suspense;\n object.refetch = refetch;\n return object;\n}\nexport {\n useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n return useBaseQuery(QueryObserver, options, queryClient);\n}\nexport {\n useQuery\n};\n//# sourceMappingURL=useQuery.js.map"],"names":["QueryObserver","Subscribable","client","options","#client","#selectError","#currentThenable","pendingThenable","#currentQuery","#currentQueryInitialState","#currentResult","#currentResultState","#currentResultOptions","#selectFn","#selectResult","#lastQueryWithDefinedData","#staleTimeoutId","#refetchIntervalId","#currentRefetchInterval","#trackedProps","shouldFetchOnMount","#executeFetch","#updateTimers","shouldFetchOn","#clearStaleTimeout","#clearRefetchInterval","notifyOptions","prevOptions","prevQuery","resolveEnabled","#updateQuery","shallowEqualObjects","mounted","shouldFetchOptionally","resolveStaleTime","#updateStaleTimeout","nextRefetchInterval","#computeRefetchInterval","#updateRefetchInterval","query","result","shouldAssignObserverCurrentProperties","onPropTracked","trackedResult","key","defaultedOptions","fetchOptions","promise","noop","staleTime","isServer","isValidTimeout","timeout","timeUntilStale","nextInterval","focusManager","prevResult","prevResultState","prevResultOptions","queryInitialState","state","newState","isPlaceholderData","data","fetchOnMount","fetchOptionally","fetchState","error","errorUpdatedAt","status","replaceData","selectError","placeholderData","isFetching","isPending","isError","isLoading","hasData","nextResult","isStale","finalizeThenableIfPossible","thenable","recreateThenable","pending","prevThenable","defaultNotifyOptions","shouldNotifyListeners","notifyOnChangeProps","notifyOnChangePropsValue","includedProps","typedKey","#notify","notifyManager","listener","shouldLoadOnMount","field","value","observer","optimisticResult","useBaseQuery","Observer","queryClient","useQueryClient","computed","clonedOptions","cloneDeepUnref","defaulted","shallowReactive","unsubscribe","watch","isRestoring","updateState","updater","onScopeDispose","refetch","args","suspense","resolve","reject","stopWatch","run","shouldThrowError","object","toRefs","useQuery"],"mappings":"kOAgBG,IAACA,EAAgB,cAAcC,CAAa,CAC7C,YAAYC,EAAQC,EAAS,CAC3B,MAAO,EACP,KAAK,QAAUA,EACf,KAAKC,GAAUF,EACf,KAAKG,GAAe,KACpB,KAAKC,GAAmBC,EAAiB,EACpC,KAAK,QAAQ,+BAChB,KAAKD,GAAiB,OACpB,IAAI,MAAM,2DAA2D,CACtE,EAEH,KAAK,YAAa,EAClB,KAAK,WAAWH,CAAO,CAC3B,CACEC,GACAI,GAAgB,OAChBC,GAA4B,OAC5BC,GAAiB,OACjBC,GACAC,GACAN,GACAD,GACAQ,GACAC,GAGAC,GACAC,GACAC,GACAC,GACAC,GAAgC,IAAI,IACpC,aAAc,CACZ,KAAK,QAAU,KAAK,QAAQ,KAAK,IAAI,CACzC,CACE,aAAc,CACR,KAAK,UAAU,OAAS,IAC1B,KAAKX,GAAc,YAAY,IAAI,EAC/BY,EAAmB,KAAKZ,GAAe,KAAK,OAAO,EACrD,KAAKa,GAAe,EAEpB,KAAK,aAAc,EAErB,KAAKC,GAAe,EAE1B,CACE,eAAgB,CACT,KAAK,gBACR,KAAK,QAAS,CAEpB,CACE,wBAAyB,CACvB,OAAOC,EACL,KAAKf,GACL,KAAK,QACL,KAAK,QAAQ,kBACd,CACL,CACE,0BAA2B,CACzB,OAAOe,EACL,KAAKf,GACL,KAAK,QACL,KAAK,QAAQ,oBACd,CACL,CACE,SAAU,CACR,KAAK,UAA4B,IAAI,IACrC,KAAKgB,GAAoB,EACzB,KAAKC,GAAuB,EAC5B,KAAKjB,GAAc,eAAe,IAAI,CAC1C,CACE,WAAWL,EAASuB,EAAe,CACjC,MAAMC,EAAc,KAAK,QACnBC,EAAY,KAAKpB,G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