PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | assets/js/packages/query/query.js +3078 -4962 4.2.0-dev24.3.0-beta3 View file →
@@ -1,5000 +1,3116 @@
1 -/******/ (function() { // webpackBootstrap
2 -/******/ "use strict";
3 -/******/ var __webpack_modules__ = ({
1 +(function(react) {
4 2
5 -/***/ "./node_modules/@tanstack/query-core/build/modern/focusManager.js":
6 -/*!************************************************************************!*\
7 - !*** ./node_modules/@tanstack/query-core/build/modern/focusManager.js ***!
8 - \************************************************************************/
9 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3 +//#region \0rolldown/runtime.js
4 + var __create = Object.create;
5 + var __defProp = Object.defineProperty;
6 + var __name = (target, value) => __defProp(target, "name", {
7 + value,
8 + configurable: true
9 + });
10 + var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11 + var __getOwnPropNames = Object.getOwnPropertyNames;
12 + var __getProtoOf = Object.getPrototypeOf;
13 + var __hasOwnProp = Object.prototype.hasOwnProperty;
14 + var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
15 + var __exportAll = (all, no_symbols) => {
16 + let target = {};
17 + for (var name in all) {
18 + __defProp(target, name, {
19 + get: all[name],
20 + enumerable: true
21 + });
22 + }
23 + if (!no_symbols) {
24 + __defProp(target, Symbol.toStringTag, { value: "Module" });
25 + }
26 + return target;
27 + };
28 + var __copyProps = (to, from, except, desc) => {
29 + if (from && typeof from === "object" || typeof from === "function") {
30 + for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
31 + key = keys[i];
32 + if (!__hasOwnProp.call(to, key) && key !== except) {
33 + __defProp(to, key, {
34 + get: ((k) => from[k]).bind(null, key),
35 + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
36 + });
37 + }
38 + }
39 + }
40 + return to;
41 + };
42 + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
43 + value: mod,
44 + enumerable: true
45 + }) : target, mod));
10 46
11 -__webpack_require__.r(__webpack_exports__);
12 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 -/* harmony export */ FocusManager: function() { return /* binding */ FocusManager; },
14 -/* harmony export */ focusManager: function() { return /* binding */ focusManager; }
15 -/* harmony export */ });
16 -/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
17 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
18 -// src/focusManager.ts
47 +//#endregion
48 +react = __toESM(react, 1);
19 49
50 +//#region node_modules/@tanstack/query-core/build/modern/subscribable.js
51 + var Subscribable = class {
52 + constructor() {
53 + this.listeners = /* @__PURE__ */ new Set();
54 + this.subscribe = this.subscribe.bind(this);
55 + }
56 + subscribe(listener) {
57 + this.listeners.add(listener);
58 + this.onSubscribe();
59 + return () => {
60 + this.listeners.delete(listener);
61 + this.onUnsubscribe();
62 + };
63 + }
64 + hasListeners() {
65 + return this.listeners.size > 0;
66 + }
67 + onSubscribe() {}
68 + onUnsubscribe() {}
69 + };
20 70
21 -var FocusManager = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
22 - #focused;
23 - #cleanup;
24 - #setup;
25 - constructor() {
26 - super();
27 - this.#setup = (onFocus) => {
28 - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer && window.addEventListener) {
29 - const listener = () => onFocus();
30 - window.addEventListener("visibilitychange", listener, false);
31 - return () => {
32 - window.removeEventListener("visibilitychange", listener);
33 - };
34 - }
35 - return;
36 - };
37 - }
38 - onSubscribe() {
39 - if (!this.#cleanup) {
40 - this.setEventListener(this.#setup);
41 - }
42 - }
43 - onUnsubscribe() {
44 - if (!this.hasListeners()) {
45 - this.#cleanup?.();
46 - this.#cleanup = void 0;
47 - }
48 - }
49 - setEventListener(setup) {
50 - this.#setup = setup;
51 - this.#cleanup?.();
52 - this.#cleanup = setup((focused) => {
53 - if (typeof focused === "boolean") {
54 - this.setFocused(focused);
55 - } else {
56 - this.onFocus();
57 - }
58 - });
59 - }
60 - setFocused(focused) {
61 - const changed = this.#focused !== focused;
62 - if (changed) {
63 - this.#focused = focused;
64 - this.onFocus();
65 - }
66 - }
67 - onFocus() {
68 - const isFocused = this.isFocused();
69 - this.listeners.forEach((listener) => {
70 - listener(isFocused);
71 - });
72 - }
73 - isFocused() {
74 - if (typeof this.#focused === "boolean") {
75 - return this.#focused;
76 - }
77 - return globalThis.document?.visibilityState !== "hidden";
78 - }
79 -};
80 -var focusManager = new FocusManager();
71 +//#endregion
72 +//#region node_modules/@tanstack/query-core/build/modern/timeoutManager.js
73 + var defaultTimeoutProvider = {
74 + setTimeout: (callback, delay) => setTimeout(callback, delay),
75 + clearTimeout: (timeoutId) => clearTimeout(timeoutId),
76 + setInterval: (callback, delay) => setInterval(callback, delay),
77 + clearInterval: (intervalId) => clearInterval(intervalId)
78 + };
79 + var TimeoutManager = class {
80 + #provider = defaultTimeoutProvider;
81 + #providerCalled = false;
82 + setTimeoutProvider(provider) {
83 + if (this.#providerCalled && provider !== this.#provider) console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`, {
84 + previous: this.#provider,
85 + provider
86 + });
87 + this.#provider = provider;
88 + this.#providerCalled = false;
89 + }
90 + setTimeout(callback, delay) {
91 + this.#providerCalled = true;
92 + return this.#provider.setTimeout(callback, delay);
93 + }
94 + clearTimeout(timeoutId) {
95 + this.#provider.clearTimeout(timeoutId);
96 + }
97 + setInterval(callback, delay) {
98 + this.#providerCalled = true;
99 + return this.#provider.setInterval(callback, delay);
100 + }
101 + clearInterval(intervalId) {
102 + this.#provider.clearInterval(intervalId);
103 + }
104 + };
105 + var timeoutManager = new TimeoutManager();
106 + function systemSetTimeoutZero(callback) {
107 + setTimeout(callback, 0);
108 + }
81 109
82 -//# sourceMappingURL=focusManager.js.map
110 +//#endregion
111 +//#region node_modules/@tanstack/query-core/build/modern/utils.js
112 + var isServer = typeof window === "undefined" || "Deno" in globalThis;
113 + function noop() {}
114 + function functionalUpdate(updater, input) {
115 + return typeof updater === "function" ? updater(input) : updater;
116 + }
117 + function isValidTimeout(value) {
118 + return typeof value === "number" && value >= 0 && value !== Infinity;
119 + }
120 + function timeUntilStale(updatedAt, staleTime) {
121 + return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
122 + }
123 + function resolveStaleTime(staleTime, query) {
124 + return typeof staleTime === "function" ? staleTime(query) : staleTime;
125 + }
126 + function resolveEnabled(enabled, query) {
127 + return typeof enabled === "function" ? enabled(query) : enabled;
128 + }
129 + function matchQuery(filters, query) {
130 + const { type = "all", exact, fetchStatus, predicate, queryKey, stale } = filters;
131 + if (queryKey) {
132 + if (exact) {
133 + if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) return false;
134 + } else if (!partialMatchKey(query.queryKey, queryKey)) return false;
135 + }
136 + if (type !== "all") {
137 + const isActive = query.isActive();
138 + if (type === "active" && !isActive) return false;
139 + if (type === "inactive" && isActive) return false;
140 + }
141 + if (typeof stale === "boolean" && query.isStale() !== stale) return false;
142 + if (fetchStatus && fetchStatus !== query.state.fetchStatus) return false;
143 + if (predicate && !predicate(query)) return false;
144 + return true;
145 + }
146 + function matchMutation(filters, mutation) {
147 + const { exact, status, predicate, mutationKey } = filters;
148 + if (mutationKey) {
149 + if (!mutation.options.mutationKey) return false;
150 + if (exact) {
151 + if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) return false;
152 + } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) return false;
153 + }
154 + if (status && mutation.state.status !== status) return false;
155 + if (predicate && !predicate(mutation)) return false;
156 + return true;
157 + }
158 + function hashQueryKeyByOptions(queryKey, options) {
159 + return (options?.queryKeyHashFn || hashKey)(queryKey);
160 + }
161 + function hashKey(queryKey) {
162 + return JSON.stringify(queryKey, (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
163 + result[key] = val[key];
164 + return result;
165 + }, {}) : val);
166 + }
167 + function partialMatchKey(a, b) {
168 + if (a === b) return true;
169 + if (typeof a !== typeof b) return false;
170 + if (a && b && typeof a === "object" && typeof b === "object") return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));
171 + return false;
172 + }
173 + var hasOwn = Object.prototype.hasOwnProperty;
174 + function replaceEqualDeep(a, b) {
175 + if (a === b) return a;
176 + const array = isPlainArray(a) && isPlainArray(b);
177 + if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;
178 + const aSize = (array ? a : Object.keys(a)).length;
179 + const bItems = array ? b : Object.keys(b);
180 + const bSize = bItems.length;
181 + const copy = array ? new Array(bSize) : {};
182 + let equalItems = 0;
183 + for (let i = 0; i < bSize; i++) {
184 + const key = array ? i : bItems[i];
185 + const aItem = a[key];
186 + const bItem = b[key];
187 + if (aItem === bItem) {
188 + copy[key] = aItem;
189 + if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;
190 + continue;
191 + }
192 + if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
193 + copy[key] = bItem;
194 + continue;
195 + }
196 + const v = replaceEqualDeep(aItem, bItem);
197 + copy[key] = v;
198 + if (v === aItem) equalItems++;
199 + }
200 + return aSize === bSize && equalItems === aSize ? a : copy;
201 + }
202 + function shallowEqualObjects(a, b) {
203 + if (!b || Object.keys(a).length !== Object.keys(b).length) return false;
204 + for (const key in a) if (a[key] !== b[key]) return false;
205 + return true;
206 + }
207 + function isPlainArray(value) {
208 + return Array.isArray(value) && value.length === Object.keys(value).length;
209 + }
210 + function isPlainObject(o) {
211 + if (!hasObjectPrototype(o)) return false;
212 + const ctor = o.constructor;
213 + if (ctor === void 0) return true;
214 + const prot = ctor.prototype;
215 + if (!hasObjectPrototype(prot)) return false;
216 + if (!prot.hasOwnProperty("isPrototypeOf")) return false;
217 + if (Object.getPrototypeOf(o) !== Object.prototype) return false;
218 + return true;
219 + }
220 + function hasObjectPrototype(o) {
221 + return Object.prototype.toString.call(o) === "[object Object]";
222 + }
223 + function sleep(timeout) {
224 + return new Promise((resolve) => {
225 + timeoutManager.setTimeout(resolve, timeout);
226 + });
227 + }
228 + function replaceData(prevData, data, options) {
229 + if (typeof options.structuralSharing === "function") return options.structuralSharing(prevData, data);
230 + else if (options.structuralSharing !== false) try {
231 + return replaceEqualDeep(prevData, data);
232 + } catch (error) {
233 + console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`);
234 + throw error;
235 + }
236 + return data;
237 + }
238 + function addToEnd(items, item, max = 0) {
239 + const newItems = [...items, item];
240 + return max && newItems.length > max ? newItems.slice(1) : newItems;
241 + }
242 + function addToStart(items, item, max = 0) {
243 + const newItems = [item, ...items];
244 + return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
245 + }
246 + var skipToken = Symbol();
247 + function ensureQueryFn(options, fetchOptions) {
248 + if (options.queryFn === skipToken) console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`);
249 + if (!options.queryFn && fetchOptions?.initialPromise) return () => fetchOptions.initialPromise;
250 + if (!options.queryFn || options.queryFn === skipToken) return () => Promise.reject(/* @__PURE__ */ new Error(`Missing queryFn: '${options.queryHash}'`));
251 + return options.queryFn;
252 + }
253 + function shouldThrowError(throwOnError, params) {
254 + if (typeof throwOnError === "function") return throwOnError(...params);
255 + return !!throwOnError;
256 + }
257 + function addConsumeAwareSignal(object, getSignal, onCancelled) {
258 + let consumed = false;
259 + let signal;
260 + Object.defineProperty(object, "signal", {
261 + enumerable: true,
262 + get: () => {
263 + signal ??= getSignal();
264 + if (consumed) return signal;
265 + consumed = true;
266 + if (signal.aborted) onCancelled();
267 + else signal.addEventListener("abort", onCancelled, { once: true });
268 + return signal;
269 + }
270 + });
271 + return object;
272 + }
83 273
84 -/***/ }),
274 +//#endregion
275 +//#region node_modules/@tanstack/query-core/build/modern/focusManager.js
276 + var FocusManager = class extends Subscribable {
277 + #focused;
278 + #cleanup;
279 + #setup;
280 + constructor() {
281 + super();
282 + this.#setup = (onFocus) => {
283 + if (!isServer && window.addEventListener) {
284 + const listener = () => onFocus();
285 + window.addEventListener("visibilitychange", listener, false);
286 + return () => {
287 + window.removeEventListener("visibilitychange", listener);
288 + };
289 + }
290 + };
291 + }
292 + onSubscribe() {
293 + if (!this.#cleanup) this.setEventListener(this.#setup);
294 + }
295 + onUnsubscribe() {
296 + if (!this.hasListeners()) {
297 + this.#cleanup?.();
298 + this.#cleanup = void 0;
299 + }
300 + }
301 + setEventListener(setup) {
302 + this.#setup = setup;
303 + this.#cleanup?.();
304 + this.#cleanup = setup((focused) => {
305 + if (typeof focused === "boolean") this.setFocused(focused);
306 + else this.onFocus();
307 + });
308 + }
309 + setFocused(focused) {
310 + if (this.#focused !== focused) {
311 + this.#focused = focused;
312 + this.onFocus();
313 + }
314 + }
315 + onFocus() {
316 + const isFocused = this.isFocused();
317 + this.listeners.forEach((listener) => {
318 + listener(isFocused);
319 + });
320 + }
321 + isFocused() {
322 + if (typeof this.#focused === "boolean") return this.#focused;
323 + return globalThis.document?.visibilityState !== "hidden";
324 + }
325 + };
326 + var focusManager = new FocusManager();
85 327
86 -/***/ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js":
87 -/*!*********************************************************************************!*\
88 - !*** ./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js ***!
89 - \*********************************************************************************/
90 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
328 +//#endregion
329 +//#region node_modules/@tanstack/query-core/build/modern/thenable.js
330 + function pendingThenable() {
331 + let resolve;
332 + let reject;
333 + const thenable = new Promise((_resolve, _reject) => {
334 + resolve = _resolve;
335 + reject = _reject;
336 + });
337 + thenable.status = "pending";
338 + thenable.catch(() => {});
339 + function finalize(data) {
340 + Object.assign(thenable, data);
341 + delete thenable.resolve;
342 + delete thenable.reject;
343 + }
344 + thenable.resolve = (value) => {
345 + finalize({
346 + status: "fulfilled",
347 + value
348 + });
349 + resolve(value);
350 + };
351 + thenable.reject = (reason) => {
352 + finalize({
353 + status: "rejected",
354 + reason
355 + });
356 + reject(reason);
357 + };
358 + return thenable;
359 + }
91 360
92 -__webpack_require__.r(__webpack_exports__);
93 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
94 -/* harmony export */ hasNextPage: function() { return /* binding */ hasNextPage; },
95 -/* harmony export */ hasPreviousPage: function() { return /* binding */ hasPreviousPage; },
96 -/* harmony export */ infiniteQueryBehavior: function() { return /* binding */ infiniteQueryBehavior; }
97 -/* harmony export */ });
98 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
99 -// src/infiniteQueryBehavior.ts
361 +//#endregion
362 +//#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
363 + var defaultScheduler = systemSetTimeoutZero;
364 + function createNotifyManager() {
365 + let queue = [];
366 + let transactions = 0;
367 + let notifyFn = (callback) => {
368 + callback();
369 + };
370 + let batchNotifyFn = (callback) => {
371 + callback();
372 + };
373 + let scheduleFn = defaultScheduler;
374 + const schedule = (callback) => {
375 + if (transactions) queue.push(callback);
376 + else scheduleFn(() => {
377 + notifyFn(callback);
378 + });
379 + };
380 + const flush = () => {
381 + const originalQueue = queue;
382 + queue = [];
383 + if (originalQueue.length) scheduleFn(() => {
384 + batchNotifyFn(() => {
385 + originalQueue.forEach((callback) => {
386 + notifyFn(callback);
387 + });
388 + });
389 + });
390 + };
391 + return {
392 + batch: (callback) => {
393 + let result;
394 + transactions++;
395 + try {
396 + result = callback();
397 + } finally {
398 + transactions--;
399 + if (!transactions) flush();
400 + }
401 + return result;
402 + },
403 + /**
404 + * All calls to the wrapped function will be batched.
405 + */
406 + batchCalls: (callback) => {
407 + return (...args) => {
408 + schedule(() => {
409 + callback(...args);
410 + });
411 + };
412 + },
413 + schedule,
414 + /**
415 + * Use this method to set a custom notify function.
416 + * This can be used to for example wrap notifications with `React.act` while running tests.
417 + */
418 + setNotifyFunction: (fn) => {
419 + notifyFn = fn;
420 + },
421 + /**
422 + * Use this method to set a custom function to batch notifications together into a single tick.
423 + * By default React Query will use the batch function provided by ReactDOM or React Native.
424 + */
425 + setBatchNotifyFunction: (fn) => {
426 + batchNotifyFn = fn;
427 + },
428 + setScheduler: (fn) => {
429 + scheduleFn = fn;
430 + }
431 + };
432 + }
433 + var notifyManager = createNotifyManager();
100 434
101 -function infiniteQueryBehavior(pages) {
102 - return {
103 - onFetch: (context, query) => {
104 - const options = context.options;
105 - const direction = context.fetchOptions?.meta?.fetchMore?.direction;
106 - const oldPages = context.state.data?.pages || [];
107 - const oldPageParams = context.state.data?.pageParams || [];
108 - let result = { pages: [], pageParams: [] };
109 - let currentPage = 0;
110 - const fetchFn = async () => {
111 - let cancelled = false;
112 - const addSignalProperty = (object) => {
113 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.addConsumeAwareSignal)(
114 - object,
115 - () => context.signal,
116 - () => cancelled = true
117 - );
118 - };
119 - const queryFn = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.ensureQueryFn)(context.options, context.fetchOptions);
120 - const fetchPage = async (data, param, previous) => {
121 - if (cancelled) {
122 - return Promise.reject();
123 - }
124 - if (param == null && data.pages.length) {
125 - return Promise.resolve(data);
126 - }
127 - const createQueryFnContext = () => {
128 - const queryFnContext2 = {
129 - client: context.client,
130 - queryKey: context.queryKey,
131 - pageParam: param,
132 - direction: previous ? "backward" : "forward",
133 - meta: context.options.meta
134 - };
135 - addSignalProperty(queryFnContext2);
136 - return queryFnContext2;
137 - };
138 - const queryFnContext = createQueryFnContext();
139 - const page = await queryFn(queryFnContext);
140 - const { maxPages } = context.options;
141 - const addTo = previous ? _utils_js__WEBPACK_IMPORTED_MODULE_0__.addToStart : _utils_js__WEBPACK_IMPORTED_MODULE_0__.addToEnd;
142 - return {
143 - pages: addTo(data.pages, page, maxPages),
144 - pageParams: addTo(data.pageParams, param, maxPages)
145 - };
146 - };
147 - if (direction && oldPages.length) {
148 - const previous = direction === "backward";
149 - const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
150 - const oldData = {
151 - pages: oldPages,
152 - pageParams: oldPageParams
153 - };
154 - const param = pageParamFn(options, oldData);
155 - result = await fetchPage(oldData, param, previous);
156 - } else {
157 - const remainingPages = pages ?? oldPages.length;
158 - do {
159 - const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
160 - if (currentPage > 0 && param == null) {
161 - break;
162 - }
163 - result = await fetchPage(result, param);
164 - currentPage++;
165 - } while (currentPage < remainingPages);
166 - }
167 - return result;
168 - };
169 - if (context.options.persister) {
170 - context.fetchFn = () => {
171 - return context.options.persister?.(
172 - fetchFn,
173 - {
174 - client: context.client,
175 - queryKey: context.queryKey,
176 - meta: context.options.meta,
177 - signal: context.signal
178 - },
179 - query
180 - );
181 - };
182 - } else {
183 - context.fetchFn = fetchFn;
184 - }
185 - }
186 - };
187 -}
188 -function getNextPageParam(options, { pages, pageParams }) {
189 - const lastIndex = pages.length - 1;
190 - return pages.length > 0 ? options.getNextPageParam(
191 - pages[lastIndex],
192 - pages,
193 - pageParams[lastIndex],
194 - pageParams
195 - ) : void 0;
196 -}
197 -function getPreviousPageParam(options, { pages, pageParams }) {
198 - return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
199 -}
200 -function hasNextPage(options, data) {
201 - if (!data) return false;
202 - return getNextPageParam(options, data) != null;
203 -}
204 -function hasPreviousPage(options, data) {
205 - if (!data || !options.getPreviousPageParam) return false;
206 - return getPreviousPageParam(options, data) != null;
207 -}
435 +//#endregion
436 +//#region node_modules/@tanstack/query-core/build/modern/onlineManager.js
437 + var OnlineManager = class extends Subscribable {
438 + #online = true;
439 + #cleanup;
440 + #setup;
441 + constructor() {
442 + super();
443 + this.#setup = (onOnline) => {
444 + if (!isServer && window.addEventListener) {
445 + const onlineListener = () => onOnline(true);
446 + const offlineListener = () => onOnline(false);
447 + window.addEventListener("online", onlineListener, false);
448 + window.addEventListener("offline", offlineListener, false);
449 + return () => {
450 + window.removeEventListener("online", onlineListener);
451 + window.removeEventListener("offline", offlineListener);
452 + };
453 + }
454 + };
455 + }
456 + onSubscribe() {
457 + if (!this.#cleanup) this.setEventListener(this.#setup);
458 + }
459 + onUnsubscribe() {
460 + if (!this.hasListeners()) {
461 + this.#cleanup?.();
462 + this.#cleanup = void 0;
463 + }
464 + }
465 + setEventListener(setup) {
466 + this.#setup = setup;
467 + this.#cleanup?.();
468 + this.#cleanup = setup(this.setOnline.bind(this));
469 + }
470 + setOnline(online) {
471 + if (this.#online !== online) {
472 + this.#online = online;
473 + this.listeners.forEach((listener) => {
474 + listener(online);
475 + });
476 + }
477 + }
478 + isOnline() {
479 + return this.#online;
480 + }
481 + };
482 + var onlineManager = new OnlineManager();
208 483
209 -//# sourceMappingURL=infiniteQueryBehavior.js.map
484 +//#endregion
485 +//#region node_modules/@tanstack/query-core/build/modern/retryer.js
486 + function defaultRetryDelay(failureCount) {
487 + return Math.min(1e3 * 2 ** failureCount, 3e4);
488 + }
489 + function canFetch(networkMode) {
490 + return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
491 + }
492 + var CancelledError = class extends Error {
493 + constructor(options) {
494 + super("CancelledError");
495 + this.revert = options?.revert;
496 + this.silent = options?.silent;
497 + }
498 + };
499 + function createRetryer(config) {
500 + let isRetryCancelled = false;
501 + let failureCount = 0;
502 + let continueFn;
503 + const thenable = pendingThenable();
504 + const isResolved = () => thenable.status !== "pending";
505 + const cancel = (cancelOptions) => {
506 + if (!isResolved()) {
507 + const error = new CancelledError(cancelOptions);
508 + reject(error);
509 + config.onCancel?.(error);
510 + }
511 + };
512 + const cancelRetry = () => {
513 + isRetryCancelled = true;
514 + };
515 + const continueRetry = () => {
516 + isRetryCancelled = false;
517 + };
518 + const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun();
519 + const canStart = () => canFetch(config.networkMode) && config.canRun();
520 + const resolve = (value) => {
521 + if (!isResolved()) {
522 + continueFn?.();
523 + thenable.resolve(value);
524 + }
525 + };
526 + const reject = (value) => {
527 + if (!isResolved()) {
528 + continueFn?.();
529 + thenable.reject(value);
530 + }
531 + };
532 + const pause = () => {
533 + return new Promise((continueResolve) => {
534 + continueFn = (value) => {
535 + if (isResolved() || canContinue()) continueResolve(value);
536 + };
537 + config.onPause?.();
538 + }).then(() => {
539 + continueFn = void 0;
540 + if (!isResolved()) config.onContinue?.();
541 + });
542 + };
543 + const run = () => {
544 + if (isResolved()) return;
545 + let promiseOrValue;
546 + const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
547 + try {
548 + promiseOrValue = initialPromise ?? config.fn();
549 + } catch (error) {
550 + promiseOrValue = Promise.reject(error);
551 + }
552 + Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
553 + if (isResolved()) return;
554 + const retry = config.retry ?? (isServer ? 0 : 3);
555 + const retryDelay = config.retryDelay ?? defaultRetryDelay;
556 + const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
557 + const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
558 + if (isRetryCancelled || !shouldRetry) {
559 + reject(error);
560 + return;
561 + }
562 + failureCount++;
563 + config.onFail?.(failureCount, error);
564 + sleep(delay).then(() => {
565 + return canContinue() ? void 0 : pause();
566 + }).then(() => {
567 + if (isRetryCancelled) reject(error);
568 + else run();
569 + });
570 + });
571 + };
572 + return {
573 + promise: thenable,
574 + status: () => thenable.status,
575 + cancel,
576 + continue: () => {
577 + continueFn?.();
578 + return thenable;
579 + },
580 + cancelRetry,
581 + continueRetry,
582 + canStart,
583 + start: () => {
584 + if (canStart()) run();
585 + else pause().then(run);
586 + return thenable;
587 + }
588 + };
589 + }
210 590
211 -/***/ }),
591 +//#endregion
592 +//#region node_modules/@tanstack/query-core/build/modern/removable.js
593 + var Removable = class {
594 + #gcTimeout;
595 + destroy() {
596 + this.clearGcTimeout();
597 + }
598 + scheduleGc() {
599 + this.clearGcTimeout();
600 + if (isValidTimeout(this.gcTime)) this.#gcTimeout = timeoutManager.setTimeout(() => {
601 + this.optionalRemove();
602 + }, this.gcTime);
603 + }
604 + updateGcTime(newGcTime) {
605 + this.gcTime = Math.max(this.gcTime || 0, newGcTime ?? (isServer ? Infinity : 300 * 1e3));
606 + }
607 + clearGcTimeout() {
608 + if (this.#gcTimeout) {
609 + timeoutManager.clearTimeout(this.#gcTimeout);
610 + this.#gcTimeout = void 0;
611 + }
612 + }
613 + };
212 614
213 -/***/ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js":
214 -/*!*********************************************************************************!*\
215 - !*** ./node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js ***!
216 - \*********************************************************************************/
217 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
615 +//#endregion
616 +//#region node_modules/@tanstack/query-core/build/modern/query.js
617 + var Query = class extends Removable {
618 + #initialState;
619 + #revertState;
620 + #cache;
621 + #client;
622 + #retryer;
623 + #defaultOptions;
624 + #abortSignalConsumed;
625 + constructor(config) {
626 + super();
627 + this.#abortSignalConsumed = false;
628 + this.#defaultOptions = config.defaultOptions;
629 + this.setOptions(config.options);
630 + this.observers = [];
631 + this.#client = config.client;
632 + this.#cache = this.#client.getQueryCache();
633 + this.queryKey = config.queryKey;
634 + this.queryHash = config.queryHash;
635 + this.#initialState = getDefaultState$1(this.options);
636 + this.state = config.state ?? this.#initialState;
637 + this.scheduleGc();
638 + }
639 + get meta() {
640 + return this.options.meta;
641 + }
642 + get promise() {
643 + return this.#retryer?.promise;
644 + }
645 + setOptions(options) {
646 + this.options = {
647 + ...this.#defaultOptions,
648 + ...options
649 + };
650 + this.updateGcTime(this.options.gcTime);
651 + if (this.state && this.state.data === void 0) {
652 + const defaultState = getDefaultState$1(this.options);
653 + if (defaultState.data !== void 0) {
654 + this.setState(successState(defaultState.data, defaultState.dataUpdatedAt));
655 + this.#initialState = defaultState;
656 + }
657 + }
658 + }
659 + optionalRemove() {
660 + if (!this.observers.length && this.state.fetchStatus === "idle") this.#cache.remove(this);
661 + }
662 + setData(newData, options) {
663 + const data = replaceData(this.state.data, newData, this.options);
664 + this.#dispatch({
665 + data,
666 + type: "success",
667 + dataUpdatedAt: options?.updatedAt,
668 + manual: options?.manual
669 + });
670 + return data;
671 + }
672 + setState(state, setStateOptions) {
673 + this.#dispatch({
674 + type: "setState",
675 + state,
676 + setStateOptions
677 + });
678 + }
679 + cancel(options) {
680 + const promise = this.#retryer?.promise;
681 + this.#retryer?.cancel(options);
682 + return promise ? promise.then(noop).catch(noop) : Promise.resolve();
683 + }
684 + destroy() {
685 + super.destroy();
686 + this.cancel({ silent: true });
687 + }
688 + reset() {
689 + this.destroy();
690 + this.setState(this.#initialState);
691 + }
692 + isActive() {
693 + return this.observers.some((observer) => resolveEnabled(observer.options.enabled, this) !== false);
694 + }
695 + isDisabled() {
696 + if (this.getObserversCount() > 0) return !this.isActive();
697 + return this.options.queryFn === skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
698 + }
699 + isStatic() {
700 + if (this.getObserversCount() > 0) return this.observers.some((observer) => resolveStaleTime(observer.options.staleTime, this) === "static");
701 + return false;
702 + }
703 + isStale() {
704 + if (this.getObserversCount() > 0) return this.observers.some((observer) => observer.getCurrentResult().isStale);
705 + return this.state.data === void 0 || this.state.isInvalidated;
706 + }
707 + isStaleByTime(staleTime = 0) {
708 + if (this.state.data === void 0) return true;
709 + if (staleTime === "static") return false;
710 + if (this.state.isInvalidated) return true;
711 + return !timeUntilStale(this.state.dataUpdatedAt, staleTime);
712 + }
713 + onFocus() {
714 + this.observers.find((x) => x.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: false });
715 + this.#retryer?.continue();
716 + }
717 + onOnline() {
718 + this.observers.find((x) => x.shouldFetchOnReconnect())?.refetch({ cancelRefetch: false });
719 + this.#retryer?.continue();
720 + }
721 + addObserver(observer) {
722 + if (!this.observers.includes(observer)) {
723 + this.observers.push(observer);
724 + this.clearGcTimeout();
725 + this.#cache.notify({
726 + type: "observerAdded",
727 + query: this,
728 + observer
729 + });
730 + }
731 + }
732 + removeObserver(observer) {
733 + if (this.observers.includes(observer)) {
734 + this.observers = this.observers.filter((x) => x !== observer);
735 + if (!this.observers.length) {
736 + if (this.#retryer) if (this.#abortSignalConsumed) this.#retryer.cancel({ revert: true });
737 + else this.#retryer.cancelRetry();
738 + this.scheduleGc();
739 + }
740 + this.#cache.notify({
741 + type: "observerRemoved",
742 + query: this,
743 + observer
744 + });
745 + }
746 + }
747 + getObserversCount() {
748 + return this.observers.length;
749 + }
750 + invalidate() {
751 + if (!this.state.isInvalidated) this.#dispatch({ type: "invalidate" });
752 + }
753 + async fetch(options, fetchOptions) {
754 + if (this.state.fetchStatus !== "idle" && this.#retryer?.status() !== "rejected") {
755 + if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) this.cancel({ silent: true });
756 + else if (this.#retryer) {
757 + this.#retryer.continueRetry();
758 + return this.#retryer.promise;
759 + }
760 + }
761 + if (options) this.setOptions(options);
762 + if (!this.options.queryFn) {
763 + const observer = this.observers.find((x) => x.options.queryFn);
764 + if (observer) this.setOptions(observer.options);
765 + }
766 + if (!Array.isArray(this.options.queryKey)) console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`);
767 + const abortController = new AbortController();
768 + const addSignalProperty = (object) => {
769 + Object.defineProperty(object, "signal", {
770 + enumerable: true,
771 + get: () => {
772 + this.#abortSignalConsumed = true;
773 + return abortController.signal;
774 + }
775 + });
776 + };
777 + const fetchFn = () => {
778 + const queryFn = ensureQueryFn(this.options, fetchOptions);
779 + const createQueryFnContext = () => {
780 + const queryFnContext2 = {
781 + client: this.#client,
782 + queryKey: this.queryKey,
783 + meta: this.meta
784 + };
785 + addSignalProperty(queryFnContext2);
786 + return queryFnContext2;
787 + };
788 + const queryFnContext = createQueryFnContext();
789 + this.#abortSignalConsumed = false;
790 + if (this.options.persister) return this.options.persister(queryFn, queryFnContext, this);
791 + return queryFn(queryFnContext);
792 + };
793 + const createFetchContext = () => {
794 + const context2 = {
795 + fetchOptions,
796 + options: this.options,
797 + queryKey: this.queryKey,
798 + client: this.#client,
799 + state: this.state,
800 + fetchFn
801 + };
802 + addSignalProperty(context2);
803 + return context2;
804 + };
805 + const context = createFetchContext();
806 + this.options.behavior?.onFetch(context, this);
807 + this.#revertState = this.state;
808 + if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) this.#dispatch({
809 + type: "fetch",
810 + meta: context.fetchOptions?.meta
811 + });
812 + this.#retryer = createRetryer({
813 + initialPromise: fetchOptions?.initialPromise,
814 + fn: context.fetchFn,
815 + onCancel: (error) => {
816 + if (error instanceof CancelledError && error.revert) this.setState({
817 + ...this.#revertState,
818 + fetchStatus: "idle"
819 + });
820 + abortController.abort();
821 + },
822 + onFail: (failureCount, error) => {
823 + this.#dispatch({
824 + type: "failed",
825 + failureCount,
826 + error
827 + });
828 + },
829 + onPause: () => {
830 + this.#dispatch({ type: "pause" });
831 + },
832 + onContinue: () => {
833 + this.#dispatch({ type: "continue" });
834 + },
835 + retry: context.options.retry,
836 + retryDelay: context.options.retryDelay,
837 + networkMode: context.options.networkMode,
838 + canRun: () => true
839 + });
840 + try {
841 + const data = await this.#retryer.start();
842 + if (data === void 0) {
843 + console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`);
844 + throw new Error(`${this.queryHash} data is undefined`);
845 + }
846 + this.setData(data);
847 + this.#cache.config.onSuccess?.(data, this);
848 + this.#cache.config.onSettled?.(data, this.state.error, this);
849 + return data;
850 + } catch (error) {
851 + if (error instanceof CancelledError) {
852 + if (error.silent) return this.#retryer.promise;
853 + else if (error.revert) {
854 + if (this.state.data === void 0) throw error;
855 + return this.state.data;
856 + }
857 + }
858 + this.#dispatch({
859 + type: "error",
860 + error
861 + });
862 + this.#cache.config.onError?.(error, this);
863 + this.#cache.config.onSettled?.(this.state.data, error, this);
864 + throw error;
865 + } finally {
866 + this.scheduleGc();
867 + }
868 + }
869 + #dispatch(action) {
870 + const reducer = (state) => {
871 + switch (action.type) {
872 + case "failed": return {
873 + ...state,
874 + fetchFailureCount: action.failureCount,
875 + fetchFailureReason: action.error
876 + };
877 + case "pause": return {
878 + ...state,
879 + fetchStatus: "paused"
880 + };
881 + case "continue": return {
882 + ...state,
883 + fetchStatus: "fetching"
884 + };
885 + case "fetch": return {
886 + ...state,
887 + ...fetchState(state.data, this.options),
888 + fetchMeta: action.meta ?? null
889 + };
890 + case "success":
891 + const newState = {
892 + ...state,
893 + ...successState(action.data, action.dataUpdatedAt),
894 + dataUpdateCount: state.dataUpdateCount + 1,
895 + ...!action.manual && {
896 + fetchStatus: "idle",
897 + fetchFailureCount: 0,
898 + fetchFailureReason: null
899 + }
900 + };
901 + this.#revertState = action.manual ? newState : void 0;
902 + return newState;
903 + case "error":
904 + const error = action.error;
905 + return {
906 + ...state,
907 + error,
908 + errorUpdateCount: state.errorUpdateCount + 1,
909 + errorUpdatedAt: Date.now(),
910 + fetchFailureCount: state.fetchFailureCount + 1,
911 + fetchFailureReason: error,
912 + fetchStatus: "idle",
913 + status: "error"
914 + };
915 + case "invalidate": return {
916 + ...state,
917 + isInvalidated: true
918 + };
919 + case "setState": return {
920 + ...state,
921 + ...action.state
922 + };
923 + }
924 + };
925 + this.state = reducer(this.state);
926 + notifyManager.batch(() => {
927 + this.observers.forEach((observer) => {
928 + observer.onQueryUpdate();
929 + });
930 + this.#cache.notify({
931 + query: this,
932 + type: "updated",
933 + action
934 + });
935 + });
936 + }
937 + };
938 + function fetchState(data, options) {
939 + return {
940 + fetchFailureCount: 0,
941 + fetchFailureReason: null,
942 + fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused",
943 + ...data === void 0 && {
944 + error: null,
945 + status: "pending"
946 + }
947 + };
948 + }
949 + function successState(data, dataUpdatedAt) {
950 + return {
951 + data,
952 + dataUpdatedAt: dataUpdatedAt ?? Date.now(),
953 + error: null,
954 + isInvalidated: false,
955 + status: "success"
956 + };
957 + }
958 + function getDefaultState$1(options) {
959 + const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
960 + const hasData = data !== void 0;
961 + const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
962 + return {
963 + data,
964 + dataUpdateCount: 0,
965 + dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
966 + error: null,
967 + errorUpdateCount: 0,
968 + errorUpdatedAt: 0,
969 + fetchFailureCount: 0,
970 + fetchFailureReason: null,
971 + fetchMeta: null,
972 + isInvalidated: false,
973 + status: hasData ? "success" : "pending",
974 + fetchStatus: "idle"
975 + };
976 + }
977 + __name(getDefaultState$1, "getDefaultState");
218 978
219 -__webpack_require__.r(__webpack_exports__);
220 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
221 -/* harmony export */ InfiniteQueryObserver: function() { return /* binding */ InfiniteQueryObserver; }
222 -/* harmony export */ });
223 -/* harmony import */ var _queryObserver_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./queryObserver.js */ "./node_modules/@tanstack/query-core/build/modern/queryObserver.js");
224 -/* harmony import */ var _infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infiniteQueryBehavior.js */ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js");
225 -// src/infiniteQueryObserver.ts
979 +//#endregion
980 +//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
981 + var QueryObserver = class extends Subscribable {
982 + constructor(client, options) {
983 + super();
984 + this.options = options;
985 + this.#client = client;
986 + this.#selectError = null;
987 + this.#currentThenable = pendingThenable();
988 + this.bindMethods();
989 + this.setOptions(options);
990 + }
991 + #client;
992 + #currentQuery = void 0;
993 + #currentQueryInitialState = void 0;
994 + #currentResult = void 0;
995 + #currentResultState;
996 + #currentResultOptions;
997 + #currentThenable;
998 + #selectError;
999 + #selectFn;
1000 + #selectResult;
1001 + #lastQueryWithDefinedData;
1002 + #staleTimeoutId;
1003 + #refetchIntervalId;
1004 + #currentRefetchInterval;
1005 + #trackedProps = /* @__PURE__ */ new Set();
1006 + bindMethods() {
1007 + this.refetch = this.refetch.bind(this);
1008 + }
1009 + onSubscribe() {
1010 + if (this.listeners.size === 1) {
1011 + this.#currentQuery.addObserver(this);
1012 + if (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();
1013 + else this.updateResult();
1014 + this.#updateTimers();
1015 + }
1016 + }
1017 + onUnsubscribe() {
1018 + if (!this.hasListeners()) this.destroy();
1019 + }
1020 + shouldFetchOnReconnect() {
1021 + return shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);
1022 + }
1023 + shouldFetchOnWindowFocus() {
1024 + return shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);
1025 + }
1026 + destroy() {
1027 + this.listeners = /* @__PURE__ */ new Set();
1028 + this.#clearStaleTimeout();
1029 + this.#clearRefetchInterval();
1030 + this.#currentQuery.removeObserver(this);
1031 + }
1032 + setOptions(options) {
1033 + const prevOptions = this.options;
1034 + const prevQuery = this.#currentQuery;
1035 + this.options = this.#client.defaultQueryOptions(options);
1036 + if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== "boolean") throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");
1037 + this.#updateQuery();
1038 + this.#currentQuery.setOptions(this.options);
1039 + if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({
1040 + type: "observerOptionsUpdated",
1041 + query: this.#currentQuery,
1042 + observer: this
1043 + });
1044 + const mounted = this.hasListeners();
1045 + if (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();
1046 + this.updateResult();
1047 + 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))) this.#updateStaleTimeout();
1048 + const nextRefetchInterval = this.#computeRefetchInterval();
1049 + if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);
1050 + }
1051 + getOptimisticResult(options) {
1052 + const query = this.#client.getQueryCache().build(this.#client, options);
1053 + const result = this.createResult(query, options);
1054 + if (shouldAssignObserverCurrentProperties(this, result)) {
1055 + this.#currentResult = result;
1056 + this.#currentResultOptions = this.options;
1057 + this.#currentResultState = this.#currentQuery.state;
1058 + }
1059 + return result;
1060 + }
1061 + getCurrentResult() {
1062 + return this.#currentResult;
1063 + }
1064 + trackResult(result, onPropTracked) {
1065 + return new Proxy(result, { get: (target, key) => {
1066 + this.trackProp(key);
1067 + onPropTracked?.(key);
1068 + if (key === "promise") {
1069 + this.trackProp("data");
1070 + if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === "pending") this.#currentThenable.reject(/* @__PURE__ */ new Error("experimental_prefetchInRender feature flag is not enabled"));
1071 + }
1072 + return Reflect.get(target, key);
1073 + } });
1074 + }
1075 + trackProp(key) {
1076 + this.#trackedProps.add(key);
1077 + }
1078 + getCurrentQuery() {
1079 + return this.#currentQuery;
1080 + }
1081 + refetch({ ...options } = {}) {
1082 + return this.fetch({ ...options });
1083 + }
1084 + fetchOptimistic(options) {
1085 + const defaultedOptions = this.#client.defaultQueryOptions(options);
1086 + const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
1087 + return query.fetch().then(() => this.createResult(query, defaultedOptions));
1088 + }
1089 + fetch(fetchOptions) {
1090 + return this.#executeFetch({
1091 + ...fetchOptions,
1092 + cancelRefetch: fetchOptions.cancelRefetch ?? true
1093 + }).then(() => {
1094 + this.updateResult();
1095 + return this.#currentResult;
1096 + });
1097 + }
1098 + #executeFetch(fetchOptions) {
1099 + this.#updateQuery();
1100 + let promise = this.#currentQuery.fetch(this.options, fetchOptions);
1101 + if (!fetchOptions?.throwOnError) promise = promise.catch(noop);
1102 + return promise;
1103 + }
1104 + #updateStaleTimeout() {
1105 + this.#clearStaleTimeout();
1106 + const staleTime = resolveStaleTime(this.options.staleTime, this.#currentQuery);
1107 + if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) return;
1108 + const timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;
1109 + this.#staleTimeoutId = timeoutManager.setTimeout(() => {
1110 + if (!this.#currentResult.isStale) this.updateResult();
1111 + }, timeout);
1112 + }
1113 + #computeRefetchInterval() {
1114 + return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
1115 + }
1116 + #updateRefetchInterval(nextInterval) {
1117 + this.#clearRefetchInterval();
1118 + this.#currentRefetchInterval = nextInterval;
1119 + if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) return;
1120 + this.#refetchIntervalId = timeoutManager.setInterval(() => {
1121 + if (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();
1122 + }, this.#currentRefetchInterval);
1123 + }
1124 + #updateTimers() {
1125 + this.#updateStaleTimeout();
1126 + this.#updateRefetchInterval(this.#computeRefetchInterval());
1127 + }
1128 + #clearStaleTimeout() {
1129 + if (this.#staleTimeoutId) {
1130 + timeoutManager.clearTimeout(this.#staleTimeoutId);
1131 + this.#staleTimeoutId = void 0;
1132 + }
1133 + }
1134 + #clearRefetchInterval() {
1135 + if (this.#refetchIntervalId) {
1136 + timeoutManager.clearInterval(this.#refetchIntervalId);
1137 + this.#refetchIntervalId = void 0;
1138 + }
1139 + }
1140 + createResult(query, options) {
1141 + const prevQuery = this.#currentQuery;
1142 + const prevOptions = this.options;
1143 + const prevResult = this.#currentResult;
1144 + const prevResultState = this.#currentResultState;
1145 + const prevResultOptions = this.#currentResultOptions;
1146 + const queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;
1147 + const { state } = query;
1148 + let newState = { ...state };
1149 + let isPlaceholderData = false;
1150 + let data;
1151 + if (options._optimisticResults) {
1152 + const mounted = this.hasListeners();
1153 + const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
1154 + const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
1155 + if (fetchOnMount || fetchOptionally) newState = {
1156 + ...newState,
1157 + ...fetchState(state.data, query.options)
1158 + };
1159 + if (options._optimisticResults === "isRestoring") newState.fetchStatus = "idle";
1160 + }
1161 + let { error, errorUpdatedAt, status } = newState;
1162 + data = newState.data;
1163 + let skipSelect = false;
1164 + if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
1165 + let placeholderData;
1166 + if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
1167 + placeholderData = prevResult.data;
1168 + skipSelect = true;
1169 + } else placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;
1170 + if (placeholderData !== void 0) {
1171 + status = "success";
1172 + data = replaceData(prevResult?.data, placeholderData, options);
1173 + isPlaceholderData = true;
1174 + }
1175 + }
1176 + if (options.select && data !== void 0 && !skipSelect) if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;
1177 + else try {
1178 + this.#selectFn = options.select;
1179 + data = options.select(data);
1180 + data = replaceData(prevResult?.data, data, options);
1181 + this.#selectResult = data;
1182 + this.#selectError = null;
1183 + } catch (selectError) {
1184 + this.#selectError = selectError;
1185 + }
1186 + if (this.#selectError) {
1187 + error = this.#selectError;
1188 + data = this.#selectResult;
1189 + errorUpdatedAt = Date.now();
1190 + status = "error";
1191 + }
1192 + const isFetching = newState.fetchStatus === "fetching";
1193 + const isPending = status === "pending";
1194 + const isError = status === "error";
1195 + const isLoading = isPending && isFetching;
1196 + const hasData = data !== void 0;
1197 + const nextResult = {
1198 + status,
1199 + fetchStatus: newState.fetchStatus,
1200 + isPending,
1201 + isSuccess: status === "success",
1202 + isError,
1203 + isInitialLoading: isLoading,
1204 + isLoading,
1205 + data,
1206 + dataUpdatedAt: newState.dataUpdatedAt,
1207 + error,
1208 + errorUpdatedAt,
1209 + failureCount: newState.fetchFailureCount,
1210 + failureReason: newState.fetchFailureReason,
1211 + errorUpdateCount: newState.errorUpdateCount,
1212 + isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
1213 + isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
1214 + isFetching,
1215 + isRefetching: isFetching && !isPending,
1216 + isLoadingError: isError && !hasData,
1217 + isPaused: newState.fetchStatus === "paused",
1218 + isPlaceholderData,
1219 + isRefetchError: isError && hasData,
1220 + isStale: isStale(query, options),
1221 + refetch: this.refetch,
1222 + promise: this.#currentThenable,
1223 + isEnabled: resolveEnabled(options.enabled, query) !== false
1224 + };
1225 + if (this.options.experimental_prefetchInRender) {
1226 + const finalizeThenableIfPossible = (thenable) => {
1227 + if (nextResult.status === "error") thenable.reject(nextResult.error);
1228 + else if (nextResult.data !== void 0) thenable.resolve(nextResult.data);
1229 + };
1230 + const recreateThenable = () => {
1231 + const pending = this.#currentThenable = nextResult.promise = pendingThenable();
1232 + finalizeThenableIfPossible(pending);
1233 + };
1234 + const prevThenable = this.#currentThenable;
1235 + switch (prevThenable.status) {
1236 + case "pending":
1237 + if (query.queryHash === prevQuery.queryHash) finalizeThenableIfPossible(prevThenable);
1238 + break;
1239 + case "fulfilled":
1240 + if (nextResult.status === "error" || nextResult.data !== prevThenable.value) recreateThenable();
1241 + break;
1242 + case "rejected":
1243 + if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) recreateThenable();
1244 + break;
1245 + }
1246 + }
1247 + return nextResult;
1248 + }
1249 + updateResult() {
1250 + const prevResult = this.#currentResult;
1251 + const nextResult = this.createResult(this.#currentQuery, this.options);
1252 + this.#currentResultState = this.#currentQuery.state;
1253 + this.#currentResultOptions = this.options;
1254 + if (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;
1255 + if (shallowEqualObjects(nextResult, prevResult)) return;
1256 + this.#currentResult = nextResult;
1257 + const shouldNotifyListeners = () => {
1258 + if (!prevResult) return true;
1259 + const { notifyOnChangeProps } = this.options;
1260 + const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
1261 + if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;
1262 + const includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);
1263 + if (this.options.throwOnError) includedProps.add("error");
1264 + return Object.keys(this.#currentResult).some((key) => {
1265 + const typedKey = key;
1266 + return this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);
1267 + });
1268 + };
1269 + this.#notify({ listeners: shouldNotifyListeners() });
1270 + }
1271 + #updateQuery() {
1272 + const query = this.#client.getQueryCache().build(this.#client, this.options);
1273 + if (query === this.#currentQuery) return;
1274 + const prevQuery = this.#currentQuery;
1275 + this.#currentQuery = query;
1276 + this.#currentQueryInitialState = query.state;
1277 + if (this.hasListeners()) {
1278 + prevQuery?.removeObserver(this);
1279 + query.addObserver(this);
1280 + }
1281 + }
1282 + onQueryUpdate() {
1283 + this.updateResult();
1284 + if (this.hasListeners()) this.#updateTimers();
1285 + }
1286 + #notify(notifyOptions) {
1287 + notifyManager.batch(() => {
1288 + if (notifyOptions.listeners) this.listeners.forEach((listener) => {
1289 + listener(this.#currentResult);
1290 + });
1291 + this.#client.getQueryCache().notify({
1292 + query: this.#currentQuery,
1293 + type: "observerResultsUpdated"
1294 + });
1295 + });
1296 + }
1297 + };
1298 + function shouldLoadOnMount(query, options) {
1299 + return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
1300 + }
1301 + function shouldFetchOnMount(query, options) {
1302 + return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
1303 + }
1304 + function shouldFetchOn(query, options, field) {
1305 + if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
1306 + const value = typeof field === "function" ? field(query) : field;
1307 + return value === "always" || value !== false && isStale(query, options);
1308 + }
1309 + return false;
1310 + }
1311 + function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
1312 + return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
1313 + }
1314 + function isStale(query, options) {
1315 + return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
1316 + }
1317 + function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
1318 + if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) return true;
1319 + return false;
1320 + }
226 1321
1322 +//#endregion
1323 +//#region node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
1324 + function infiniteQueryBehavior(pages) {
1325 + return { onFetch: (context, query) => {
1326 + const options = context.options;
1327 + const direction = context.fetchOptions?.meta?.fetchMore?.direction;
1328 + const oldPages = context.state.data?.pages || [];
1329 + const oldPageParams = context.state.data?.pageParams || [];
1330 + let result = {
1331 + pages: [],
1332 + pageParams: []
1333 + };
1334 + let currentPage = 0;
1335 + const fetchFn = async () => {
1336 + let cancelled = false;
1337 + const addSignalProperty = (object) => {
1338 + addConsumeAwareSignal(object, () => context.signal, () => cancelled = true);
1339 + };
1340 + const queryFn = ensureQueryFn(context.options, context.fetchOptions);
1341 + const fetchPage = async (data, param, previous) => {
1342 + if (cancelled) return Promise.reject();
1343 + if (param == null && data.pages.length) return Promise.resolve(data);
1344 + const createQueryFnContext = () => {
1345 + const queryFnContext2 = {
1346 + client: context.client,
1347 + queryKey: context.queryKey,
1348 + pageParam: param,
1349 + direction: previous ? "backward" : "forward",
1350 + meta: context.options.meta
1351 + };
1352 + addSignalProperty(queryFnContext2);
1353 + return queryFnContext2;
1354 + };
1355 + const queryFnContext = createQueryFnContext();
1356 + const page = await queryFn(queryFnContext);
1357 + const { maxPages } = context.options;
1358 + const addTo = previous ? addToStart : addToEnd;
1359 + return {
1360 + pages: addTo(data.pages, page, maxPages),
1361 + pageParams: addTo(data.pageParams, param, maxPages)
1362 + };
1363 + };
1364 + if (direction && oldPages.length) {
1365 + const previous = direction === "backward";
1366 + const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
1367 + const oldData = {
1368 + pages: oldPages,
1369 + pageParams: oldPageParams
1370 + };
1371 + result = await fetchPage(oldData, pageParamFn(options, oldData), previous);
1372 + } else {
1373 + const remainingPages = pages ?? oldPages.length;
1374 + do {
1375 + const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
1376 + if (currentPage > 0 && param == null) break;
1377 + result = await fetchPage(result, param);
1378 + currentPage++;
1379 + } while (currentPage < remainingPages);
1380 + }
1381 + return result;
1382 + };
1383 + if (context.options.persister) context.fetchFn = () => {
1384 + return context.options.persister?.(fetchFn, {
1385 + client: context.client,
1386 + queryKey: context.queryKey,
1387 + meta: context.options.meta,
1388 + signal: context.signal
1389 + }, query);
1390 + };
1391 + else context.fetchFn = fetchFn;
1392 + } };
1393 + }
1394 + function getNextPageParam(options, { pages, pageParams }) {
1395 + const lastIndex = pages.length - 1;
1396 + return pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0;
1397 + }
1398 + function getPreviousPageParam(options, { pages, pageParams }) {
1399 + return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
1400 + }
1401 + function hasNextPage(options, data) {
1402 + if (!data) return false;
1403 + return getNextPageParam(options, data) != null;
1404 + }
1405 + function hasPreviousPage(options, data) {
1406 + if (!data || !options.getPreviousPageParam) return false;
1407 + return getPreviousPageParam(options, data) != null;
1408 + }
227 1409
228 -var InfiniteQueryObserver = class extends _queryObserver_js__WEBPACK_IMPORTED_MODULE_0__.QueryObserver {
229 - constructor(client, options) {
230 - super(client, options);
231 - }
232 - bindMethods() {
233 - super.bindMethods();
234 - this.fetchNextPage = this.fetchNextPage.bind(this);
235 - this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
236 - }
237 - setOptions(options) {
238 - super.setOptions({
239 - ...options,
240 - behavior: (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_1__.infiniteQueryBehavior)()
241 - });
242 - }
243 - getOptimisticResult(options) {
244 - options.behavior = (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_1__.infiniteQueryBehavior)();
245 - return super.getOptimisticResult(options);
246 - }
247 - fetchNextPage(options) {
248 - return this.fetch({
249 - ...options,
250 - meta: {
251 - fetchMore: { direction: "forward" }
252 - }
253 - });
254 - }
255 - fetchPreviousPage(options) {
256 - return this.fetch({
257 - ...options,
258 - meta: {
259 - fetchMore: { direction: "backward" }
260 - }
261 - });
262 - }
263 - createResult(query, options) {
264 - const { state } = query;
265 - const parentResult = super.createResult(query, options);
266 - const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
267 - const fetchDirection = state.fetchMeta?.fetchMore?.direction;
268 - const isFetchNextPageError = isError && fetchDirection === "forward";
269 - const isFetchingNextPage = isFetching && fetchDirection === "forward";
270 - const isFetchPreviousPageError = isError && fetchDirection === "backward";
271 - const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
272 - const result = {
273 - ...parentResult,
274 - fetchNextPage: this.fetchNextPage,
275 - fetchPreviousPage: this.fetchPreviousPage,
276 - hasNextPage: (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_1__.hasNextPage)(options, state.data),
277 - hasPreviousPage: (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_1__.hasPreviousPage)(options, state.data),
278 - isFetchNextPageError,
279 - isFetchingNextPage,
280 - isFetchPreviousPageError,
281 - isFetchingPreviousPage,
282 - isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
283 - isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
284 - };
285 - return result;
286 - }
287 -};
1410 +//#endregion
1411 +//#region node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
1412 + var InfiniteQueryObserver = class extends QueryObserver {
1413 + constructor(client, options) {
1414 + super(client, options);
1415 + }
1416 + bindMethods() {
1417 + super.bindMethods();
1418 + this.fetchNextPage = this.fetchNextPage.bind(this);
1419 + this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
1420 + }
1421 + setOptions(options) {
1422 + super.setOptions({
1423 + ...options,
1424 + behavior: infiniteQueryBehavior()
1425 + });
1426 + }
1427 + getOptimisticResult(options) {
1428 + options.behavior = infiniteQueryBehavior();
1429 + return super.getOptimisticResult(options);
1430 + }
1431 + fetchNextPage(options) {
1432 + return this.fetch({
1433 + ...options,
1434 + meta: { fetchMore: { direction: "forward" } }
1435 + });
1436 + }
1437 + fetchPreviousPage(options) {
1438 + return this.fetch({
1439 + ...options,
1440 + meta: { fetchMore: { direction: "backward" } }
1441 + });
1442 + }
1443 + createResult(query, options) {
1444 + const { state } = query;
1445 + const parentResult = super.createResult(query, options);
1446 + const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
1447 + const fetchDirection = state.fetchMeta?.fetchMore?.direction;
1448 + const isFetchNextPageError = isError && fetchDirection === "forward";
1449 + const isFetchingNextPage = isFetching && fetchDirection === "forward";
1450 + const isFetchPreviousPageError = isError && fetchDirection === "backward";
1451 + const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
1452 + return {
1453 + ...parentResult,
1454 + fetchNextPage: this.fetchNextPage,
1455 + fetchPreviousPage: this.fetchPreviousPage,
1456 + hasNextPage: hasNextPage(options, state.data),
1457 + hasPreviousPage: hasPreviousPage(options, state.data),
1458 + isFetchNextPageError,
1459 + isFetchingNextPage,
1460 + isFetchPreviousPageError,
1461 + isFetchingPreviousPage,
1462 + isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
1463 + isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
1464 + };
1465 + }
1466 + };
288 1467
289 -//# sourceMappingURL=infiniteQueryObserver.js.map
1468 +//#endregion
1469 +//#region node_modules/@tanstack/query-core/build/modern/mutation.js
1470 + var Mutation = class extends Removable {
1471 + #client;
1472 + #observers;
1473 + #mutationCache;
1474 + #retryer;
1475 + constructor(config) {
1476 + super();
1477 + this.#client = config.client;
1478 + this.mutationId = config.mutationId;
1479 + this.#mutationCache = config.mutationCache;
1480 + this.#observers = [];
1481 + this.state = config.state || getDefaultState();
1482 + this.setOptions(config.options);
1483 + this.scheduleGc();
1484 + }
1485 + setOptions(options) {
1486 + this.options = options;
1487 + this.updateGcTime(this.options.gcTime);
1488 + }
1489 + get meta() {
1490 + return this.options.meta;
1491 + }
1492 + addObserver(observer) {
1493 + if (!this.#observers.includes(observer)) {
1494 + this.#observers.push(observer);
1495 + this.clearGcTimeout();
1496 + this.#mutationCache.notify({
1497 + type: "observerAdded",
1498 + mutation: this,
1499 + observer
1500 + });
1501 + }
1502 + }
1503 + removeObserver(observer) {
1504 + this.#observers = this.#observers.filter((x) => x !== observer);
1505 + this.scheduleGc();
1506 + this.#mutationCache.notify({
1507 + type: "observerRemoved",
1508 + mutation: this,
1509 + observer
1510 + });
1511 + }
1512 + optionalRemove() {
1513 + if (!this.#observers.length) if (this.state.status === "pending") this.scheduleGc();
1514 + else this.#mutationCache.remove(this);
1515 + }
1516 + continue() {
1517 + return this.#retryer?.continue() ?? this.execute(this.state.variables);
1518 + }
1519 + async execute(variables) {
1520 + const onContinue = () => {
1521 + this.#dispatch({ type: "continue" });
1522 + };
1523 + const mutationFnContext = {
1524 + client: this.#client,
1525 + meta: this.options.meta,
1526 + mutationKey: this.options.mutationKey
1527 + };
1528 + this.#retryer = createRetryer({
1529 + fn: () => {
1530 + if (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error("No mutationFn found"));
1531 + return this.options.mutationFn(variables, mutationFnContext);
1532 + },
1533 + onFail: (failureCount, error) => {
1534 + this.#dispatch({
1535 + type: "failed",
1536 + failureCount,
1537 + error
1538 + });
1539 + },
1540 + onPause: () => {
1541 + this.#dispatch({ type: "pause" });
1542 + },
1543 + onContinue,
1544 + retry: this.options.retry ?? 0,
1545 + retryDelay: this.options.retryDelay,
1546 + networkMode: this.options.networkMode,
1547 + canRun: () => this.#mutationCache.canRun(this)
1548 + });
1549 + const restored = this.state.status === "pending";
1550 + const isPaused = !this.#retryer.canStart();
1551 + try {
1552 + if (restored) onContinue();
1553 + else {
1554 + this.#dispatch({
1555 + type: "pending",
1556 + variables,
1557 + isPaused
1558 + });
1559 + await this.#mutationCache.config.onMutate?.(variables, this, mutationFnContext);
1560 + const context = await this.options.onMutate?.(variables, mutationFnContext);
1561 + if (context !== this.state.context) this.#dispatch({
1562 + type: "pending",
1563 + context,
1564 + variables,
1565 + isPaused
1566 + });
1567 + }
1568 + const data = await this.#retryer.start();
1569 + await this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);
1570 + await this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);
1571 + await this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);
1572 + await this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);
1573 + this.#dispatch({
1574 + type: "success",
1575 + data
1576 + });
1577 + return data;
1578 + } catch (error) {
1579 + try {
1580 + await this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);
1581 + await this.options.onError?.(error, variables, this.state.context, mutationFnContext);
1582 + await this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);
1583 + await this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);
1584 + throw error;
1585 + } finally {
1586 + this.#dispatch({
1587 + type: "error",
1588 + error
1589 + });
1590 + }
1591 + } finally {
1592 + this.#mutationCache.runNext(this);
1593 + }
1594 + }
1595 + #dispatch(action) {
1596 + const reducer = (state) => {
1597 + switch (action.type) {
1598 + case "failed": return {
1599 + ...state,
1600 + failureCount: action.failureCount,
1601 + failureReason: action.error
1602 + };
1603 + case "pause": return {
1604 + ...state,
1605 + isPaused: true
1606 + };
1607 + case "continue": return {
1608 + ...state,
1609 + isPaused: false
1610 + };
1611 + case "pending": return {
1612 + ...state,
1613 + context: action.context,
1614 + data: void 0,
1615 + failureCount: 0,
1616 + failureReason: null,
1617 + error: null,
1618 + isPaused: action.isPaused,
1619 + status: "pending",
1620 + variables: action.variables,
1621 + submittedAt: Date.now()
1622 + };
1623 + case "success": return {
1624 + ...state,
1625 + data: action.data,
1626 + failureCount: 0,
1627 + failureReason: null,
1628 + error: null,
1629 + status: "success",
1630 + isPaused: false
1631 + };
1632 + case "error": return {
1633 + ...state,
1634 + data: void 0,
1635 + error: action.error,
1636 + failureCount: state.failureCount + 1,
1637 + failureReason: action.error,
1638 + isPaused: false,
1639 + status: "error"
1640 + };
1641 + }
1642 + };
1643 + this.state = reducer(this.state);
1644 + notifyManager.batch(() => {
1645 + this.#observers.forEach((observer) => {
1646 + observer.onMutationUpdate(action);
1647 + });
1648 + this.#mutationCache.notify({
1649 + mutation: this,
1650 + type: "updated",
1651 + action
1652 + });
1653 + });
1654 + }
1655 + };
1656 + function getDefaultState() {
1657 + return {
1658 + context: void 0,
1659 + data: void 0,
1660 + error: null,
1661 + failureCount: 0,
1662 + failureReason: null,
1663 + isPaused: false,
1664 + status: "idle",
1665 + variables: void 0,
1666 + submittedAt: 0
1667 + };
1668 + }
290 1669
291 -/***/ }),
1670 +//#endregion
1671 +//#region node_modules/@tanstack/query-core/build/modern/mutationCache.js
1672 + var MutationCache = class extends Subscribable {
1673 + constructor(config = {}) {
1674 + super();
1675 + this.config = config;
1676 + this.#mutations = /* @__PURE__ */ new Set();
1677 + this.#scopes = /* @__PURE__ */ new Map();
1678 + this.#mutationId = 0;
1679 + }
1680 + #mutations;
1681 + #scopes;
1682 + #mutationId;
1683 + build(client, options, state) {
1684 + const mutation = new Mutation({
1685 + client,
1686 + mutationCache: this,
1687 + mutationId: ++this.#mutationId,
1688 + options: client.defaultMutationOptions(options),
1689 + state
1690 + });
1691 + this.add(mutation);
1692 + return mutation;
1693 + }
1694 + add(mutation) {
1695 + this.#mutations.add(mutation);
1696 + const scope = scopeFor(mutation);
1697 + if (typeof scope === "string") {
1698 + const scopedMutations = this.#scopes.get(scope);
1699 + if (scopedMutations) scopedMutations.push(mutation);
1700 + else this.#scopes.set(scope, [mutation]);
1701 + }
1702 + this.notify({
1703 + type: "added",
1704 + mutation
1705 + });
1706 + }
1707 + remove(mutation) {
1708 + if (this.#mutations.delete(mutation)) {
1709 + const scope = scopeFor(mutation);
1710 + if (typeof scope === "string") {
1711 + const scopedMutations = this.#scopes.get(scope);
1712 + if (scopedMutations) {
1713 + if (scopedMutations.length > 1) {
1714 + const index = scopedMutations.indexOf(mutation);
1715 + if (index !== -1) scopedMutations.splice(index, 1);
1716 + } else if (scopedMutations[0] === mutation) this.#scopes.delete(scope);
1717 + }
1718 + }
1719 + }
1720 + this.notify({
1721 + type: "removed",
1722 + mutation
1723 + });
1724 + }
1725 + canRun(mutation) {
1726 + const scope = scopeFor(mutation);
1727 + if (typeof scope === "string") {
1728 + const firstPendingMutation = this.#scopes.get(scope)?.find((m) => m.state.status === "pending");
1729 + return !firstPendingMutation || firstPendingMutation === mutation;
1730 + } else return true;
1731 + }
1732 + runNext(mutation) {
1733 + const scope = scopeFor(mutation);
1734 + if (typeof scope === "string") return (this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused))?.continue() ?? Promise.resolve();
1735 + else return Promise.resolve();
1736 + }
1737 + clear() {
1738 + notifyManager.batch(() => {
1739 + this.#mutations.forEach((mutation) => {
1740 + this.notify({
1741 + type: "removed",
1742 + mutation
1743 + });
1744 + });
1745 + this.#mutations.clear();
1746 + this.#scopes.clear();
1747 + });
1748 + }
1749 + getAll() {
1750 + return Array.from(this.#mutations);
1751 + }
1752 + find(filters) {
1753 + const defaultedFilters = {
1754 + exact: true,
1755 + ...filters
1756 + };
1757 + return this.getAll().find((mutation) => matchMutation(defaultedFilters, mutation));
1758 + }
1759 + findAll(filters = {}) {
1760 + return this.getAll().filter((mutation) => matchMutation(filters, mutation));
1761 + }
1762 + notify(event) {
1763 + notifyManager.batch(() => {
1764 + this.listeners.forEach((listener) => {
1765 + listener(event);
1766 + });
1767 + });
1768 + }
1769 + resumePausedMutations() {
1770 + const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
1771 + return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));
1772 + }
1773 + };
1774 + function scopeFor(mutation) {
1775 + return mutation.options.scope?.id;
1776 + }
292 1777
293 -/***/ "./node_modules/@tanstack/query-core/build/modern/mutation.js":
294 -/*!********************************************************************!*\
295 - !*** ./node_modules/@tanstack/query-core/build/modern/mutation.js ***!
296 - \********************************************************************/
297 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1778 +//#endregion
1779 +//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
1780 + var MutationObserver = class extends Subscribable {
1781 + #client;
1782 + #currentResult = void 0;
1783 + #currentMutation;
1784 + #mutateOptions;
1785 + constructor(client, options) {
1786 + super();
1787 + this.#client = client;
1788 + this.setOptions(options);
1789 + this.bindMethods();
1790 + this.#updateResult();
1791 + }
1792 + bindMethods() {
1793 + this.mutate = this.mutate.bind(this);
1794 + this.reset = this.reset.bind(this);
1795 + }
1796 + setOptions(options) {
1797 + const prevOptions = this.options;
1798 + this.options = this.#client.defaultMutationOptions(options);
1799 + if (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({
1800 + type: "observerOptionsUpdated",
1801 + mutation: this.#currentMutation,
1802 + observer: this
1803 + });
1804 + if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();
1805 + else if (this.#currentMutation?.state.status === "pending") this.#currentMutation.setOptions(this.options);
1806 + }
1807 + onUnsubscribe() {
1808 + if (!this.hasListeners()) this.#currentMutation?.removeObserver(this);
1809 + }
1810 + onMutationUpdate(action) {
1811 + this.#updateResult();
1812 + this.#notify(action);
1813 + }
1814 + getCurrentResult() {
1815 + return this.#currentResult;
1816 + }
1817 + reset() {
1818 + this.#currentMutation?.removeObserver(this);
1819 + this.#currentMutation = void 0;
1820 + this.#updateResult();
1821 + this.#notify();
1822 + }
1823 + mutate(variables, options) {
1824 + this.#mutateOptions = options;
1825 + this.#currentMutation?.removeObserver(this);
1826 + this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
1827 + this.#currentMutation.addObserver(this);
1828 + return this.#currentMutation.execute(variables);
1829 + }
1830 + #updateResult() {
1831 + const state = this.#currentMutation?.state ?? getDefaultState();
1832 + this.#currentResult = {
1833 + ...state,
1834 + isPending: state.status === "pending",
1835 + isSuccess: state.status === "success",
1836 + isError: state.status === "error",
1837 + isIdle: state.status === "idle",
1838 + mutate: this.mutate,
1839 + reset: this.reset
1840 + };
1841 + }
1842 + #notify(action) {
1843 + notifyManager.batch(() => {
1844 + if (this.#mutateOptions && this.hasListeners()) {
1845 + const variables = this.#currentResult.variables;
1846 + const onMutateResult = this.#currentResult.context;
1847 + const context = {
1848 + client: this.#client,
1849 + meta: this.options.meta,
1850 + mutationKey: this.options.mutationKey
1851 + };
1852 + if (action?.type === "success") {
1853 + this.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);
1854 + this.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);
1855 + } else if (action?.type === "error") {
1856 + this.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);
1857 + this.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);
1858 + }
1859 + }
1860 + this.listeners.forEach((listener) => {
1861 + listener(this.#currentResult);
1862 + });
1863 + });
1864 + }
1865 + };
298 1866
299 -__webpack_require__.r(__webpack_exports__);
300 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
301 -/* harmony export */ Mutation: function() { return /* binding */ Mutation; },
302 -/* harmony export */ getDefaultState: function() { return /* binding */ getDefaultState; }
303 -/* harmony export */ });
304 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
305 -/* harmony import */ var _removable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removable.js */ "./node_modules/@tanstack/query-core/build/modern/removable.js");
306 -/* harmony import */ var _retryer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./retryer.js */ "./node_modules/@tanstack/query-core/build/modern/retryer.js");
307 -// src/mutation.ts
1867 +//#endregion
1868 +//#region node_modules/@tanstack/query-core/build/modern/queryCache.js
1869 + var QueryCache = class extends Subscribable {
1870 + constructor(config = {}) {
1871 + super();
1872 + this.config = config;
1873 + this.#queries = /* @__PURE__ */ new Map();
1874 + }
1875 + #queries;
1876 + build(client, options, state) {
1877 + const queryKey = options.queryKey;
1878 + const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);
1879 + let query = this.get(queryHash);
1880 + if (!query) {
1881 + query = new Query({
1882 + client,
1883 + queryKey,
1884 + queryHash,
1885 + options: client.defaultQueryOptions(options),
1886 + state,
1887 + defaultOptions: client.getQueryDefaults(queryKey)
1888 + });
1889 + this.add(query);
1890 + }
1891 + return query;
1892 + }
1893 + add(query) {
1894 + if (!this.#queries.has(query.queryHash)) {
1895 + this.#queries.set(query.queryHash, query);
1896 + this.notify({
1897 + type: "added",
1898 + query
1899 + });
1900 + }
1901 + }
1902 + remove(query) {
1903 + const queryInMap = this.#queries.get(query.queryHash);
1904 + if (queryInMap) {
1905 + query.destroy();
1906 + if (queryInMap === query) this.#queries.delete(query.queryHash);
1907 + this.notify({
1908 + type: "removed",
1909 + query
1910 + });
1911 + }
1912 + }
1913 + clear() {
1914 + notifyManager.batch(() => {
1915 + this.getAll().forEach((query) => {
1916 + this.remove(query);
1917 + });
1918 + });
1919 + }
1920 + get(queryHash) {
1921 + return this.#queries.get(queryHash);
1922 + }
1923 + getAll() {
1924 + return [...this.#queries.values()];
1925 + }
1926 + find(filters) {
1927 + const defaultedFilters = {
1928 + exact: true,
1929 + ...filters
1930 + };
1931 + return this.getAll().find((query) => matchQuery(defaultedFilters, query));
1932 + }
1933 + findAll(filters = {}) {
1934 + const queries = this.getAll();
1935 + return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;
1936 + }
1937 + notify(event) {
1938 + notifyManager.batch(() => {
1939 + this.listeners.forEach((listener) => {
1940 + listener(event);
1941 + });
1942 + });
1943 + }
1944 + onFocus() {
1945 + notifyManager.batch(() => {
1946 + this.getAll().forEach((query) => {
1947 + query.onFocus();
1948 + });
1949 + });
1950 + }
1951 + onOnline() {
1952 + notifyManager.batch(() => {
1953 + this.getAll().forEach((query) => {
1954 + query.onOnline();
1955 + });
1956 + });
1957 + }
1958 + };
308 1959
1960 +//#endregion
1961 +//#region node_modules/@tanstack/query-core/build/modern/queryClient.js
1962 + var QueryClient = class {
1963 + #queryCache;
1964 + #mutationCache;
1965 + #defaultOptions;
1966 + #queryDefaults;
1967 + #mutationDefaults;
1968 + #mountCount;
1969 + #unsubscribeFocus;
1970 + #unsubscribeOnline;
1971 + constructor(config = {}) {
1972 + this.#queryCache = config.queryCache || new QueryCache();
1973 + this.#mutationCache = config.mutationCache || new MutationCache();
1974 + this.#defaultOptions = config.defaultOptions || {};
1975 + this.#queryDefaults = /* @__PURE__ */ new Map();
1976 + this.#mutationDefaults = /* @__PURE__ */ new Map();
1977 + this.#mountCount = 0;
1978 + }
1979 + mount() {
1980 + this.#mountCount++;
1981 + if (this.#mountCount !== 1) return;
1982 + this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {
1983 + if (focused) {
1984 + await this.resumePausedMutations();
1985 + this.#queryCache.onFocus();
1986 + }
1987 + });
1988 + this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {
1989 + if (online) {
1990 + await this.resumePausedMutations();
1991 + this.#queryCache.onOnline();
1992 + }
1993 + });
1994 + }
1995 + unmount() {
1996 + this.#mountCount--;
1997 + if (this.#mountCount !== 0) return;
1998 + this.#unsubscribeFocus?.();
1999 + this.#unsubscribeFocus = void 0;
2000 + this.#unsubscribeOnline?.();
2001 + this.#unsubscribeOnline = void 0;
2002 + }
2003 + isFetching(filters) {
2004 + return this.#queryCache.findAll({
2005 + ...filters,
2006 + fetchStatus: "fetching"
2007 + }).length;
2008 + }
2009 + isMutating(filters) {
2010 + return this.#mutationCache.findAll({
2011 + ...filters,
2012 + status: "pending"
2013 + }).length;
2014 + }
2015 + /**
2016 + * Imperative (non-reactive) way to retrieve data for a QueryKey.
2017 + * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
2018 + *
2019 + * Hint: Do not use this function inside a component, because it won't receive updates.
2020 + * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
2021 + */
2022 + getQueryData(queryKey) {
2023 + const options = this.defaultQueryOptions({ queryKey });
2024 + return this.#queryCache.get(options.queryHash)?.state.data;
2025 + }
2026 + ensureQueryData(options) {
2027 + const defaultedOptions = this.defaultQueryOptions(options);
2028 + const query = this.#queryCache.build(this, defaultedOptions);
2029 + const cachedData = query.state.data;
2030 + if (cachedData === void 0) return this.fetchQuery(options);
2031 + if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) this.prefetchQuery(defaultedOptions);
2032 + return Promise.resolve(cachedData);
2033 + }
2034 + getQueriesData(filters) {
2035 + return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
2036 + return [queryKey, state.data];
2037 + });
2038 + }
2039 + setQueryData(queryKey, updater, options) {
2040 + const defaultedOptions = this.defaultQueryOptions({ queryKey });
2041 + const prevData = this.#queryCache.get(defaultedOptions.queryHash)?.state.data;
2042 + const data = functionalUpdate(updater, prevData);
2043 + if (data === void 0) return;
2044 + return this.#queryCache.build(this, defaultedOptions).setData(data, {
2045 + ...options,
2046 + manual: true
2047 + });
2048 + }
2049 + setQueriesData(filters, updater, options) {
2050 + return notifyManager.batch(() => this.#queryCache.findAll(filters).map(({ queryKey }) => [queryKey, this.setQueryData(queryKey, updater, options)]));
2051 + }
2052 + getQueryState(queryKey) {
2053 + const options = this.defaultQueryOptions({ queryKey });
2054 + return this.#queryCache.get(options.queryHash)?.state;
2055 + }
2056 + removeQueries(filters) {
2057 + const queryCache = this.#queryCache;
2058 + notifyManager.batch(() => {
2059 + queryCache.findAll(filters).forEach((query) => {
2060 + queryCache.remove(query);
2061 + });
2062 + });
2063 + }
2064 + resetQueries(filters, options) {
2065 + const queryCache = this.#queryCache;
2066 + return notifyManager.batch(() => {
2067 + queryCache.findAll(filters).forEach((query) => {
2068 + query.reset();
2069 + });
2070 + return this.refetchQueries({
2071 + type: "active",
2072 + ...filters
2073 + }, options);
2074 + });
2075 + }
2076 + cancelQueries(filters, cancelOptions = {}) {
2077 + const defaultedCancelOptions = {
2078 + revert: true,
2079 + ...cancelOptions
2080 + };
2081 + const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));
2082 + return Promise.all(promises).then(noop).catch(noop);
2083 + }
2084 + invalidateQueries(filters, options = {}) {
2085 + return notifyManager.batch(() => {
2086 + this.#queryCache.findAll(filters).forEach((query) => {
2087 + query.invalidate();
2088 + });
2089 + if (filters?.refetchType === "none") return Promise.resolve();
2090 + return this.refetchQueries({
2091 + ...filters,
2092 + type: filters?.refetchType ?? filters?.type ?? "active"
2093 + }, options);
2094 + });
2095 + }
2096 + refetchQueries(filters, options = {}) {
2097 + const fetchOptions = {
2098 + ...options,
2099 + cancelRefetch: options.cancelRefetch ?? true
2100 + };
2101 + const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
2102 + let promise = query.fetch(void 0, fetchOptions);
2103 + if (!fetchOptions.throwOnError) promise = promise.catch(noop);
2104 + return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
2105 + }));
2106 + return Promise.all(promises).then(noop);
2107 + }
2108 + fetchQuery(options) {
2109 + const defaultedOptions = this.defaultQueryOptions(options);
2110 + if (defaultedOptions.retry === void 0) defaultedOptions.retry = false;
2111 + const query = this.#queryCache.build(this, defaultedOptions);
2112 + return query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query)) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
2113 + }
2114 + prefetchQuery(options) {
2115 + return this.fetchQuery(options).then(noop).catch(noop);
2116 + }
2117 + fetchInfiniteQuery(options) {
2118 + options.behavior = infiniteQueryBehavior(options.pages);
2119 + return this.fetchQuery(options);
2120 + }
2121 + prefetchInfiniteQuery(options) {
2122 + return this.fetchInfiniteQuery(options).then(noop).catch(noop);
2123 + }
2124 + ensureInfiniteQueryData(options) {
2125 + options.behavior = infiniteQueryBehavior(options.pages);
2126 + return this.ensureQueryData(options);
2127 + }
2128 + resumePausedMutations() {
2129 + if (onlineManager.isOnline()) return this.#mutationCache.resumePausedMutations();
2130 + return Promise.resolve();
2131 + }
2132 + getQueryCache() {
2133 + return this.#queryCache;
2134 + }
2135 + getMutationCache() {
2136 + return this.#mutationCache;
2137 + }
2138 + getDefaultOptions() {
2139 + return this.#defaultOptions;
2140 + }
2141 + setDefaultOptions(options) {
2142 + this.#defaultOptions = options;
2143 + }
2144 + setQueryDefaults(queryKey, options) {
2145 + this.#queryDefaults.set(hashKey(queryKey), {
2146 + queryKey,
2147 + defaultOptions: options
2148 + });
2149 + }
2150 + getQueryDefaults(queryKey) {
2151 + const defaults = [...this.#queryDefaults.values()];
2152 + const result = {};
2153 + defaults.forEach((queryDefault) => {
2154 + if (partialMatchKey(queryKey, queryDefault.queryKey)) Object.assign(result, queryDefault.defaultOptions);
2155 + });
2156 + return result;
2157 + }
2158 + setMutationDefaults(mutationKey, options) {
2159 + this.#mutationDefaults.set(hashKey(mutationKey), {
2160 + mutationKey,
2161 + defaultOptions: options
2162 + });
2163 + }
2164 + getMutationDefaults(mutationKey) {
2165 + const defaults = [...this.#mutationDefaults.values()];
2166 + const result = {};
2167 + defaults.forEach((queryDefault) => {
2168 + if (partialMatchKey(mutationKey, queryDefault.mutationKey)) Object.assign(result, queryDefault.defaultOptions);
2169 + });
2170 + return result;
2171 + }
2172 + defaultQueryOptions(options) {
2173 + if (options._defaulted) return options;
2174 + const defaultedOptions = {
2175 + ...this.#defaultOptions.queries,
2176 + ...this.getQueryDefaults(options.queryKey),
2177 + ...options,
2178 + _defaulted: true
2179 + };
2180 + if (!defaultedOptions.queryHash) defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);
2181 + if (defaultedOptions.refetchOnReconnect === void 0) defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
2182 + if (defaultedOptions.throwOnError === void 0) defaultedOptions.throwOnError = !!defaultedOptions.suspense;
2183 + if (!defaultedOptions.networkMode && defaultedOptions.persister) defaultedOptions.networkMode = "offlineFirst";
2184 + if (defaultedOptions.queryFn === skipToken) defaultedOptions.enabled = false;
2185 + return defaultedOptions;
2186 + }
2187 + defaultMutationOptions(options) {
2188 + if (options?._defaulted) return options;
2189 + return {
2190 + ...this.#defaultOptions.mutations,
2191 + ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
2192 + ...options,
2193 + _defaulted: true
2194 + };
2195 + }
2196 + clear() {
2197 + this.#queryCache.clear();
2198 + this.#mutationCache.clear();
2199 + }
2200 + };
309 2201
310 -
311 -var Mutation = class extends _removable_js__WEBPACK_IMPORTED_MODULE_1__.Removable {
312 - #client;
313 - #observers;
314 - #mutationCache;
315 - #retryer;
316 - constructor(config) {
317 - super();
318 - this.#client = config.client;
319 - this.mutationId = config.mutationId;
320 - this.#mutationCache = config.mutationCache;
321 - this.#observers = [];
322 - this.state = config.state || getDefaultState();
323 - this.setOptions(config.options);
324 - this.scheduleGc();
325 - }
326 - setOptions(options) {
327 - this.options = options;
328 - this.updateGcTime(this.options.gcTime);
329 - }
330 - get meta() {
331 - return this.options.meta;
332 - }
333 - addObserver(observer) {
334 - if (!this.#observers.includes(observer)) {
335 - this.#observers.push(observer);
336 - this.clearGcTimeout();
337 - this.#mutationCache.notify({
338 - type: "observerAdded",
339 - mutation: this,
340 - observer
341 - });
342 - }
343 - }
344 - removeObserver(observer) {
345 - this.#observers = this.#observers.filter((x) => x !== observer);
346 - this.scheduleGc();
347 - this.#mutationCache.notify({
348 - type: "observerRemoved",
349 - mutation: this,
350 - observer
351 - });
352 - }
353 - optionalRemove() {
354 - if (!this.#observers.length) {
355 - if (this.state.status === "pending") {
356 - this.scheduleGc();
357 - } else {
358 - this.#mutationCache.remove(this);
359 - }
360 - }
361 - }
362 - continue() {
363 - return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
364 - this.execute(this.state.variables);
365 - }
366 - async execute(variables) {
367 - const onContinue = () => {
368 - this.#dispatch({ type: "continue" });
369 - };
370 - const mutationFnContext = {
371 - client: this.#client,
372 - meta: this.options.meta,
373 - mutationKey: this.options.mutationKey
374 - };
375 - this.#retryer = (0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.createRetryer)({
376 - fn: () => {
377 - if (!this.options.mutationFn) {
378 - return Promise.reject(new Error("No mutationFn found"));
379 - }
380 - return this.options.mutationFn(variables, mutationFnContext);
381 - },
382 - onFail: (failureCount, error) => {
383 - this.#dispatch({ type: "failed", failureCount, error });
384 - },
385 - onPause: () => {
386 - this.#dispatch({ type: "pause" });
387 - },
388 - onContinue,
389 - retry: this.options.retry ?? 0,
390 - retryDelay: this.options.retryDelay,
391 - networkMode: this.options.networkMode,
392 - canRun: () => this.#mutationCache.canRun(this)
393 - });
394 - const restored = this.state.status === "pending";
395 - const isPaused = !this.#retryer.canStart();
396 - try {
397 - if (restored) {
398 - onContinue();
399 - } else {
400 - this.#dispatch({ type: "pending", variables, isPaused });
401 - await this.#mutationCache.config.onMutate?.(
402 - variables,
403 - this,
404 - mutationFnContext
405 - );
406 - const context = await this.options.onMutate?.(
407 - variables,
408 - mutationFnContext
409 - );
410 - if (context !== this.state.context) {
411 - this.#dispatch({
412 - type: "pending",
413 - context,
414 - variables,
415 - isPaused
416 - });
417 - }
418 - }
419 - const data = await this.#retryer.start();
420 - await this.#mutationCache.config.onSuccess?.(
421 - data,
422 - variables,
423 - this.state.context,
424 - this,
425 - mutationFnContext
426 - );
427 - await this.options.onSuccess?.(
428 - data,
429 - variables,
430 - this.state.context,
431 - mutationFnContext
432 - );
433 - await this.#mutationCache.config.onSettled?.(
434 - data,
435 - null,
436 - this.state.variables,
437 - this.state.context,
438 - this,
439 - mutationFnContext
440 - );
441 - await this.options.onSettled?.(
442 - data,
443 - null,
444 - variables,
445 - this.state.context,
446 - mutationFnContext
447 - );
448 - this.#dispatch({ type: "success", data });
449 - return data;
450 - } catch (error) {
451 - try {
452 - await this.#mutationCache.config.onError?.(
453 - error,
454 - variables,
455 - this.state.context,
456 - this,
457 - mutationFnContext
458 - );
459 - await this.options.onError?.(
460 - error,
461 - variables,
462 - this.state.context,
463 - mutationFnContext
464 - );
465 - await this.#mutationCache.config.onSettled?.(
466 - void 0,
467 - error,
468 - this.state.variables,
469 - this.state.context,
470 - this,
471 - mutationFnContext
472 - );
473 - await this.options.onSettled?.(
474 - void 0,
475 - error,
476 - variables,
477 - this.state.context,
478 - mutationFnContext
479 - );
480 - throw error;
481 - } finally {
482 - this.#dispatch({ type: "error", error });
483 - }
484 - } finally {
485 - this.#mutationCache.runNext(this);
486 - }
487 - }
488 - #dispatch(action) {
489 - const reducer = (state) => {
490 - switch (action.type) {
491 - case "failed":
492 - return {
493 - ...state,
494 - failureCount: action.failureCount,
495 - failureReason: action.error
496 - };
497 - case "pause":
498 - return {
499 - ...state,
500 - isPaused: true
501 - };
502 - case "continue":
503 - return {
504 - ...state,
505 - isPaused: false
506 - };
507 - case "pending":
508 - return {
509 - ...state,
510 - context: action.context,
511 - data: void 0,
512 - failureCount: 0,
513 - failureReason: null,
514 - error: null,
515 - isPaused: action.isPaused,
516 - status: "pending",
517 - variables: action.variables,
518 - submittedAt: Date.now()
519 - };
520 - case "success":
521 - return {
522 - ...state,
523 - data: action.data,
524 - failureCount: 0,
525 - failureReason: null,
526 - error: null,
527 - status: "success",
528 - isPaused: false
529 - };
530 - case "error":
531 - return {
532 - ...state,
533 - data: void 0,
534 - error: action.error,
535 - failureCount: state.failureCount + 1,
536 - failureReason: action.error,
537 - isPaused: false,
538 - status: "error"
539 - };
540 - }
541 - };
542 - this.state = reducer(this.state);
543 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_0__.notifyManager.batch(() => {
544 - this.#observers.forEach((observer) => {
545 - observer.onMutationUpdate(action);
546 - });
547 - this.#mutationCache.notify({
548 - mutation: this,
549 - type: "updated",
550 - action
551 - });
552 - });
553 - }
554 -};
555 -function getDefaultState() {
556 - return {
557 - context: void 0,
558 - data: void 0,
559 - error: null,
560 - failureCount: 0,
561 - failureReason: null,
562 - isPaused: false,
563 - status: "idle",
564 - variables: void 0,
565 - submittedAt: 0
566 - };
567 -}
568 -
569 -//# sourceMappingURL=mutation.js.map
570 -
571 -/***/ }),
572 -
573 -/***/ "./node_modules/@tanstack/query-core/build/modern/mutationCache.js":
574 -/*!*************************************************************************!*\
575 - !*** ./node_modules/@tanstack/query-core/build/modern/mutationCache.js ***!
576 - \*************************************************************************/
577 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
578 -
579 -__webpack_require__.r(__webpack_exports__);
580 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
581 -/* harmony export */ MutationCache: function() { return /* binding */ MutationCache; }
582 -/* harmony export */ });
583 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
584 -/* harmony import */ var _mutation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mutation.js */ "./node_modules/@tanstack/query-core/build/modern/mutation.js");
585 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
586 -/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
587 -// src/mutationCache.ts
588 -
589 -
590 -
591 -
592 -var MutationCache = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_3__.Subscribable {
593 - constructor(config = {}) {
594 - super();
595 - this.config = config;
596 - this.#mutations = /* @__PURE__ */ new Set();
597 - this.#scopes = /* @__PURE__ */ new Map();
598 - this.#mutationId = 0;
599 - }
600 - #mutations;
601 - #scopes;
602 - #mutationId;
603 - build(client, options, state) {
604 - const mutation = new _mutation_js__WEBPACK_IMPORTED_MODULE_1__.Mutation({
605 - client,
606 - mutationCache: this,
607 - mutationId: ++this.#mutationId,
608 - options: client.defaultMutationOptions(options),
609 - state
610 - });
611 - this.add(mutation);
612 - return mutation;
613 - }
614 - add(mutation) {
615 - this.#mutations.add(mutation);
616 - const scope = scopeFor(mutation);
617 - if (typeof scope === "string") {
618 - const scopedMutations = this.#scopes.get(scope);
619 - if (scopedMutations) {
620 - scopedMutations.push(mutation);
621 - } else {
622 - this.#scopes.set(scope, [mutation]);
623 - }
624 - }
625 - this.notify({ type: "added", mutation });
626 - }
627 - remove(mutation) {
628 - if (this.#mutations.delete(mutation)) {
629 - const scope = scopeFor(mutation);
630 - if (typeof scope === "string") {
631 - const scopedMutations = this.#scopes.get(scope);
632 - if (scopedMutations) {
633 - if (scopedMutations.length > 1) {
634 - const index = scopedMutations.indexOf(mutation);
635 - if (index !== -1) {
636 - scopedMutations.splice(index, 1);
637 - }
638 - } else if (scopedMutations[0] === mutation) {
639 - this.#scopes.delete(scope);
640 - }
641 - }
642 - }
643 - }
644 - this.notify({ type: "removed", mutation });
645 - }
646 - canRun(mutation) {
647 - const scope = scopeFor(mutation);
648 - if (typeof scope === "string") {
649 - const mutationsWithSameScope = this.#scopes.get(scope);
650 - const firstPendingMutation = mutationsWithSameScope?.find(
651 - (m) => m.state.status === "pending"
652 - );
653 - return !firstPendingMutation || firstPendingMutation === mutation;
654 - } else {
655 - return true;
656 - }
657 - }
658 - runNext(mutation) {
659 - const scope = scopeFor(mutation);
660 - if (typeof scope === "string") {
661 - const foundMutation = this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused);
662 - return foundMutation?.continue() ?? Promise.resolve();
663 - } else {
664 - return Promise.resolve();
665 - }
666 - }
667 - clear() {
668 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_0__.notifyManager.batch(() => {
669 - this.#mutations.forEach((mutation) => {
670 - this.notify({ type: "removed", mutation });
671 - });
672 - this.#mutations.clear();
673 - this.#scopes.clear();
674 - });
675 - }
676 - getAll() {
677 - return Array.from(this.#mutations);
678 - }
679 - find(filters) {
680 - const defaultedFilters = { exact: true, ...filters };
681 - return this.getAll().find(
682 - (mutation) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.matchMutation)(defaultedFilters, mutation)
683 - );
684 - }
685 - findAll(filters = {}) {
686 - return this.getAll().filter((mutation) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.matchMutation)(filters, mutation));
687 - }
688 - notify(event) {
689 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_0__.notifyManager.batch(() => {
690 - this.listeners.forEach((listener) => {
691 - listener(event);
692 - });
693 - });
694 - }
695 - resumePausedMutations() {
696 - const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
697 - return _notifyManager_js__WEBPACK_IMPORTED_MODULE_0__.notifyManager.batch(
698 - () => Promise.all(
699 - pausedMutations.map((mutation) => mutation.continue().catch(_utils_js__WEBPACK_IMPORTED_MODULE_2__.noop))
700 - )
701 - );
702 - }
703 -};
704 -function scopeFor(mutation) {
705 - return mutation.options.scope?.id;
706 -}
707 -
708 -//# sourceMappingURL=mutationCache.js.map
709 -
710 -/***/ }),
711 -
712 -/***/ "./node_modules/@tanstack/query-core/build/modern/mutationObserver.js":
713 -/*!****************************************************************************!*\
714 - !*** ./node_modules/@tanstack/query-core/build/modern/mutationObserver.js ***!
715 - \****************************************************************************/
716 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
717 -
718 -__webpack_require__.r(__webpack_exports__);
719 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
720 -/* harmony export */ MutationObserver: function() { return /* binding */ MutationObserver; }
721 -/* harmony export */ });
722 -/* harmony import */ var _mutation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mutation.js */ "./node_modules/@tanstack/query-core/build/modern/mutation.js");
723 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
724 -/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
725 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
726 -// src/mutationObserver.ts
727 -
728 -
729 -
730 -
731 -var MutationObserver = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_2__.Subscribable {
732 - #client;
733 - #currentResult = void 0;
734 - #currentMutation;
735 - #mutateOptions;
736 - constructor(client, options) {
737 - super();
738 - this.#client = client;
739 - this.setOptions(options);
740 - this.bindMethods();
741 - this.#updateResult();
742 - }
743 - bindMethods() {
744 - this.mutate = this.mutate.bind(this);
745 - this.reset = this.reset.bind(this);
746 - }
747 - setOptions(options) {
748 - const prevOptions = this.options;
749 - this.options = this.#client.defaultMutationOptions(options);
750 - if (!(0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.shallowEqualObjects)(this.options, prevOptions)) {
751 - this.#client.getMutationCache().notify({
752 - type: "observerOptionsUpdated",
753 - mutation: this.#currentMutation,
754 - observer: this
755 - });
756 - }
757 - if (prevOptions?.mutationKey && this.options.mutationKey && (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.hashKey)(prevOptions.mutationKey) !== (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.hashKey)(this.options.mutationKey)) {
758 - this.reset();
759 - } else if (this.#currentMutation?.state.status === "pending") {
760 - this.#currentMutation.setOptions(this.options);
761 - }
762 - }
763 - onUnsubscribe() {
764 - if (!this.hasListeners()) {
765 - this.#currentMutation?.removeObserver(this);
766 - }
767 - }
768 - onMutationUpdate(action) {
769 - this.#updateResult();
770 - this.#notify(action);
771 - }
772 - getCurrentResult() {
773 - return this.#currentResult;
774 - }
775 - reset() {
776 - this.#currentMutation?.removeObserver(this);
777 - this.#currentMutation = void 0;
778 - this.#updateResult();
779 - this.#notify();
780 - }
781 - mutate(variables, options) {
782 - this.#mutateOptions = options;
783 - this.#currentMutation?.removeObserver(this);
784 - this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
785 - this.#currentMutation.addObserver(this);
786 - return this.#currentMutation.execute(variables);
787 - }
788 - #updateResult() {
789 - const state = this.#currentMutation?.state ?? (0,_mutation_js__WEBPACK_IMPORTED_MODULE_0__.getDefaultState)();
790 - this.#currentResult = {
791 - ...state,
792 - isPending: state.status === "pending",
793 - isSuccess: state.status === "success",
794 - isError: state.status === "error",
795 - isIdle: state.status === "idle",
796 - mutate: this.mutate,
797 - reset: this.reset
798 - };
799 - }
800 - #notify(action) {
801 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_1__.notifyManager.batch(() => {
802 - if (this.#mutateOptions && this.hasListeners()) {
803 - const variables = this.#currentResult.variables;
804 - const onMutateResult = this.#currentResult.context;
805 - const context = {
806 - client: this.#client,
807 - meta: this.options.meta,
808 - mutationKey: this.options.mutationKey
809 - };
810 - if (action?.type === "success") {
811 - this.#mutateOptions.onSuccess?.(
812 - action.data,
813 - variables,
814 - onMutateResult,
815 - context
816 - );
817 - this.#mutateOptions.onSettled?.(
818 - action.data,
819 - null,
820 - variables,
821 - onMutateResult,
822 - context
823 - );
824 - } else if (action?.type === "error") {
825 - this.#mutateOptions.onError?.(
826 - action.error,
827 - variables,
828 - onMutateResult,
829 - context
830 - );
831 - this.#mutateOptions.onSettled?.(
832 - void 0,
833 - action.error,
834 - variables,
835 - onMutateResult,
836 - context
837 - );
838 - }
839 - }
840 - this.listeners.forEach((listener) => {
841 - listener(this.#currentResult);
842 - });
843 - });
844 - }
845 -};
846 -
847 -//# sourceMappingURL=mutationObserver.js.map
848 -
849 -/***/ }),
850 -
851 -/***/ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js":
852 -/*!*************************************************************************!*\
853 - !*** ./node_modules/@tanstack/query-core/build/modern/notifyManager.js ***!
854 - \*************************************************************************/
855 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
856 -
857 -__webpack_require__.r(__webpack_exports__);
858 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
859 -/* harmony export */ createNotifyManager: function() { return /* binding */ createNotifyManager; },
860 -/* harmony export */ defaultScheduler: function() { return /* binding */ defaultScheduler; },
861 -/* harmony export */ notifyManager: function() { return /* binding */ notifyManager; }
862 -/* harmony export */ });
863 -/* harmony import */ var _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timeoutManager.js */ "./node_modules/@tanstack/query-core/build/modern/timeoutManager.js");
864 -// src/notifyManager.ts
865 -
866 -var defaultScheduler = _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__.systemSetTimeoutZero;
867 -function createNotifyManager() {
868 - let queue = [];
869 - let transactions = 0;
870 - let notifyFn = (callback) => {
871 - callback();
872 - };
873 - let batchNotifyFn = (callback) => {
874 - callback();
875 - };
876 - let scheduleFn = defaultScheduler;
877 - const schedule = (callback) => {
878 - if (transactions) {
879 - queue.push(callback);
880 - } else {
881 - scheduleFn(() => {
882 - notifyFn(callback);
883 - });
884 - }
885 - };
886 - const flush = () => {
887 - const originalQueue = queue;
888 - queue = [];
889 - if (originalQueue.length) {
890 - scheduleFn(() => {
891 - batchNotifyFn(() => {
892 - originalQueue.forEach((callback) => {
893 - notifyFn(callback);
894 - });
895 - });
896 - });
897 - }
898 - };
899 - return {
900 - batch: (callback) => {
901 - let result;
902 - transactions++;
903 - try {
904 - result = callback();
905 - } finally {
906 - transactions--;
907 - if (!transactions) {
908 - flush();
909 - }
910 - }
911 - return result;
912 - },
913 - /**
914 - * All calls to the wrapped function will be batched.
915 - */
916 - batchCalls: (callback) => {
917 - return (...args) => {
918 - schedule(() => {
919 - callback(...args);
920 - });
921 - };
922 - },
923 - schedule,
924 - /**
925 - * Use this method to set a custom notify function.
926 - * This can be used to for example wrap notifications with `React.act` while running tests.
927 - */
928 - setNotifyFunction: (fn) => {
929 - notifyFn = fn;
930 - },
931 - /**
932 - * Use this method to set a custom function to batch notifications together into a single tick.
933 - * By default React Query will use the batch function provided by ReactDOM or React Native.
934 - */
935 - setBatchNotifyFunction: (fn) => {
936 - batchNotifyFn = fn;
937 - },
938 - setScheduler: (fn) => {
939 - scheduleFn = fn;
940 - }
941 - };
942 -}
943 -var notifyManager = createNotifyManager();
944 -
945 -//# sourceMappingURL=notifyManager.js.map
946 -
947 -/***/ }),
948 -
949 -/***/ "./node_modules/@tanstack/query-core/build/modern/onlineManager.js":
950 -/*!*************************************************************************!*\
951 - !*** ./node_modules/@tanstack/query-core/build/modern/onlineManager.js ***!
952 - \*************************************************************************/
953 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
954 -
955 -__webpack_require__.r(__webpack_exports__);
956 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
957 -/* harmony export */ OnlineManager: function() { return /* binding */ OnlineManager; },
958 -/* harmony export */ onlineManager: function() { return /* binding */ onlineManager; }
959 -/* harmony export */ });
960 -/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
961 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
962 -// src/onlineManager.ts
963 -
964 -
965 -var OnlineManager = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
966 - #online = true;
967 - #cleanup;
968 - #setup;
969 - constructor() {
970 - super();
971 - this.#setup = (onOnline) => {
972 - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer && window.addEventListener) {
973 - const onlineListener = () => onOnline(true);
974 - const offlineListener = () => onOnline(false);
975 - window.addEventListener("online", onlineListener, false);
976 - window.addEventListener("offline", offlineListener, false);
977 - return () => {
978 - window.removeEventListener("online", onlineListener);
979 - window.removeEventListener("offline", offlineListener);
980 - };
981 - }
982 - return;
983 - };
984 - }
985 - onSubscribe() {
986 - if (!this.#cleanup) {
987 - this.setEventListener(this.#setup);
988 - }
989 - }
990 - onUnsubscribe() {
991 - if (!this.hasListeners()) {
992 - this.#cleanup?.();
993 - this.#cleanup = void 0;
994 - }
995 - }
996 - setEventListener(setup) {
997 - this.#setup = setup;
998 - this.#cleanup?.();
999 - this.#cleanup = setup(this.setOnline.bind(this));
1000 - }
1001 - setOnline(online) {
1002 - const changed = this.#online !== online;
1003 - if (changed) {
1004 - this.#online = online;
1005 - this.listeners.forEach((listener) => {
1006 - listener(online);
1007 - });
1008 - }
1009 - }
1010 - isOnline() {
1011 - return this.#online;
1012 - }
1013 -};
1014 -var onlineManager = new OnlineManager();
1015 -
1016 -//# sourceMappingURL=onlineManager.js.map
1017 -
1018 -/***/ }),
1019 -
1020 -/***/ "./node_modules/@tanstack/query-core/build/modern/query.js":
1021 -/*!*****************************************************************!*\
1022 - !*** ./node_modules/@tanstack/query-core/build/modern/query.js ***!
1023 - \*****************************************************************/
1024 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1025 -
1026 -__webpack_require__.r(__webpack_exports__);
1027 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1028 -/* harmony export */ Query: function() { return /* binding */ Query; },
1029 -/* harmony export */ fetchState: function() { return /* binding */ fetchState; }
1030 -/* harmony export */ });
1031 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
1032 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
1033 -/* harmony import */ var _retryer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./retryer.js */ "./node_modules/@tanstack/query-core/build/modern/retryer.js");
1034 -/* harmony import */ var _removable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./removable.js */ "./node_modules/@tanstack/query-core/build/modern/removable.js");
1035 -// src/query.ts
1036 -
1037 -
1038 -
1039 -
1040 -var Query = class extends _removable_js__WEBPACK_IMPORTED_MODULE_3__.Removable {
1041 - #initialState;
1042 - #revertState;
1043 - #cache;
1044 - #client;
1045 - #retryer;
1046 - #defaultOptions;
1047 - #abortSignalConsumed;
1048 - constructor(config) {
1049 - super();
1050 - this.#abortSignalConsumed = false;
1051 - this.#defaultOptions = config.defaultOptions;
1052 - this.setOptions(config.options);
1053 - this.observers = [];
1054 - this.#client = config.client;
1055 - this.#cache = this.#client.getQueryCache();
1056 - this.queryKey = config.queryKey;
1057 - this.queryHash = config.queryHash;
1058 - this.#initialState = getDefaultState(this.options);
1059 - this.state = config.state ?? this.#initialState;
1060 - this.scheduleGc();
1061 - }
1062 - get meta() {
1063 - return this.options.meta;
1064 - }
1065 - get promise() {
1066 - return this.#retryer?.promise;
1067 - }
1068 - setOptions(options) {
1069 - this.options = { ...this.#defaultOptions, ...options };
1070 - this.updateGcTime(this.options.gcTime);
1071 - if (this.state && this.state.data === void 0) {
1072 - const defaultState = getDefaultState(this.options);
1073 - if (defaultState.data !== void 0) {
1074 - this.setState(
1075 - successState(defaultState.data, defaultState.dataUpdatedAt)
1076 - );
1077 - this.#initialState = defaultState;
1078 - }
1079 - }
1080 - }
1081 - optionalRemove() {
1082 - if (!this.observers.length && this.state.fetchStatus === "idle") {
1083 - this.#cache.remove(this);
1084 - }
1085 - }
1086 - setData(newData, options) {
1087 - const data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.replaceData)(this.state.data, newData, this.options);
1088 - this.#dispatch({
1089 - data,
1090 - type: "success",
1091 - dataUpdatedAt: options?.updatedAt,
1092 - manual: options?.manual
1093 - });
1094 - return data;
1095 - }
1096 - setState(state, setStateOptions) {
1097 - this.#dispatch({ type: "setState", state, setStateOptions });
1098 - }
1099 - cancel(options) {
1100 - const promise = this.#retryer?.promise;
1101 - this.#retryer?.cancel(options);
1102 - return promise ? promise.then(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop) : Promise.resolve();
1103 - }
1104 - destroy() {
1105 - super.destroy();
1106 - this.cancel({ silent: true });
1107 - }
1108 - reset() {
1109 - this.destroy();
1110 - this.setState(this.#initialState);
1111 - }
1112 - isActive() {
1113 - return this.observers.some(
1114 - (observer) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.resolveEnabled)(observer.options.enabled, this) !== false
1115 - );
1116 - }
1117 - isDisabled() {
1118 - if (this.getObserversCount() > 0) {
1119 - return !this.isActive();
1120 - }
1121 - return this.options.queryFn === _utils_js__WEBPACK_IMPORTED_MODULE_0__.skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
1122 - }
1123 - isStatic() {
1124 - if (this.getObserversCount() > 0) {
1125 - return this.observers.some(
1126 - (observer) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.resolveStaleTime)(observer.options.staleTime, this) === "static"
1127 - );
1128 - }
1129 - return false;
1130 - }
1131 - isStale() {
1132 - if (this.getObserversCount() > 0) {
1133 - return this.observers.some(
1134 - (observer) => observer.getCurrentResult().isStale
1135 - );
1136 - }
1137 - return this.state.data === void 0 || this.state.isInvalidated;
1138 - }
1139 - isStaleByTime(staleTime = 0) {
1140 - if (this.state.data === void 0) {
1141 - return true;
1142 - }
1143 - if (staleTime === "static") {
1144 - return false;
1145 - }
1146 - if (this.state.isInvalidated) {
1147 - return true;
1148 - }
1149 - return !(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
1150 - }
1151 - onFocus() {
1152 - const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
1153 - observer?.refetch({ cancelRefetch: false });
1154 - this.#retryer?.continue();
1155 - }
1156 - onOnline() {
1157 - const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
1158 - observer?.refetch({ cancelRefetch: false });
1159 - this.#retryer?.continue();
1160 - }
1161 - addObserver(observer) {
1162 - if (!this.observers.includes(observer)) {
1163 - this.observers.push(observer);
1164 - this.clearGcTimeout();
1165 - this.#cache.notify({ type: "observerAdded", query: this, observer });
1166 - }
1167 - }
1168 - removeObserver(observer) {
1169 - if (this.observers.includes(observer)) {
1170 - this.observers = this.observers.filter((x) => x !== observer);
1171 - if (!this.observers.length) {
1172 - if (this.#retryer) {
1173 - if (this.#abortSignalConsumed) {
1174 - this.#retryer.cancel({ revert: true });
1175 - } else {
1176 - this.#retryer.cancelRetry();
1177 - }
1178 - }
1179 - this.scheduleGc();
1180 - }
1181 - this.#cache.notify({ type: "observerRemoved", query: this, observer });
1182 - }
1183 - }
1184 - getObserversCount() {
1185 - return this.observers.length;
1186 - }
1187 - invalidate() {
1188 - if (!this.state.isInvalidated) {
1189 - this.#dispatch({ type: "invalidate" });
1190 - }
1191 - }
1192 - async fetch(options, fetchOptions) {
1193 - if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
1194 - // re-start the fetch; there is a chance that the query is still in a
1195 - // pending state when that happens
1196 - this.#retryer?.status() !== "rejected") {
1197 - if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {
1198 - this.cancel({ silent: true });
1199 - } else if (this.#retryer) {
1200 - this.#retryer.continueRetry();
1201 - return this.#retryer.promise;
1202 - }
1203 - }
1204 - if (options) {
1205 - this.setOptions(options);
1206 - }
1207 - if (!this.options.queryFn) {
1208 - const observer = this.observers.find((x) => x.options.queryFn);
1209 - if (observer) {
1210 - this.setOptions(observer.options);
1211 - }
1212 - }
1213 - if (true) {
1214 - if (!Array.isArray(this.options.queryKey)) {
1215 - console.error(
1216 - `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`
1217 - );
1218 - }
1219 - }
1220 - const abortController = new AbortController();
1221 - const addSignalProperty = (object) => {
1222 - Object.defineProperty(object, "signal", {
1223 - enumerable: true,
1224 - get: () => {
1225 - this.#abortSignalConsumed = true;
1226 - return abortController.signal;
1227 - }
1228 - });
1229 - };
1230 - const fetchFn = () => {
1231 - const queryFn = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.ensureQueryFn)(this.options, fetchOptions);
1232 - const createQueryFnContext = () => {
1233 - const queryFnContext2 = {
1234 - client: this.#client,
1235 - queryKey: this.queryKey,
1236 - meta: this.meta
1237 - };
1238 - addSignalProperty(queryFnContext2);
1239 - return queryFnContext2;
1240 - };
1241 - const queryFnContext = createQueryFnContext();
1242 - this.#abortSignalConsumed = false;
1243 - if (this.options.persister) {
1244 - return this.options.persister(
1245 - queryFn,
1246 - queryFnContext,
1247 - this
1248 - );
1249 - }
1250 - return queryFn(queryFnContext);
1251 - };
1252 - const createFetchContext = () => {
1253 - const context2 = {
1254 - fetchOptions,
1255 - options: this.options,
1256 - queryKey: this.queryKey,
1257 - client: this.#client,
1258 - state: this.state,
1259 - fetchFn
1260 - };
1261 - addSignalProperty(context2);
1262 - return context2;
1263 - };
1264 - const context = createFetchContext();
1265 - this.options.behavior?.onFetch(context, this);
1266 - this.#revertState = this.state;
1267 - if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
1268 - this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
1269 - }
1270 - this.#retryer = (0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.createRetryer)({
1271 - initialPromise: fetchOptions?.initialPromise,
1272 - fn: context.fetchFn,
1273 - onCancel: (error) => {
1274 - if (error instanceof _retryer_js__WEBPACK_IMPORTED_MODULE_2__.CancelledError && error.revert) {
1275 - this.setState({
1276 - ...this.#revertState,
1277 - fetchStatus: "idle"
1278 - });
1279 - }
1280 - abortController.abort();
1281 - },
1282 - onFail: (failureCount, error) => {
1283 - this.#dispatch({ type: "failed", failureCount, error });
1284 - },
1285 - onPause: () => {
1286 - this.#dispatch({ type: "pause" });
1287 - },
1288 - onContinue: () => {
1289 - this.#dispatch({ type: "continue" });
1290 - },
1291 - retry: context.options.retry,
1292 - retryDelay: context.options.retryDelay,
1293 - networkMode: context.options.networkMode,
1294 - canRun: () => true
1295 - });
1296 - try {
1297 - const data = await this.#retryer.start();
1298 - if (data === void 0) {
1299 - if (true) {
1300 - console.error(
1301 - `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
1302 - );
1303 - }
1304 - throw new Error(`${this.queryHash} data is undefined`);
1305 - }
1306 - this.setData(data);
1307 - this.#cache.config.onSuccess?.(data, this);
1308 - this.#cache.config.onSettled?.(
1309 - data,
1310 - this.state.error,
1311 - this
1312 - );
1313 - return data;
1314 - } catch (error) {
1315 - if (error instanceof _retryer_js__WEBPACK_IMPORTED_MODULE_2__.CancelledError) {
1316 - if (error.silent) {
1317 - return this.#retryer.promise;
1318 - } else if (error.revert) {
1319 - if (this.state.data === void 0) {
1320 - throw error;
1321 - }
1322 - return this.state.data;
1323 - }
1324 - }
1325 - this.#dispatch({
1326 - type: "error",
1327 - error
1328 - });
1329 - this.#cache.config.onError?.(
1330 - error,
1331 - this
1332 - );
1333 - this.#cache.config.onSettled?.(
1334 - this.state.data,
1335 - error,
1336 - this
1337 - );
1338 - throw error;
1339 - } finally {
1340 - this.scheduleGc();
1341 - }
1342 - }
1343 - #dispatch(action) {
1344 - const reducer = (state) => {
1345 - switch (action.type) {
1346 - case "failed":
1347 - return {
1348 - ...state,
1349 - fetchFailureCount: action.failureCount,
1350 - fetchFailureReason: action.error
1351 - };
1352 - case "pause":
1353 - return {
1354 - ...state,
1355 - fetchStatus: "paused"
1356 - };
1357 - case "continue":
1358 - return {
1359 - ...state,
1360 - fetchStatus: "fetching"
1361 - };
1362 - case "fetch":
1363 - return {
1364 - ...state,
1365 - ...fetchState(state.data, this.options),
1366 - fetchMeta: action.meta ?? null
1367 - };
1368 - case "success":
1369 - const newState = {
1370 - ...state,
1371 - ...successState(action.data, action.dataUpdatedAt),
1372 - dataUpdateCount: state.dataUpdateCount + 1,
1373 - ...!action.manual && {
1374 - fetchStatus: "idle",
1375 - fetchFailureCount: 0,
1376 - fetchFailureReason: null
1377 - }
1378 - };
1379 - this.#revertState = action.manual ? newState : void 0;
1380 - return newState;
1381 - case "error":
1382 - const error = action.error;
1383 - return {
1384 - ...state,
1385 - error,
1386 - errorUpdateCount: state.errorUpdateCount + 1,
1387 - errorUpdatedAt: Date.now(),
1388 - fetchFailureCount: state.fetchFailureCount + 1,
1389 - fetchFailureReason: error,
1390 - fetchStatus: "idle",
1391 - status: "error"
1392 - };
1393 - case "invalidate":
1394 - return {
1395 - ...state,
1396 - isInvalidated: true
1397 - };
1398 - case "setState":
1399 - return {
1400 - ...state,
1401 - ...action.state
1402 - };
1403 - }
1404 - };
1405 - this.state = reducer(this.state);
1406 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_1__.notifyManager.batch(() => {
1407 - this.observers.forEach((observer) => {
1408 - observer.onQueryUpdate();
1409 - });
1410 - this.#cache.notify({ query: this, type: "updated", action });
1411 - });
1412 - }
1413 -};
1414 -function fetchState(data, options) {
1415 - return {
1416 - fetchFailureCount: 0,
1417 - fetchFailureReason: null,
1418 - fetchStatus: (0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.canFetch)(options.networkMode) ? "fetching" : "paused",
1419 - ...data === void 0 && {
1420 - error: null,
1421 - status: "pending"
1422 - }
1423 - };
1424 -}
1425 -function successState(data, dataUpdatedAt) {
1426 - return {
1427 - data,
1428 - dataUpdatedAt: dataUpdatedAt ?? Date.now(),
1429 - error: null,
1430 - isInvalidated: false,
1431 - status: "success"
1432 - };
1433 -}
1434 -function getDefaultState(options) {
1435 - const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
1436 - const hasData = data !== void 0;
1437 - const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
1438 - return {
1439 - data,
1440 - dataUpdateCount: 0,
1441 - dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
1442 - error: null,
1443 - errorUpdateCount: 0,
1444 - errorUpdatedAt: 0,
1445 - fetchFailureCount: 0,
1446 - fetchFailureReason: null,
1447 - fetchMeta: null,
1448 - isInvalidated: false,
1449 - status: hasData ? "success" : "pending",
1450 - fetchStatus: "idle"
1451 - };
1452 -}
1453 -
1454 -//# sourceMappingURL=query.js.map
1455 -
1456 -/***/ }),
1457 -
1458 -/***/ "./node_modules/@tanstack/query-core/build/modern/queryCache.js":
1459 -/*!**********************************************************************!*\
1460 - !*** ./node_modules/@tanstack/query-core/build/modern/queryCache.js ***!
1461 - \**********************************************************************/
1462 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1463 -
1464 -__webpack_require__.r(__webpack_exports__);
1465 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1466 -/* harmony export */ QueryCache: function() { return /* binding */ QueryCache; }
1467 -/* harmony export */ });
1468 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
1469 -/* harmony import */ var _query_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query.js */ "./node_modules/@tanstack/query-core/build/modern/query.js");
1470 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
1471 -/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
1472 -// src/queryCache.ts
1473 -
1474 -
1475 -
1476 -
1477 -var QueryCache = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_3__.Subscribable {
1478 - constructor(config = {}) {
1479 - super();
1480 - this.config = config;
1481 - this.#queries = /* @__PURE__ */ new Map();
1482 - }
1483 - #queries;
1484 - build(client, options, state) {
1485 - const queryKey = options.queryKey;
1486 - const queryHash = options.queryHash ?? (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hashQueryKeyByOptions)(queryKey, options);
1487 - let query = this.get(queryHash);
1488 - if (!query) {
1489 - query = new _query_js__WEBPACK_IMPORTED_MODULE_1__.Query({
1490 - client,
1491 - queryKey,
1492 - queryHash,
1493 - options: client.defaultQueryOptions(options),
1494 - state,
1495 - defaultOptions: client.getQueryDefaults(queryKey)
1496 - });
1497 - this.add(query);
1498 - }
1499 - return query;
1500 - }
1501 - add(query) {
1502 - if (!this.#queries.has(query.queryHash)) {
1503 - this.#queries.set(query.queryHash, query);
1504 - this.notify({
1505 - type: "added",
1506 - query
1507 - });
1508 - }
1509 - }
1510 - remove(query) {
1511 - const queryInMap = this.#queries.get(query.queryHash);
1512 - if (queryInMap) {
1513 - query.destroy();
1514 - if (queryInMap === query) {
1515 - this.#queries.delete(query.queryHash);
1516 - }
1517 - this.notify({ type: "removed", query });
1518 - }
1519 - }
1520 - clear() {
1521 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
1522 - this.getAll().forEach((query) => {
1523 - this.remove(query);
1524 - });
1525 - });
1526 - }
1527 - get(queryHash) {
1528 - return this.#queries.get(queryHash);
1529 - }
1530 - getAll() {
1531 - return [...this.#queries.values()];
1532 - }
1533 - find(filters) {
1534 - const defaultedFilters = { exact: true, ...filters };
1535 - return this.getAll().find(
1536 - (query) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.matchQuery)(defaultedFilters, query)
1537 - );
1538 - }
1539 - findAll(filters = {}) {
1540 - const queries = this.getAll();
1541 - return Object.keys(filters).length > 0 ? queries.filter((query) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.matchQuery)(filters, query)) : queries;
1542 - }
1543 - notify(event) {
1544 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
1545 - this.listeners.forEach((listener) => {
1546 - listener(event);
1547 - });
1548 - });
1549 - }
1550 - onFocus() {
1551 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
1552 - this.getAll().forEach((query) => {
1553 - query.onFocus();
1554 - });
1555 - });
1556 - }
1557 - onOnline() {
1558 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
1559 - this.getAll().forEach((query) => {
1560 - query.onOnline();
1561 - });
1562 - });
1563 - }
1564 -};
1565 -
1566 -//# sourceMappingURL=queryCache.js.map
1567 -
1568 -/***/ }),
1569 -
1570 -/***/ "./node_modules/@tanstack/query-core/build/modern/queryClient.js":
1571 -/*!***********************************************************************!*\
1572 - !*** ./node_modules/@tanstack/query-core/build/modern/queryClient.js ***!
1573 - \***********************************************************************/
1574 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1575 -
1576 -__webpack_require__.r(__webpack_exports__);
1577 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1578 -/* harmony export */ QueryClient: function() { return /* binding */ QueryClient; }
1579 -/* harmony export */ });
1580 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
1581 -/* harmony import */ var _queryCache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./queryCache.js */ "./node_modules/@tanstack/query-core/build/modern/queryCache.js");
1582 -/* harmony import */ var _mutationCache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutationCache.js */ "./node_modules/@tanstack/query-core/build/modern/mutationCache.js");
1583 -/* harmony import */ var _focusManager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./focusManager.js */ "./node_modules/@tanstack/query-core/build/modern/focusManager.js");
1584 -/* harmony import */ var _onlineManager_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./onlineManager.js */ "./node_modules/@tanstack/query-core/build/modern/onlineManager.js");
1585 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
1586 -/* harmony import */ var _infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./infiniteQueryBehavior.js */ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js");
1587 -// src/queryClient.ts
1588 -
1589 -
1590 -
1591 -
1592 -
1593 -
1594 -
1595 -var QueryClient = class {
1596 - #queryCache;
1597 - #mutationCache;
1598 - #defaultOptions;
1599 - #queryDefaults;
1600 - #mutationDefaults;
1601 - #mountCount;
1602 - #unsubscribeFocus;
1603 - #unsubscribeOnline;
1604 - constructor(config = {}) {
1605 - this.#queryCache = config.queryCache || new _queryCache_js__WEBPACK_IMPORTED_MODULE_1__.QueryCache();
1606 - this.#mutationCache = config.mutationCache || new _mutationCache_js__WEBPACK_IMPORTED_MODULE_2__.MutationCache();
1607 - this.#defaultOptions = config.defaultOptions || {};
1608 - this.#queryDefaults = /* @__PURE__ */ new Map();
1609 - this.#mutationDefaults = /* @__PURE__ */ new Map();
1610 - this.#mountCount = 0;
1611 - }
1612 - mount() {
1613 - this.#mountCount++;
1614 - if (this.#mountCount !== 1) return;
1615 - this.#unsubscribeFocus = _focusManager_js__WEBPACK_IMPORTED_MODULE_3__.focusManager.subscribe(async (focused) => {
1616 - if (focused) {
1617 - await this.resumePausedMutations();
1618 - this.#queryCache.onFocus();
1619 - }
1620 - });
1621 - this.#unsubscribeOnline = _onlineManager_js__WEBPACK_IMPORTED_MODULE_4__.onlineManager.subscribe(async (online) => {
1622 - if (online) {
1623 - await this.resumePausedMutations();
1624 - this.#queryCache.onOnline();
1625 - }
1626 - });
1627 - }
1628 - unmount() {
1629 - this.#mountCount--;
1630 - if (this.#mountCount !== 0) return;
1631 - this.#unsubscribeFocus?.();
1632 - this.#unsubscribeFocus = void 0;
1633 - this.#unsubscribeOnline?.();
1634 - this.#unsubscribeOnline = void 0;
1635 - }
1636 - isFetching(filters) {
1637 - return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
1638 - }
1639 - isMutating(filters) {
1640 - return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
1641 - }
1642 - /**
1643 - * Imperative (non-reactive) way to retrieve data for a QueryKey.
1644 - * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
1645 - *
1646 - * Hint: Do not use this function inside a component, because it won't receive updates.
1647 - * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
1648 - */
1649 - getQueryData(queryKey) {
1650 - const options = this.defaultQueryOptions({ queryKey });
1651 - return this.#queryCache.get(options.queryHash)?.state.data;
1652 - }
1653 - ensureQueryData(options) {
1654 - const defaultedOptions = this.defaultQueryOptions(options);
1655 - const query = this.#queryCache.build(this, defaultedOptions);
1656 - const cachedData = query.state.data;
1657 - if (cachedData === void 0) {
1658 - return this.fetchQuery(options);
1659 - }
1660 - if (options.revalidateIfStale && query.isStaleByTime((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.resolveStaleTime)(defaultedOptions.staleTime, query))) {
1661 - void this.prefetchQuery(defaultedOptions);
1662 - }
1663 - return Promise.resolve(cachedData);
1664 - }
1665 - getQueriesData(filters) {
1666 - return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
1667 - const data = state.data;
1668 - return [queryKey, data];
1669 - });
1670 - }
1671 - setQueryData(queryKey, updater, options) {
1672 - const defaultedOptions = this.defaultQueryOptions({ queryKey });
1673 - const query = this.#queryCache.get(
1674 - defaultedOptions.queryHash
1675 - );
1676 - const prevData = query?.state.data;
1677 - const data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.functionalUpdate)(updater, prevData);
1678 - if (data === void 0) {
1679 - return void 0;
1680 - }
1681 - return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
1682 - }
1683 - setQueriesData(filters, updater, options) {
1684 - return _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(
1685 - () => this.#queryCache.findAll(filters).map(({ queryKey }) => [
1686 - queryKey,
1687 - this.setQueryData(queryKey, updater, options)
1688 - ])
1689 - );
1690 - }
1691 - getQueryState(queryKey) {
1692 - const options = this.defaultQueryOptions({ queryKey });
1693 - return this.#queryCache.get(
1694 - options.queryHash
1695 - )?.state;
1696 - }
1697 - removeQueries(filters) {
1698 - const queryCache = this.#queryCache;
1699 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(() => {
1700 - queryCache.findAll(filters).forEach((query) => {
1701 - queryCache.remove(query);
1702 - });
1703 - });
1704 - }
1705 - resetQueries(filters, options) {
1706 - const queryCache = this.#queryCache;
1707 - return _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(() => {
1708 - queryCache.findAll(filters).forEach((query) => {
1709 - query.reset();
1710 - });
1711 - return this.refetchQueries(
1712 - {
1713 - type: "active",
1714 - ...filters
1715 - },
1716 - options
1717 - );
1718 - });
1719 - }
1720 - cancelQueries(filters, cancelOptions = {}) {
1721 - const defaultedCancelOptions = { revert: true, ...cancelOptions };
1722 - const promises = _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(
1723 - () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
1724 - );
1725 - return Promise.all(promises).then(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop);
1726 - }
1727 - invalidateQueries(filters, options = {}) {
1728 - return _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(() => {
1729 - this.#queryCache.findAll(filters).forEach((query) => {
1730 - query.invalidate();
1731 - });
1732 - if (filters?.refetchType === "none") {
1733 - return Promise.resolve();
1734 - }
1735 - return this.refetchQueries(
1736 - {
1737 - ...filters,
1738 - type: filters?.refetchType ?? filters?.type ?? "active"
1739 - },
1740 - options
1741 - );
1742 - });
1743 - }
1744 - refetchQueries(filters, options = {}) {
1745 - const fetchOptions = {
1746 - ...options,
1747 - cancelRefetch: options.cancelRefetch ?? true
1748 - };
1749 - const promises = _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(
1750 - () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
1751 - let promise = query.fetch(void 0, fetchOptions);
1752 - if (!fetchOptions.throwOnError) {
1753 - promise = promise.catch(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop);
1754 - }
1755 - return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
1756 - })
1757 - );
1758 - return Promise.all(promises).then(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop);
1759 - }
1760 - fetchQuery(options) {
1761 - const defaultedOptions = this.defaultQueryOptions(options);
1762 - if (defaultedOptions.retry === void 0) {
1763 - defaultedOptions.retry = false;
1764 - }
1765 - const query = this.#queryCache.build(this, defaultedOptions);
1766 - return query.isStaleByTime(
1767 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.resolveStaleTime)(defaultedOptions.staleTime, query)
1768 - ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
1769 - }
1770 - prefetchQuery(options) {
1771 - return this.fetchQuery(options).then(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop);
1772 - }
1773 - fetchInfiniteQuery(options) {
1774 - options.behavior = (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_6__.infiniteQueryBehavior)(options.pages);
1775 - return this.fetchQuery(options);
1776 - }
1777 - prefetchInfiniteQuery(options) {
1778 - return this.fetchInfiniteQuery(options).then(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop);
1779 - }
1780 - ensureInfiniteQueryData(options) {
1781 - options.behavior = (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_6__.infiniteQueryBehavior)(options.pages);
1782 - return this.ensureQueryData(options);
1783 - }
1784 - resumePausedMutations() {
1785 - if (_onlineManager_js__WEBPACK_IMPORTED_MODULE_4__.onlineManager.isOnline()) {
1786 - return this.#mutationCache.resumePausedMutations();
1787 - }
1788 - return Promise.resolve();
1789 - }
1790 - getQueryCache() {
1791 - return this.#queryCache;
1792 - }
1793 - getMutationCache() {
1794 - return this.#mutationCache;
1795 - }
1796 - getDefaultOptions() {
1797 - return this.#defaultOptions;
1798 - }
1799 - setDefaultOptions(options) {
1800 - this.#defaultOptions = options;
1801 - }
1802 - setQueryDefaults(queryKey, options) {
1803 - this.#queryDefaults.set((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hashKey)(queryKey), {
1804 - queryKey,
1805 - defaultOptions: options
1806 - });
1807 - }
1808 - getQueryDefaults(queryKey) {
1809 - const defaults = [...this.#queryDefaults.values()];
1810 - const result = {};
1811 - defaults.forEach((queryDefault) => {
1812 - if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.partialMatchKey)(queryKey, queryDefault.queryKey)) {
1813 - Object.assign(result, queryDefault.defaultOptions);
1814 - }
1815 - });
1816 - return result;
1817 - }
1818 - setMutationDefaults(mutationKey, options) {
1819 - this.#mutationDefaults.set((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hashKey)(mutationKey), {
1820 - mutationKey,
1821 - defaultOptions: options
1822 - });
1823 - }
1824 - getMutationDefaults(mutationKey) {
1825 - const defaults = [...this.#mutationDefaults.values()];
1826 - const result = {};
1827 - defaults.forEach((queryDefault) => {
1828 - if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
1829 - Object.assign(result, queryDefault.defaultOptions);
1830 - }
1831 - });
1832 - return result;
1833 - }
1834 - defaultQueryOptions(options) {
1835 - if (options._defaulted) {
1836 - return options;
1837 - }
1838 - const defaultedOptions = {
1839 - ...this.#defaultOptions.queries,
1840 - ...this.getQueryDefaults(options.queryKey),
1841 - ...options,
1842 - _defaulted: true
1843 - };
1844 - if (!defaultedOptions.queryHash) {
1845 - defaultedOptions.queryHash = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hashQueryKeyByOptions)(
1846 - defaultedOptions.queryKey,
1847 - defaultedOptions
1848 - );
1849 - }
1850 - if (defaultedOptions.refetchOnReconnect === void 0) {
1851 - defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
1852 - }
1853 - if (defaultedOptions.throwOnError === void 0) {
1854 - defaultedOptions.throwOnError = !!defaultedOptions.suspense;
1855 - }
1856 - if (!defaultedOptions.networkMode && defaultedOptions.persister) {
1857 - defaultedOptions.networkMode = "offlineFirst";
1858 - }
1859 - if (defaultedOptions.queryFn === _utils_js__WEBPACK_IMPORTED_MODULE_0__.skipToken) {
1860 - defaultedOptions.enabled = false;
1861 - }
1862 - return defaultedOptions;
1863 - }
1864 - defaultMutationOptions(options) {
1865 - if (options?._defaulted) {
1866 - return options;
1867 - }
1868 - return {
1869 - ...this.#defaultOptions.mutations,
1870 - ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
1871 - ...options,
1872 - _defaulted: true
1873 - };
1874 - }
1875 - clear() {
1876 - this.#queryCache.clear();
1877 - this.#mutationCache.clear();
1878 - }
1879 -};
1880 -
1881 -//# sourceMappingURL=queryClient.js.map
1882 -
1883 -/***/ }),
1884 -
1885 -/***/ "./node_modules/@tanstack/query-core/build/modern/queryObserver.js":
1886 -/*!*************************************************************************!*\
1887 - !*** ./node_modules/@tanstack/query-core/build/modern/queryObserver.js ***!
1888 - \*************************************************************************/
1889 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1890 -
1891 -__webpack_require__.r(__webpack_exports__);
1892 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1893 -/* harmony export */ QueryObserver: function() { return /* binding */ QueryObserver; }
1894 -/* harmony export */ });
1895 -/* harmony import */ var _focusManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./focusManager.js */ "./node_modules/@tanstack/query-core/build/modern/focusManager.js");
1896 -/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
1897 -/* harmony import */ var _query_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query.js */ "./node_modules/@tanstack/query-core/build/modern/query.js");
1898 -/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
1899 -/* harmony import */ var _thenable_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./thenable.js */ "./node_modules/@tanstack/query-core/build/modern/thenable.js");
1900 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
1901 -/* harmony import */ var _timeoutManager_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./timeoutManager.js */ "./node_modules/@tanstack/query-core/build/modern/timeoutManager.js");
1902 -// src/queryObserver.ts
1903 -
1904 -
1905 -
1906 -
1907 -
1908 -
1909 -
1910 -var QueryObserver = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_3__.Subscribable {
1911 - constructor(client, options) {
1912 - super();
1913 - this.options = options;
1914 - this.#client = client;
1915 - this.#selectError = null;
1916 - this.#currentThenable = (0,_thenable_js__WEBPACK_IMPORTED_MODULE_4__.pendingThenable)();
1917 - this.bindMethods();
1918 - this.setOptions(options);
1919 - }
1920 - #client;
1921 - #currentQuery = void 0;
1922 - #currentQueryInitialState = void 0;
1923 - #currentResult = void 0;
1924 - #currentResultState;
1925 - #currentResultOptions;
1926 - #currentThenable;
1927 - #selectError;
1928 - #selectFn;
1929 - #selectResult;
1930 - // This property keeps track of the last query with defined data.
1931 - // It will be used to pass the previous data and query to the placeholder function between renders.
1932 - #lastQueryWithDefinedData;
1933 - #staleTimeoutId;
1934 - #refetchIntervalId;
1935 - #currentRefetchInterval;
1936 - #trackedProps = /* @__PURE__ */ new Set();
1937 - bindMethods() {
1938 - this.refetch = this.refetch.bind(this);
1939 - }
1940 - onSubscribe() {
1941 - if (this.listeners.size === 1) {
1942 - this.#currentQuery.addObserver(this);
1943 - if (shouldFetchOnMount(this.#currentQuery, this.options)) {
1944 - this.#executeFetch();
1945 - } else {
1946 - this.updateResult();
1947 - }
1948 - this.#updateTimers();
1949 - }
1950 - }
1951 - onUnsubscribe() {
1952 - if (!this.hasListeners()) {
1953 - this.destroy();
1954 - }
1955 - }
1956 - shouldFetchOnReconnect() {
1957 - return shouldFetchOn(
1958 - this.#currentQuery,
1959 - this.options,
1960 - this.options.refetchOnReconnect
1961 - );
1962 - }
1963 - shouldFetchOnWindowFocus() {
1964 - return shouldFetchOn(
1965 - this.#currentQuery,
1966 - this.options,
1967 - this.options.refetchOnWindowFocus
1968 - );
1969 - }
1970 - destroy() {
1971 - this.listeners = /* @__PURE__ */ new Set();
1972 - this.#clearStaleTimeout();
1973 - this.#clearRefetchInterval();
1974 - this.#currentQuery.removeObserver(this);
1975 - }
1976 - setOptions(options) {
1977 - const prevOptions = this.options;
1978 - const prevQuery = this.#currentQuery;
1979 - this.options = this.#client.defaultQueryOptions(options);
1980 - if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(this.options.enabled, this.#currentQuery) !== "boolean") {
1981 - throw new Error(
1982 - "Expected enabled to be a boolean or a callback that returns a boolean"
1983 - );
1984 - }
1985 - this.#updateQuery();
1986 - this.#currentQuery.setOptions(this.options);
1987 - if (prevOptions._defaulted && !(0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.shallowEqualObjects)(this.options, prevOptions)) {
1988 - this.#client.getQueryCache().notify({
1989 - type: "observerOptionsUpdated",
1990 - query: this.#currentQuery,
1991 - observer: this
1992 - });
1993 - }
1994 - const mounted = this.hasListeners();
1995 - if (mounted && shouldFetchOptionally(
1996 - this.#currentQuery,
1997 - prevQuery,
1998 - this.options,
1999 - prevOptions
2000 - )) {
2001 - this.#executeFetch();
2002 - }
2003 - this.updateResult();
2004 - if (mounted && (this.#currentQuery !== prevQuery || (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveStaleTime)(this.options.staleTime, this.#currentQuery) !== (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveStaleTime)(prevOptions.staleTime, this.#currentQuery))) {
2005 - this.#updateStaleTimeout();
2006 - }
2007 - const nextRefetchInterval = this.#computeRefetchInterval();
2008 - if (mounted && (this.#currentQuery !== prevQuery || (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
2009 - this.#updateRefetchInterval(nextRefetchInterval);
2010 - }
2011 - }
2012 - getOptimisticResult(options) {
2013 - const query = this.#client.getQueryCache().build(this.#client, options);
2014 - const result = this.createResult(query, options);
2015 - if (shouldAssignObserverCurrentProperties(this, result)) {
2016 - this.#currentResult = result;
2017 - this.#currentResultOptions = this.options;
2018 - this.#currentResultState = this.#currentQuery.state;
2019 - }
2020 - return result;
2021 - }
2022 - getCurrentResult() {
2023 - return this.#currentResult;
2024 - }
2025 - trackResult(result, onPropTracked) {
2026 - return new Proxy(result, {
2027 - get: (target, key) => {
2028 - this.trackProp(key);
2029 - onPropTracked?.(key);
2030 - if (key === "promise") {
2031 - this.trackProp("data");
2032 - if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === "pending") {
2033 - this.#currentThenable.reject(
2034 - new Error(
2035 - "experimental_prefetchInRender feature flag is not enabled"
2036 - )
2037 - );
2038 - }
2039 - }
2040 - return Reflect.get(target, key);
2041 - }
2042 - });
2043 - }
2044 - trackProp(key) {
2045 - this.#trackedProps.add(key);
2046 - }
2047 - getCurrentQuery() {
2048 - return this.#currentQuery;
2049 - }
2050 - refetch({ ...options } = {}) {
2051 - return this.fetch({
2052 - ...options
2053 - });
2054 - }
2055 - fetchOptimistic(options) {
2056 - const defaultedOptions = this.#client.defaultQueryOptions(options);
2057 - const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
2058 - return query.fetch().then(() => this.createResult(query, defaultedOptions));
2059 - }
2060 - fetch(fetchOptions) {
2061 - return this.#executeFetch({
2062 - ...fetchOptions,
2063 - cancelRefetch: fetchOptions.cancelRefetch ?? true
2064 - }).then(() => {
2065 - this.updateResult();
2066 - return this.#currentResult;
2067 - });
2068 - }
2069 - #executeFetch(fetchOptions) {
2070 - this.#updateQuery();
2071 - let promise = this.#currentQuery.fetch(
2072 - this.options,
2073 - fetchOptions
2074 - );
2075 - if (!fetchOptions?.throwOnError) {
2076 - promise = promise.catch(_utils_js__WEBPACK_IMPORTED_MODULE_5__.noop);
2077 - }
2078 - return promise;
2079 - }
2080 - #updateStaleTimeout() {
2081 - this.#clearStaleTimeout();
2082 - const staleTime = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveStaleTime)(
2083 - this.options.staleTime,
2084 - this.#currentQuery
2085 - );
2086 - if (_utils_js__WEBPACK_IMPORTED_MODULE_5__.isServer || this.#currentResult.isStale || !(0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.isValidTimeout)(staleTime)) {
2087 - return;
2088 - }
2089 - const time = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime);
2090 - const timeout = time + 1;
2091 - this.#staleTimeoutId = _timeoutManager_js__WEBPACK_IMPORTED_MODULE_6__.timeoutManager.setTimeout(() => {
2092 - if (!this.#currentResult.isStale) {
2093 - this.updateResult();
2094 - }
2095 - }, timeout);
2096 - }
2097 - #computeRefetchInterval() {
2098 - return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
2099 - }
2100 - #updateRefetchInterval(nextInterval) {
2101 - this.#clearRefetchInterval();
2102 - this.#currentRefetchInterval = nextInterval;
2103 - if (_utils_js__WEBPACK_IMPORTED_MODULE_5__.isServer || (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
2104 - return;
2105 - }
2106 - this.#refetchIntervalId = _timeoutManager_js__WEBPACK_IMPORTED_MODULE_6__.timeoutManager.setInterval(() => {
2107 - if (this.options.refetchIntervalInBackground || _focusManager_js__WEBPACK_IMPORTED_MODULE_0__.focusManager.isFocused()) {
2108 - this.#executeFetch();
2109 - }
2110 - }, this.#currentRefetchInterval);
2111 - }
2112 - #updateTimers() {
2113 - this.#updateStaleTimeout();
2114 - this.#updateRefetchInterval(this.#computeRefetchInterval());
2115 - }
2116 - #clearStaleTimeout() {
2117 - if (this.#staleTimeoutId) {
2118 - _timeoutManager_js__WEBPACK_IMPORTED_MODULE_6__.timeoutManager.clearTimeout(this.#staleTimeoutId);
2119 - this.#staleTimeoutId = void 0;
2120 - }
2121 - }
2122 - #clearRefetchInterval() {
2123 - if (this.#refetchIntervalId) {
2124 - _timeoutManager_js__WEBPACK_IMPORTED_MODULE_6__.timeoutManager.clearInterval(this.#refetchIntervalId);
2125 - this.#refetchIntervalId = void 0;
2126 - }
2127 - }
2128 - createResult(query, options) {
2129 - const prevQuery = this.#currentQuery;
2130 - const prevOptions = this.options;
2131 - const prevResult = this.#currentResult;
2132 - const prevResultState = this.#currentResultState;
2133 - const prevResultOptions = this.#currentResultOptions;
2134 - const queryChange = query !== prevQuery;
2135 - const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
2136 - const { state } = query;
2137 - let newState = { ...state };
2138 - let isPlaceholderData = false;
2139 - let data;
2140 - if (options._optimisticResults) {
2141 - const mounted = this.hasListeners();
2142 - const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
2143 - const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
2144 - if (fetchOnMount || fetchOptionally) {
2145 - newState = {
2146 - ...newState,
2147 - ...(0,_query_js__WEBPACK_IMPORTED_MODULE_2__.fetchState)(state.data, query.options)
2148 - };
2149 - }
2150 - if (options._optimisticResults === "isRestoring") {
2151 - newState.fetchStatus = "idle";
2152 - }
2153 - }
2154 - let { error, errorUpdatedAt, status } = newState;
2155 - data = newState.data;
2156 - let skipSelect = false;
2157 - if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
2158 - let placeholderData;
2159 - if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
2160 - placeholderData = prevResult.data;
2161 - skipSelect = true;
2162 - } else {
2163 - placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
2164 - this.#lastQueryWithDefinedData?.state.data,
2165 - this.#lastQueryWithDefinedData
2166 - ) : options.placeholderData;
2167 - }
2168 - if (placeholderData !== void 0) {
2169 - status = "success";
2170 - data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.replaceData)(
2171 - prevResult?.data,
2172 - placeholderData,
2173 - options
2174 - );
2175 - isPlaceholderData = true;
2176 - }
2177 - }
2178 - if (options.select && data !== void 0 && !skipSelect) {
2179 - if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {
2180 - data = this.#selectResult;
2181 - } else {
2182 - try {
2183 - this.#selectFn = options.select;
2184 - data = options.select(data);
2185 - data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.replaceData)(prevResult?.data, data, options);
2186 - this.#selectResult = data;
2187 - this.#selectError = null;
2188 - } catch (selectError) {
2189 - this.#selectError = selectError;
2190 - }
2191 - }
2192 - }
2193 - if (this.#selectError) {
2194 - error = this.#selectError;
2195 - data = this.#selectResult;
2196 - errorUpdatedAt = Date.now();
2197 - status = "error";
2198 - }
2199 - const isFetching = newState.fetchStatus === "fetching";
2200 - const isPending = status === "pending";
2201 - const isError = status === "error";
2202 - const isLoading = isPending && isFetching;
2203 - const hasData = data !== void 0;
2204 - const result = {
2205 - status,
2206 - fetchStatus: newState.fetchStatus,
2207 - isPending,
2208 - isSuccess: status === "success",
2209 - isError,
2210 - isInitialLoading: isLoading,
2211 - isLoading,
2212 - data,
2213 - dataUpdatedAt: newState.dataUpdatedAt,
2214 - error,
2215 - errorUpdatedAt,
2216 - failureCount: newState.fetchFailureCount,
2217 - failureReason: newState.fetchFailureReason,
2218 - errorUpdateCount: newState.errorUpdateCount,
2219 - isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
2220 - isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
2221 - isFetching,
2222 - isRefetching: isFetching && !isPending,
2223 - isLoadingError: isError && !hasData,
2224 - isPaused: newState.fetchStatus === "paused",
2225 - isPlaceholderData,
2226 - isRefetchError: isError && hasData,
2227 - isStale: isStale(query, options),
2228 - refetch: this.refetch,
2229 - promise: this.#currentThenable,
2230 - isEnabled: (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(options.enabled, query) !== false
2231 - };
2232 - const nextResult = result;
2233 - if (this.options.experimental_prefetchInRender) {
2234 - const finalizeThenableIfPossible = (thenable) => {
2235 - if (nextResult.status === "error") {
2236 - thenable.reject(nextResult.error);
2237 - } else if (nextResult.data !== void 0) {
2238 - thenable.resolve(nextResult.data);
2239 - }
2240 - };
2241 - const recreateThenable = () => {
2242 - const pending = this.#currentThenable = nextResult.promise = (0,_thenable_js__WEBPACK_IMPORTED_MODULE_4__.pendingThenable)();
2243 - finalizeThenableIfPossible(pending);
2244 - };
2245 - const prevThenable = this.#currentThenable;
2246 - switch (prevThenable.status) {
2247 - case "pending":
2248 - if (query.queryHash === prevQuery.queryHash) {
2249 - finalizeThenableIfPossible(prevThenable);
2250 - }
2251 - break;
2252 - case "fulfilled":
2253 - if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
2254 - recreateThenable();
2255 - }
2256 - break;
2257 - case "rejected":
2258 - if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
2259 - recreateThenable();
2260 - }
2261 - break;
2262 - }
2263 - }
2264 - return nextResult;
2265 - }
2266 - updateResult() {
2267 - const prevResult = this.#currentResult;
2268 - const nextResult = this.createResult(this.#currentQuery, this.options);
2269 - this.#currentResultState = this.#currentQuery.state;
2270 - this.#currentResultOptions = this.options;
2271 - if (this.#currentResultState.data !== void 0) {
2272 - this.#lastQueryWithDefinedData = this.#currentQuery;
2273 - }
2274 - if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.shallowEqualObjects)(nextResult, prevResult)) {
2275 - return;
2276 - }
2277 - this.#currentResult = nextResult;
2278 - const shouldNotifyListeners = () => {
2279 - if (!prevResult) {
2280 - return true;
2281 - }
2282 - const { notifyOnChangeProps } = this.options;
2283 - const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
2284 - if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
2285 - return true;
2286 - }
2287 - const includedProps = new Set(
2288 - notifyOnChangePropsValue ?? this.#trackedProps
2289 - );
2290 - if (this.options.throwOnError) {
2291 - includedProps.add("error");
2292 - }
2293 - return Object.keys(this.#currentResult).some((key) => {
2294 - const typedKey = key;
2295 - const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
2296 - return changed && includedProps.has(typedKey);
2297 - });
2298 - };
2299 - this.#notify({ listeners: shouldNotifyListeners() });
2300 - }
2301 - #updateQuery() {
2302 - const query = this.#client.getQueryCache().build(this.#client, this.options);
2303 - if (query === this.#currentQuery) {
2304 - return;
2305 - }
2306 - const prevQuery = this.#currentQuery;
2307 - this.#currentQuery = query;
2308 - this.#currentQueryInitialState = query.state;
2309 - if (this.hasListeners()) {
2310 - prevQuery?.removeObserver(this);
2311 - query.addObserver(this);
2312 - }
2313 - }
2314 - onQueryUpdate() {
2315 - this.updateResult();
2316 - if (this.hasListeners()) {
2317 - this.#updateTimers();
2318 - }
2319 - }
2320 - #notify(notifyOptions) {
2321 - _notifyManager_js__WEBPACK_IMPORTED_MODULE_1__.notifyManager.batch(() => {
2322 - if (notifyOptions.listeners) {
2323 - this.listeners.forEach((listener) => {
2324 - listener(this.#currentResult);
2325 - });
2326 - }
2327 - this.#client.getQueryCache().notify({
2328 - query: this.#currentQuery,
2329 - type: "observerResultsUpdated"
2330 - });
2331 - });
2332 - }
2333 -};
2334 -function shouldLoadOnMount(query, options) {
2335 - return (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
2336 -}
2337 -function shouldFetchOnMount(query, options) {
2338 - return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
2339 -}
2340 -function shouldFetchOn(query, options, field) {
2341 - if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(options.enabled, query) !== false && (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveStaleTime)(options.staleTime, query) !== "static") {
2342 - const value = typeof field === "function" ? field(query) : field;
2343 - return value === "always" || value !== false && isStale(query, options);
2344 - }
2345 - return false;
2346 -}
2347 -function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
2348 - return (query !== prevQuery || (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
2349 -}
2350 -function isStale(query, options) {
2351 - return (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.resolveStaleTime)(options.staleTime, query));
2352 -}
2353 -function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
2354 - if (!(0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
2355 - return true;
2356 - }
2357 - return false;
2358 -}
2359 -
2360 -//# sourceMappingURL=queryObserver.js.map
2361 -
2362 -/***/ }),
2363 -
2364 -/***/ "./node_modules/@tanstack/query-core/build/modern/removable.js":
2365 -/*!*********************************************************************!*\
2366 - !*** ./node_modules/@tanstack/query-core/build/modern/removable.js ***!
2367 - \*********************************************************************/
2368 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2369 -
2370 -__webpack_require__.r(__webpack_exports__);
2371 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2372 -/* harmony export */ Removable: function() { return /* binding */ Removable; }
2373 -/* harmony export */ });
2374 -/* harmony import */ var _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timeoutManager.js */ "./node_modules/@tanstack/query-core/build/modern/timeoutManager.js");
2375 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
2376 -// src/removable.ts
2377 -
2378 -
2379 -var Removable = class {
2380 - #gcTimeout;
2381 - destroy() {
2382 - this.clearGcTimeout();
2383 - }
2384 - scheduleGc() {
2385 - this.clearGcTimeout();
2386 - if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isValidTimeout)(this.gcTime)) {
2387 - this.#gcTimeout = _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__.timeoutManager.setTimeout(() => {
2388 - this.optionalRemove();
2389 - }, this.gcTime);
2390 - }
2391 - }
2392 - updateGcTime(newGcTime) {
2393 - this.gcTime = Math.max(
2394 - this.gcTime || 0,
2395 - newGcTime ?? (_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer ? Infinity : 5 * 60 * 1e3)
2396 - );
2397 - }
2398 - clearGcTimeout() {
2399 - if (this.#gcTimeout) {
2400 - _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__.timeoutManager.clearTimeout(this.#gcTimeout);
2401 - this.#gcTimeout = void 0;
2402 - }
2403 - }
2404 -};
2405 -
2406 -//# sourceMappingURL=removable.js.map
2407 -
2408 -/***/ }),
2409 -
2410 -/***/ "./node_modules/@tanstack/query-core/build/modern/retryer.js":
2411 -/*!*******************************************************************!*\
2412 - !*** ./node_modules/@tanstack/query-core/build/modern/retryer.js ***!
2413 - \*******************************************************************/
2414 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2415 -
2416 -__webpack_require__.r(__webpack_exports__);
2417 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2418 -/* harmony export */ CancelledError: function() { return /* binding */ CancelledError; },
2419 -/* harmony export */ canFetch: function() { return /* binding */ canFetch; },
2420 -/* harmony export */ createRetryer: function() { return /* binding */ createRetryer; },
2421 -/* harmony export */ isCancelledError: function() { return /* binding */ isCancelledError; }
2422 -/* harmony export */ });
2423 -/* harmony import */ var _focusManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./focusManager.js */ "./node_modules/@tanstack/query-core/build/modern/focusManager.js");
2424 -/* harmony import */ var _onlineManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./onlineManager.js */ "./node_modules/@tanstack/query-core/build/modern/onlineManager.js");
2425 -/* harmony import */ var _thenable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./thenable.js */ "./node_modules/@tanstack/query-core/build/modern/thenable.js");
2426 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
2427 -// src/retryer.ts
2428 -
2429 -
2430 -
2431 -
2432 -function defaultRetryDelay(failureCount) {
2433 - return Math.min(1e3 * 2 ** failureCount, 3e4);
2434 -}
2435 -function canFetch(networkMode) {
2436 - return (networkMode ?? "online") === "online" ? _onlineManager_js__WEBPACK_IMPORTED_MODULE_1__.onlineManager.isOnline() : true;
2437 -}
2438 -var CancelledError = class extends Error {
2439 - constructor(options) {
2440 - super("CancelledError");
2441 - this.revert = options?.revert;
2442 - this.silent = options?.silent;
2443 - }
2444 -};
2445 -function isCancelledError(value) {
2446 - return value instanceof CancelledError;
2447 -}
2448 -function createRetryer(config) {
2449 - let isRetryCancelled = false;
2450 - let failureCount = 0;
2451 - let continueFn;
2452 - const thenable = (0,_thenable_js__WEBPACK_IMPORTED_MODULE_2__.pendingThenable)();
2453 - const isResolved = () => thenable.status !== "pending";
2454 - const cancel = (cancelOptions) => {
2455 - if (!isResolved()) {
2456 - const error = new CancelledError(cancelOptions);
2457 - reject(error);
2458 - config.onCancel?.(error);
2459 - }
2460 - };
2461 - const cancelRetry = () => {
2462 - isRetryCancelled = true;
2463 - };
2464 - const continueRetry = () => {
2465 - isRetryCancelled = false;
2466 - };
2467 - const canContinue = () => _focusManager_js__WEBPACK_IMPORTED_MODULE_0__.focusManager.isFocused() && (config.networkMode === "always" || _onlineManager_js__WEBPACK_IMPORTED_MODULE_1__.onlineManager.isOnline()) && config.canRun();
2468 - const canStart = () => canFetch(config.networkMode) && config.canRun();
2469 - const resolve = (value) => {
2470 - if (!isResolved()) {
2471 - continueFn?.();
2472 - thenable.resolve(value);
2473 - }
2474 - };
2475 - const reject = (value) => {
2476 - if (!isResolved()) {
2477 - continueFn?.();
2478 - thenable.reject(value);
2479 - }
2480 - };
2481 - const pause = () => {
2482 - return new Promise((continueResolve) => {
2483 - continueFn = (value) => {
2484 - if (isResolved() || canContinue()) {
2485 - continueResolve(value);
2486 - }
2487 - };
2488 - config.onPause?.();
2489 - }).then(() => {
2490 - continueFn = void 0;
2491 - if (!isResolved()) {
2492 - config.onContinue?.();
2493 - }
2494 - });
2495 - };
2496 - const run = () => {
2497 - if (isResolved()) {
2498 - return;
2499 - }
2500 - let promiseOrValue;
2501 - const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
2502 - try {
2503 - promiseOrValue = initialPromise ?? config.fn();
2504 - } catch (error) {
2505 - promiseOrValue = Promise.reject(error);
2506 - }
2507 - Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
2508 - if (isResolved()) {
2509 - return;
2510 - }
2511 - const retry = config.retry ?? (_utils_js__WEBPACK_IMPORTED_MODULE_3__.isServer ? 0 : 3);
2512 - const retryDelay = config.retryDelay ?? defaultRetryDelay;
2513 - const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
2514 - const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
2515 - if (isRetryCancelled || !shouldRetry) {
2516 - reject(error);
2517 - return;
2518 - }
2519 - failureCount++;
2520 - config.onFail?.(failureCount, error);
2521 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.sleep)(delay).then(() => {
2522 - return canContinue() ? void 0 : pause();
2523 - }).then(() => {
2524 - if (isRetryCancelled) {
2525 - reject(error);
2526 - } else {
2527 - run();
2528 - }
2529 - });
2530 - });
2531 - };
2532 - return {
2533 - promise: thenable,
2534 - status: () => thenable.status,
2535 - cancel,
2536 - continue: () => {
2537 - continueFn?.();
2538 - return thenable;
2539 - },
2540 - cancelRetry,
2541 - continueRetry,
2542 - canStart,
2543 - start: () => {
2544 - if (canStart()) {
2545 - run();
2546 - } else {
2547 - pause().then(run);
2548 - }
2549 - return thenable;
2550 - }
2551 - };
2552 -}
2553 -
2554 -//# sourceMappingURL=retryer.js.map
2555 -
2556 -/***/ }),
2557 -
2558 -/***/ "./node_modules/@tanstack/query-core/build/modern/subscribable.js":
2559 -/*!************************************************************************!*\
2560 - !*** ./node_modules/@tanstack/query-core/build/modern/subscribable.js ***!
2561 - \************************************************************************/
2562 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2563 -
2564 -__webpack_require__.r(__webpack_exports__);
2565 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2566 -/* harmony export */ Subscribable: function() { return /* binding */ Subscribable; }
2567 -/* harmony export */ });
2568 -// src/subscribable.ts
2569 -var Subscribable = class {
2570 - constructor() {
2571 - this.listeners = /* @__PURE__ */ new Set();
2572 - this.subscribe = this.subscribe.bind(this);
2573 - }
2574 - subscribe(listener) {
2575 - this.listeners.add(listener);
2576 - this.onSubscribe();
2577 - return () => {
2578 - this.listeners.delete(listener);
2579 - this.onUnsubscribe();
2580 - };
2581 - }
2582 - hasListeners() {
2583 - return this.listeners.size > 0;
2584 - }
2585 - onSubscribe() {
2586 - }
2587 - onUnsubscribe() {
2588 - }
2589 -};
2590 -
2591 -//# sourceMappingURL=subscribable.js.map
2592 -
2593 -/***/ }),
2594 -
2595 -/***/ "./node_modules/@tanstack/query-core/build/modern/thenable.js":
2596 -/*!********************************************************************!*\
2597 - !*** ./node_modules/@tanstack/query-core/build/modern/thenable.js ***!
2598 - \********************************************************************/
2599 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2600 -
2601 -__webpack_require__.r(__webpack_exports__);
2602 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2603 -/* harmony export */ pendingThenable: function() { return /* binding */ pendingThenable; },
2604 -/* harmony export */ tryResolveSync: function() { return /* binding */ tryResolveSync; }
2605 -/* harmony export */ });
2606 -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
2607 -// src/thenable.ts
2608 -
2609 -function pendingThenable() {
2610 - let resolve;
2611 - let reject;
2612 - const thenable = new Promise((_resolve, _reject) => {
2613 - resolve = _resolve;
2614 - reject = _reject;
2615 - });
2616 - thenable.status = "pending";
2617 - thenable.catch(() => {
2618 - });
2619 - function finalize(data) {
2620 - Object.assign(thenable, data);
2621 - delete thenable.resolve;
2622 - delete thenable.reject;
2623 - }
2624 - thenable.resolve = (value) => {
2625 - finalize({
2626 - status: "fulfilled",
2627 - value
2628 - });
2629 - resolve(value);
2630 - };
2631 - thenable.reject = (reason) => {
2632 - finalize({
2633 - status: "rejected",
2634 - reason
2635 - });
2636 - reject(reason);
2637 - };
2638 - return thenable;
2639 -}
2640 -function tryResolveSync(promise) {
2641 - let data;
2642 - promise.then((result) => {
2643 - data = result;
2644 - return result;
2645 - }, _utils_js__WEBPACK_IMPORTED_MODULE_0__.noop)?.catch(_utils_js__WEBPACK_IMPORTED_MODULE_0__.noop);
2646 - if (data !== void 0) {
2647 - return { data };
2648 - }
2649 - return void 0;
2650 -}
2651 -
2652 -//# sourceMappingURL=thenable.js.map
2653 -
2654 -/***/ }),
2655 -
2656 -/***/ "./node_modules/@tanstack/query-core/build/modern/timeoutManager.js":
2657 -/*!**************************************************************************!*\
2658 - !*** ./node_modules/@tanstack/query-core/build/modern/timeoutManager.js ***!
2659 - \**************************************************************************/
2660 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2661 -
2662 -__webpack_require__.r(__webpack_exports__);
2663 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2664 -/* harmony export */ TimeoutManager: function() { return /* binding */ TimeoutManager; },
2665 -/* harmony export */ defaultTimeoutProvider: function() { return /* binding */ defaultTimeoutProvider; },
2666 -/* harmony export */ systemSetTimeoutZero: function() { return /* binding */ systemSetTimeoutZero; },
2667 -/* harmony export */ timeoutManager: function() { return /* binding */ timeoutManager; }
2668 -/* harmony export */ });
2669 -// src/timeoutManager.ts
2670 -var defaultTimeoutProvider = {
2671 - // We need the wrapper function syntax below instead of direct references to
2672 - // global setTimeout etc.
2673 - //
2674 - // BAD: `setTimeout: setTimeout`
2675 - // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
2676 - //
2677 - // If we use direct references here, then anything that wants to spy on or
2678 - // replace the global setTimeout (like tests) won't work since we'll already
2679 - // have a hard reference to the original implementation at the time when this
2680 - // file was imported.
2681 - setTimeout: (callback, delay) => setTimeout(callback, delay),
2682 - clearTimeout: (timeoutId) => clearTimeout(timeoutId),
2683 - setInterval: (callback, delay) => setInterval(callback, delay),
2684 - clearInterval: (intervalId) => clearInterval(intervalId)
2685 -};
2686 -var TimeoutManager = class {
2687 - // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
2688 - // type at app boot; and if we leave that type, then any new timer provider
2689 - // would need to support ReturnType<typeof setTimeout>, which is infeasible.
2690 - //
2691 - // We settle for type safety for the TimeoutProvider type, and accept that
2692 - // this class is unsafe internally to allow for extension.
2693 - #provider = defaultTimeoutProvider;
2694 - #providerCalled = false;
2695 - setTimeoutProvider(provider) {
2696 - if (true) {
2697 - if (this.#providerCalled && provider !== this.#provider) {
2698 - console.error(
2699 - `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,
2700 - { previous: this.#provider, provider }
2701 - );
2702 - }
2703 - }
2704 - this.#provider = provider;
2705 - if (true) {
2706 - this.#providerCalled = false;
2707 - }
2708 - }
2709 - setTimeout(callback, delay) {
2710 - if (true) {
2711 - this.#providerCalled = true;
2712 - }
2713 - return this.#provider.setTimeout(callback, delay);
2714 - }
2715 - clearTimeout(timeoutId) {
2716 - this.#provider.clearTimeout(timeoutId);
2717 - }
2718 - setInterval(callback, delay) {
2719 - if (true) {
2720 - this.#providerCalled = true;
2721 - }
2722 - return this.#provider.setInterval(callback, delay);
2723 - }
2724 - clearInterval(intervalId) {
2725 - this.#provider.clearInterval(intervalId);
2726 - }
2727 -};
2728 -var timeoutManager = new TimeoutManager();
2729 -function systemSetTimeoutZero(callback) {
2730 - setTimeout(callback, 0);
2731 -}
2732 -
2733 -//# sourceMappingURL=timeoutManager.js.map
2734 -
2735 -/***/ }),
2736 -
2737 -/***/ "./node_modules/@tanstack/query-core/build/modern/utils.js":
2738 -/*!*****************************************************************!*\
2739 - !*** ./node_modules/@tanstack/query-core/build/modern/utils.js ***!
2740 - \*****************************************************************/
2741 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2742 -
2743 -__webpack_require__.r(__webpack_exports__);
2744 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2745 -/* harmony export */ addConsumeAwareSignal: function() { return /* binding */ addConsumeAwareSignal; },
2746 -/* harmony export */ addToEnd: function() { return /* binding */ addToEnd; },
2747 -/* harmony export */ addToStart: function() { return /* binding */ addToStart; },
2748 -/* harmony export */ ensureQueryFn: function() { return /* binding */ ensureQueryFn; },
2749 -/* harmony export */ functionalUpdate: function() { return /* binding */ functionalUpdate; },
2750 -/* harmony export */ hashKey: function() { return /* binding */ hashKey; },
2751 -/* harmony export */ hashQueryKeyByOptions: function() { return /* binding */ hashQueryKeyByOptions; },
2752 -/* harmony export */ isPlainArray: function() { return /* binding */ isPlainArray; },
2753 -/* harmony export */ isPlainObject: function() { return /* binding */ isPlainObject; },
2754 -/* harmony export */ isServer: function() { return /* binding */ isServer; },
2755 -/* harmony export */ isValidTimeout: function() { return /* binding */ isValidTimeout; },
2756 -/* harmony export */ keepPreviousData: function() { return /* binding */ keepPreviousData; },
2757 -/* harmony export */ matchMutation: function() { return /* binding */ matchMutation; },
2758 -/* harmony export */ matchQuery: function() { return /* binding */ matchQuery; },
2759 -/* harmony export */ noop: function() { return /* binding */ noop; },
2760 -/* harmony export */ partialMatchKey: function() { return /* binding */ partialMatchKey; },
2761 -/* harmony export */ replaceData: function() { return /* binding */ replaceData; },
2762 -/* harmony export */ replaceEqualDeep: function() { return /* binding */ replaceEqualDeep; },
2763 -/* harmony export */ resolveEnabled: function() { return /* binding */ resolveEnabled; },
2764 -/* harmony export */ resolveStaleTime: function() { return /* binding */ resolveStaleTime; },
2765 -/* harmony export */ shallowEqualObjects: function() { return /* binding */ shallowEqualObjects; },
2766 -/* harmony export */ shouldThrowError: function() { return /* binding */ shouldThrowError; },
2767 -/* harmony export */ skipToken: function() { return /* binding */ skipToken; },
2768 -/* harmony export */ sleep: function() { return /* binding */ sleep; },
2769 -/* harmony export */ timeUntilStale: function() { return /* binding */ timeUntilStale; }
2770 -/* harmony export */ });
2771 -/* harmony import */ var _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timeoutManager.js */ "./node_modules/@tanstack/query-core/build/modern/timeoutManager.js");
2772 -// src/utils.ts
2773 -
2774 -var isServer = typeof window === "undefined" || "Deno" in globalThis;
2775 -function noop() {
2776 -}
2777 -function functionalUpdate(updater, input) {
2778 - return typeof updater === "function" ? updater(input) : updater;
2779 -}
2780 -function isValidTimeout(value) {
2781 - return typeof value === "number" && value >= 0 && value !== Infinity;
2782 -}
2783 -function timeUntilStale(updatedAt, staleTime) {
2784 - return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
2785 -}
2786 -function resolveStaleTime(staleTime, query) {
2787 - return typeof staleTime === "function" ? staleTime(query) : staleTime;
2788 -}
2789 -function resolveEnabled(enabled, query) {
2790 - return typeof enabled === "function" ? enabled(query) : enabled;
2791 -}
2792 -function matchQuery(filters, query) {
2793 - const {
2794 - type = "all",
2795 - exact,
2796 - fetchStatus,
2797 - predicate,
2798 - queryKey,
2799 - stale
2800 - } = filters;
2801 - if (queryKey) {
2802 - if (exact) {
2803 - if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
2804 - return false;
2805 - }
2806 - } else if (!partialMatchKey(query.queryKey, queryKey)) {
2807 - return false;
2808 - }
2809 - }
2810 - if (type !== "all") {
2811 - const isActive = query.isActive();
2812 - if (type === "active" && !isActive) {
2813 - return false;
2814 - }
2815 - if (type === "inactive" && isActive) {
2816 - return false;
2817 - }
2818 - }
2819 - if (typeof stale === "boolean" && query.isStale() !== stale) {
2820 - return false;
2821 - }
2822 - if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
2823 - return false;
2824 - }
2825 - if (predicate && !predicate(query)) {
2826 - return false;
2827 - }
2828 - return true;
2829 -}
2830 -function matchMutation(filters, mutation) {
2831 - const { exact, status, predicate, mutationKey } = filters;
2832 - if (mutationKey) {
2833 - if (!mutation.options.mutationKey) {
2834 - return false;
2835 - }
2836 - if (exact) {
2837 - if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
2838 - return false;
2839 - }
2840 - } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
2841 - return false;
2842 - }
2843 - }
2844 - if (status && mutation.state.status !== status) {
2845 - return false;
2846 - }
2847 - if (predicate && !predicate(mutation)) {
2848 - return false;
2849 - }
2850 - return true;
2851 -}
2852 -function hashQueryKeyByOptions(queryKey, options) {
2853 - const hashFn = options?.queryKeyHashFn || hashKey;
2854 - return hashFn(queryKey);
2855 -}
2856 -function hashKey(queryKey) {
2857 - return JSON.stringify(
2858 - queryKey,
2859 - (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
2860 - result[key] = val[key];
2861 - return result;
2862 - }, {}) : val
2863 - );
2864 -}
2865 -function partialMatchKey(a, b) {
2866 - if (a === b) {
2867 - return true;
2868 - }
2869 - if (typeof a !== typeof b) {
2870 - return false;
2871 - }
2872 - if (a && b && typeof a === "object" && typeof b === "object") {
2873 - return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));
2874 - }
2875 - return false;
2876 -}
2877 -var hasOwn = Object.prototype.hasOwnProperty;
2878 -function replaceEqualDeep(a, b) {
2879 - if (a === b) {
2880 - return a;
2881 - }
2882 - const array = isPlainArray(a) && isPlainArray(b);
2883 - if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;
2884 - const aItems = array ? a : Object.keys(a);
2885 - const aSize = aItems.length;
2886 - const bItems = array ? b : Object.keys(b);
2887 - const bSize = bItems.length;
2888 - const copy = array ? new Array(bSize) : {};
2889 - let equalItems = 0;
2890 - for (let i = 0; i < bSize; i++) {
2891 - const key = array ? i : bItems[i];
2892 - const aItem = a[key];
2893 - const bItem = b[key];
2894 - if (aItem === bItem) {
2895 - copy[key] = aItem;
2896 - if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;
2897 - continue;
2898 - }
2899 - if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
2900 - copy[key] = bItem;
2901 - continue;
2902 - }
2903 - const v = replaceEqualDeep(aItem, bItem);
2904 - copy[key] = v;
2905 - if (v === aItem) equalItems++;
2906 - }
2907 - return aSize === bSize && equalItems === aSize ? a : copy;
2908 -}
2909 -function shallowEqualObjects(a, b) {
2910 - if (!b || Object.keys(a).length !== Object.keys(b).length) {
2911 - return false;
2912 - }
2913 - for (const key in a) {
2914 - if (a[key] !== b[key]) {
2915 - return false;
2916 - }
2917 - }
2918 - return true;
2919 -}
2920 -function isPlainArray(value) {
2921 - return Array.isArray(value) && value.length === Object.keys(value).length;
2922 -}
2923 -function isPlainObject(o) {
2924 - if (!hasObjectPrototype(o)) {
2925 - return false;
2926 - }
2927 - const ctor = o.constructor;
2928 - if (ctor === void 0) {
2929 - return true;
2930 - }
2931 - const prot = ctor.prototype;
2932 - if (!hasObjectPrototype(prot)) {
2933 - return false;
2934 - }
2935 - if (!prot.hasOwnProperty("isPrototypeOf")) {
2936 - return false;
2937 - }
2938 - if (Object.getPrototypeOf(o) !== Object.prototype) {
2939 - return false;
2940 - }
2941 - return true;
2942 -}
2943 -function hasObjectPrototype(o) {
2944 - return Object.prototype.toString.call(o) === "[object Object]";
2945 -}
2946 -function sleep(timeout) {
2947 - return new Promise((resolve) => {
2948 - _timeoutManager_js__WEBPACK_IMPORTED_MODULE_0__.timeoutManager.setTimeout(resolve, timeout);
2949 - });
2950 -}
2951 -function replaceData(prevData, data, options) {
2952 - if (typeof options.structuralSharing === "function") {
2953 - return options.structuralSharing(prevData, data);
2954 - } else if (options.structuralSharing !== false) {
2955 - if (true) {
2956 - try {
2957 - return replaceEqualDeep(prevData, data);
2958 - } catch (error) {
2959 - console.error(
2960 - `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
2961 - );
2962 - throw error;
2963 - }
2964 - }
2965 - // removed by dead control flow
2966 -
2967 - }
2968 - return data;
2969 -}
2970 -function keepPreviousData(previousData) {
2971 - return previousData;
2972 -}
2973 -function addToEnd(items, item, max = 0) {
2974 - const newItems = [...items, item];
2975 - return max && newItems.length > max ? newItems.slice(1) : newItems;
2976 -}
2977 -function addToStart(items, item, max = 0) {
2978 - const newItems = [item, ...items];
2979 - return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
2980 -}
2981 -var skipToken = Symbol();
2982 -function ensureQueryFn(options, fetchOptions) {
2983 - if (true) {
2984 - if (options.queryFn === skipToken) {
2985 - console.error(
2986 - `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
2987 - );
2988 - }
2989 - }
2990 - if (!options.queryFn && fetchOptions?.initialPromise) {
2991 - return () => fetchOptions.initialPromise;
2992 - }
2993 - if (!options.queryFn || options.queryFn === skipToken) {
2994 - return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
2995 - }
2996 - return options.queryFn;
2997 -}
2998 -function shouldThrowError(throwOnError, params) {
2999 - if (typeof throwOnError === "function") {
3000 - return throwOnError(...params);
3001 - }
3002 - return !!throwOnError;
3003 -}
3004 -function addConsumeAwareSignal(object, getSignal, onCancelled) {
3005 - let consumed = false;
3006 - let signal;
3007 - Object.defineProperty(object, "signal", {
3008 - enumerable: true,
3009 - get: () => {
3010 - signal ??= getSignal();
3011 - if (consumed) {
3012 - return signal;
3013 - }
3014 - consumed = true;
3015 - if (signal.aborted) {
3016 - onCancelled();
3017 - } else {
3018 - signal.addEventListener("abort", onCancelled, { once: true });
3019 - }
3020 - return signal;
3021 - }
3022 - });
3023 - return object;
3024 -}
3025 -
3026 -//# sourceMappingURL=utils.js.map
3027 -
3028 -/***/ }),
3029 -
3030 -/***/ "./node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js":
3031 -/*!********************************************************************************!*\
3032 - !*** ./node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js ***!
3033 - \********************************************************************************/
3034 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3035 -
3036 -__webpack_require__.r(__webpack_exports__);
3037 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3038 -/* harmony export */ IsRestoringProvider: function() { return /* binding */ IsRestoringProvider; },
3039 -/* harmony export */ useIsRestoring: function() { return /* binding */ useIsRestoring; }
3040 -/* harmony export */ });
3041 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3042 -"use client";
3043 -
3044 -// src/IsRestoringProvider.ts
3045 -
3046 -var IsRestoringContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(false);
3047 -var useIsRestoring = () => react__WEBPACK_IMPORTED_MODULE_0__.useContext(IsRestoringContext);
3048 -var IsRestoringProvider = IsRestoringContext.Provider;
3049 -
3050 -//# sourceMappingURL=IsRestoringProvider.js.map
3051 -
3052 -/***/ }),
3053 -
3054 -/***/ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js":
3055 -/*!********************************************************************************!*\
3056 - !*** ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js ***!
3057 - \********************************************************************************/
3058 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3059 -
3060 -__webpack_require__.r(__webpack_exports__);
3061 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3062 -/* harmony export */ QueryClientContext: function() { return /* binding */ QueryClientContext; },
3063 -/* harmony export */ QueryClientProvider: function() { return /* binding */ QueryClientProvider; },
3064 -/* harmony export */ useQueryClient: function() { return /* binding */ useQueryClient; }
3065 -/* harmony export */ });
3066 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3067 -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3068 -"use client";
3069 -
3070 -// src/QueryClientProvider.tsx
3071 -
3072 -
3073 -var QueryClientContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(
3074 - void 0
3075 -);
3076 -var useQueryClient = (queryClient) => {
3077 - const client = react__WEBPACK_IMPORTED_MODULE_0__.useContext(QueryClientContext);
3078 - if (queryClient) {
3079 - return queryClient;
3080 - }
3081 - if (!client) {
3082 - throw new Error("No QueryClient set, use QueryClientProvider to set one");
3083 - }
3084 - return client;
3085 -};
3086 -var QueryClientProvider = ({
3087 - client,
3088 - children
3089 -}) => {
3090 - react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
3091 - client.mount();
3092 - return () => {
3093 - client.unmount();
3094 - };
3095 - }, [client]);
3096 - return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(QueryClientContext.Provider, { value: client, children });
3097 -};
3098 -
3099 -//# sourceMappingURL=QueryClientProvider.js.map
3100 -
3101 -/***/ }),
3102 -
3103 -/***/ "./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js":
3104 -/*!************************************************************************************!*\
3105 - !*** ./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js ***!
3106 - \************************************************************************************/
3107 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3108 -
3109 -__webpack_require__.r(__webpack_exports__);
3110 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3111 -/* harmony export */ QueryErrorResetBoundary: function() { return /* binding */ QueryErrorResetBoundary; },
3112 -/* harmony export */ useQueryErrorResetBoundary: function() { return /* binding */ useQueryErrorResetBoundary; }
3113 -/* harmony export */ });
3114 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3115 -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3116 -"use client";
3117 -
3118 -// src/QueryErrorResetBoundary.tsx
3119 -
3120 -
3121 -function createValue() {
3122 - let isReset = false;
3123 - return {
3124 - clearReset: () => {
3125 - isReset = false;
3126 - },
3127 - reset: () => {
3128 - isReset = true;
3129 - },
3130 - isReset: () => {
3131 - return isReset;
3132 - }
3133 - };
3134 -}
3135 -var QueryErrorResetBoundaryContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(createValue());
3136 -var useQueryErrorResetBoundary = () => react__WEBPACK_IMPORTED_MODULE_0__.useContext(QueryErrorResetBoundaryContext);
3137 -var QueryErrorResetBoundary = ({
3138 - children
3139 -}) => {
3140 - const [value] = react__WEBPACK_IMPORTED_MODULE_0__.useState(() => createValue());
3141 - return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
3142 -};
3143 -
3144 -//# sourceMappingURL=QueryErrorResetBoundary.js.map
3145 -
3146 -/***/ }),
3147 -
3148 -/***/ "./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js":
3149 -/*!*******************************************************************************!*\
3150 - !*** ./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js ***!
3151 - \*******************************************************************************/
3152 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3153 -
3154 -__webpack_require__.r(__webpack_exports__);
3155 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3156 -/* harmony export */ ensurePreventErrorBoundaryRetry: function() { return /* binding */ ensurePreventErrorBoundaryRetry; },
3157 -/* harmony export */ getHasError: function() { return /* binding */ getHasError; },
3158 -/* harmony export */ useClearResetErrorBoundary: function() { return /* binding */ useClearResetErrorBoundary; }
3159 -/* harmony export */ });
3160 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3161 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
3162 -"use client";
3163 -
3164 -// src/errorBoundaryUtils.ts
3165 -
3166 -
3167 -var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
3168 - if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
3169 - if (!errorResetBoundary.isReset()) {
3170 - options.retryOnMount = false;
3171 - }
3172 - }
3173 -};
3174 -var useClearResetErrorBoundary = (errorResetBoundary) => {
3175 - react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
3176 - errorResetBoundary.clearReset();
3177 - }, [errorResetBoundary]);
3178 -};
3179 -var getHasError = ({
3180 - result,
3181 - errorResetBoundary,
3182 - throwOnError,
3183 - query,
3184 - suspense
3185 -}) => {
3186 - return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || (0,_tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__.shouldThrowError)(throwOnError, [result.error, query]));
3187 -};
3188 -
3189 -//# sourceMappingURL=errorBoundaryUtils.js.map
3190 -
3191 -/***/ }),
3192 -
3193 -/***/ "./node_modules/@tanstack/react-query/build/modern/suspense.js":
3194 -/*!*********************************************************************!*\
3195 - !*** ./node_modules/@tanstack/react-query/build/modern/suspense.js ***!
3196 - \*********************************************************************/
3197 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3198 -
3199 -__webpack_require__.r(__webpack_exports__);
3200 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3201 -/* harmony export */ defaultThrowOnError: function() { return /* binding */ defaultThrowOnError; },
3202 -/* harmony export */ ensureSuspenseTimers: function() { return /* binding */ ensureSuspenseTimers; },
3203 -/* harmony export */ fetchOptimistic: function() { return /* binding */ fetchOptimistic; },
3204 -/* harmony export */ shouldSuspend: function() { return /* binding */ shouldSuspend; },
3205 -/* harmony export */ willFetch: function() { return /* binding */ willFetch; }
3206 -/* harmony export */ });
3207 -// src/suspense.ts
3208 -var defaultThrowOnError = (_error, query) => query.state.data === void 0;
3209 -var ensureSuspenseTimers = (defaultedOptions) => {
3210 - if (defaultedOptions.suspense) {
3211 - const MIN_SUSPENSE_TIME_MS = 1e3;
3212 - const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
3213 - const originalStaleTime = defaultedOptions.staleTime;
3214 - defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
3215 - if (typeof defaultedOptions.gcTime === "number") {
3216 - defaultedOptions.gcTime = Math.max(
3217 - defaultedOptions.gcTime,
3218 - MIN_SUSPENSE_TIME_MS
3219 - );
3220 - }
3221 - }
3222 -};
3223 -var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
3224 -var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
3225 -var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
3226 - errorResetBoundary.clearReset();
3227 -});
3228 -
3229 -//# sourceMappingURL=suspense.js.map
3230 -
3231 -/***/ }),
3232 -
3233 -/***/ "./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js":
3234 -/*!*************************************************************************!*\
3235 - !*** ./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js ***!
3236 - \*************************************************************************/
3237 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3238 -
3239 -__webpack_require__.r(__webpack_exports__);
3240 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3241 -/* harmony export */ useBaseQuery: function() { return /* binding */ useBaseQuery; }
3242 -/* harmony export */ });
3243 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3244 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
3245 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
3246 -/* harmony import */ var _QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./QueryClientProvider.js */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
3247 -/* harmony import */ var _QueryErrorResetBoundary_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./QueryErrorResetBoundary.js */ "./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js");
3248 -/* harmony import */ var _errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./errorBoundaryUtils.js */ "./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js");
3249 -/* harmony import */ var _IsRestoringProvider_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./IsRestoringProvider.js */ "./node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js");
3250 -/* harmony import */ var _suspense_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./suspense.js */ "./node_modules/@tanstack/react-query/build/modern/suspense.js");
3251 -"use client";
3252 -
3253 -// src/useBaseQuery.ts
3254 -
3255 -
3256 -
3257 -
3258 -
3259 -
3260 -
3261 -function useBaseQuery(options, Observer, queryClient) {
3262 - if (true) {
3263 - if (typeof options !== "object" || Array.isArray(options)) {
3264 - throw new Error(
3265 - 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
3266 - );
3267 - }
3268 - }
3269 - const isRestoring = (0,_IsRestoringProvider_js__WEBPACK_IMPORTED_MODULE_6__.useIsRestoring)();
3270 - const errorResetBoundary = (0,_QueryErrorResetBoundary_js__WEBPACK_IMPORTED_MODULE_4__.useQueryErrorResetBoundary)();
3271 - const client = (0,_QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_3__.useQueryClient)(queryClient);
3272 - const defaultedOptions = client.defaultQueryOptions(options);
3273 - client.getDefaultOptions().queries?._experimental_beforeQuery?.(
3274 - defaultedOptions
3275 - );
3276 - if (true) {
3277 - if (!defaultedOptions.queryFn) {
3278 - console.error(
3279 - `[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
3280 - );
3281 - }
3282 - }
3283 - defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
3284 - (0,_suspense_js__WEBPACK_IMPORTED_MODULE_7__.ensureSuspenseTimers)(defaultedOptions);
3285 - (0,_errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
3286 - (0,_errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__.useClearResetErrorBoundary)(errorResetBoundary);
3287 - const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
3288 - const [observer] = react__WEBPACK_IMPORTED_MODULE_0__.useState(
3289 - () => new Observer(
3290 - client,
3291 - defaultedOptions
3292 - )
3293 - );
3294 - const result = observer.getOptimisticResult(defaultedOptions);
3295 - const shouldSubscribe = !isRestoring && options.subscribed !== false;
3296 - react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore(
3297 - react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
3298 - (onStoreChange) => {
3299 - const unsubscribe = shouldSubscribe ? observer.subscribe(_tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__.notifyManager.batchCalls(onStoreChange)) : _tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__.noop;
3300 - observer.updateResult();
3301 - return unsubscribe;
3302 - },
3303 - [observer, shouldSubscribe]
3304 - ),
3305 - () => observer.getCurrentResult(),
3306 - () => observer.getCurrentResult()
3307 - );
3308 - react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
3309 - observer.setOptions(defaultedOptions);
3310 - }, [defaultedOptions, observer]);
3311 - if ((0,_suspense_js__WEBPACK_IMPORTED_MODULE_7__.shouldSuspend)(defaultedOptions, result)) {
3312 - throw (0,_suspense_js__WEBPACK_IMPORTED_MODULE_7__.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
3313 - }
3314 - if ((0,_errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__.getHasError)({
3315 - result,
3316 - errorResetBoundary,
3317 - throwOnError: defaultedOptions.throwOnError,
3318 - query: client.getQueryCache().get(defaultedOptions.queryHash),
3319 - suspense: defaultedOptions.suspense
3320 - })) {
3321 - throw result.error;
3322 - }
3323 - ;
3324 - client.getDefaultOptions().queries?._experimental_afterQuery?.(
3325 - defaultedOptions,
3326 - result
3327 - );
3328 - if (defaultedOptions.experimental_prefetchInRender && !_tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__.isServer && (0,_suspense_js__WEBPACK_IMPORTED_MODULE_7__.willFetch)(result, isRestoring)) {
3329 - const promise = isNewCacheEntry ? (
3330 - // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
3331 - (0,_suspense_js__WEBPACK_IMPORTED_MODULE_7__.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
3332 - ) : (
3333 - // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
3334 - client.getQueryCache().get(defaultedOptions.queryHash)?.promise
3335 - );
3336 - promise?.catch(_tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__.noop).finally(() => {
3337 - observer.updateResult();
3338 - });
3339 - }
3340 - return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
3341 -}
3342 -
3343 -//# sourceMappingURL=useBaseQuery.js.map
3344 -
3345 -/***/ }),
3346 -
3347 -/***/ "./node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js":
3348 -/*!*****************************************************************************!*\
3349 - !*** ./node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js ***!
3350 - \*****************************************************************************/
3351 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3352 -
3353 -__webpack_require__.r(__webpack_exports__);
3354 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3355 -/* harmony export */ useInfiniteQuery: function() { return /* binding */ useInfiniteQuery; }
3356 -/* harmony export */ });
3357 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js");
3358 -/* harmony import */ var _useBaseQuery_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useBaseQuery.js */ "./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");
3359 -"use client";
3360 -
3361 -// src/useInfiniteQuery.ts
3362 -
3363 -
3364 -function useInfiniteQuery(options, queryClient) {
3365 - return (0,_useBaseQuery_js__WEBPACK_IMPORTED_MODULE_1__.useBaseQuery)(
3366 - options,
3367 - _tanstack_query_core__WEBPACK_IMPORTED_MODULE_0__.InfiniteQueryObserver,
3368 - queryClient
3369 - );
3370 -}
3371 -
3372 -//# sourceMappingURL=useInfiniteQuery.js.map
3373 -
3374 -/***/ }),
3375 -
3376 -/***/ "./node_modules/@tanstack/react-query/build/modern/useMutation.js":
3377 -/*!************************************************************************!*\
3378 - !*** ./node_modules/@tanstack/react-query/build/modern/useMutation.js ***!
3379 - \************************************************************************/
3380 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3381 -
3382 -__webpack_require__.r(__webpack_exports__);
3383 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3384 -/* harmony export */ useMutation: function() { return /* binding */ useMutation; }
3385 -/* harmony export */ });
3386 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3387 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/mutationObserver.js");
3388 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
3389 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
3390 -/* harmony import */ var _QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./QueryClientProvider.js */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
3391 -"use client";
3392 -
3393 -// src/useMutation.ts
3394 -
3395 -
3396 -
3397 -function useMutation(options, queryClient) {
3398 - const client = (0,_QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_4__.useQueryClient)(queryClient);
3399 - const [observer] = react__WEBPACK_IMPORTED_MODULE_0__.useState(
3400 - () => new _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__.MutationObserver(
3401 - client,
3402 - options
3403 - )
3404 - );
3405 - react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
3406 - observer.setOptions(options);
3407 - }, [observer, options]);
3408 - const result = react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore(
3409 - react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
3410 - (onStoreChange) => observer.subscribe(_tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batchCalls(onStoreChange)),
3411 - [observer]
3412 - ),
3413 - () => observer.getCurrentResult(),
3414 - () => observer.getCurrentResult()
3415 - );
3416 - const mutate = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
3417 - (variables, mutateOptions) => {
3418 - observer.mutate(variables, mutateOptions).catch(_tanstack_query_core__WEBPACK_IMPORTED_MODULE_3__.noop);
3419 - },
3420 - [observer]
3421 - );
3422 - if (result.error && (0,_tanstack_query_core__WEBPACK_IMPORTED_MODULE_3__.shouldThrowError)(observer.options.throwOnError, [result.error])) {
3423 - throw result.error;
3424 - }
3425 - return { ...result, mutate, mutateAsync: result.mutate };
3426 -}
3427 -
3428 -//# sourceMappingURL=useMutation.js.map
3429 -
3430 -/***/ }),
3431 -
3432 -/***/ "./node_modules/@tanstack/react-query/build/modern/useMutationState.js":
3433 -/*!*****************************************************************************!*\
3434 - !*** ./node_modules/@tanstack/react-query/build/modern/useMutationState.js ***!
3435 - \*****************************************************************************/
3436 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3437 -
3438 -__webpack_require__.r(__webpack_exports__);
3439 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3440 -/* harmony export */ useIsMutating: function() { return /* binding */ useIsMutating; },
3441 -/* harmony export */ useMutationState: function() { return /* binding */ useMutationState; }
3442 -/* harmony export */ });
3443 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3444 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
3445 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
3446 -/* harmony import */ var _QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./QueryClientProvider.js */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
3447 -"use client";
3448 -
3449 -// src/useMutationState.ts
3450 -
3451 -
3452 -
3453 -function useIsMutating(filters, queryClient) {
3454 - const client = (0,_QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_3__.useQueryClient)(queryClient);
3455 - return useMutationState(
3456 - { filters: { ...filters, status: "pending" } },
3457 - client
3458 - ).length;
3459 -}
3460 -function getResult(mutationCache, options) {
3461 - return mutationCache.findAll(options.filters).map(
3462 - (mutation) => options.select ? options.select(mutation) : mutation.state
3463 - );
3464 -}
3465 -function useMutationState(options = {}, queryClient) {
3466 - const mutationCache = (0,_QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_3__.useQueryClient)(queryClient).getMutationCache();
3467 - const optionsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(options);
3468 - const result = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);
3469 - if (result.current === null) {
3470 - result.current = getResult(mutationCache, options);
3471 - }
3472 - react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
3473 - optionsRef.current = options;
3474 - });
3475 - return react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore(
3476 - react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
3477 - (onStoreChange) => mutationCache.subscribe(() => {
3478 - const nextResult = (0,_tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__.replaceEqualDeep)(
3479 - result.current,
3480 - getResult(mutationCache, optionsRef.current)
3481 - );
3482 - if (result.current !== nextResult) {
3483 - result.current = nextResult;
3484 - _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__.notifyManager.schedule(onStoreChange);
3485 - }
3486 - }),
3487 - [mutationCache]
3488 - ),
3489 - () => result.current,
3490 - () => result.current
3491 - );
3492 -}
3493 -
3494 -//# sourceMappingURL=useMutationState.js.map
3495 -
3496 -/***/ }),
3497 -
3498 -/***/ "./node_modules/@tanstack/react-query/build/modern/useQuery.js":
3499 -/*!*********************************************************************!*\
3500 - !*** ./node_modules/@tanstack/react-query/build/modern/useQuery.js ***!
3501 - \*********************************************************************/
3502 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3503 -
3504 -__webpack_require__.r(__webpack_exports__);
3505 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3506 -/* harmony export */ useQuery: function() { return /* binding */ useQuery; }
3507 -/* harmony export */ });
3508 -/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/queryObserver.js");
3509 -/* harmony import */ var _useBaseQuery_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useBaseQuery.js */ "./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");
3510 -"use client";
3511 -
3512 -// src/useQuery.ts
3513 -
3514 -
3515 -function useQuery(options, queryClient) {
3516 - return (0,_useBaseQuery_js__WEBPACK_IMPORTED_MODULE_1__.useBaseQuery)(options, _tanstack_query_core__WEBPACK_IMPORTED_MODULE_0__.QueryObserver, queryClient);
3517 -}
3518 -
3519 -//# sourceMappingURL=useQuery.js.map
3520 -
3521 -/***/ }),
3522 -
3523 -/***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
3524 -/*!*****************************************************************!*\
3525 - !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
3526 - \*****************************************************************/
3527 -/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3528 -
2202 +//#endregion
2203 +//#region node_modules/react/cjs/react-jsx-runtime.development.js
3529 2204 /**
3530 - * @license React
3531 - * react-jsx-runtime.development.js
3532 - *
3533 - * Copyright (c) Facebook, Inc. and its affiliates.
3534 - *
3535 - * This source code is licensed under the MIT license found in the
3536 - * LICENSE file in the root directory of this source tree.
3537 - */
2205 + * @license React
2206 + * react-jsx-runtime.development.js
2207 + *
2208 + * Copyright (c) Facebook, Inc. and its affiliates.
2209 + *
2210 + * This source code is licensed under the MIT license found in the
2211 + * LICENSE file in the root directory of this source tree.
2212 + */
2213 + var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((exports) => {
2214 + (function() {
2215 + "use strict";
2216 + var React = (globalThis.React);
2217 + var REACT_ELEMENT_TYPE = Symbol.for("react.element");
2218 + var REACT_PORTAL_TYPE = Symbol.for("react.portal");
2219 + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
2220 + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
2221 + var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
2222 + var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
2223 + var REACT_CONTEXT_TYPE = Symbol.for("react.context");
2224 + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
2225 + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
2226 + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
2227 + var REACT_MEMO_TYPE = Symbol.for("react.memo");
2228 + var REACT_LAZY_TYPE = Symbol.for("react.lazy");
2229 + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
2230 + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2231 + var FAUX_ITERATOR_SYMBOL = "@@iterator";
2232 + function getIteratorFn(maybeIterable) {
2233 + if (maybeIterable === null || typeof maybeIterable !== "object") return null;
2234 + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2235 + if (typeof maybeIterator === "function") return maybeIterator;
2236 + return null;
2237 + }
2238 + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2239 + function error(format) {
2240 + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
2241 + printWarning("error", format, args);
2242 + }
2243 + function printWarning(level, format, args) {
2244 + var stack = ReactSharedInternals.ReactDebugCurrentFrame.getStackAddendum();
2245 + if (stack !== "") {
2246 + format += "%s";
2247 + args = args.concat([stack]);
2248 + }
2249 + var argsWithFormat = args.map(function(item) {
2250 + return String(item);
2251 + });
2252 + argsWithFormat.unshift("Warning: " + format);
2253 + Function.prototype.apply.call(console[level], console, argsWithFormat);
2254 + }
2255 + var enableScopeAPI = false;
2256 + var enableCacheElement = false;
2257 + var enableTransitionTracing = false;
2258 + var enableLegacyHidden = false;
2259 + var enableDebugTracing = false;
2260 + var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
2261 + function isValidElementType(type) {
2262 + if (typeof type === "string" || typeof type === "function") return true;
2263 + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) return true;
2264 + if (typeof type === "object" && type !== null) {
2265 + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) return true;
2266 + }
2267 + return false;
2268 + }
2269 + function getWrappedName(outerType, innerType, wrapperName) {
2270 + var displayName = outerType.displayName;
2271 + if (displayName) return displayName;
2272 + var functionName = innerType.displayName || innerType.name || "";
2273 + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
2274 + }
2275 + function getContextName(type) {
2276 + return type.displayName || "Context";
2277 + }
2278 + function getComponentNameFromType(type) {
2279 + if (type == null) return null;
2280 + if (typeof type.tag === "number") error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
2281 + if (typeof type === "function") return type.displayName || type.name || null;
2282 + if (typeof type === "string") return type;
2283 + switch (type) {
2284 + case REACT_FRAGMENT_TYPE: return "Fragment";
2285 + case REACT_PORTAL_TYPE: return "Portal";
2286 + case REACT_PROFILER_TYPE: return "Profiler";
2287 + case REACT_STRICT_MODE_TYPE: return "StrictMode";
2288 + case REACT_SUSPENSE_TYPE: return "Suspense";
2289 + case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
2290 + }
2291 + if (typeof type === "object") switch (type.$$typeof) {
2292 + case REACT_CONTEXT_TYPE: return getContextName(type) + ".Consumer";
2293 + case REACT_PROVIDER_TYPE: return getContextName(type._context) + ".Provider";
2294 + case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef");
2295 + case REACT_MEMO_TYPE:
2296 + var outerName = type.displayName || null;
2297 + if (outerName !== null) return outerName;
2298 + return getComponentNameFromType(type.type) || "Memo";
2299 + case REACT_LAZY_TYPE:
2300 + var lazyComponent = type;
2301 + var payload = lazyComponent._payload;
2302 + var init = lazyComponent._init;
2303 + try {
2304 + return getComponentNameFromType(init(payload));
2305 + } catch (x) {
2306 + return null;
2307 + }
2308 + }
2309 + return null;
2310 + }
2311 + var assign = Object.assign;
2312 + var disabledDepth = 0;
2313 + var prevLog;
2314 + var prevInfo;
2315 + var prevWarn;
2316 + var prevError;
2317 + var prevGroup;
2318 + var prevGroupCollapsed;
2319 + var prevGroupEnd;
2320 + function disabledLog() {}
2321 + disabledLog.__reactDisabledLog = true;
2322 + function disableLogs() {
2323 + if (disabledDepth === 0) {
2324 + prevLog = console.log;
2325 + prevInfo = console.info;
2326 + prevWarn = console.warn;
2327 + prevError = console.error;
2328 + prevGroup = console.group;
2329 + prevGroupCollapsed = console.groupCollapsed;
2330 + prevGroupEnd = console.groupEnd;
2331 + var props = {
2332 + configurable: true,
2333 + enumerable: true,
2334 + value: disabledLog,
2335 + writable: true
2336 + };
2337 + Object.defineProperties(console, {
2338 + info: props,
2339 + log: props,
2340 + warn: props,
2341 + error: props,
2342 + group: props,
2343 + groupCollapsed: props,
2344 + groupEnd: props
2345 + });
2346 + }
2347 + disabledDepth++;
2348 + }
2349 + function reenableLogs() {
2350 + disabledDepth--;
2351 + if (disabledDepth === 0) {
2352 + var props = {
2353 + configurable: true,
2354 + enumerable: true,
2355 + writable: true
2356 + };
2357 + Object.defineProperties(console, {
2358 + log: assign({}, props, { value: prevLog }),
2359 + info: assign({}, props, { value: prevInfo }),
2360 + warn: assign({}, props, { value: prevWarn }),
2361 + error: assign({}, props, { value: prevError }),
2362 + group: assign({}, props, { value: prevGroup }),
2363 + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
2364 + groupEnd: assign({}, props, { value: prevGroupEnd })
2365 + });
2366 + }
2367 + if (disabledDepth < 0) error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2368 + }
2369 + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2370 + var prefix;
2371 + function describeBuiltInComponentFrame(name, source, ownerFn) {
2372 + if (prefix === void 0) try {
2373 + throw Error();
2374 + } catch (x) {
2375 + var match = x.stack.trim().match(/\n( *(at )?)/);
2376 + prefix = match && match[1] || "";
2377 + }
2378 + return "\n" + prefix + name;
2379 + }
2380 + var reentry = false;
2381 + var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map)();
2382 + function describeNativeComponentFrame(fn, construct) {
2383 + if (!fn || reentry) return "";
2384 + var frame = componentFrameCache.get(fn);
2385 + if (frame !== void 0) return frame;
2386 + var control;
2387 + reentry = true;
2388 + var previousPrepareStackTrace = Error.prepareStackTrace;
2389 + Error.prepareStackTrace = void 0;
2390 + var previousDispatcher = ReactCurrentDispatcher.current;
2391 + ReactCurrentDispatcher.current = null;
2392 + disableLogs();
2393 + try {
2394 + if (construct) {
2395 + var Fake = function() {
2396 + throw Error();
2397 + };
2398 + Object.defineProperty(Fake.prototype, "props", { set: function() {
2399 + throw Error();
2400 + } });
2401 + if (typeof Reflect === "object" && Reflect.construct) {
2402 + try {
2403 + Reflect.construct(Fake, []);
2404 + } catch (x) {
2405 + control = x;
2406 + }
2407 + Reflect.construct(fn, [], Fake);
2408 + } else {
2409 + try {
2410 + Fake.call();
2411 + } catch (x) {
2412 + control = x;
2413 + }
2414 + fn.call(Fake.prototype);
2415 + }
2416 + } else {
2417 + try {
2418 + throw Error();
2419 + } catch (x) {
2420 + control = x;
2421 + }
2422 + fn();
2423 + }
2424 + } catch (sample) {
2425 + if (sample && control && typeof sample.stack === "string") {
2426 + var sampleLines = sample.stack.split("\n");
2427 + var controlLines = control.stack.split("\n");
2428 + var s = sampleLines.length - 1;
2429 + var c = controlLines.length - 1;
2430 + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) c--;
2431 + for (; s >= 1 && c >= 0; s--, c--) if (sampleLines[s] !== controlLines[c]) {
2432 + if (s !== 1 || c !== 1) do {
2433 + s--;
2434 + c--;
2435 + if (c < 0 || sampleLines[s] !== controlLines[c]) {
2436 + var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2437 + if (fn.displayName && _frame.includes("<anonymous>")) _frame = _frame.replace("<anonymous>", fn.displayName);
2438 + if (typeof fn === "function") componentFrameCache.set(fn, _frame);
2439 + return _frame;
2440 + }
2441 + } while (s >= 1 && c >= 0);
2442 + break;
2443 + }
2444 + }
2445 + } finally {
2446 + reentry = false;
2447 + ReactCurrentDispatcher.current = previousDispatcher;
2448 + reenableLogs();
2449 + Error.prepareStackTrace = previousPrepareStackTrace;
2450 + }
2451 + var name = fn ? fn.displayName || fn.name : "";
2452 + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2453 + if (typeof fn === "function") componentFrameCache.set(fn, syntheticFrame);
2454 + return syntheticFrame;
2455 + }
2456 + function describeFunctionComponentFrame(fn, source, ownerFn) {
2457 + return describeNativeComponentFrame(fn, false);
2458 + }
2459 + function shouldConstruct(Component) {
2460 + var prototype = Component.prototype;
2461 + return !!(prototype && prototype.isReactComponent);
2462 + }
2463 + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2464 + if (type == null) return "";
2465 + if (typeof type === "function") return describeNativeComponentFrame(type, shouldConstruct(type));
2466 + if (typeof type === "string") return describeBuiltInComponentFrame(type);
2467 + switch (type) {
2468 + case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense");
2469 + case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList");
2470 + }
2471 + if (typeof type === "object") switch (type.$$typeof) {
2472 + case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render);
2473 + case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2474 + case REACT_LAZY_TYPE:
2475 + var lazyComponent = type;
2476 + var payload = lazyComponent._payload;
2477 + var init = lazyComponent._init;
2478 + try {
2479 + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2480 + } catch (x) {}
2481 + }
2482 + return "";
2483 + }
2484 + var hasOwnProperty = Object.prototype.hasOwnProperty;
2485 + var loggedTypeFailures = {};
2486 + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2487 + function setCurrentlyValidatingElement(element) {
2488 + if (element) {
2489 + var owner = element._owner;
2490 + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2491 + ReactDebugCurrentFrame.setExtraStackFrame(stack);
2492 + } else ReactDebugCurrentFrame.setExtraStackFrame(null);
2493 + }
2494 + function checkPropTypes(typeSpecs, values, location, componentName, element) {
2495 + var has = Function.call.bind(hasOwnProperty);
2496 + for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
2497 + var error$1 = void 0;
2498 + try {
2499 + if (typeof typeSpecs[typeSpecName] !== "function") {
2500 + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
2501 + err.name = "Invariant Violation";
2502 + throw err;
2503 + }
2504 + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2505 + } catch (ex) {
2506 + error$1 = ex;
2507 + }
2508 + if (error$1 && !(error$1 instanceof Error)) {
2509 + setCurrentlyValidatingElement(element);
2510 + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
2511 + setCurrentlyValidatingElement(null);
2512 + }
2513 + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2514 + loggedTypeFailures[error$1.message] = true;
2515 + setCurrentlyValidatingElement(element);
2516 + error("Failed %s type: %s", location, error$1.message);
2517 + setCurrentlyValidatingElement(null);
2518 + }
2519 + }
2520 + }
2521 + var isArrayImpl = Array.isArray;
2522 + function isArray(a) {
2523 + return isArrayImpl(a);
2524 + }
2525 + function typeName(value) {
2526 + return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2527 + }
2528 + function willCoercionThrow(value) {
2529 + try {
2530 + testStringCoercion(value);
2531 + return false;
2532 + } catch (e) {
2533 + return true;
2534 + }
2535 + }
2536 + function testStringCoercion(value) {
2537 + return "" + value;
2538 + }
2539 + function checkKeyStringCoercion(value) {
2540 + if (willCoercionThrow(value)) {
2541 + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2542 + return testStringCoercion(value);
2543 + }
2544 + }
2545 + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2546 + var RESERVED_PROPS = {
2547 + key: true,
2548 + ref: true,
2549 + __self: true,
2550 + __source: true
2551 + };
2552 + var specialPropKeyWarningShown;
2553 + var specialPropRefWarningShown;
2554 + var didWarnAboutStringRefs = {};
2555 + function hasValidRef(config) {
2556 + if (hasOwnProperty.call(config, "ref")) {
2557 + var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2558 + if (getter && getter.isReactWarning) return false;
2559 + }
2560 + return config.ref !== void 0;
2561 + }
2562 + function hasValidKey(config) {
2563 + if (hasOwnProperty.call(config, "key")) {
2564 + var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2565 + if (getter && getter.isReactWarning) return false;
2566 + }
2567 + return config.key !== void 0;
2568 + }
2569 + function warnIfStringRefCannotBeAutoConverted(config, self) {
2570 + if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2571 + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2572 + if (!didWarnAboutStringRefs[componentName]) {
2573 + error("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2574 + didWarnAboutStringRefs[componentName] = true;
2575 + }
2576 + }
2577 + }
2578 + function defineKeyPropWarningGetter(props, displayName) {
2579 + var warnAboutAccessingKey = function() {
2580 + if (!specialPropKeyWarningShown) {
2581 + specialPropKeyWarningShown = true;
2582 + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2583 + }
2584 + };
2585 + warnAboutAccessingKey.isReactWarning = true;
2586 + Object.defineProperty(props, "key", {
2587 + get: warnAboutAccessingKey,
2588 + configurable: true
2589 + });
2590 + }
2591 + function defineRefPropWarningGetter(props, displayName) {
2592 + var warnAboutAccessingRef = function() {
2593 + if (!specialPropRefWarningShown) {
2594 + specialPropRefWarningShown = true;
2595 + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2596 + }
2597 + };
2598 + warnAboutAccessingRef.isReactWarning = true;
2599 + Object.defineProperty(props, "ref", {
2600 + get: warnAboutAccessingRef,
2601 + configurable: true
2602 + });
2603 + }
2604 + /**
2605 + * Factory method to create a new React element. This no longer adheres to
2606 + * the class pattern, so do not use new to call it. Also, instanceof check
2607 + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2608 + * if something is a React Element.
2609 + *
2610 + * @param {*} type
2611 + * @param {*} props
2612 + * @param {*} key
2613 + * @param {string|object} ref
2614 + * @param {*} owner
2615 + * @param {*} self A *temporary* helper to detect places where `this` is
2616 + * different from the `owner` when React.createElement is called, so that we
2617 + * can warn. We want to get rid of owner and replace string `ref`s with arrow
2618 + * functions, and as long as `this` and owner are the same, there will be no
2619 + * change in behavior.
2620 + * @param {*} source An annotation object (added by a transpiler or otherwise)
2621 + * indicating filename, line number, and/or other information.
2622 + * @internal
2623 + */
2624 + var ReactElement = function(type, key, ref, self, source, owner, props) {
2625 + var element = {
2626 + $$typeof: REACT_ELEMENT_TYPE,
2627 + type,
2628 + key,
2629 + ref,
2630 + props,
2631 + _owner: owner
2632 + };
2633 + element._store = {};
2634 + Object.defineProperty(element._store, "validated", {
2635 + configurable: false,
2636 + enumerable: false,
2637 + writable: true,
2638 + value: false
2639 + });
2640 + Object.defineProperty(element, "_self", {
2641 + configurable: false,
2642 + enumerable: false,
2643 + writable: false,
2644 + value: self
2645 + });
2646 + Object.defineProperty(element, "_source", {
2647 + configurable: false,
2648 + enumerable: false,
2649 + writable: false,
2650 + value: source
2651 + });
2652 + if (Object.freeze) {
2653 + Object.freeze(element.props);
2654 + Object.freeze(element);
2655 + }
2656 + return element;
2657 + };
2658 + /**
2659 + * https://github.com/reactjs/rfcs/pull/107
2660 + * @param {*} type
2661 + * @param {object} props
2662 + * @param {string} key
2663 + */
2664 + function jsxDEV(type, config, maybeKey, source, self) {
2665 + var propName;
2666 + var props = {};
2667 + var key = null;
2668 + var ref = null;
2669 + if (maybeKey !== void 0) {
2670 + checkKeyStringCoercion(maybeKey);
2671 + key = "" + maybeKey;
2672 + }
2673 + if (hasValidKey(config)) {
2674 + checkKeyStringCoercion(config.key);
2675 + key = "" + config.key;
2676 + }
2677 + if (hasValidRef(config)) {
2678 + ref = config.ref;
2679 + warnIfStringRefCannotBeAutoConverted(config, self);
2680 + }
2681 + for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];
2682 + if (type && type.defaultProps) {
2683 + var defaultProps = type.defaultProps;
2684 + for (propName in defaultProps) if (props[propName] === void 0) props[propName] = defaultProps[propName];
2685 + }
2686 + if (key || ref) {
2687 + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2688 + if (key) defineKeyPropWarningGetter(props, displayName);
2689 + if (ref) defineRefPropWarningGetter(props, displayName);
2690 + }
2691 + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2692 + }
2693 + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2694 + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2695 + function setCurrentlyValidatingElement$1(element) {
2696 + if (element) {
2697 + var owner = element._owner;
2698 + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2699 + ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2700 + } else ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2701 + }
2702 + var propTypesMisspellWarningShown = false;
2703 + /**
2704 + * Verifies the object is a ReactElement.
2705 + * See https://reactjs.org/docs/react-api.html#isvalidelement
2706 + * @param {?object} object
2707 + * @return {boolean} True if `object` is a ReactElement.
2708 + * @final
2709 + */
2710 + function isValidElement(object) {
2711 + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2712 + }
2713 + function getDeclarationErrorAddendum() {
2714 + if (ReactCurrentOwner$1.current) {
2715 + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2716 + if (name) return "\n\nCheck the render method of `" + name + "`.";
2717 + }
2718 + return "";
2719 + }
2720 + function getSourceInfoErrorAddendum(source) {
2721 + if (source !== void 0) {
2722 + var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2723 + var lineNumber = source.lineNumber;
2724 + return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2725 + }
2726 + return "";
2727 + }
2728 + /**
2729 + * Warn if there's no key explicitly set on dynamic arrays of children or
2730 + * object keys are not valid. This allows us to keep track of children between
2731 + * updates.
2732 + */
2733 + var ownerHasKeyUseWarning = {};
2734 + function getCurrentComponentErrorInfo(parentType) {
2735 + var info = getDeclarationErrorAddendum();
2736 + if (!info) {
2737 + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2738 + if (parentName) info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2739 + }
2740 + return info;
2741 + }
2742 + /**
2743 + * Warn if the element doesn't have an explicit key assigned to it.
2744 + * This element is in an array. The array could grow and shrink or be
2745 + * reordered. All children that haven't already been validated are required to
2746 + * have a "key" property assigned to it. Error statuses are cached so a warning
2747 + * will only be shown once.
2748 + *
2749 + * @internal
2750 + * @param {ReactElement} element Element that requires a key.
2751 + * @param {*} parentType element's parent's type.
2752 + */
2753 + function validateExplicitKey(element, parentType) {
2754 + if (!element._store || element._store.validated || element.key != null) return;
2755 + element._store.validated = true;
2756 + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2757 + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) return;
2758 + ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2759 + var childOwner = "";
2760 + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2761 + setCurrentlyValidatingElement$1(element);
2762 + error("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", currentComponentErrorInfo, childOwner);
2763 + setCurrentlyValidatingElement$1(null);
2764 + }
2765 + /**
2766 + * Ensure that every element either is passed in a static location, in an
2767 + * array with an explicit keys property defined, or in an object literal
2768 + * with valid key property.
2769 + *
2770 + * @internal
2771 + * @param {ReactNode} node Statically passed child of any type.
2772 + * @param {*} parentType node's parent's type.
2773 + */
2774 + function validateChildKeys(node, parentType) {
2775 + if (typeof node !== "object") return;
2776 + if (isArray(node)) for (var i = 0; i < node.length; i++) {
2777 + var child = node[i];
2778 + if (isValidElement(child)) validateExplicitKey(child, parentType);
2779 + }
2780 + else if (isValidElement(node)) {
2781 + if (node._store) node._store.validated = true;
2782 + } else if (node) {
2783 + var iteratorFn = getIteratorFn(node);
2784 + if (typeof iteratorFn === "function") {
2785 + if (iteratorFn !== node.entries) {
2786 + var iterator = iteratorFn.call(node);
2787 + var step;
2788 + while (!(step = iterator.next()).done) if (isValidElement(step.value)) validateExplicitKey(step.value, parentType);
2789 + }
2790 + }
2791 + }
2792 + }
2793 + /**
2794 + * Given an element, validate that its props follow the propTypes definition,
2795 + * provided by the type.
2796 + *
2797 + * @param {ReactElement} element
2798 + */
2799 + function validatePropTypes(element) {
2800 + var type = element.type;
2801 + if (type === null || type === void 0 || typeof type === "string") return;
2802 + var propTypes;
2803 + if (typeof type === "function") propTypes = type.propTypes;
2804 + else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) propTypes = type.propTypes;
2805 + else return;
2806 + if (propTypes) {
2807 + var name = getComponentNameFromType(type);
2808 + checkPropTypes(propTypes, element.props, "prop", name, element);
2809 + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2810 + propTypesMisspellWarningShown = true;
2811 + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", getComponentNameFromType(type) || "Unknown");
2812 + }
2813 + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2814 + }
2815 + /**
2816 + * Given a fragment, validate that it can only be provided with fragment props
2817 + * @param {ReactElement} fragment
2818 + */
2819 + function validateFragmentProps(fragment) {
2820 + var keys = Object.keys(fragment.props);
2821 + for (var i = 0; i < keys.length; i++) {
2822 + var key = keys[i];
2823 + if (key !== "children" && key !== "key") {
2824 + setCurrentlyValidatingElement$1(fragment);
2825 + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
2826 + setCurrentlyValidatingElement$1(null);
2827 + break;
2828 + }
2829 + }
2830 + if (fragment.ref !== null) {
2831 + setCurrentlyValidatingElement$1(fragment);
2832 + error("Invalid attribute `ref` supplied to `React.Fragment`.");
2833 + setCurrentlyValidatingElement$1(null);
2834 + }
2835 + }
2836 + var didWarnAboutKeySpread = {};
2837 + function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
2838 + var validType = isValidElementType(type);
2839 + if (!validType) {
2840 + var info = "";
2841 + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
2842 + var sourceInfo = getSourceInfoErrorAddendum(source);
2843 + if (sourceInfo) info += sourceInfo;
2844 + else info += getDeclarationErrorAddendum();
2845 + var typeString;
2846 + if (type === null) typeString = "null";
2847 + else if (isArray(type)) typeString = "array";
2848 + else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
2849 + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
2850 + info = " Did you accidentally export a JSX literal instead of a component?";
2851 + } else typeString = typeof type;
2852 + error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
2853 + }
2854 + var element = jsxDEV(type, props, key, source, self);
2855 + if (element == null) return element;
2856 + if (validType) {
2857 + var children = props.children;
2858 + if (children !== void 0) if (isStaticChildren) if (isArray(children)) {
2859 + for (var i = 0; i < children.length; i++) validateChildKeys(children[i], type);
2860 + if (Object.freeze) Object.freeze(children);
2861 + } else error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2862 + else validateChildKeys(children, type);
2863 + }
2864 + if (hasOwnProperty.call(props, "key")) {
2865 + var componentName = getComponentNameFromType(type);
2866 + var keys = Object.keys(props).filter(function(k) {
2867 + return k !== "key";
2868 + });
2869 + var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
2870 + if (!didWarnAboutKeySpread[componentName + beforeExample]) {
2871 + error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", beforeExample, componentName, keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}", componentName);
2872 + didWarnAboutKeySpread[componentName + beforeExample] = true;
2873 + }
2874 + }
2875 + if (type === REACT_FRAGMENT_TYPE) validateFragmentProps(element);
2876 + else validatePropTypes(element);
2877 + return element;
2878 + }
2879 + function jsxWithValidationStatic(type, props, key) {
2880 + return jsxWithValidation(type, props, key, true);
2881 + }
2882 + function jsxWithValidationDynamic(type, props, key) {
2883 + return jsxWithValidation(type, props, key, false);
2884 + }
2885 + var jsx = jsxWithValidationDynamic;
2886 + var jsxs = jsxWithValidationStatic;
2887 + exports.Fragment = REACT_FRAGMENT_TYPE;
2888 + exports.jsx = jsx;
2889 + exports.jsxs = jsxs;
2890 + })();
2891 + }));
3538 2892
2893 +//#endregion
2894 +//#region node_modules/react/jsx-runtime.js
2895 + var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2896 + module.exports = require_react_jsx_runtime_development();
2897 + }));
3539 2898
2899 +//#endregion
2900 +//#region node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
2901 + var import_jsx_runtime = require_jsx_runtime();
2902 + var QueryClientContext = react.createContext(void 0);
2903 + var useQueryClient = (queryClient) => {
2904 + const client = react.useContext(QueryClientContext);
2905 + if (queryClient) return queryClient;
2906 + if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
2907 + return client;
2908 + };
2909 + var QueryClientProvider = ({ client, children }) => {
2910 + react.useEffect(() => {
2911 + client.mount();
2912 + return () => {
2913 + client.unmount();
2914 + };
2915 + }, [client]);
2916 + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, {
2917 + value: client,
2918 + children
2919 + });
2920 + };
3540 2921
3541 -if (true) {
3542 - (function() {
3543 -'use strict';
2922 +//#endregion
2923 +//#region node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
2924 + var IsRestoringContext = react.createContext(false);
2925 + var useIsRestoring = () => react.useContext(IsRestoringContext);
2926 + var IsRestoringProvider = IsRestoringContext.Provider;
3544 2927
3545 -var React = __webpack_require__(/*! react */ "react");
2928 +//#endregion
2929 +//#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
2930 + function createValue() {
2931 + let isReset = false;
2932 + return {
2933 + clearReset: () => {
2934 + isReset = false;
2935 + },
2936 + reset: () => {
2937 + isReset = true;
2938 + },
2939 + isReset: () => {
2940 + return isReset;
2941 + }
2942 + };
2943 + }
2944 + var QueryErrorResetBoundaryContext = react.createContext(createValue());
2945 + var useQueryErrorResetBoundary = () => react.useContext(QueryErrorResetBoundaryContext);
3546 2946
3547 -// ATTENTION
3548 -// When adding new symbols to this file,
3549 -// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
3550 -// The Symbol used to tag the ReactElement-like types.
3551 -var REACT_ELEMENT_TYPE = Symbol.for('react.element');
3552 -var REACT_PORTAL_TYPE = Symbol.for('react.portal');
3553 -var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
3554 -var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
3555 -var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
3556 -var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
3557 -var REACT_CONTEXT_TYPE = Symbol.for('react.context');
3558 -var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
3559 -var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
3560 -var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
3561 -var REACT_MEMO_TYPE = Symbol.for('react.memo');
3562 -var REACT_LAZY_TYPE = Symbol.for('react.lazy');
3563 -var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
3564 -var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
3565 -var FAUX_ITERATOR_SYMBOL = '@@iterator';
3566 -function getIteratorFn(maybeIterable) {
3567 - if (maybeIterable === null || typeof maybeIterable !== 'object') {
3568 - return null;
3569 - }
2947 +//#endregion
2948 +//#region node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
2949 + var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
2950 + if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
2951 + if (!errorResetBoundary.isReset()) options.retryOnMount = false;
2952 + }
2953 + };
2954 + var useClearResetErrorBoundary = (errorResetBoundary) => {
2955 + react.useEffect(() => {
2956 + errorResetBoundary.clearReset();
2957 + }, [errorResetBoundary]);
2958 + };
2959 + var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {
2960 + return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
2961 + };
3570 2962
3571 - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2963 +//#endregion
2964 +//#region node_modules/@tanstack/react-query/build/modern/suspense.js
2965 + var ensureSuspenseTimers = (defaultedOptions) => {
2966 + if (defaultedOptions.suspense) {
2967 + const MIN_SUSPENSE_TIME_MS = 1e3;
2968 + const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
2969 + const originalStaleTime = defaultedOptions.staleTime;
2970 + defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
2971 + if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
2972 + }
2973 + };
2974 + var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
2975 + var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
2976 + var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
2977 + errorResetBoundary.clearReset();
2978 + });
3572 2979
3573 - if (typeof maybeIterator === 'function') {
3574 - return maybeIterator;
3575 - }
2980 +//#endregion
2981 +//#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
2982 + function useBaseQuery(options, Observer, queryClient) {
2983 + if (typeof options !== "object" || Array.isArray(options)) throw new Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
2984 + const isRestoring = useIsRestoring();
2985 + const errorResetBoundary = useQueryErrorResetBoundary();
2986 + const client = useQueryClient(queryClient);
2987 + const defaultedOptions = client.defaultQueryOptions(options);
2988 + client.getDefaultOptions().queries?._experimental_beforeQuery?.(defaultedOptions);
2989 + if (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);
2990 + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
2991 + ensureSuspenseTimers(defaultedOptions);
2992 + ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);
2993 + useClearResetErrorBoundary(errorResetBoundary);
2994 + const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
2995 + const [observer] = react.useState(() => new Observer(client, defaultedOptions));
2996 + const result = observer.getOptimisticResult(defaultedOptions);
2997 + const shouldSubscribe = !isRestoring && options.subscribed !== false;
2998 + react.useSyncExternalStore(react.useCallback((onStoreChange) => {
2999 + const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
3000 + observer.updateResult();
3001 + return unsubscribe;
3002 + }, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
3003 + react.useEffect(() => {
3004 + observer.setOptions(defaultedOptions);
3005 + }, [defaultedOptions, observer]);
3006 + if (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
3007 + if (getHasError({
3008 + result,
3009 + errorResetBoundary,
3010 + throwOnError: defaultedOptions.throwOnError,
3011 + query: client.getQueryCache().get(defaultedOptions.queryHash),
3012 + suspense: defaultedOptions.suspense
3013 + })) throw result.error;
3014 + client.getDefaultOptions().queries?._experimental_afterQuery?.(defaultedOptions, result);
3015 + if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) (isNewCacheEntry ? fetchOptimistic(defaultedOptions, observer, errorResetBoundary) : client.getQueryCache().get(defaultedOptions.queryHash)?.promise)?.catch(noop).finally(() => {
3016 + observer.updateResult();
3017 + });
3018 + return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
3019 + }
3576 3020
3577 - return null;
3578 -}
3021 +//#endregion
3022 +//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
3023 + function useQuery(options, queryClient) {
3024 + return useBaseQuery(options, QueryObserver, queryClient);
3025 + }
3579 3026
3580 -var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
3027 +//#endregion
3028 +//#region node_modules/@tanstack/react-query/build/modern/useMutationState.js
3029 + function useIsMutating(filters, queryClient) {
3030 + const client = useQueryClient(queryClient);
3031 + return useMutationState({ filters: {
3032 + ...filters,
3033 + status: "pending"
3034 + } }, client).length;
3035 + }
3036 + function getResult(mutationCache, options) {
3037 + return mutationCache.findAll(options.filters).map((mutation) => options.select ? options.select(mutation) : mutation.state);
3038 + }
3039 + function useMutationState(options = {}, queryClient) {
3040 + const mutationCache = useQueryClient(queryClient).getMutationCache();
3041 + const optionsRef = react.useRef(options);
3042 + const result = react.useRef(null);
3043 + if (result.current === null) result.current = getResult(mutationCache, options);
3044 + react.useEffect(() => {
3045 + optionsRef.current = options;
3046 + });
3047 + return react.useSyncExternalStore(react.useCallback((onStoreChange) => mutationCache.subscribe(() => {
3048 + const nextResult = replaceEqualDeep(result.current, getResult(mutationCache, optionsRef.current));
3049 + if (result.current !== nextResult) {
3050 + result.current = nextResult;
3051 + notifyManager.schedule(onStoreChange);
3052 + }
3053 + }), [mutationCache]), () => result.current, () => result.current);
3054 + }
3581 3055
3582 -function error(format) {
3583 - {
3584 - {
3585 - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
3586 - args[_key2 - 1] = arguments[_key2];
3587 - }
3056 +//#endregion
3057 +//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
3058 + function useMutation(options, queryClient) {
3059 + const client = useQueryClient(queryClient);
3060 + const [observer] = react.useState(() => new MutationObserver(client, options));
3061 + react.useEffect(() => {
3062 + observer.setOptions(options);
3063 + }, [observer, options]);
3064 + const result = react.useSyncExternalStore(react.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
3065 + const mutate = react.useCallback((variables, mutateOptions) => {
3066 + observer.mutate(variables, mutateOptions).catch(noop);
3067 + }, [observer]);
3068 + if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
3069 + return {
3070 + ...result,
3071 + mutate,
3072 + mutateAsync: result.mutate
3073 + };
3074 + }
3588 3075
3589 - printWarning('error', format, args);
3590 - }
3591 - }
3592 -}
3076 +//#endregion
3077 +//#region node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
3078 + function useInfiniteQuery(options, queryClient) {
3079 + return useBaseQuery(options, InfiniteQueryObserver, queryClient);
3080 + }
3593 3081
3594 -function printWarning(level, format, args) {
3595 - // When changing this logic, you might want to also
3596 - // update consoleWithStackDev.www.js as well.
3597 - {
3598 - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
3599 - var stack = ReactDebugCurrentFrame.getStackAddendum();
3082 +//#endregion
3083 +//#region packages/packages/libs/query/src/index.ts
3084 + var src_exports = /* @__PURE__ */ __exportAll({
3085 + QueryClient: () => QueryClient,
3086 + QueryClientProvider: () => QueryClientProvider,
3087 + createQueryClient: () => createQueryClient,
3088 + getQueryClient: () => getQueryClient,
3089 + useInfiniteQuery: () => useInfiniteQuery,
3090 + useIsMutating: () => useIsMutating,
3091 + useMutation: () => useMutation,
3092 + useQuery: () => useQuery,
3093 + useQueryClient: () => useQueryClient
3094 + });
3095 + var queryClient;
3096 + function getQueryClient() {
3097 + if (!queryClient) throw new Error("Query client is not created yet.");
3098 + return queryClient;
3099 + }
3100 + function createQueryClient() {
3101 + if (queryClient) throw new Error("Query client is already created.");
3102 + queryClient = new QueryClient({ defaultOptions: { queries: {
3103 + refetchOnWindowFocus: false,
3104 + refetchOnReconnect: false
3105 + } } });
3106 + return queryClient;
3107 + }
3600 3108
3601 - if (stack !== '') {
3602 - format += '%s';
3603 - args = args.concat([stack]);
3604 - } // eslint-disable-next-line react-internal/safe-string-coercion
3109 +//#endregion
3110 +//#region \0elementor-package-library-entry
3111 + (window.elementorV2 = window.elementorV2 || {}).query = src_exports;
3605 3112
3606 -
3607 - var argsWithFormat = args.map(function (item) {
3608 - return String(item);
3609 - }); // Careful: RN currently depends on this prefix
3610 -
3611 - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
3612 - // breaks IE9: https://github.com/facebook/react/issues/13610
3613 - // eslint-disable-next-line react-internal/no-production-logging
3614 -
3615 - Function.prototype.apply.call(console[level], console, argsWithFormat);
3616 - }
3617 -}
3618 -
3619 -// -----------------------------------------------------------------------------
3620 -
3621 -var enableScopeAPI = false; // Experimental Create Event Handle API.
3622 -var enableCacheElement = false;
3623 -var enableTransitionTracing = false; // No known bugs, but needs performance testing
3624 -
3625 -var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
3626 -// stuff. Intended to enable React core members to more easily debug scheduling
3627 -// issues in DEV builds.
3628 -
3629 -var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
3630 -
3631 -var REACT_MODULE_REFERENCE;
3632 -
3633 -{
3634 - REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
3635 -}
3636 -
3637 -function isValidElementType(type) {
3638 - if (typeof type === 'string' || typeof type === 'function') {
3639 - return true;
3640 - } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
3641 -
3642 -
3643 - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
3644 - return true;
3645 - }
3646 -
3647 - if (typeof type === 'object' && type !== null) {
3648 - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
3649 - // types supported by any Flight configuration anywhere since
3650 - // we don't know which Flight build this will end up being used
3651 - // with.
3652 - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
3653 - return true;
3654 - }
3655 - }
3656 -
3657 - return false;
3658 -}
3659 -
3660 -function getWrappedName(outerType, innerType, wrapperName) {
3661 - var displayName = outerType.displayName;
3662 -
3663 - if (displayName) {
3664 - return displayName;
3665 - }
3666 -
3667 - var functionName = innerType.displayName || innerType.name || '';
3668 - return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
3669 -} // Keep in sync with react-reconciler/getComponentNameFromFiber
3670 -
3671 -
3672 -function getContextName(type) {
3673 - return type.displayName || 'Context';
3674 -} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
3675 -
3676 -
3677 -function getComponentNameFromType(type) {
3678 - if (type == null) {
3679 - // Host root, text node or just invalid type.
3680 - return null;
3681 - }
3682 -
3683 - {
3684 - if (typeof type.tag === 'number') {
3685 - error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
3686 - }
3687 - }
3688 -
3689 - if (typeof type === 'function') {
3690 - return type.displayName || type.name || null;
3691 - }
3692 -
3693 - if (typeof type === 'string') {
3694 - return type;
3695 - }
3696 -
3697 - switch (type) {
3698 - case REACT_FRAGMENT_TYPE:
3699 - return 'Fragment';
3700 -
3701 - case REACT_PORTAL_TYPE:
3702 - return 'Portal';
3703 -
3704 - case REACT_PROFILER_TYPE:
3705 - return 'Profiler';
3706 -
3707 - case REACT_STRICT_MODE_TYPE:
3708 - return 'StrictMode';
3709 -
3710 - case REACT_SUSPENSE_TYPE:
3711 - return 'Suspense';
3712 -
3713 - case REACT_SUSPENSE_LIST_TYPE:
3714 - return 'SuspenseList';
3715 -
3716 - }
3717 -
3718 - if (typeof type === 'object') {
3719 - switch (type.$$typeof) {
3720 - case REACT_CONTEXT_TYPE:
3721 - var context = type;
3722 - return getContextName(context) + '.Consumer';
3723 -
3724 - case REACT_PROVIDER_TYPE:
3725 - var provider = type;
3726 - return getContextName(provider._context) + '.Provider';
3727 -
3728 - case REACT_FORWARD_REF_TYPE:
3729 - return getWrappedName(type, type.render, 'ForwardRef');
3730 -
3731 - case REACT_MEMO_TYPE:
3732 - var outerName = type.displayName || null;
3733 -
3734 - if (outerName !== null) {
3735 - return outerName;
3736 - }
3737 -
3738 - return getComponentNameFromType(type.type) || 'Memo';
3739 -
3740 - case REACT_LAZY_TYPE:
3741 - {
3742 - var lazyComponent = type;
3743 - var payload = lazyComponent._payload;
3744 - var init = lazyComponent._init;
3745 -
3746 - try {
3747 - return getComponentNameFromType(init(payload));
3748 - } catch (x) {
3749 - return null;
3750 - }
3751 - }
3752 -
3753 - // eslint-disable-next-line no-fallthrough
3754 - }
3755 - }
3756 -
3757 - return null;
3758 -}
3759 -
3760 -var assign = Object.assign;
3761 -
3762 -// Helpers to patch console.logs to avoid logging during side-effect free
3763 -// replaying on render function. This currently only patches the object
3764 -// lazily which won't cover if the log function was extracted eagerly.
3765 -// We could also eagerly patch the method.
3766 -var disabledDepth = 0;
3767 -var prevLog;
3768 -var prevInfo;
3769 -var prevWarn;
3770 -var prevError;
3771 -var prevGroup;
3772 -var prevGroupCollapsed;
3773 -var prevGroupEnd;
3774 -
3775 -function disabledLog() {}
3776 -
3777 -disabledLog.__reactDisabledLog = true;
3778 -function disableLogs() {
3779 - {
3780 - if (disabledDepth === 0) {
3781 - /* eslint-disable react-internal/no-production-logging */
3782 - prevLog = console.log;
3783 - prevInfo = console.info;
3784 - prevWarn = console.warn;
3785 - prevError = console.error;
3786 - prevGroup = console.group;
3787 - prevGroupCollapsed = console.groupCollapsed;
3788 - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
3789 -
3790 - var props = {
3791 - configurable: true,
3792 - enumerable: true,
3793 - value: disabledLog,
3794 - writable: true
3795 - }; // $FlowFixMe Flow thinks console is immutable.
3796 -
3797 - Object.defineProperties(console, {
3798 - info: props,
3799 - log: props,
3800 - warn: props,
3801 - error: props,
3802 - group: props,
3803 - groupCollapsed: props,
3804 - groupEnd: props
3805 - });
3806 - /* eslint-enable react-internal/no-production-logging */
3807 - }
3808 -
3809 - disabledDepth++;
3810 - }
3811 -}
3812 -function reenableLogs() {
3813 - {
3814 - disabledDepth--;
3815 -
3816 - if (disabledDepth === 0) {
3817 - /* eslint-disable react-internal/no-production-logging */
3818 - var props = {
3819 - configurable: true,
3820 - enumerable: true,
3821 - writable: true
3822 - }; // $FlowFixMe Flow thinks console is immutable.
3823 -
3824 - Object.defineProperties(console, {
3825 - log: assign({}, props, {
3826 - value: prevLog
3827 - }),
3828 - info: assign({}, props, {
3829 - value: prevInfo
3830 - }),
3831 - warn: assign({}, props, {
3832 - value: prevWarn
3833 - }),
3834 - error: assign({}, props, {
3835 - value: prevError
3836 - }),
3837 - group: assign({}, props, {
3838 - value: prevGroup
3839 - }),
3840 - groupCollapsed: assign({}, props, {
3841 - value: prevGroupCollapsed
3842 - }),
3843 - groupEnd: assign({}, props, {
3844 - value: prevGroupEnd
3845 - })
3846 - });
3847 - /* eslint-enable react-internal/no-production-logging */
3848 - }
3849 -
3850 - if (disabledDepth < 0) {
3851 - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
3852 - }
3853 - }
3854 -}
3855 -
3856 -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
3857 -var prefix;
3858 -function describeBuiltInComponentFrame(name, source, ownerFn) {
3859 - {
3860 - if (prefix === undefined) {
3861 - // Extract the VM specific prefix used by each line.
3862 - try {
3863 - throw Error();
3864 - } catch (x) {
3865 - var match = x.stack.trim().match(/\n( *(at )?)/);
3866 - prefix = match && match[1] || '';
3867 - }
3868 - } // We use the prefix to ensure our stacks line up with native stack frames.
3869 -
3870 -
3871 - return '\n' + prefix + name;
3872 - }
3873 -}
3874 -var reentry = false;
3875 -var componentFrameCache;
3876 -
3877 -{
3878 - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
3879 - componentFrameCache = new PossiblyWeakMap();
3880 -}
3881 -
3882 -function describeNativeComponentFrame(fn, construct) {
3883 - // If something asked for a stack inside a fake render, it should get ignored.
3884 - if ( !fn || reentry) {
3885 - return '';
3886 - }
3887 -
3888 - {
3889 - var frame = componentFrameCache.get(fn);
3890 -
3891 - if (frame !== undefined) {
3892 - return frame;
3893 - }
3894 - }
3895 -
3896 - var control;
3897 - reentry = true;
3898 - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
3899 -
3900 - Error.prepareStackTrace = undefined;
3901 - var previousDispatcher;
3902 -
3903 - {
3904 - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
3905 - // for warnings.
3906 -
3907 - ReactCurrentDispatcher.current = null;
3908 - disableLogs();
3909 - }
3910 -
3911 - try {
3912 - // This should throw.
3913 - if (construct) {
3914 - // Something should be setting the props in the constructor.
3915 - var Fake = function () {
3916 - throw Error();
3917 - }; // $FlowFixMe
3918 -
3919 -
3920 - Object.defineProperty(Fake.prototype, 'props', {
3921 - set: function () {
3922 - // We use a throwing setter instead of frozen or non-writable props
3923 - // because that won't throw in a non-strict mode function.
3924 - throw Error();
3925 - }
3926 - });
3927 -
3928 - if (typeof Reflect === 'object' && Reflect.construct) {
3929 - // We construct a different control for this case to include any extra
3930 - // frames added by the construct call.
3931 - try {
3932 - Reflect.construct(Fake, []);
3933 - } catch (x) {
3934 - control = x;
3935 - }
3936 -
3937 - Reflect.construct(fn, [], Fake);
3938 - } else {
3939 - try {
3940 - Fake.call();
3941 - } catch (x) {
3942 - control = x;
3943 - }
3944 -
3945 - fn.call(Fake.prototype);
3946 - }
3947 - } else {
3948 - try {
3949 - throw Error();
3950 - } catch (x) {
3951 - control = x;
3952 - }
3953 -
3954 - fn();
3955 - }
3956 - } catch (sample) {
3957 - // This is inlined manually because closure doesn't do it for us.
3958 - if (sample && control && typeof sample.stack === 'string') {
3959 - // This extracts the first frame from the sample that isn't also in the control.
3960 - // Skipping one frame that we assume is the frame that calls the two.
3961 - var sampleLines = sample.stack.split('\n');
3962 - var controlLines = control.stack.split('\n');
3963 - var s = sampleLines.length - 1;
3964 - var c = controlLines.length - 1;
3965 -
3966 - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
3967 - // We expect at least one stack frame to be shared.
3968 - // Typically this will be the root most one. However, stack frames may be
3969 - // cut off due to maximum stack limits. In this case, one maybe cut off
3970 - // earlier than the other. We assume that the sample is longer or the same
3971 - // and there for cut off earlier. So we should find the root most frame in
3972 - // the sample somewhere in the control.
3973 - c--;
3974 - }
3975 -
3976 - for (; s >= 1 && c >= 0; s--, c--) {
3977 - // Next we find the first one that isn't the same which should be the
3978 - // frame that called our sample function and the control.
3979 - if (sampleLines[s] !== controlLines[c]) {
3980 - // In V8, the first line is describing the message but other VMs don't.
3981 - // If we're about to return the first line, and the control is also on the same
3982 - // line, that's a pretty good indicator that our sample threw at same line as
3983 - // the control. I.e. before we entered the sample frame. So we ignore this result.
3984 - // This can happen if you passed a class to function component, or non-function.
3985 - if (s !== 1 || c !== 1) {
3986 - do {
3987 - s--;
3988 - c--; // We may still have similar intermediate frames from the construct call.
3989 - // The next one that isn't the same should be our match though.
3990 -
3991 - if (c < 0 || sampleLines[s] !== controlLines[c]) {
3992 - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
3993 - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
3994 - // but we have a user-provided "displayName"
3995 - // splice it in to make the stack more readable.
3996 -
3997 -
3998 - if (fn.displayName && _frame.includes('<anonymous>')) {
3999 - _frame = _frame.replace('<anonymous>', fn.displayName);
4000 - }
4001 -
4002 - {
4003 - if (typeof fn === 'function') {
4004 - componentFrameCache.set(fn, _frame);
4005 - }
4006 - } // Return the line we found.
4007 -
4008 -
4009 - return _frame;
4010 - }
4011 - } while (s >= 1 && c >= 0);
4012 - }
4013 -
4014 - break;
4015 - }
4016 - }
4017 - }
4018 - } finally {
4019 - reentry = false;
4020 -
4021 - {
4022 - ReactCurrentDispatcher.current = previousDispatcher;
4023 - reenableLogs();
4024 - }
4025 -
4026 - Error.prepareStackTrace = previousPrepareStackTrace;
4027 - } // Fallback to just using the name if we couldn't make it throw.
4028 -
4029 -
4030 - var name = fn ? fn.displayName || fn.name : '';
4031 - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
4032 -
4033 - {
4034 - if (typeof fn === 'function') {
4035 - componentFrameCache.set(fn, syntheticFrame);
4036 - }
4037 - }
4038 -
4039 - return syntheticFrame;
4040 -}
4041 -function describeFunctionComponentFrame(fn, source, ownerFn) {
4042 - {
4043 - return describeNativeComponentFrame(fn, false);
4044 - }
4045 -}
4046 -
4047 -function shouldConstruct(Component) {
4048 - var prototype = Component.prototype;
4049 - return !!(prototype && prototype.isReactComponent);
4050 -}
4051 -
4052 -function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
4053 -
4054 - if (type == null) {
4055 - return '';
4056 - }
4057 -
4058 - if (typeof type === 'function') {
4059 - {
4060 - return describeNativeComponentFrame(type, shouldConstruct(type));
4061 - }
4062 - }
4063 -
4064 - if (typeof type === 'string') {
4065 - return describeBuiltInComponentFrame(type);
4066 - }
4067 -
4068 - switch (type) {
4069 - case REACT_SUSPENSE_TYPE:
4070 - return describeBuiltInComponentFrame('Suspense');
4071 -
4072 - case REACT_SUSPENSE_LIST_TYPE:
4073 - return describeBuiltInComponentFrame('SuspenseList');
4074 - }
4075 -
4076 - if (typeof type === 'object') {
4077 - switch (type.$$typeof) {
4078 - case REACT_FORWARD_REF_TYPE:
4079 - return describeFunctionComponentFrame(type.render);
4080 -
4081 - case REACT_MEMO_TYPE:
4082 - // Memo may contain any component type so we recursively resolve it.
4083 - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
4084 -
4085 - case REACT_LAZY_TYPE:
4086 - {
4087 - var lazyComponent = type;
4088 - var payload = lazyComponent._payload;
4089 - var init = lazyComponent._init;
4090 -
4091 - try {
4092 - // Lazy may contain any component type so we recursively resolve it.
4093 - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
4094 - } catch (x) {}
4095 - }
4096 - }
4097 - }
4098 -
4099 - return '';
4100 -}
4101 -
4102 -var hasOwnProperty = Object.prototype.hasOwnProperty;
4103 -
4104 -var loggedTypeFailures = {};
4105 -var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
4106 -
4107 -function setCurrentlyValidatingElement(element) {
4108 - {
4109 - if (element) {
4110 - var owner = element._owner;
4111 - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
4112 - ReactDebugCurrentFrame.setExtraStackFrame(stack);
4113 - } else {
4114 - ReactDebugCurrentFrame.setExtraStackFrame(null);
4115 - }
4116 - }
4117 -}
4118 -
4119 -function checkPropTypes(typeSpecs, values, location, componentName, element) {
4120 - {
4121 - // $FlowFixMe This is okay but Flow doesn't know it.
4122 - var has = Function.call.bind(hasOwnProperty);
4123 -
4124 - for (var typeSpecName in typeSpecs) {
4125 - if (has(typeSpecs, typeSpecName)) {
4126 - var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
4127 - // fail the render phase where it didn't fail before. So we log it.
4128 - // After these have been cleaned up, we'll let them throw.
4129 -
4130 - try {
4131 - // This is intentionally an invariant that gets caught. It's the same
4132 - // behavior as without this statement except with a better message.
4133 - if (typeof typeSpecs[typeSpecName] !== 'function') {
4134 - // eslint-disable-next-line react-internal/prod-error-codes
4135 - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
4136 - err.name = 'Invariant Violation';
4137 - throw err;
4138 - }
4139 -
4140 - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
4141 - } catch (ex) {
4142 - error$1 = ex;
4143 - }
4144 -
4145 - if (error$1 && !(error$1 instanceof Error)) {
4146 - setCurrentlyValidatingElement(element);
4147 -
4148 - error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
4149 -
4150 - setCurrentlyValidatingElement(null);
4151 - }
4152 -
4153 - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
4154 - // Only monitor this failure once because there tends to be a lot of the
4155 - // same error.
4156 - loggedTypeFailures[error$1.message] = true;
4157 - setCurrentlyValidatingElement(element);
4158 -
4159 - error('Failed %s type: %s', location, error$1.message);
4160 -
4161 - setCurrentlyValidatingElement(null);
4162 - }
4163 - }
4164 - }
4165 - }
4166 -}
4167 -
4168 -var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
4169 -
4170 -function isArray(a) {
4171 - return isArrayImpl(a);
4172 -}
4173 -
4174 -/*
4175 - * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
4176 - * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
4177 - *
4178 - * The functions in this module will throw an easier-to-understand,
4179 - * easier-to-debug exception with a clear errors message message explaining the
4180 - * problem. (Instead of a confusing exception thrown inside the implementation
4181 - * of the `value` object).
4182 - */
4183 -// $FlowFixMe only called in DEV, so void return is not possible.
4184 -function typeName(value) {
4185 - {
4186 - // toStringTag is needed for namespaced types like Temporal.Instant
4187 - var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
4188 - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
4189 - return type;
4190 - }
4191 -} // $FlowFixMe only called in DEV, so void return is not possible.
4192 -
4193 -
4194 -function willCoercionThrow(value) {
4195 - {
4196 - try {
4197 - testStringCoercion(value);
4198 - return false;
4199 - } catch (e) {
4200 - return true;
4201 - }
4202 - }
4203 -}
4204 -
4205 -function testStringCoercion(value) {
4206 - // If you ended up here by following an exception call stack, here's what's
4207 - // happened: you supplied an object or symbol value to React (as a prop, key,
4208 - // DOM attribute, CSS property, string ref, etc.) and when React tried to
4209 - // coerce it to a string using `'' + value`, an exception was thrown.
4210 - //
4211 - // The most common types that will cause this exception are `Symbol` instances
4212 - // and Temporal objects like `Temporal.Instant`. But any object that has a
4213 - // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
4214 - // exception. (Library authors do this to prevent users from using built-in
4215 - // numeric operators like `+` or comparison operators like `>=` because custom
4216 - // methods are needed to perform accurate arithmetic or comparison.)
4217 - //
4218 - // To fix the problem, coerce this object or symbol value to a string before
4219 - // passing it to React. The most reliable way is usually `String(value)`.
4220 - //
4221 - // To find which value is throwing, check the browser or debugger console.
4222 - // Before this exception was thrown, there should be `console.error` output
4223 - // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
4224 - // problem and how that type was used: key, atrribute, input value prop, etc.
4225 - // In most cases, this console output also shows the component and its
4226 - // ancestor components where the exception happened.
4227 - //
4228 - // eslint-disable-next-line react-internal/safe-string-coercion
4229 - return '' + value;
4230 -}
4231 -function checkKeyStringCoercion(value) {
4232 - {
4233 - if (willCoercionThrow(value)) {
4234 - error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
4235 -
4236 - return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
4237 - }
4238 - }
4239 -}
4240 -
4241 -var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
4242 -var RESERVED_PROPS = {
4243 - key: true,
4244 - ref: true,
4245 - __self: true,
4246 - __source: true
4247 -};
4248 -var specialPropKeyWarningShown;
4249 -var specialPropRefWarningShown;
4250 -var didWarnAboutStringRefs;
4251 -
4252 -{
4253 - didWarnAboutStringRefs = {};
4254 -}
4255 -
4256 -function hasValidRef(config) {
4257 - {
4258 - if (hasOwnProperty.call(config, 'ref')) {
4259 - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
4260 -
4261 - if (getter && getter.isReactWarning) {
4262 - return false;
4263 - }
4264 - }
4265 - }
4266 -
4267 - return config.ref !== undefined;
4268 -}
4269 -
4270 -function hasValidKey(config) {
4271 - {
4272 - if (hasOwnProperty.call(config, 'key')) {
4273 - var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
4274 -
4275 - if (getter && getter.isReactWarning) {
4276 - return false;
4277 - }
4278 - }
4279 - }
4280 -
4281 - return config.key !== undefined;
4282 -}
4283 -
4284 -function warnIfStringRefCannotBeAutoConverted(config, self) {
4285 - {
4286 - if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
4287 - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
4288 -
4289 - if (!didWarnAboutStringRefs[componentName]) {
4290 - error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
4291 -
4292 - didWarnAboutStringRefs[componentName] = true;
4293 - }
4294 - }
4295 - }
4296 -}
4297 -
4298 -function defineKeyPropWarningGetter(props, displayName) {
4299 - {
4300 - var warnAboutAccessingKey = function () {
4301 - if (!specialPropKeyWarningShown) {
4302 - specialPropKeyWarningShown = true;
4303 -
4304 - error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
4305 - }
4306 - };
4307 -
4308 - warnAboutAccessingKey.isReactWarning = true;
4309 - Object.defineProperty(props, 'key', {
4310 - get: warnAboutAccessingKey,
4311 - configurable: true
4312 - });
4313 - }
4314 -}
4315 -
4316 -function defineRefPropWarningGetter(props, displayName) {
4317 - {
4318 - var warnAboutAccessingRef = function () {
4319 - if (!specialPropRefWarningShown) {
4320 - specialPropRefWarningShown = true;
4321 -
4322 - error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
4323 - }
4324 - };
4325 -
4326 - warnAboutAccessingRef.isReactWarning = true;
4327 - Object.defineProperty(props, 'ref', {
4328 - get: warnAboutAccessingRef,
4329 - configurable: true
4330 - });
4331 - }
4332 -}
4333 -/**
4334 - * Factory method to create a new React element. This no longer adheres to
4335 - * the class pattern, so do not use new to call it. Also, instanceof check
4336 - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
4337 - * if something is a React Element.
4338 - *
4339 - * @param {*} type
4340 - * @param {*} props
4341 - * @param {*} key
4342 - * @param {string|object} ref
4343 - * @param {*} owner
4344 - * @param {*} self A *temporary* helper to detect places where `this` is
4345 - * different from the `owner` when React.createElement is called, so that we
4346 - * can warn. We want to get rid of owner and replace string `ref`s with arrow
4347 - * functions, and as long as `this` and owner are the same, there will be no
4348 - * change in behavior.
4349 - * @param {*} source An annotation object (added by a transpiler or otherwise)
4350 - * indicating filename, line number, and/or other information.
4351 - * @internal
4352 - */
4353 -
4354 -
4355 -var ReactElement = function (type, key, ref, self, source, owner, props) {
4356 - var element = {
4357 - // This tag allows us to uniquely identify this as a React Element
4358 - $$typeof: REACT_ELEMENT_TYPE,
4359 - // Built-in properties that belong on the element
4360 - type: type,
4361 - key: key,
4362 - ref: ref,
4363 - props: props,
4364 - // Record the component responsible for creating this element.
4365 - _owner: owner
4366 - };
4367 -
4368 - {
4369 - // The validation flag is currently mutative. We put it on
4370 - // an external backing store so that we can freeze the whole object.
4371 - // This can be replaced with a WeakMap once they are implemented in
4372 - // commonly used development environments.
4373 - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
4374 - // the validation flag non-enumerable (where possible, which should
4375 - // include every environment we run tests in), so the test framework
4376 - // ignores it.
4377 -
4378 - Object.defineProperty(element._store, 'validated', {
4379 - configurable: false,
4380 - enumerable: false,
4381 - writable: true,
4382 - value: false
4383 - }); // self and source are DEV only properties.
4384 -
4385 - Object.defineProperty(element, '_self', {
4386 - configurable: false,
4387 - enumerable: false,
4388 - writable: false,
4389 - value: self
4390 - }); // Two elements created in two different places should be considered
4391 - // equal for testing purposes and therefore we hide it from enumeration.
4392 -
4393 - Object.defineProperty(element, '_source', {
4394 - configurable: false,
4395 - enumerable: false,
4396 - writable: false,
4397 - value: source
4398 - });
4399 -
4400 - if (Object.freeze) {
4401 - Object.freeze(element.props);
4402 - Object.freeze(element);
4403 - }
4404 - }
4405 -
4406 - return element;
4407 -};
4408 -/**
4409 - * https://github.com/reactjs/rfcs/pull/107
4410 - * @param {*} type
4411 - * @param {object} props
4412 - * @param {string} key
4413 - */
4414 -
4415 -function jsxDEV(type, config, maybeKey, source, self) {
4416 - {
4417 - var propName; // Reserved names are extracted
4418 -
4419 - var props = {};
4420 - var key = null;
4421 - var ref = null; // Currently, key can be spread in as a prop. This causes a potential
4422 - // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
4423 - // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
4424 - // but as an intermediary step, we will use jsxDEV for everything except
4425 - // <div {...props} key="Hi" />, because we aren't currently able to tell if
4426 - // key is explicitly declared to be undefined or not.
4427 -
4428 - if (maybeKey !== undefined) {
4429 - {
4430 - checkKeyStringCoercion(maybeKey);
4431 - }
4432 -
4433 - key = '' + maybeKey;
4434 - }
4435 -
4436 - if (hasValidKey(config)) {
4437 - {
4438 - checkKeyStringCoercion(config.key);
4439 - }
4440 -
4441 - key = '' + config.key;
4442 - }
4443 -
4444 - if (hasValidRef(config)) {
4445 - ref = config.ref;
4446 - warnIfStringRefCannotBeAutoConverted(config, self);
4447 - } // Remaining properties are added to a new props object
4448 -
4449 -
4450 - for (propName in config) {
4451 - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
4452 - props[propName] = config[propName];
4453 - }
4454 - } // Resolve default props
4455 -
4456 -
4457 - if (type && type.defaultProps) {
4458 - var defaultProps = type.defaultProps;
4459 -
4460 - for (propName in defaultProps) {
4461 - if (props[propName] === undefined) {
4462 - props[propName] = defaultProps[propName];
4463 - }
4464 - }
4465 - }
4466 -
4467 - if (key || ref) {
4468 - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
4469 -
4470 - if (key) {
4471 - defineKeyPropWarningGetter(props, displayName);
4472 - }
4473 -
4474 - if (ref) {
4475 - defineRefPropWarningGetter(props, displayName);
4476 - }
4477 - }
4478 -
4479 - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
4480 - }
4481 -}
4482 -
4483 -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
4484 -var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
4485 -
4486 -function setCurrentlyValidatingElement$1(element) {
4487 - {
4488 - if (element) {
4489 - var owner = element._owner;
4490 - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
4491 - ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
4492 - } else {
4493 - ReactDebugCurrentFrame$1.setExtraStackFrame(null);
4494 - }
4495 - }
4496 -}
4497 -
4498 -var propTypesMisspellWarningShown;
4499 -
4500 -{
4501 - propTypesMisspellWarningShown = false;
4502 -}
4503 -/**
4504 - * Verifies the object is a ReactElement.
4505 - * See https://reactjs.org/docs/react-api.html#isvalidelement
4506 - * @param {?object} object
4507 - * @return {boolean} True if `object` is a ReactElement.
4508 - * @final
4509 - */
4510 -
4511 -
4512 -function isValidElement(object) {
4513 - {
4514 - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
4515 - }
4516 -}
4517 -
4518 -function getDeclarationErrorAddendum() {
4519 - {
4520 - if (ReactCurrentOwner$1.current) {
4521 - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
4522 -
4523 - if (name) {
4524 - return '\n\nCheck the render method of `' + name + '`.';
4525 - }
4526 - }
4527 -
4528 - return '';
4529 - }
4530 -}
4531 -
4532 -function getSourceInfoErrorAddendum(source) {
4533 - {
4534 - if (source !== undefined) {
4535 - var fileName = source.fileName.replace(/^.*[\\\/]/, '');
4536 - var lineNumber = source.lineNumber;
4537 - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
4538 - }
4539 -
4540 - return '';
4541 - }
4542 -}
4543 -/**
4544 - * Warn if there's no key explicitly set on dynamic arrays of children or
4545 - * object keys are not valid. This allows us to keep track of children between
4546 - * updates.
4547 - */
4548 -
4549 -
4550 -var ownerHasKeyUseWarning = {};
4551 -
4552 -function getCurrentComponentErrorInfo(parentType) {
4553 - {
4554 - var info = getDeclarationErrorAddendum();
4555 -
4556 - if (!info) {
4557 - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
4558 -
4559 - if (parentName) {
4560 - info = "\n\nCheck the top-level render call using <" + parentName + ">.";
4561 - }
4562 - }
4563 -
4564 - return info;
4565 - }
4566 -}
4567 -/**
4568 - * Warn if the element doesn't have an explicit key assigned to it.
4569 - * This element is in an array. The array could grow and shrink or be
4570 - * reordered. All children that haven't already been validated are required to
4571 - * have a "key" property assigned to it. Error statuses are cached so a warning
4572 - * will only be shown once.
4573 - *
4574 - * @internal
4575 - * @param {ReactElement} element Element that requires a key.
4576 - * @param {*} parentType element's parent's type.
4577 - */
4578 -
4579 -
4580 -function validateExplicitKey(element, parentType) {
4581 - {
4582 - if (!element._store || element._store.validated || element.key != null) {
4583 - return;
4584 - }
4585 -
4586 - element._store.validated = true;
4587 - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
4588 -
4589 - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
4590 - return;
4591 - }
4592 -
4593 - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
4594 - // property, it may be the creator of the child that's responsible for
4595 - // assigning it a key.
4596 -
4597 - var childOwner = '';
4598 -
4599 - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
4600 - // Give the component that originally created this child.
4601 - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
4602 - }
4603 -
4604 - setCurrentlyValidatingElement$1(element);
4605 -
4606 - error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
4607 -
4608 - setCurrentlyValidatingElement$1(null);
4609 - }
4610 -}
4611 -/**
4612 - * Ensure that every element either is passed in a static location, in an
4613 - * array with an explicit keys property defined, or in an object literal
4614 - * with valid key property.
4615 - *
4616 - * @internal
4617 - * @param {ReactNode} node Statically passed child of any type.
4618 - * @param {*} parentType node's parent's type.
4619 - */
4620 -
4621 -
4622 -function validateChildKeys(node, parentType) {
4623 - {
4624 - if (typeof node !== 'object') {
4625 - return;
4626 - }
4627 -
4628 - if (isArray(node)) {
4629 - for (var i = 0; i < node.length; i++) {
4630 - var child = node[i];
4631 -
4632 - if (isValidElement(child)) {
4633 - validateExplicitKey(child, parentType);
4634 - }
4635 - }
4636 - } else if (isValidElement(node)) {
4637 - // This element was passed in a valid location.
4638 - if (node._store) {
4639 - node._store.validated = true;
4640 - }
4641 - } else if (node) {
4642 - var iteratorFn = getIteratorFn(node);
4643 -
4644 - if (typeof iteratorFn === 'function') {
4645 - // Entry iterators used to provide implicit keys,
4646 - // but now we print a separate warning for them later.
4647 - if (iteratorFn !== node.entries) {
4648 - var iterator = iteratorFn.call(node);
4649 - var step;
4650 -
4651 - while (!(step = iterator.next()).done) {
4652 - if (isValidElement(step.value)) {
4653 - validateExplicitKey(step.value, parentType);
4654 - }
4655 - }
4656 - }
4657 - }
4658 - }
4659 - }
4660 -}
4661 -/**
4662 - * Given an element, validate that its props follow the propTypes definition,
4663 - * provided by the type.
4664 - *
4665 - * @param {ReactElement} element
4666 - */
4667 -
4668 -
4669 -function validatePropTypes(element) {
4670 - {
4671 - var type = element.type;
4672 -
4673 - if (type === null || type === undefined || typeof type === 'string') {
4674 - return;
4675 - }
4676 -
4677 - var propTypes;
4678 -
4679 - if (typeof type === 'function') {
4680 - propTypes = type.propTypes;
4681 - } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
4682 - // Inner props are checked in the reconciler.
4683 - type.$$typeof === REACT_MEMO_TYPE)) {
4684 - propTypes = type.propTypes;
4685 - } else {
4686 - return;
4687 - }
4688 -
4689 - if (propTypes) {
4690 - // Intentionally inside to avoid triggering lazy initializers:
4691 - var name = getComponentNameFromType(type);
4692 - checkPropTypes(propTypes, element.props, 'prop', name, element);
4693 - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
4694 - propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
4695 -
4696 - var _name = getComponentNameFromType(type);
4697 -
4698 - error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
4699 - }
4700 -
4701 - if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
4702 - error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
4703 - }
4704 - }
4705 -}
4706 -/**
4707 - * Given a fragment, validate that it can only be provided with fragment props
4708 - * @param {ReactElement} fragment
4709 - */
4710 -
4711 -
4712 -function validateFragmentProps(fragment) {
4713 - {
4714 - var keys = Object.keys(fragment.props);
4715 -
4716 - for (var i = 0; i < keys.length; i++) {
4717 - var key = keys[i];
4718 -
4719 - if (key !== 'children' && key !== 'key') {
4720 - setCurrentlyValidatingElement$1(fragment);
4721 -
4722 - error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
4723 -
4724 - setCurrentlyValidatingElement$1(null);
4725 - break;
4726 - }
4727 - }
4728 -
4729 - if (fragment.ref !== null) {
4730 - setCurrentlyValidatingElement$1(fragment);
4731 -
4732 - error('Invalid attribute `ref` supplied to `React.Fragment`.');
4733 -
4734 - setCurrentlyValidatingElement$1(null);
4735 - }
4736 - }
4737 -}
4738 -
4739 -var didWarnAboutKeySpread = {};
4740 -function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
4741 - {
4742 - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
4743 - // succeed and there will likely be errors in render.
4744 -
4745 - if (!validType) {
4746 - var info = '';
4747 -
4748 - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
4749 - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
4750 - }
4751 -
4752 - var sourceInfo = getSourceInfoErrorAddendum(source);
4753 -
4754 - if (sourceInfo) {
4755 - info += sourceInfo;
4756 - } else {
4757 - info += getDeclarationErrorAddendum();
4758 - }
4759 -
4760 - var typeString;
4761 -
4762 - if (type === null) {
4763 - typeString = 'null';
4764 - } else if (isArray(type)) {
4765 - typeString = 'array';
4766 - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
4767 - typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
4768 - info = ' Did you accidentally export a JSX literal instead of a component?';
4769 - } else {
4770 - typeString = typeof type;
4771 - }
4772 -
4773 - error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
4774 - }
4775 -
4776 - var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
4777 - // TODO: Drop this when these are no longer allowed as the type argument.
4778 -
4779 - if (element == null) {
4780 - return element;
4781 - } // Skip key warning if the type isn't valid since our key validation logic
4782 - // doesn't expect a non-string/function type and can throw confusing errors.
4783 - // We don't want exception behavior to differ between dev and prod.
4784 - // (Rendering will throw with a helpful message and as soon as the type is
4785 - // fixed, the key warnings will appear.)
4786 -
4787 -
4788 - if (validType) {
4789 - var children = props.children;
4790 -
4791 - if (children !== undefined) {
4792 - if (isStaticChildren) {
4793 - if (isArray(children)) {
4794 - for (var i = 0; i < children.length; i++) {
4795 - validateChildKeys(children[i], type);
4796 - }
4797 -
4798 - if (Object.freeze) {
4799 - Object.freeze(children);
4800 - }
4801 - } else {
4802 - error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
4803 - }
4804 - } else {
4805 - validateChildKeys(children, type);
4806 - }
4807 - }
4808 - }
4809 -
4810 - {
4811 - if (hasOwnProperty.call(props, 'key')) {
4812 - var componentName = getComponentNameFromType(type);
4813 - var keys = Object.keys(props).filter(function (k) {
4814 - return k !== 'key';
4815 - });
4816 - var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
4817 -
4818 - if (!didWarnAboutKeySpread[componentName + beforeExample]) {
4819 - var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
4820 -
4821 - error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
4822 -
4823 - didWarnAboutKeySpread[componentName + beforeExample] = true;
4824 - }
4825 - }
4826 - }
4827 -
4828 - if (type === REACT_FRAGMENT_TYPE) {
4829 - validateFragmentProps(element);
4830 - } else {
4831 - validatePropTypes(element);
4832 - }
4833 -
4834 - return element;
4835 - }
4836 -} // These two functions exist to still get child warnings in dev
4837 -// even with the prod transform. This means that jsxDEV is purely
4838 -// opt-in behavior for better messages but that we won't stop
4839 -// giving you warnings if you use production apis.
4840 -
4841 -function jsxWithValidationStatic(type, props, key) {
4842 - {
4843 - return jsxWithValidation(type, props, key, true);
4844 - }
4845 -}
4846 -function jsxWithValidationDynamic(type, props, key) {
4847 - {
4848 - return jsxWithValidation(type, props, key, false);
4849 - }
4850 -}
4851 -
4852 -var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
4853 -// for now we can ship identical prod functions
4854 -
4855 -var jsxs = jsxWithValidationStatic ;
4856 -
4857 -exports.Fragment = REACT_FRAGMENT_TYPE;
4858 -exports.jsx = jsx;
4859 -exports.jsxs = jsxs;
4860 - })();
4861 -}
4862 -
4863 -
4864 -/***/ }),
4865 -
4866 -/***/ "./node_modules/react/jsx-runtime.js":
4867 -/*!*******************************************!*\
4868 - !*** ./node_modules/react/jsx-runtime.js ***!
4869 - \*******************************************/
4870 -/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4871 -
4872 -
4873 -
4874 -if (false) // removed by dead control flow
4875 -{} else {
4876 - module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
4877 -}
4878 -
4879 -
4880 -/***/ }),
4881 -
4882 -/***/ "react":
4883 -/*!**************************!*\
4884 - !*** external ["React"] ***!
4885 - \**************************/
4886 -/***/ (function(module) {
4887 -
4888 -module.exports = window["React"];
4889 -
4890 -/***/ })
4891 -
4892 -/******/ });
4893 -/************************************************************************/
4894 -/******/ // The module cache
4895 -/******/ var __webpack_module_cache__ = {};
4896 -/******/
4897 -/******/ // The require function
4898 -/******/ function __webpack_require__(moduleId) {
4899 -/******/ // Check if module is in cache
4900 -/******/ var cachedModule = __webpack_module_cache__[moduleId];
4901 -/******/ if (cachedModule !== undefined) {
4902 -/******/ return cachedModule.exports;
4903 -/******/ }
4904 -/******/ // Create a new module (and put it into the cache)
4905 -/******/ var module = __webpack_module_cache__[moduleId] = {
4906 -/******/ // no module.id needed
4907 -/******/ // no module.loaded needed
4908 -/******/ exports: {}
4909 -/******/ };
4910 -/******/
4911 -/******/ // Execute the module function
4912 -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
4913 -/******/
4914 -/******/ // Return the exports of the module
4915 -/******/ return module.exports;
4916 -/******/ }
4917 -/******/
4918 -/************************************************************************/
4919 -/******/ /* webpack/runtime/define property getters */
4920 -/******/ !function() {
4921 -/******/ // define getter functions for harmony exports
4922 -/******/ __webpack_require__.d = function(exports, definition) {
4923 -/******/ for(var key in definition) {
4924 -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
4925 -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
4926 -/******/ }
4927 -/******/ }
4928 -/******/ };
4929 -/******/ }();
4930 -/******/
4931 -/******/ /* webpack/runtime/hasOwnProperty shorthand */
4932 -/******/ !function() {
4933 -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
4934 -/******/ }();
4935 -/******/
4936 -/******/ /* webpack/runtime/make namespace object */
4937 -/******/ !function() {
4938 -/******/ // define __esModule on exports
4939 -/******/ __webpack_require__.r = function(exports) {
4940 -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
4941 -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4942 -/******/ }
4943 -/******/ Object.defineProperty(exports, '__esModule', { value: true });
4944 -/******/ };
4945 -/******/ }();
4946 -/******/
4947 -/************************************************************************/
4948 -var __webpack_exports__ = {};
4949 -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
4950 -!function() {
4951 -/*!***************************************************!*\
4952 - !*** ./packages/packages/libs/query/src/index.ts ***!
4953 - \***************************************************/
4954 -__webpack_require__.r(__webpack_exports__);
4955 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
4956 -/* harmony export */ QueryClient: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.QueryClient; },
4957 -/* harmony export */ QueryClientProvider: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_2__.QueryClientProvider; },
4958 -/* harmony export */ createQueryClient: function() { return /* binding */ createQueryClient; },
4959 -/* harmony export */ getQueryClient: function() { return /* binding */ getQueryClient; },
4960 -/* harmony export */ useInfiniteQuery: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.useInfiniteQuery; },
4961 -/* harmony export */ useIsMutating: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_3__.useIsMutating; },
4962 -/* harmony export */ useMutation: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_4__.useMutation; },
4963 -/* harmony export */ useQuery: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__.useQuery; },
4964 -/* harmony export */ useQueryClient: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_2__.useQueryClient; }
4965 -/* harmony export */ });
4966 -/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/query-core/build/modern/queryClient.js");
4967 -/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/useQuery.js");
4968 -/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
4969 -/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/useMutationState.js");
4970 -/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/useMutation.js");
4971 -/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js");
4972 -
4973 -
4974 -let queryClient;
4975 -function getQueryClient() {
4976 - if (!queryClient) {
4977 - throw new Error('Query client is not created yet.');
4978 - }
4979 - return queryClient;
4980 -}
4981 -function createQueryClient() {
4982 - if (queryClient) {
4983 - throw new Error('Query client is already created.');
4984 - }
4985 - queryClient = new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.QueryClient({
4986 - defaultOptions: {
4987 - queries: {
4988 - refetchOnWindowFocus: false,
4989 - refetchOnReconnect: false
4990 - }
4991 - }
4992 - });
4993 - return queryClient;
4994 -}
4995 -}();
4996 -(window.elementorV2 = window.elementorV2 || {}).query = __webpack_exports__;
4997 -/******/ })()
4998 -;
3113 +//#endregion
3114 +})(React);
4999 3115 window.elementorV2.query?.init?.();
5000 3116 //# sourceMappingURL=query.js.map