PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.8
Elementor Website Builder – more than just a page builder v3.35.8
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 +2 -3115 4.3.0-beta33.35.8 View file →
@@ -1,3116 +1,3 @@
1 -(function(react) {
2 -
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));
46 -
47 -//#endregion
48 -react = __toESM(react, 1);
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 - };
70 -
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 - }
109 -
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 - }
273 -
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();
327 -
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 - }
360 -
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();
434 -
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();
483 -
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 - }
590 -
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 - };
614 -
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");
978 -
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 - }
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 - }
1409 -
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 - };
1467 -
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 - }
1669 -
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 - }
1777 -
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 - };
1866 -
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 - };
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 - };
2201 -
2202 -//#endregion
2203 -//#region node_modules/react/cjs/react-jsx-runtime.development.js
2204 -/**
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 - }));
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 - }));
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 - };
2921 -
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;
2927 -
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);
2946 -
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 - };
2962 -
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 - });
2979 -
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 - }
3020 -
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 - }
3026 -
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 - }
3055 -
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 - }
3075 -
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 - }
3081 -
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 - }
3108 -
3109 -//#endregion
3110 -//#region \0elementor-package-library-entry
3111 - (window.elementorV2 = window.elementorV2 || {}).query = src_exports;
3112 -
3113 -//#endregion
3114 -})(React);
3115 -window.elementorV2.query?.init?.();
1 +/*! For license information please see query.js.LICENSE.txt */
2 +!function(){"use strict";var e={"./packages/node_modules/@tanstack/query-core/build/modern/focusManager.js":function(e,t,r){r.r(t),r.d(t,{FocusManager:function(){return i},focusManager:function(){return a}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),i=class extends n.Subscribable{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!s.isServer&&window.addEventListener){const listener=()=>e();return window.addEventListener("visibilitychange",listener,!1),()=>{window.removeEventListener("visibilitychange",listener)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},a=new i},"./packages/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js":function(e,t,r){r.r(t),r.d(t,{hasNextPage:function(){return hasNextPage},hasPreviousPage:function(){return hasPreviousPage},infiniteQueryBehavior:function(){return infiniteQueryBehavior}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js");function infiniteQueryBehavior(e){return{onFetch:(t,r)=>{const s=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const fetchFn=async()=>{let r=!1;const l=(0,n.ensureQueryFn)(t.options,t.fetchOptions),fetchPage=async(e,s,i)=>{if(r)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const a=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:s,direction:i?"backward":"forward",meta:t.options.meta};var a;return a=e,(0,n.addConsumeAwareSignal)(a,()=>t.signal,()=>r=!0),e})(),o=await l(a),{maxPages:u}=t.options,c=i?n.addToStart:n.addToEnd;return{pages:c(e.pages,o,u),pageParams:c(e.pageParams,s,u)}};if(i&&a.length){const e="backward"===i,t={pages:a,pageParams:o},r=(e?getPreviousPageParam:getNextPageParam)(s,t);u=await fetchPage(t,r,e)}else{const t=e??a.length;do{const e=0===c?o[0]??s.initialPageParam:getNextPageParam(s,u);if(c>0&&null==e)break;u=await fetchPage(u,e),c++}while(c<t)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(fetchFn,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=fetchFn}}}function getNextPageParam(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function getPreviousPageParam(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function hasNextPage(e,t){return!!t&&null!=getNextPageParam(e,t)}function hasPreviousPage(e,t){return!(!t||!e.getPreviousPageParam)&&null!=getPreviousPageParam(e,t)}},"./packages/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js":function(e,t,r){r.r(t),r.d(t,{InfiniteQueryObserver:function(){return i}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/queryObserver.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js"),i=class extends n.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,s.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,s.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:u}=n,c=r.fetchMeta?.fetchMore?.direction,l=o&&"forward"===c,d=i&&"forward"===c,h=o&&"backward"===c,f=i&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,s.hasNextPage)(t,r.data),hasPreviousPage:(0,s.hasPreviousPage)(t,r.data),isFetchNextPageError:l,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:f,isRefetchError:u&&!l&&!h,isRefetching:a&&!d&&!f}}}},"./packages/node_modules/@tanstack/query-core/build/modern/mutation.js":function(e,t,r){r.r(t),r.d(t,{Mutation:function(){return a},getDefaultState:function(){return getDefaultState}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/removable.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/retryer.js"),a=class extends s.Removable{#n;#s;#i;#a;constructor(e){super(),this.#n=e.client,this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#s=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#s.includes(e)||(this.#s.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#s=this.#s.filter(t=>t!==e),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#s.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const onContinue=()=>{this.#o({type:"continue"})},t={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=(0,i.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,t):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:onContinue,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});const r="pending"===this.state.status,n=!this.#a.canStart();try{if(r)onContinue();else{this.#o({type:"pending",variables:e,isPaused:n}),this.#i.config.onMutate&&await this.#i.config.onMutate(e,this,t);const r=await(this.options.onMutate?.(e,t));r!==this.state.context&&this.#o({type:"pending",context:r,variables:e,isPaused:n})}const s=await this.#a.start();return await(this.#i.config.onSuccess?.(s,e,this.state.context,this,t)),await(this.options.onSuccess?.(s,e,this.state.context,t)),await(this.#i.config.onSettled?.(s,null,this.state.variables,this.state.context,this,t)),await(this.options.onSettled?.(s,null,e,this.state.context,t)),this.#o({type:"success",data:s}),s}catch(r){try{await(this.#i.config.onError?.(r,e,this.state.context,this,t))}catch(e){Promise.reject(e)}try{await(this.options.onError?.(r,e,this.state.context,t))}catch(e){Promise.reject(e)}try{await(this.#i.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,t))}catch(e){Promise.reject(e)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,t))}catch(e){Promise.reject(e)}throw this.#o({type:"error",error:r}),r}finally{this.#i.runNext(this)}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.notifyManager.batch(()=>{this.#s.forEach(t=>{t.onMutationUpdate(e)}),this.#i.notify({mutation:this,type:"updated",action:e})})}};function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},"./packages/node_modules/@tanstack/query-core/build/modern/mutationCache.js":function(e,t,r){r.r(t),r.d(t,{MutationCache:function(){return o}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/mutation.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js"),o=class extends a.Subscribable{constructor(e={}){super(),this.config=e,this.#u=new Set,this.#c=new Map,this.#l=0}#u;#c;#l;build(e,t,r){const n=new s.Mutation({client:e,mutationCache:this,mutationId:++this.#l,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#u.add(e);const t=scopeFor(e);if("string"==typeof t){const r=this.#c.get(t);r?r.push(e):this.#c.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#u.delete(e)){const t=scopeFor(e);if("string"==typeof t){const r=this.#c.get(t);if(r)if(r.length>1){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#c.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=scopeFor(e);if("string"==typeof t){const r=this.#c.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}return!0}runNext(e){const t=scopeFor(e);if("string"==typeof t){const r=this.#c.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}return Promise.resolve()}clear(){n.notifyManager.batch(()=>{this.#u.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#u.clear(),this.#c.clear()})}getAll(){return Array.from(this.#u)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>(0,i.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.matchMutation)(e,t))}notify(e){n.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return n.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.noop))))}};function scopeFor(e){return e.options.scope?.id}},"./packages/node_modules/@tanstack/query-core/build/modern/mutationObserver.js":function(e,t,r){r.r(t),r.d(t,{MutationObserver:function(){return o}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/mutation.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),o=class extends i.Subscribable{#n;#d=void 0;#h;#f;constructor(e,t){super(),this.#n=e,this.setOptions(t),this.bindMethods(),this.#p()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#n.defaultMutationOptions(e),(0,a.shallowEqualObjects)(this.options,t)||this.#n.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#h,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.hashKey)(t.mutationKey)!==(0,a.hashKey)(this.options.mutationKey)?this.reset():"pending"===this.#h?.state.status&&this.#h.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#h?.removeObserver(this)}onMutationUpdate(e){this.#p(),this.#y(e)}getCurrentResult(){return this.#d}reset(){this.#h?.removeObserver(this),this.#h=void 0,this.#p(),this.#y()}mutate(e,t){return this.#f=t,this.#h?.removeObserver(this),this.#h=this.#n.getMutationCache().build(this.#n,this.options),this.#h.addObserver(this),this.#h.execute(e)}#p(){const e=this.#h?.state??(0,n.getDefaultState)();this.#d={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#y(e){s.notifyManager.batch(()=>{if(this.#f&&this.hasListeners()){const t=this.#d.variables,r=this.#d.context,n={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===e?.type){try{this.#f.onSuccess?.(e.data,t,r,n)}catch(e){Promise.reject(e)}try{this.#f.onSettled?.(e.data,null,t,r,n)}catch(e){Promise.reject(e)}}else if("error"===e?.type){try{this.#f.onError?.(e.error,t,r,n)}catch(e){Promise.reject(e)}try{this.#f.onSettled?.(void 0,e.error,t,r,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#d)})})}}},"./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js":function(e,t,r){r.r(t),r.d(t,{createNotifyManager:function(){return createNotifyManager},defaultScheduler:function(){return n},notifyManager:function(){return s}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/timeoutManager.js").systemSetTimeoutZero;function createNotifyManager(){let e=[],t=0,notifyFn=e=>{e()},batchNotifyFn=e=>{e()},r=n;const schedule=n=>{t?e.push(n):r(()=>{notifyFn(n)})};return{batch:n=>{let s;t++;try{s=n()}finally{t--,t||(()=>{const t=e;e=[],t.length&&r(()=>{batchNotifyFn(()=>{t.forEach(e=>{notifyFn(e)})})})})()}return s},batchCalls:e=>(...t)=>{schedule(()=>{e(...t)})},schedule:schedule,setNotifyFunction:e=>{notifyFn=e},setBatchNotifyFunction:e=>{batchNotifyFn=e},setScheduler:e=>{r=e}}}var s=createNotifyManager()},"./packages/node_modules/@tanstack/query-core/build/modern/onlineManager.js":function(e,t,r){r.r(t),r.d(t,{OnlineManager:function(){return i},onlineManager:function(){return a}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),i=class extends n.Subscribable{#m=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!s.isServer&&window.addEventListener){const onlineListener=()=>e(!0),offlineListener=()=>e(!1);return window.addEventListener("online",onlineListener,!1),window.addEventListener("offline",offlineListener,!1),()=>{window.removeEventListener("online",onlineListener),window.removeEventListener("offline",offlineListener)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#m!==e&&(this.#m=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#m}},a=new i},"./packages/node_modules/@tanstack/query-core/build/modern/query.js":function(e,t,r){r.r(t),r.d(t,{Query:function(){return o},fetchState:function(){return fetchState}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/retryer.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/removable.js"),o=class extends a.Removable{#g;#b;#v;#n;#a;#k;#C;constructor(e){super(),this.#C=!1,this.#k=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.client,this.#v=this.#n.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#g=getDefaultState(this.options),this.state=e.state??this.#g,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#k,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=getDefaultState(this.options);void 0!==e.data&&(this.setState(successState(e.data,e.dataUpdatedAt)),this.#g=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#v.remove(this)}setData(e,t){const r=(0,n.replaceData)(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(n.noop).catch(n.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#g)}isActive(){return this.observers.some(e=>!1!==(0,n.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,n.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,n.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#v.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#C?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#v.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#a?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}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']");const r=new AbortController,addSignalProperty=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#C=!0,r.signal)})},fetchFn=()=>{const e=(0,n.ensureQueryFn)(this.options,t),r=(()=>{const e={client:this.#n,queryKey:this.queryKey,meta:this.meta};return addSignalProperty(e),e})();return this.#C=!1,this.options.persister?this.options.persister(e,r,this):e(r)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:fetchFn};return addSignalProperty(e),e})();this.options.behavior?.onFetch(s,this),this.#b=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#o({type:"fetch",meta:s.fetchOptions?.meta}),this.#a=(0,i.createRetryer)({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof i.CancelledError&&e.revert&&this.setState({...this.#b,fetchStatus:"idle"}),r.abort()},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#a.start();if(void 0===e)throw 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}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#v.config.onSuccess?.(e,this),this.#v.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof i.CancelledError){if(e.silent)return this.#a.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#o({type:"error",error:e}),this.#v.config.onError?.(e,this),this.#v.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...fetchState(t.data,this.options),fetchMeta:e.meta??null};case"success":const r={...t,...successState(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#b=e.manual?r:void 0,r;case"error":const n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),s.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#v.notify({query:this,type:"updated",action:e})})}};function fetchState(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,i.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function successState(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function getDefaultState(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}},"./packages/node_modules/@tanstack/query-core/build/modern/queryCache.js":function(e,t,r){r.r(t),r.d(t,{QueryCache:function(){return o}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/query.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js"),o=class extends a.Subscribable{constructor(e={}){super(),this.config=e,this.#O=new Map}#O;build(e,t,r){const i=t.queryKey,a=t.queryHash??(0,n.hashQueryKeyByOptions)(i,t);let o=this.get(a);return o||(o=new s.Query({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#O.has(e.queryHash)||(this.#O.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#O.get(e.queryHash);t&&(e.destroy(),t===e&&this.#O.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#O.get(e)}getAll(){return[...this.#O.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchQuery)(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n.matchQuery)(e,t)):t}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}},"./packages/node_modules/@tanstack/query-core/build/modern/queryClient.js":function(e,t,r){r.r(t),r.d(t,{QueryClient:function(){return l}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/queryCache.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/mutationCache.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/focusManager.js"),o=r("./packages/node_modules/@tanstack/query-core/build/modern/onlineManager.js"),u=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),c=r("./packages/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js"),l=class{#q;#i;#k;#S;#w;#_;#j;#P;constructor(e={}){this.#q=e.queryCache||new s.QueryCache,this.#i=e.mutationCache||new i.MutationCache,this.#k=e.defaultOptions||{},this.#S=new Map,this.#w=new Map,this.#_=0}mount(){this.#_++,1===this.#_&&(this.#j=a.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#q.onFocus())}),this.#P=o.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#q.onOnline())}))}unmount(){this.#_--,0===this.#_&&(this.#j?.(),this.#j=void 0,this.#P?.(),this.#P=void 0)}isFetching(e){return this.#q.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#q.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#q.build(this,t),s=r.state.data;return void 0===s?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#q.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),i=this.#q.get(s.queryHash),a=i?.state.data,o=(0,n.functionalUpdate)(t,a);if(void 0!==o)return this.#q.build(this,s).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return u.notifyManager.batch(()=>this.#q.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#q.get(t.queryHash)?.state}removeQueries(e){const t=this.#q;u.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#q;return u.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},s=u.notifyManager.batch(()=>this.#q.findAll(e).map(e=>e.cancel(r)));return Promise.all(s).then(n.noop).catch(n.noop)}invalidateQueries(e,t={}){return u.notifyManager.batch(()=>(this.#q.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},s=u.notifyManager.batch(()=>this.#q.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(s).then(n.noop)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#q.build(this,t);return r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.noop).catch(n.noop)}fetchInfiniteQuery(e){return e.behavior=(0,c.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.noop).catch(n.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,c.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return o.onlineManager.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#q}getMutationCache(){return this.#i}getDefaultOptions(){return this.#k}setDefaultOptions(e){this.#k=e}setQueryDefaults(e,t){this.#S.set((0,n.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#S.values()],r={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#w.set((0,n.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#w.values()],r={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#k.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#k.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#q.clear(),this.#i.clear()}}},"./packages/node_modules/@tanstack/query-core/build/modern/queryObserver.js":function(e,t,r){r.r(t),r.d(t,{QueryObserver:function(){return l}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/focusManager.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/query.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js"),o=r("./packages/node_modules/@tanstack/query-core/build/modern/thenable.js"),u=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),c=r("./packages/node_modules/@tanstack/query-core/build/modern/timeoutManager.js"),l=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#n=e,this.#R=null,this.#E=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#n;#Q=void 0;#T=void 0;#d=void 0;#M;#F;#E;#R;#x;#D;#I;#A;#K;#U;#N=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#Q.addObserver(this),shouldFetchOnMount(this.#Q,this.options)?this.#B():this.updateResult(),this.#V())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.#Q,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.#Q,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#L(),this.#$(),this.#Q.removeObserver(this)}setOptions(e){const t=this.options,r=this.#Q;if(this.options=this.#n.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,u.resolveEnabled)(this.options.enabled,this.#Q))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#H(),this.#Q.setOptions(this.options),t._defaulted&&!(0,u.shallowEqualObjects)(this.options,t)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#Q,observer:this});const n=this.hasListeners();n&&shouldFetchOptionally(this.#Q,r,this.options,t)&&this.#B(),this.updateResult(),!n||this.#Q===r&&(0,u.resolveEnabled)(this.options.enabled,this.#Q)===(0,u.resolveEnabled)(t.enabled,this.#Q)&&(0,u.resolveStaleTime)(this.options.staleTime,this.#Q)===(0,u.resolveStaleTime)(t.staleTime,this.#Q)||this.#W();const s=this.#G();!n||this.#Q===r&&(0,u.resolveEnabled)(this.options.enabled,this.#Q)===(0,u.resolveEnabled)(t.enabled,this.#Q)&&s===this.#U||this.#z(s)}getOptimisticResult(e){const t=this.#n.getQueryCache().build(this.#n,e),r=this.createResult(t,e);return function shouldAssignObserverCurrentProperties(e,t){if(!(0,u.shallowEqualObjects)(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(this.#d=r,this.#F=this.options,this.#M=this.#Q.state),r}getCurrentResult(){return this.#d}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#E.status||this.#E.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#N.add(e)}getCurrentQuery(){return this.#Q}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#n.defaultQueryOptions(e),r=this.#n.getQueryCache().build(this.#n,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#B({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#d))}#B(e){this.#H();let t=this.#Q.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u.noop)),t}#W(){this.#L();const e=(0,u.resolveStaleTime)(this.options.staleTime,this.#Q);if(u.isServer||this.#d.isStale||!(0,u.isValidTimeout)(e))return;const t=(0,u.timeUntilStale)(this.#d.dataUpdatedAt,e)+1;this.#A=c.timeoutManager.setTimeout(()=>{this.#d.isStale||this.updateResult()},t)}#G(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#Q):this.options.refetchInterval)??!1}#z(e){this.#$(),this.#U=e,!u.isServer&&!1!==(0,u.resolveEnabled)(this.options.enabled,this.#Q)&&(0,u.isValidTimeout)(this.#U)&&0!==this.#U&&(this.#K=c.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||n.focusManager.isFocused())&&this.#B()},this.#U))}#V(){this.#W(),this.#z(this.#G())}#L(){this.#A&&(c.timeoutManager.clearTimeout(this.#A),this.#A=void 0)}#$(){this.#K&&(c.timeoutManager.clearInterval(this.#K),this.#K=void 0)}createResult(e,t){const r=this.#Q,n=this.options,s=this.#d,a=this.#M,c=this.#F,l=e!==r?e.state:this.#T,{state:d}=e;let h,f={...d},p=!1;if(t._optimisticResults){const s=this.hasListeners(),a=!s&&shouldFetchOnMount(e,t),o=s&&shouldFetchOptionally(e,r,t,n);(a||o)&&(f={...f,...(0,i.fetchState)(d.data,e.options)}),"isRestoring"===t._optimisticResults&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:g}=f;h=f.data;let b=!1;if(void 0!==t.placeholderData&&void 0===h&&"pending"===g){let e;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=s.data,b=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#I?.state.data,this.#I):t.placeholderData,void 0!==e&&(g="success",h=(0,u.replaceData)(s?.data,e,t),p=!0)}if(t.select&&void 0!==h&&!b)if(s&&h===a?.data&&t.select===this.#x)h=this.#D;else try{this.#x=t.select,h=t.select(h),h=(0,u.replaceData)(s?.data,h,t),this.#D=h,this.#R=null}catch(e){this.#R=e}this.#R&&(y=this.#R,h=this.#D,m=Date.now(),g="error");const v="fetching"===f.fetchStatus,k="pending"===g,C="error"===g,O=k&&v,q=void 0!==h,S={status:g,fetchStatus:f.fetchStatus,isPending:k,isSuccess:"success"===g,isError:C,isInitialLoading:O,isLoading:O,data:h,dataUpdatedAt:f.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!k,isLoadingError:C&&!q,isPaused:"paused"===f.fetchStatus,isPlaceholderData:p,isRefetchError:C&&q,isStale:isStale(e,t),refetch:this.refetch,promise:this.#E,isEnabled:!1!==(0,u.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==S.data,n="error"===S.status&&!t,finalizeThenableIfPossible=e=>{n?e.reject(S.error):t&&e.resolve(S.data)},recreateThenable=()=>{const e=this.#E=S.promise=(0,o.pendingThenable)();finalizeThenableIfPossible(e)},s=this.#E;switch(s.status){case"pending":e.queryHash===r.queryHash&&finalizeThenableIfPossible(s);break;case"fulfilled":(n||S.data!==s.value)&&recreateThenable();break;case"rejected":n&&S.error===s.reason||recreateThenable()}}return S}updateResult(){const e=this.#d,t=this.createResult(this.#Q,this.options);if(this.#M=this.#Q.state,this.#F=this.options,void 0!==this.#M.data&&(this.#I=this.#Q),(0,u.shallowEqualObjects)(t,e))return;this.#d=t;this.#y({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#N.size)return!0;const n=new Set(r??this.#N);return this.options.throwOnError&&n.add("error"),Object.keys(this.#d).some(t=>{const r=t;return this.#d[r]!==e[r]&&n.has(r)})})()})}#H(){const e=this.#n.getQueryCache().build(this.#n,this.options);if(e===this.#Q)return;const t=this.#Q;this.#Q=e,this.#T=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#V()}#y(e){s.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#d)}),this.#n.getQueryCache().notify({query:this.#Q,type:"observerResultsUpdated"})})}};function shouldFetchOnMount(e,t){return function shouldLoadOnMount(e,t){return!1!==(0,u.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,r){if(!1!==(0,u.resolveEnabled)(t.enabled,e)&&"static"!==(0,u.resolveStaleTime)(t.staleTime,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&isStale(e,t)}return!1}function shouldFetchOptionally(e,t,r,n){return(e!==t||!1===(0,u.resolveEnabled)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&isStale(e,r)}function isStale(e,t){return!1!==(0,u.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,u.resolveStaleTime)(t.staleTime,e))}},"./packages/node_modules/@tanstack/query-core/build/modern/removable.js":function(e,t,r){r.r(t),r.d(t,{Removable:function(){return i}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/timeoutManager.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),i=class{#J;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,s.isValidTimeout)(this.gcTime)&&(this.#J=n.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(s.isServer?1/0:3e5))}clearGcTimeout(){this.#J&&(n.timeoutManager.clearTimeout(this.#J),this.#J=void 0)}}},"./packages/node_modules/@tanstack/query-core/build/modern/retryer.js":function(e,t,r){r.r(t),r.d(t,{CancelledError:function(){return o},canFetch:function(){return canFetch},createRetryer:function(){return createRetryer},isCancelledError:function(){return isCancelledError}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/focusManager.js"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/onlineManager.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/thenable.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js");function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return"online"!==(e??"online")||s.onlineManager.isOnline()}var o=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function isCancelledError(e){return e instanceof o}function createRetryer(e){let t,r=!1,u=0;const c=(0,i.pendingThenable)(),isResolved=()=>"pending"!==c.status,canContinue=()=>n.focusManager.isFocused()&&("always"===e.networkMode||s.onlineManager.isOnline())&&e.canRun(),canStart=()=>canFetch(e.networkMode)&&e.canRun(),resolve=e=>{isResolved()||(t?.(),c.resolve(e))},reject=e=>{isResolved()||(t?.(),c.reject(e))},pause=()=>new Promise(r=>{t=e=>{(isResolved()||canContinue())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,isResolved()||e.onContinue?.()}),run=()=>{if(isResolved())return;let t;const n=0===u?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(resolve).catch(t=>{if(isResolved())return;const n=e.retry??(a.isServer?0:3),s=e.retryDelay??defaultRetryDelay,i="function"==typeof s?s(u,t):s,o=!0===n||"number"==typeof n&&u<n||"function"==typeof n&&n(u,t);!r&&o?(u++,e.onFail?.(u,t),(0,a.sleep)(i).then(()=>canContinue()?void 0:pause()).then(()=>{r?reject(t):run()})):reject(t)})};return{promise:c,status:()=>c.status,cancel:t=>{if(!isResolved()){const r=new o(t);reject(r),e.onCancel?.(r)}},continue:()=>(t?.(),c),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:canStart,start:()=>(canStart()?run():pause().then(run),c)}}},"./packages/node_modules/@tanstack/query-core/build/modern/subscribable.js":function(e,t,r){r.r(t),r.d(t,{Subscribable:function(){return n}});var n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},"./packages/node_modules/@tanstack/query-core/build/modern/thenable.js":function(e,t,r){r.r(t),r.d(t,{pendingThenable:function(){return pendingThenable},tryResolveSync:function(){return tryResolveSync}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js");function pendingThenable(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});function finalize(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{finalize({status:"fulfilled",value:t}),e(t)},r.reject=e=>{finalize({status:"rejected",reason:e}),t(e)},r}function tryResolveSync(e){let t;if(e.then(e=>(t=e,e),n.noop)?.catch(n.noop),void 0!==t)return{data:t}}},"./packages/node_modules/@tanstack/query-core/build/modern/timeoutManager.js":function(e,t,r){r.r(t),r.d(t,{TimeoutManager:function(){return s},defaultTimeoutProvider:function(){return n},systemSetTimeoutZero:function(){return systemSetTimeoutZero},timeoutManager:function(){return i}});var n={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=class{#Y=n;#Z=!1;setTimeoutProvider(e){this.#Z&&e!==this.#Y&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#Y,provider:e}),this.#Y=e,this.#Z=!1}setTimeout(e,t){return this.#Z=!0,this.#Y.setTimeout(e,t)}clearTimeout(e){this.#Y.clearTimeout(e)}setInterval(e,t){return this.#Z=!0,this.#Y.setInterval(e,t)}clearInterval(e){this.#Y.clearInterval(e)}},i=new s;function systemSetTimeoutZero(e){setTimeout(e,0)}},"./packages/node_modules/@tanstack/query-core/build/modern/utils.js":function(e,t,r){r.r(t),r.d(t,{addConsumeAwareSignal:function(){return addConsumeAwareSignal},addToEnd:function(){return addToEnd},addToStart:function(){return addToStart},ensureQueryFn:function(){return ensureQueryFn},functionalUpdate:function(){return functionalUpdate},hashKey:function(){return hashKey},hashQueryKeyByOptions:function(){return hashQueryKeyByOptions},isPlainArray:function(){return isPlainArray},isPlainObject:function(){return isPlainObject},isServer:function(){return s},isValidTimeout:function(){return isValidTimeout},keepPreviousData:function(){return keepPreviousData},matchMutation:function(){return matchMutation},matchQuery:function(){return matchQuery},noop:function(){return noop},partialMatchKey:function(){return partialMatchKey},replaceData:function(){return replaceData},replaceEqualDeep:function(){return replaceEqualDeep},resolveEnabled:function(){return resolveEnabled},resolveStaleTime:function(){return resolveStaleTime},shallowEqualObjects:function(){return shallowEqualObjects},shouldThrowError:function(){return shouldThrowError},skipToken:function(){return a},sleep:function(){return sleep},timeUntilStale:function(){return timeUntilStale}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/timeoutManager.js"),s="undefined"==typeof window||"Deno"in globalThis;function noop(){}function functionalUpdate(e,t){return"function"==typeof e?e(t):e}function isValidTimeout(e){return"number"==typeof e&&e>=0&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function resolveStaleTime(e,t){return"function"==typeof e?e(t):e}function resolveEnabled(e,t){return"function"==typeof e?e(t):e}function matchQuery(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a)if(n){if(t.queryHash!==hashQueryKeyByOptions(a,t.options))return!1}else if(!partialMatchKey(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&((!s||s===t.state.fetchStatus)&&!(i&&!i(t)))}function matchMutation(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(hashKey(t.options.mutationKey)!==hashKey(i))return!1}else if(!partialMatchKey(t.options.mutationKey,i))return!1}return(!n||t.state.status===n)&&!(s&&!s(t))}function hashQueryKeyByOptions(e,t){return(t?.queryKeyHashFn||hashKey)(e)}function hashKey(e){return JSON.stringify(e,(e,t)=>isPlainObject(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function partialMatchKey(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>partialMatchKey(e[r],t[r])))}var i=Object.prototype.hasOwnProperty;function replaceEqualDeep(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=isPlainArray(e)&&isPlainArray(t);if(!(n||isPlainObject(e)&&isPlainObject(t)))return t;const s=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,u=n?new Array(o):{};let c=0;for(let l=0;l<o;l++){const o=n?l:a[l],d=e[o],h=t[o];if(d===h){u[o]=d,(n?l<s:i.call(e,o))&&c++;continue}if(null===d||null===h||"object"!=typeof d||"object"!=typeof h){u[o]=h;continue}const f=replaceEqualDeep(d,h,r+1);u[o]=f,f===d&&c++}return s===o&&c===s?e:u}function shallowEqualObjects(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){if(!hasObjectPrototype(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!hasObjectPrototype(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function hasObjectPrototype(e){return"[object Object]"===Object.prototype.toString.call(e)}function sleep(e){return new Promise(t=>{n.timeoutManager.setTimeout(t,e)})}function replaceData(e,t,r){if("function"==typeof r.structuralSharing)return r.structuralSharing(e,t);if(!1!==r.structuralSharing)try{return replaceEqualDeep(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${e}`),e}return t}function keepPreviousData(e){return e}function addToEnd(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function addToStart(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var a=Symbol();function ensureQueryFn(e,t){return e.queryFn===a&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==a?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function shouldThrowError(e,t){return"function"==typeof e?e(...t):!!e}function addConsumeAwareSignal(e,t,r){let n,s=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),s||(s=!0,n.aborted?r():n.addEventListener("abort",r,{once:!0})),n)}),e}},"./packages/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js":function(e,t,r){r.r(t),r.d(t,{IsRestoringProvider:function(){return i},useIsRestoring:function(){return useIsRestoring}});var n=r("react"),s=n.createContext(!1),useIsRestoring=()=>n.useContext(s),i=s.Provider},"./packages/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js":function(e,t,r){r.r(t),r.d(t,{QueryClientContext:function(){return i},QueryClientProvider:function(){return QueryClientProvider},useQueryClient:function(){return useQueryClient}});var n=r("react"),s=r("./packages/node_modules/react/jsx-runtime.js"),i=n.createContext(void 0),useQueryClient=e=>{const t=n.useContext(i);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},QueryClientProvider=({client:e,children:t})=>(n.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,s.jsx)(i.Provider,{value:e,children:t}))},"./packages/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js":function(e,t,r){r.r(t),r.d(t,{QueryErrorResetBoundary:function(){return QueryErrorResetBoundary},useQueryErrorResetBoundary:function(){return useQueryErrorResetBoundary}});var n=r("react"),s=r("./packages/node_modules/react/jsx-runtime.js");function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var i=n.createContext(createValue()),useQueryErrorResetBoundary=()=>n.useContext(i),QueryErrorResetBoundary=({children:e})=>{const[t]=n.useState(()=>createValue());return(0,s.jsx)(i.Provider,{value:t,children:"function"==typeof e?e(t):e})}},"./packages/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js":function(e,t,r){r.r(t),r.d(t,{ensurePreventErrorBoundaryRetry:function(){return ensurePreventErrorBoundaryRetry},getHasError:function(){return getHasError},useClearResetErrorBoundary:function(){return useClearResetErrorBoundary}});var n=r("react"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),ensurePreventErrorBoundaryRetry=(e,t,r)=>{const n=r?.state.error&&"function"==typeof e.throwOnError?(0,s.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},useClearResetErrorBoundary=e=>{n.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&void 0===e.data||(0,s.shouldThrowError)(r,[e.error,n]))},"./packages/node_modules/@tanstack/react-query/build/modern/suspense.js":function(e,t,r){r.r(t),r.d(t,{defaultThrowOnError:function(){return defaultThrowOnError},ensureSuspenseTimers:function(){return ensureSuspenseTimers},fetchOptimistic:function(){return fetchOptimistic},shouldSuspend:function(){return shouldSuspend},willFetch:function(){return willFetch}});var defaultThrowOnError=(e,t)=>void 0===t.state.data,ensureSuspenseTimers=e=>{if(e.suspense){const t=1e3,clamp=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>clamp(r(...e)):clamp(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t)=>e?.suspense&&t.isPending,fetchOptimistic=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()})},"./packages/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js":function(e,t,r){r.r(t),r.d(t,{useBaseQuery:function(){return useBaseQuery}});var n=r("react"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),a=r("./packages/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js"),o=r("./packages/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js"),u=r("./packages/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js"),c=r("./packages/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js"),l=r("./packages/node_modules/@tanstack/react-query/build/modern/suspense.js");function useBaseQuery(e,t,r){if("object"!=typeof e||Array.isArray(e))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');const d=(0,c.useIsRestoring)(),h=(0,o.useQueryErrorResetBoundary)(),f=(0,a.useQueryClient)(r),p=f.defaultQueryOptions(e);f.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const y=f.getQueryCache().get(p.queryHash);p.queryFn||console.error(`[${p.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`),p._optimisticResults=d?"isRestoring":"optimistic",(0,l.ensureSuspenseTimers)(p),(0,u.ensurePreventErrorBoundaryRetry)(p,h,y),(0,u.useClearResetErrorBoundary)(h);const m=!f.getQueryCache().get(p.queryHash),[g]=n.useState(()=>new t(f,p)),b=g.getOptimisticResult(p),v=!d&&!1!==e.subscribed;if(n.useSyncExternalStore(n.useCallback(e=>{const t=v?g.subscribe(s.notifyManager.batchCalls(e)):i.noop;return g.updateResult(),t},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),n.useEffect(()=>{g.setOptions(p)},[p,g]),(0,l.shouldSuspend)(p,b))throw(0,l.fetchOptimistic)(p,g,h);if((0,u.getHasError)({result:b,errorResetBoundary:h,throwOnError:p.throwOnError,query:y,suspense:p.suspense}))throw b.error;if(f.getDefaultOptions().queries?._experimental_afterQuery?.(p,b),p.experimental_prefetchInRender&&!i.isServer&&(0,l.willFetch)(b,d)){const e=m?(0,l.fetchOptimistic)(p,g,h):y?.promise;e?.catch(i.noop).finally(()=>{g.updateResult()})}return p.notifyOnChangeProps?b:g.trackResult(b)}},"./packages/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js":function(e,t,r){r.r(t),r.d(t,{useInfiniteQuery:function(){return useInfiniteQuery}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js"),s=r("./packages/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");function useInfiniteQuery(e,t){return(0,s.useBaseQuery)(e,n.InfiniteQueryObserver,t)}},"./packages/node_modules/@tanstack/react-query/build/modern/useMutation.js":function(e,t,r){r.r(t),r.d(t,{useMutation:function(){return useMutation}});var n=r("react"),s=r("./packages/node_modules/@tanstack/query-core/build/modern/mutationObserver.js"),i=r("./packages/node_modules/@tanstack/query-core/build/modern/notifyManager.js"),a=r("./packages/node_modules/@tanstack/query-core/build/modern/utils.js"),o=r("./packages/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");function useMutation(e,t){const r=(0,o.useQueryClient)(t),[u]=n.useState(()=>new s.MutationObserver(r,e));n.useEffect(()=>{u.setOptions(e)},[u,e]);const c=n.useSyncExternalStore(n.useCallback(e=>u.subscribe(i.notifyManager.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),l=n.useCallback((e,t)=>{u.mutate(e,t).catch(a.noop)},[u]);if(c.error&&(0,a.shouldThrowError)(u.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}},"./packages/node_modules/@tanstack/react-query/build/modern/useQuery.js":function(e,t,r){r.r(t),r.d(t,{useQuery:function(){return useQuery}});var n=r("./packages/node_modules/@tanstack/query-core/build/modern/queryObserver.js"),s=r("./packages/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");function useQuery(e,t){return(0,s.useBaseQuery)(e,n.QueryObserver,t)}},"./packages/node_modules/react/cjs/react-jsx-runtime.development.js":function(e,t,r){(function(){var e=r("react"),n=Symbol.for("react.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),m=Symbol.iterator;var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function error(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function printWarning(e,t,r){var n=g.ReactDebugCurrentFrame,s=n.getStackAddendum();""!==s&&(t+="%s",r=r.concat([s]));var i=r.map(function(e){return String(e)});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var b;function getContextName(e){return e.displayName||"Context"}function getComponentNameFromType(e){if(null==e)return null;if("number"==typeof e.tag&&error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case s:return"Portal";case o:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return getContextName(e)+".Consumer";case u:return getContextName(e._context)+".Provider";case l:return function getWrappedName(e,t,r){var n=e.displayName;if(n)return n;var s=t.displayName||t.name||"";return""!==s?r+"("+s+")":r}(e,e.render,"ForwardRef");case f:var t=e.displayName||null;return null!==t?t:getComponentNameFromType(e.type)||"Memo";case p:var r=e,n=r._payload,y=r._init;try{return getComponentNameFromType(y(n))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var v,k,C,O,q,S,w,_=Object.assign,j=0;function disabledLog(){}disabledLog.__reactDisabledLog=!0;var P,R=g.ReactCurrentDispatcher;function describeBuiltInComponentFrame(e,t,r){if(void 0===P)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);P=n&&n[1]||""}return"\n"+P+e}var E,Q=!1,T="function"==typeof WeakMap?WeakMap:Map;function describeNativeComponentFrame(e,t){if(!e||Q)return"";var r,n=E.get(e);if(void 0!==n)return n;Q=!0;var s,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,s=R.current,R.current=null,function disableLogs(){if(0===j){v=console.log,k=console.info,C=console.warn,O=console.error,q=console.group,S=console.groupCollapsed,w=console.groupEnd;var e={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}j++}();try{if(t){var Fake=function(){throw Error()};if(Object.defineProperty(Fake.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(Fake,[])}catch(e){r=e}Reflect.construct(e,[],Fake)}else{try{Fake.call()}catch(e){r=e}e.call(Fake.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),o=r.stack.split("\n"),u=a.length-1,c=o.length-1;u>=1&&c>=0&&a[u]!==o[c];)c--;for(;u>=1&&c>=0;u--,c--)if(a[u]!==o[c]){if(1!==u||1!==c)do{if(u--,--c<0||a[u]!==o[c]){var l="\n"+a[u].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),"function"==typeof e&&E.set(e,l),l}}while(u>=1&&c>=0);break}}}finally{Q=!1,R.current=s,function reenableLogs(){if(0===--j){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:v}),info:_({},e,{value:k}),warn:_({},e,{value:C}),error:_({},e,{value:O}),group:_({},e,{value:q}),groupCollapsed:_({},e,{value:S}),groupEnd:_({},e,{value:w})})}j<0&&error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=e?e.displayName||e.name:"",h=d?describeBuiltInComponentFrame(d):"";return"function"==typeof e&&E.set(e,h),h}function describeUnknownElementTypeFrameInDEV(e,t,r){if(null==e)return"";if("function"==typeof e)return describeNativeComponentFrame(e,function shouldConstruct(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return describeBuiltInComponentFrame(e);switch(e){case d:return describeBuiltInComponentFrame("Suspense");case h:return describeBuiltInComponentFrame("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return function describeFunctionComponentFrame(e,t,r){return describeNativeComponentFrame(e,!1)}(e.render);case f:return describeUnknownElementTypeFrameInDEV(e.type,t,r);case p:var n=e,s=n._payload,i=n._init;try{return describeUnknownElementTypeFrameInDEV(i(s),t,r)}catch(e){}}return""}E=new T;var M=Object.prototype.hasOwnProperty,F={},x=g.ReactDebugCurrentFrame;function setCurrentlyValidatingElement(e){if(e){var t=e._owner,r=describeUnknownElementTypeFrameInDEV(e.type,e._source,t?t.type:null);x.setExtraStackFrame(r)}else x.setExtraStackFrame(null)}var D=Array.isArray;function isArray(e){return D(e)}function testStringCoercion(e){return""+e}function checkKeyStringCoercion(e){if(function willCoercionThrow(e){try{return testStringCoercion(e),!1}catch(e){return!0}}(e))return error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function typeName(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),testStringCoercion(e)}var I,A,K,U=g.ReactCurrentOwner,N={key:!0,ref:!0,__self:!0,__source:!0};K={};function jsxDEV(e,t,r,s,i){var a,o={},u=null,c=null;for(a in void 0!==r&&(checkKeyStringCoercion(r),u=""+r),function hasValidKey(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(checkKeyStringCoercion(t.key),u=""+t.key),function hasValidRef(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function warnIfStringRefCannotBeAutoConverted(e,t){if("string"==typeof e.ref&&U.current&&t&&U.current.stateNode!==t){var r=getComponentNameFromType(U.current.type);K[r]||(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(U.current.type),e.ref),K[r]=!0)}}(t,i)),t)M.call(t,a)&&!N.hasOwnProperty(a)&&(o[a]=t[a]);if(e&&e.defaultProps){var l=e.defaultProps;for(a in l)void 0===o[a]&&(o[a]=l[a])}if(u||c){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;u&&function defineKeyPropWarningGetter(e,t){var warnAboutAccessingKey=function(){I||(I=!0,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)",t))};warnAboutAccessingKey.isReactWarning=!0,Object.defineProperty(e,"key",{get:warnAboutAccessingKey,configurable:!0})}(o,d),c&&function defineRefPropWarningGetter(e,t){var warnAboutAccessingRef=function(){A||(A=!0,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)",t))};warnAboutAccessingRef.isReactWarning=!0,Object.defineProperty(e,"ref",{get:warnAboutAccessingRef,configurable:!0})}(o,d)}return function(e,t,r,s,i,a,o){var u={$$typeof:n,type:e,key:t,ref:r,props:o,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}(e,u,c,i,s,U.current,o)}var B,V=g.ReactCurrentOwner,L=g.ReactDebugCurrentFrame;function setCurrentlyValidatingElement$1(e){if(e){var t=e._owner,r=describeUnknownElementTypeFrameInDEV(e.type,e._source,t?t.type:null);L.setExtraStackFrame(r)}else L.setExtraStackFrame(null)}function isValidElement(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function getDeclarationErrorAddendum(){if(V.current){var e=getComponentNameFromType(V.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}B=!1;var $={};function validateExplicitKey(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function getCurrentComponentErrorInfo(e){var t=getDeclarationErrorAddendum();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!$[r]){$[r]=!0;var n="";e&&e._owner&&e._owner!==V.current&&(n=" It was passed a child from "+getComponentNameFromType(e._owner.type)+"."),setCurrentlyValidatingElement$1(e),error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),setCurrentlyValidatingElement$1(null)}}}function validateChildKeys(e,t){if("object"==typeof e)if(isArray(e))for(var r=0;r<e.length;r++){var n=e[r];isValidElement(n)&&validateExplicitKey(n,t)}else if(isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var s=function getIteratorFn(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof s&&s!==e.entries)for(var i,a=s.call(e);!(i=a.next()).done;)isValidElement(i.value)&&validateExplicitKey(i.value,t)}}function validatePropTypes(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==l&&r.$$typeof!==f)return;t=r.propTypes}if(t){var n=getComponentNameFromType(r);!function checkPropTypes(e,t,r,n,s){var i=Function.call.bind(M);for(var a in e)if(i(e,a)){var o=void 0;try{if("function"!=typeof e[a]){var u=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}o=e[a](t,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){o=e}!o||o instanceof Error||(setCurrentlyValidatingElement(s),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).",n||"React class",r,a,typeof o),setCurrentlyValidatingElement(null)),o instanceof Error&&!(o.message in F)&&(F[o.message]=!0,setCurrentlyValidatingElement(s),error("Failed %s type: %s",r,o.message),setCurrentlyValidatingElement(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!B){B=!0,error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",getComponentNameFromType(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var H={};function jsxWithValidation(e,t,r,s,m,g){var v=function isValidElementType(e){return"string"==typeof e||"function"==typeof e||e===i||e===o||e===a||e===d||e===h||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===u||e.$$typeof===c||e.$$typeof===l||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!v){var k="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var C,O=function getSourceInfoErrorAddendum(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);k+=O||getDeclarationErrorAddendum(),null===e?C="null":isArray(e)?C="array":void 0!==e&&e.$$typeof===n?(C="<"+(getComponentNameFromType(e.type)||"Unknown")+" />",k=" Did you accidentally export a JSX literal instead of a component?"):C=typeof e,error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",C,k)}var q=jsxDEV(e,t,r,m,g);if(null==q)return q;if(v){var S=t.children;if(void 0!==S)if(s)if(isArray(S)){for(var w=0;w<S.length;w++)validateChildKeys(S[w],e);Object.freeze&&Object.freeze(S)}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.");else validateChildKeys(S,e)}if(M.call(t,"key")){var _=getComponentNameFromType(e),j=Object.keys(t).filter(function(e){return"key"!==e}),P=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!H[_+P])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} />',P,_,j.length>0?"{"+j.join(": ..., ")+": ...}":"{}",_),H[_+P]=!0}return e===i?function validateFragmentProps(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){setCurrentlyValidatingElement$1(e),error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),setCurrentlyValidatingElement$1(null);break}}null!==e.ref&&(setCurrentlyValidatingElement$1(e),error("Invalid attribute `ref` supplied to `React.Fragment`."),setCurrentlyValidatingElement$1(null))}(q):validatePropTypes(q),q}var W=function jsxWithValidationDynamic(e,t,r){return jsxWithValidation(e,t,r,!1)},G=function jsxWithValidationStatic(e,t,r){return jsxWithValidation(e,t,r,!0)};t.Fragment=i,t.jsx=W,t.jsxs=G})()},"./packages/node_modules/react/jsx-runtime.js":function(e,t,r){e.exports=r("./packages/node_modules/react/cjs/react-jsx-runtime.development.js")},react:function(e){e.exports=window.React}},t={};function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,__webpack_require__),s.exports}__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){__webpack_require__.r(r),__webpack_require__.d(r,{QueryClient:function(){return e.QueryClient},QueryClientProvider:function(){return n.QueryClientProvider},createQueryClient:function(){return createQueryClient},getQueryClient:function(){return getQueryClient},useInfiniteQuery:function(){return i.useInfiniteQuery},useMutation:function(){return s.useMutation},useQuery:function(){return t.useQuery},useQueryClient:function(){return n.useQueryClient}});var e=__webpack_require__("./packages/node_modules/@tanstack/query-core/build/modern/queryClient.js"),t=__webpack_require__("./packages/node_modules/@tanstack/react-query/build/modern/useQuery.js"),n=__webpack_require__("./packages/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js"),s=__webpack_require__("./packages/node_modules/@tanstack/react-query/build/modern/useMutation.js"),i=__webpack_require__("./packages/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js");let a;function getQueryClient(){if(!a)throw new Error("Query client is not created yet.");return a}function createQueryClient(){if(a)throw new Error("Query client is already created.");return a=new e.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1}}}),a}}(),(window.elementorV2=window.elementorV2||{}).query=r}(),window.elementorV2.query?.init?.();
3116 3 //# sourceMappingURL=query.js.map