PageSourceSearch

https://visualpython.ai/_/oms-customer-front-office/queryClient-DpZpBkWP.js

js visualpython.ai collected 2026-09-24 09:48:25 UTC 46,429 bytes, 1,590 lines download raw bytes

1function De(t, e) {
2  for (var r = 0; r < e.length; r++) {
3    const n = e[r];
4    if (typeof n != "string" && !Array.isArray(n)) {
5      for (const s in n)
6        if (s !== "default" && !(s in t)) {
7          const i = Object.getOwnPropertyDescriptor(n, s);
8          i && Object.defineProperty(t, s, i.get ? i : {
9            enumerable: !0,
10            get: () => n[s]
11          });
12        }
13    }
14  }
15  return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
16}
17var ct = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
18function Me(t) {
19  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
20}
21function ht(t) {
22  if (t.__esModule)
23    return t;
24  var e = t.default;
25  if (typeof e == "function") {
26    var r = function n() {
27      return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
28    };
29    r.prototype = e.prototype;
30  } else
31    r = {};
32  return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
33    var s = Object.getOwnPropertyDescriptor(t, n);
vendor: 5,255 bytes, lines 34-179
34    Object.defineProperty(r, n, s.get ? s : {
35      enumerable: !0,
36      get: function() {
37        return t[n];
38      }
39    });
40  }), r;
41}
42var he = { exports: {} }, l = {};
43/**
44 * @license React
45 * react.production.min.js
46 *
47 * Copyright (c) Facebook, Inc. and its affiliates.
48 *
49 * This source code is licensed under the MIT license found in the
50 * LICENSE file in the root directory of this source tree.
51 */
52var x = Symbol.for("react.element"), Re = Symbol.for("react.portal"), Ae = Symbol.for("react.fragment"), xe = Symbol.for("react.strict_mode"), je = Symbol.for("react.profiler"), Qe = Symbol.for("react.provider"), ke = Symbol.for("react.context"), Te = Symbol.for("react.forward_ref"), Ue = Symbol.for("react.suspense"), Ke = Symbol.for("react.memo"), Ie = Symbol.for("react.lazy"), ne = Symbol.iterator;
53function Le(t) {
54  return t === null || typeof t != "object" ? null : (t = ne && t[ne] || t["@@iterator"], typeof t == "function" ? t : null);
55}
56var fe = { isMounted: function() {
57  return !1;
58}, enqueueForceUpdate: function() {
59}, enqueueReplaceState: function() {
60}, enqueueSetState: function() {
61} }, de = Object.assign, ye = {};
62function A(t, e, r) {
63  this.props = t, this.context = e, this.refs = ye, this.updater = r || fe;
64}
65A.prototype.isReactComponent = {};
66A.prototype.setState = function(t, e) {
67  if (typeof t != "object" && typeof t != "function" && t != null)
68    throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
69  this.updater.enqueueSetState(this, t, e, "setState");
70};
71A.prototype.forceUpdate = function(t) {
72  this.updater.enqueueForceUpdate(this, t, "forceUpdate");
73};
74function pe() {
75}
76pe.prototype = A.prototype;
77function W(t, e, r) {
78  this.props = t, this.context = e, this.refs = ye, this.updater = r || fe;
79}
80var J = W.prototype = new pe();
81J.constructor = W;
82de(J, A.prototype);
83J.isPureReactComponent = !0;
84var se = Array.isArray, ve = Object.prototype.hasOwnProperty, X = { current: null }, me = { key: !0, ref: !0, __self: !0, __source: !0 };
85function be(t, e, r) {
86  var n, s = {}, i = null, u = null;
87  if (e != null)
88    for (n in e.ref !== void 0 && (u = e.ref), e.key !== void 0 && (i = "" + e.key), e)
89      ve.call(e, n) && !me.hasOwnProperty(n) && (s[n] = e[n]);
90  var o = arguments.length - 2;
91  if (o === 1)
92    s.children = r;
93  else if (1 < o) {
94    for (var a = Array(o), c = 0; c < o; c++)
95      a[c] = arguments[c + 2];
96    s.children = a;
97  }
98  if (t && t.defaultProps)
99    for (n in o = t.defaultProps, o)
100      s[n] === void 0 && (s[n] = o[n]);
101  return { $$typeof: x, type: t, key: i, ref: u, props: s, _owner: X.current };
102}
103function Ne(t, e) {
104  return { $$typeof: x, type: t.type, key: e, ref: t.ref, props: t.props, _owner: t._owner };
105}
106function Y(t) {
107  return typeof t == "object" && t !== null && t.$$typeof === x;
108}
109function $e(t) {
110  var e = { "=": "=0", ":": "=2" };
111  return "$" + t.replace(/[=:]/g, function(r) {
112    return e[r];
113  });
114}
115var ie = /\/+/g;
116function H(t, e) {
117  return typeof t == "object" && t !== null && t.key != null ? $e("" + t.key) : e.toString(36);
118}
119function T(t, e, r, n, s) {
120  var i = typeof t;
121  (i === "undefined" || i === "boolean") && (t = null);
122  var u = !1;
123  if (t === null)
124    u = !0;
125  else
126    switch (i) {
127      case "string":
128      case "number":
129        u = !0;
130        break;
131      case "object":
132        switch (t.$$typeof) {
133          case x:
134          case Re:
135            u = !0;
136        }
137    }
138  if (u)
139    return u = t, s = s(u), t = n === "" ? "." + H(u, 0) : n, se(s) ? (r = "", t != null && (r = t.replace(ie, "$&/") + "/"), T(s, e, r, "", function(c) {
140      return c;
141    })) : s != null && (Y(s) && (s = Ne(s, r + (!s.key || u && u.key === s.key ? "" : ("" + s.key).replace(ie, "$&/") + "/") + t)), e.push(s)), 1;
142  if (u = 0, n = n === "" ? "." : n + ":", se(t))
143    for (var o = 0; o < t.length; o++) {
144      i = t[o];
145      var a = n + H(i, o);
146      u += T(i, e, r, a, s);
147    }
148  else if (a = Le(t), typeof a == "function")
149    for (t = a.call(t), o = 0; !(i = t.next()).done; )
150      i = i.value, a = n + H(i, o++), u += T(i, e, r, a, s);
151  else if (i === "object")
152    throw e = String(t), Error("Objects are not valid as a React child (found: " + (e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e) + "). If you meant to render a collection of children, use an array instead.");
153  return u;
154}
155function Q(t, e, r) {
156  if (t == null)
157    return t;
158  var n = [], s = 0;
159  return T(t, n, "", "", function(i) {
160    return e.call(r, i, s++);
161  }), n;
162}
163function He(t) {
164  if (t._status === -1) {
165    var e = t._result;
166    e = e(), e.then(function(r) {
167      (t._status === 0 || t._status === -1) && (t._status = 1, t._result = r);
168    }, function(r) {
169      (t._status === 0 || t._status === -1) && (t._status = 2, t._result = r);
170    }), t._status === -1 && (t._status = 0, t._result = e);
171  }
172  if (t._status === 1)
173    return t._result.default;
174  throw t._result;
175}
176var S = { current: null }, U = { transition: null }, Ge = { ReactCurrentDispatcher: S, ReactCurrentBatchConfig: U, ReactCurrentOwner: X };
177function ge() {
178  throw Error("act(...) is not supported in production builds of React.");
179}
180l.Children = { map: Q, forEach: function(t, e, r) {
181  Q(t, function() {
182    e.apply(this, arguments);
183  }, r);
184}, count: function(t) {
185  var e = 0;
186  return Q(t, function() {
187    e++;
188  }), e;
189}, toArray: function(t) {
190  return Q(t, function(e) {
191    return e;
192  }) || [];
193}, only: function(t) {
194  if (!Y(t))
195    throw Error("React.Children.only expected to receive a single React element child.");
196  return t;
197} };
198l.Component = A;
199l.Fragment = Ae;
200l.Profiler = je;
201l.PureComponent = W;
202l.StrictMode = xe;
203l.Suspense = Ue;
204l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ge;
205l.act = ge;
206l.cloneElement = function(t, e, r) {
207  if (t == null)
208    throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + t + ".");
209  var n = de({}, t.props), s = t.key, i = t.ref, u = t._owner;
210  if (e != null) {
211    if (e.ref !== void 0 && (i = e.ref, u = X.current), e.key !== void 0 && (s = "" + e.key), t.type && t.type.defaultProps)
212      var o = t.type.defaultProps;
213    for (a in e)
214      ve.call(e, a) && !me.hasOwnProperty(a) && (n[a] = e[a] === void 0 && o !== void 0 ? o[a] : e[a]);
215  }
216  var a = arguments.length - 2;
217  if (a === 1)
218    n.children = r;
219  else if (1 < a) {
220    o = Array(a);
221    for (var c = 0; c < a; c++)
222      o[c] = arguments[c + 2];
223    n.children = o;
224  }
225  return { $$typeof: x, type: t.type, key: s, ref: i, props: n, _owner: u };
226};
227l.createContext = function(t) {
228  return t = { $$typeof: ke, _currentValue: t, _currentValue2: t, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, t.Provider = { $$typeof: Qe, _context: t }, t.Consumer = t;
229};
230l.createElement = be;
231l.createFactory = function(t) {
232  var e = be.bind(null, t);
233  return e.type = t, e;
234};
235l.createRef = function() {
236  return { current: null };
237};
238l.forwardRef = function(t) {
239  return { $$typeof: Te, render: t };
240};
241l.isValidElement = Y;
242l.lazy = function(t) {
243  return { $$typeof: Ie, _payload: { _status: -1, _result: t }, _init: He };
244};
245l.memo = function(t, e) {
246  return { $$typeof: Ke, type: t, compare: e === void 0 ? null : e };
247};
248l.startTransition = function(t) {
249  var e = U.transition;
250  U.transition = {};
251  try {
252    t();
253  } finally {
254    U.transition = e;
255  }
256};
257l.unstable_act = ge;
258l.useCallback = function(t, e) {
259  return S.current.useCallback(t, e);
260};
261l.useContext = function(t) {
262  return S.current.useContext(t);
263};
264l.useDebugValue = function() {
265};
266l.useDeferredValue = function(t) {
267  return S.current.useDeferredValue(t);
268};
269l.useEffect = function(t, e) {
270  return S.current.useEffect(t, e);
271};
272l.useId = function() {
273  return S.current.useId();
274};
275l.useImperativeHandle = function(t, e, r) {
276  return S.current.useImperativeHandle(t, e, r);
277};
278l.useInsertionEffect = function(t, e) {
279  return S.current.useInsertionEffect(t, e);
280};
281l.useLayoutEffect = function(t, e) {
282  return S.current.useLayoutEffect(t, e);
283};
284l.useMemo = function(t, e) {
285  return S.current.useMemo(t, e);
286};
287l.useReducer = function(t, e, r) {
288  return S.current.useReducer(t, e, r);
289};
290l.useRef = function(t) {
291  return S.current.useRef(t);
292};
293l.useState = function(t) {
294  return S.current.useState(t);
295};
296l.useSyncExternalStore = function(t, e, r) {
297  return S.current.useSyncExternalStore(t, e, r);
298};
299l.useTransition = function() {
300  return S.current.useTransition();
301};
302l.version = "18.3.1";
303he.exports = l;
304var Oe = he.exports;
305const Be = /* @__PURE__ */ Me(Oe), ft = /* @__PURE__ */ De({
306  __proto__: null,
307  default: Be
308}, [Oe]);
309class L {
310  constructor() {
311    this.listeners = [], this.subscribe = this.subscribe.bind(this);
312  }
313  subscribe(e) {
314    return this.listeners.push(e), this.onSubscribe(), () => {
315      this.listeners = this.listeners.filter((r) => r !== e), this.onUnsubscribe();
316    };
317  }
318  hasListeners() {
319    return this.listeners.length > 0;
320  }
321  onSubscribe() {
322  }
323  onUnsubscribe() {
324  }
325}
326const Z = typeof window > "u" || "Deno" in window;
327function E() {
328}
329function Ve(t, e) {
330  return typeof t == "function" ? t(e) : t;
331}
332function ze(t) {
333  return typeof t == "number" && t >= 0 && t !== 1 / 0;
334}
335function We(t, e) {
336  return Math.max(t + (e || 0) - Date.now(), 0);
337}
338function k(t, e, r) {
339  return j(t) ? typeof e == "function" ? {
340    ...r,
341    queryKey: t,
342    queryFn: e
343  } : {
344    ...e,
345    queryKey: t
346  } : t;
347}
348function dt(t, e, r) {
349  return j(t) ? {
350    ...e,
351    mutationKey: t
352  } : typeof t == "function" ? {
353    ...e,
354    mutationFn: t
355  } : {
356    ...t
357  };
358}
359function D(t, e, r) {
360  return j(t) ? [{
361    ...e,
362    queryKey: t
363  }, r] : [t || {}, e];
364}
365function ue(t, e) {
366  const {
367    type: r = "all",
368    exact: n,
369    fetchStatus: s,
370    predicate: i,
371    queryKey: u,
372    stale: o
373  } = t;
374  if (j(u)) {
375    if (n) {
376      if (e.queryHash !== ee(u, e.options))
377        return !1;
378    } else if (!K(e.queryKey, u))
379      return !1;
380  }
381  if (r !== "all") {
382    const a = e.isActive();
383    if (r === "active" && !a || r === "inactive" && a)
384      return !1;
385  }
386  return !(typeof o == "boolean" && e.isStale() !== o || typeof s < "u" && s !== e.state.fetchStatus || i && !i(e));
387}
388function oe(t, e) {
389  const {
390    exact: r,
391    fetching: n,
392    predicate: s,
393    mutationKey: i
394  } = t;
395  if (j(i)) {
396    if (!e.options.mutationKey)
397      return !1;
398    if (r) {
399      if (R(e.options.mutationKey) !== R(i))
400        return !1;
401    } else if (!K(e.options.mutationKey, i))
402      return !1;
403  }
404  return !(typeof n == "boolean" && e.state.status === "loading" !== n || s && !s(e));
405}
406function ee(t, e) {
407  return ((e == null ? void 0 : e.queryKeyHashFn) || R)(t);
408}
409function R(t) {
410  return JSON.stringify(t, (e, r) => B(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r);
411}
412function K(t, e) {
413  return Pe(t, e);
414}
415function Pe(t, e) {
416  return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !Pe(t[r], e[r])) : !1;
417}
418function Ce(t, e) {
419  if (t === e)
420    return t;
421  const r = ae(t) && ae(e);
422  if (r || B(t) && B(e)) {
423    const n = r ? t.length : Object.keys(t).length, s = r ? e : Object.keys(e), i = s.length, u = r ? [] : {};
424    let o = 0;
425    for (let a = 0; a < i; a++) {
426      const c = r ? a : s[a];
427      u[c] = Ce(t[c], e[c]), u[c] === t[c] && o++;
428    }
429    return n === i && o === n ? t : u;
430  }
431  return e;
432}
433function yt(t, e) {
434  if (t && !e || e && !t)
435    return !1;
436  for (const r in t)
437    if (t[r] !== e[r])
438      return !1;
439  return !0;
440}
441function ae(t) {
442  return Array.isArray(t) && t.length === Object.keys(t).length;
443}
444function B(t) {
445  if (!le(t))
446    return !1;
447  const e = t.constructor;
448  if (typeof e > "u")
449    return !0;
450  const r = e.prototype;
451  return !(!le(r) || !r.hasOwnProperty("isPrototypeOf"));
452}
453function le(t) {
454  return Object.prototype.toString.call(t) === "[object Object]";
455}
456function j(t) {
457  return Array.isArray(t);
458}
459function we(t) {
460  return new Promise((e) => {
461    setTimeout(e, t);
462  });
463}
464function ce(t) {
465  we(0).then(t);
466}
467function Je() {
468  if (typeof AbortController == "function")
469    return new AbortController();
470}
471function Xe(t, e, r) {
472  return r.isDataEqual != null && r.isDataEqual(t, e) ? t : typeof r.structuralSharing == "function" ? r.structuralSharing(t, e) : r.structuralSharing !== !1 ? Ce(t, e) : e;
473}
474class Ye extends L {
475  constructor() {
476    super(), this.setup = (e) => {
477      if (!Z && window.addEventListener) {
478        const r = () => e();
479        return window.addEventListener("visibilitychange", r, !1), window.addEventListener("focus", r, !1), () => {
480          window.removeEventListener("visibilitychange", r), window.removeEventListener("focus", r);
481        };
482      }
483    };
484  }
485  onSubscribe() {
486    this.cleanup || this.setEventListener(this.setup);
487  }
488  onUnsubscribe() {
489    if (!this.hasListeners()) {
490      var e;
491      (e = this.cleanup) == null || e.call(this), this.cleanup = void 0;
492    }
493  }
494  setEventListener(e) {
495    var r;
496    this.setup = e, (r = this.cleanup) == null || r.call(this), this.cleanup = e((n) => {
497      typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
498    });
499  }
500  setFocused(e) {
501    this.focused = e, e && this.onFocus();
502  }
503  onFocus() {
504    this.listeners.forEach((e) => {
505      e();
506    });
507  }
508  isFocused() {
509    return typeof this.focused == "boolean" ? this.focused : typeof document > "u" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
510  }
511}
512const V = new Ye();
513class Ze extends L {
514  constructor() {
515    super(), this.setup = (e) => {
516      if (!Z && window.addEventListener) {
517        const r = () => e();
518        return window.addEventListener("online", r, !1), window.addEventListener("offline", r, !1), () => {
519          window.removeEventListener("online", r), window.removeEventListener("offline", r);
520        };
521      }
522    };
523  }
524  onSubscribe() {
525    this.cleanup || this.setEventListener(this.setup);
526  }
527  onUnsubscribe() {
528    if (!this.hasListeners()) {
529      var e;
530      (e = this.cleanup) == null || e.call(this), this.cleanup = void 0;
531    }
532  }
533  setEventListener(e) {
534    var r;
535    this.setup = e, (r = this.cleanup) == null || r.call(this), this.cleanup = e((n) => {
536      typeof n == "boolean" ? this.setOnline(n) : this.onOnline();
537    });
538  }
539  setOnline(e) {
540    this.online = e, e && this.onOnline();
541  }
542  onOnline() {
543    this.listeners.forEach((e) => {
544      e();
545    });
546  }
547  isOnline() {
548    return typeof this.online == "boolean" ? this.online : typeof navigator > "u" || typeof navigator.onLine > "u" ? !0 : navigator.onLine;
549  }
550}
551const I = new Ze();
552function et(t) {
553  return Math.min(1e3 * 2 ** t, 3e4);
554}
555function te(t) {
556  return (t ?? "online") === "online" ? I.isOnline() : !0;
557}
558class Se {
559  constructor(e) {
560    this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
561  }
562}
563function G(t) {
564  return t instanceof Se;
565}
566function qe(t) {
567  let e = !1, r = 0, n = !1, s, i, u;
568  const o = new Promise((y, b) => {
569    i = y, u = b;
570  }), a = (y) => {
571    n || (f(new Se(y)), t.abort == null || t.abort());
572  }, c = () => {
573    e = !0;
574  }, h = () => {
575    e = !1;
576  }, O = () => !V.isFocused() || t.networkMode !== "always" && !I.isOnline(), m = (y) => {
577    n || (n = !0, t.onSuccess == null || t.onSuccess(y), s == null || s(), i(y));
578  }, f = (y) => {
579    n || (n = !0, t.onError == null || t.onError(y), s == null || s(), u(y));
580  }, g = () => new Promise((y) => {
581    s = (b) => {
582      const q = n || !O();
583      return q && y(b), q;
584    }, t.onPause == null || t.onPause();
585  }).then(() => {
586    s = void 0, n || t.onContinue == null || t.onContinue();
587  }), P = () => {
588    if (n)
589      return;
590    let y;
591    try {
592      y = t.fn();
593    } catch (b) {
594      y = Promise.reject(b);
595    }
596    Promise.resolve(y).then(m).catch((b) => {
597      var q, F;
598      if (n)
599        return;
600      const C = (q = t.retry) != null ? q : 3, M = (F = t.retryDelay) != null ? F : et, p = typeof M == "function" ? M(r, b) : M, d = C === !0 || typeof C == "number" && r < C || typeof C == "function" && C(r, b);
601      if (e || !d) {
602        f(b);
603        return;
604      }
605      r++, t.onFail == null || t.onFail(r, b), we(p).then(() => {
606        if (O())
607          return g();
608      }).then(() => {
609        e ? f(b) : P();
610      });
611    });
612  };
613  return te(t.networkMode) ? P() : g().then(P), {
614    promise: o,
615    cancel: a,
616    continue: () => (s == null ? void 0 : s()) ? o : Promise.resolve(),
617    cancelRetry: c,
618    continueRetry: h
619  };
620}
621const re = console;
622function tt() {
623  let t = [], e = 0, r = (h) => {
624    h();
625  }, n = (h) => {
626    h();
627  };
628  const s = (h) => {
629    let O;
630    e++;
631    try {
632      O = h();
633    } finally {
634      e--, e || o();
635    }
636    return O;
637  }, i = (h) => {
638    e ? t.push(h) : ce(() => {
639      r(h);
640    });
641  }, u = (h) => (...O) => {
642    i(() => {
643      h(...O);
644    });
645  }, o = () => {
646    const h = t;
647    t = [], h.length && ce(() => {
648      n(() => {
649        h.forEach((O) => {
650          r(O);
651        });
652      });
653    });
654  };
655  return {
656    batch: s,
657    batchCalls: u,
658    schedule: i,
659    setNotifyFunction: (h) => {
660      r = h;
661    },
662    setBatchNotifyFunction: (h) => {
663      n = h;
664    }
665  };
666}
667const w = tt();
668class Fe {
669  destroy() {
670    this.clearGcTimeout();
671  }
672  scheduleGc() {
673    this.clearGcTimeout(), ze(this.cacheTime) && (this.gcTimeout = setTimeout(() => {
674      this.optionalRemove();
675    }, this.cacheTime));
676  }
677  updateCacheTime(e) {
678    this.cacheTime = Math.max(this.cacheTime || 0, e ?? (Z ? 1 / 0 : 5 * 60 * 1e3));
679  }
680  clearGcTimeout() {
681    this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
682  }
683}
684class rt extends Fe {
685  constructor(e) {
686    super(), this.abortSignalConsumed = !1, this.defaultOptions = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.cache = e.cache, this.logger = e.logger || re, this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.initialState = e.state || nt(this.options), this.state = this.initialState, this.scheduleGc();
687  }
688  get meta() {
689    return this.options.meta;
690  }
691  setOptions(e) {
692    this.options = {
693      ...this.defaultOptions,
694      ...e
695    }, this.updateCacheTime(this.options.cacheTime);
696  }
697  optionalRemove() {
698    !this.observers.length && this.state.fetchStatus === "idle" && this.cache.remove(this);
699  }
700  setData(e, r) {
701    const n = Xe(this.state.data, e, this.options);
702    return this.dispatch({
703      data: n,
704      type: "success",
705      dataUpdatedAt: r == null ? void 0 : r.updatedAt,
706      manual: r == null ? void 0 : r.manual
707    }), n;
708  }
709  setState(e, r) {
710    this.dispatch({
711      type: "setState",
712      state: e,
713      setStateOptions: r
714    });
715  }
716  cancel(e) {
717    var r;
718    const n = this.promise;
719    return (r = this.retryer) == null || r.cancel(e), n ? n.then(E).catch(E) : Promise.resolve();
720  }
721  destroy() {
722    super.destroy(), this.cancel({
723      silent: !0
724    });
725  }
726  reset() {
727    this.destroy(), this.setState(this.initialState);
728  }
729  isActive() {
730    return this.observers.some((e) => e.options.enabled !== !1);
731  }
732  isDisabled() {
733    return this.getObserversCount() > 0 && !this.isActive();
734  }
735  isStale() {
736    return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some((e) => e.getCurrentResult().isStale);
737  }
738  isStaleByTime(e = 0) {
739    return this.state.isInvalidated || !this.state.dataUpdatedAt || !We(this.state.dataUpdatedAt, e);
740  }
741  onFocus() {
742    var e;
743    const r = this.observers.find((n) => n.shouldFetchOnWindowFocus());
744    r && r.refetch({
745      cancelRefetch: !1
746    }), (e = this.retryer) == null || e.continue();
747  }
748  onOnline() {
749    var e;
750    const r = this.observers.find((n) => n.shouldFetchOnReconnect());
751    r && r.refetch({
752      cancelRefetch: !1
753    }), (e = this.retryer) == null || e.continue();
754  }
755  addObserver(e) {
756    this.observers.indexOf(e) === -1 && (this.observers.push(e), this.clearGcTimeout(), this.cache.notify({
757      type: "observerAdded",
758      query: this,
759      observer: e
760    }));
761  }
762  removeObserver(e) {
763    this.observers.indexOf(e) !== -1 && (this.observers = this.observers.filter((r) => r !== e), this.observers.length || (this.retryer && (this.abortSignalConsumed ? this.retryer.cancel({
764      revert: !0
765    }) : this.retryer.cancelRetry()), this.scheduleGc()), this.cache.notify({
766      type: "observerRemoved",
767      query: this,
768      observer: e
769    }));
770  }
771  getObserversCount() {
772    return this.observers.length;
773  }
774  invalidate() {
775    this.state.isInvalidated || this.dispatch({
776      type: "invalidate"
777    });
778  }
779  fetch(e, r) {
780    var n, s;
781    if (this.state.fetchStatus !== "idle") {
782      if (this.state.dataUpdatedAt && r != null && r.cancelRefetch)
783        this.cancel({
784          silent: !0
785        });
786      else if (this.promise) {
787        var i;
788        return (i = this.retryer) == null || i.continueRetry(), this.promise;
789      }
790    }
791    if (e && this.setOptions(e), !this.options.queryFn) {
792      const f = this.observers.find((g) => g.options.queryFn);
793      f && this.setOptions(f.options);
794    }
795    Array.isArray(this.options.queryKey);
796    const u = Je(), o = {
797      queryKey: this.queryKey,
798      pageParam: void 0,
799      meta: this.meta
800    }, a = (f) => {
801      Object.defineProperty(f, "signal", {
802        enumerable: !0,
803        get: () => {
804          if (u)
805            return this.abortSignalConsumed = !0, u.signal;
806        }
807      });
808    };
809    a(o);
810    const c = () => this.options.queryFn ? (this.abortSignalConsumed = !1, this.options.queryFn(o)) : Promise.reject("Missing queryFn"), h = {
811      fetchOptions: r,
812      options: this.options,
813      queryKey: this.queryKey,
814      state: this.state,
815      fetchFn: c
816    };
817    if (a(h), (n = this.options.behavior) == null || n.onFetch(h), this.revertState = this.state, this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((s = h.fetchOptions) == null ? void 0 : s.meta)) {
818      var O;
819      this.dispatch({
820        type: "fetch",
821        meta: (O = h.fetchOptions) == null ? void 0 : O.meta
822      });
823    }
824    const m = (f) => {
825      if (G(f) && f.silent || this.dispatch({
826        type: "error",
827        error: f
828      }), !G(f)) {
829        var g, P, y, b;
830        (g = (P = this.cache.config).onError) == null || g.call(P, f, this), (y = (b = this.cache.config).onSettled) == null || y.call(b, this.state.data, f, this);
831      }
832      this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
833    };
834    return this.retryer = qe({
835      fn: h.fetchFn,
836      abort: u == null ? void 0 : u.abort.bind(u),
837      onSuccess: (f) => {
838        var g, P, y, b;
839        if (typeof f > "u") {
840          m(new Error(this.queryHash + " data is undefined"));
841          return;
842        }
843        this.setData(f), (g = (P = this.cache.config).onSuccess) == null || g.call(P, f, this), (y = (b = this.cache.config).onSettled) == null || y.call(b, f, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
844      },
845      onError: m,
846      onFail: (f, g) => {
847        this.dispatch({
848          type: "failed",
849          failureCount: f,
850          error: g
851        });
852      },
853      onPause: () => {
854        this.dispatch({
855          type: "pause"
856        });
857      },
858      onContinue: () => {
859        this.dispatch({
860          type: "continue"
861        });
862      },
863      retry: h.options.retry,
864      retryDelay: h.options.retryDelay,
865      networkMode: h.options.networkMode
866    }), this.promise = this.retryer.promise, this.promise;
867  }
868  dispatch(e) {
869    const r = (n) => {
870      var s, i;
871      switch (e.type) {
872        case "failed":
873          return {
874            ...n,
875            fetchFailureCount: e.failureCount,
876            fetchFailureReason: e.error
877          };
878        case "pause":
879          return {
880            ...n,
881            fetchStatus: "paused"
882          };
883        case "continue":
884          return {
885            ...n,
886            fetchStatus: "fetching"
887          };
888        case "fetch":
889          return {
890            ...n,
891            fetchFailureCount: 0,
892            fetchFailureReason: null,
893            fetchMeta: (s = e.meta) != null ? s : null,
894            fetchStatus: te(this.options.networkMode) ? "fetching" : "paused",
895            ...!n.dataUpdatedAt && {
896              error: null,
897              status: "loading"
898            }
899          };
900        case "success":
901          return {
902            ...n,
903            data: e.data,
904            dataUpdateCount: n.dataUpdateCount + 1,
905            dataUpdatedAt: (i = e.dataUpdatedAt) != null ? i : Date.now(),
906            error: null,
907            isInvalidated: !1,
908            status: "success",
909            ...!e.manual && {
910              fetchStatus: "idle",
911              fetchFailureCount: 0,
912              fetchFailureReason: null
913            }
914          };
915        case "error":
916          const u = e.error;
917          return G(u) && u.revert && this.revertState ? {
918            ...this.revertState
919          } : {
920            ...n,
921            error: u,
922            errorUpdateCount: n.errorUpdateCount + 1,
923            errorUpdatedAt: Date.now(),
924            fetchFailureCount: n.fetchFailureCount + 1,
925            fetchFailureReason: u,
926            fetchStatus: "idle",
927            status: "error"
928          };
929        case "invalidate":
930          return {
931            ...n,
932            isInvalidated: !0
933          };
934        case "setState":
935          return {
936            ...n,
937            ...e.state
938          };
939      }
940    };
941    this.state = r(this.state), w.batch(() => {
942      this.observers.forEach((n) => {
943        n.onQueryUpdate(e);
944      }), this.cache.notify({
945        query: this,
946        type: "updated",
947        action: e
948      });
949    });
950  }
951}
952function nt(t) {
953  const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, r = typeof e < "u", n = r ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
954  return {
955    data: e,
956    dataUpdateCount: 0,
957    dataUpdatedAt: r ? n ?? Date.now() : 0,
958    error: null,
959    errorUpdateCount: 0,
960    errorUpdatedAt: 0,
961    fetchFailureCount: 0,
962    fetchFailureReason: null,
963    fetchMeta: null,
964    isInvalidated: !1,
965    status: r ? "success" : "loading",
966    fetchStatus: "idle"
967  };
968}
969class st extends L {
970  constructor(e) {
971    super(), this.config = e || {}, this.queries = [], this.queriesMap = {};
972  }
973  build(e, r, n) {
974    var s;
975    const i = r.queryKey, u = (s = r.queryHash) != null ? s : ee(i, r);
976    let o = this.get(u);
977    return o || (o = new rt({
978      cache: this,
979      logger: e.getLogger(),
980      queryKey: i,
981      queryHash: u,
982      options: e.defaultQueryOptions(r),
983      state: n,
984      defaultOptions: e.getQueryDefaults(i)
985    }), this.add(o)), o;
986  }
987  add(e) {
988    this.queriesMap[e.queryHash] || (this.queriesMap[e.queryHash] = e, this.queries.push(e), this.notify({
989      type: "added",
990      query: e
991    }));
992  }
993  remove(e) {
994    const r = this.queriesMap[e.queryHash];
995    r && (e.destroy(), this.queries = this.queries.filter((n) => n !== e), r === e && delete this.queriesMap[e.queryHash], this.notify({
996      type: "removed",
997      query: e
998    }));
999  }
1000  clear() {
1001    w.batch(() => {
1002      this.queries.forEach((e) => {
1003        this.remove(e);
1004      });
1005    });
1006  }
1007  get(e) {
1008    return this.queriesMap[e];
1009  }
1010  getAll() {
1011    return this.queries;
1012  }
1013  find(e, r) {
1014    const [n] = D(e, r);
1015    return typeof n.exact > "u" && (n.exact = !0), this.queries.find((s) => ue(n, s));
1016  }
1017  findAll(e, r) {
1018    const [n] = D(e, r);
1019    return Object.keys(n).length > 0 ? this.queries.filter((s) => ue(n, s)) : this.queries;
1020  }
1021  notify(e) {
1022    w.batch(() => {
1023      this.listeners.forEach((r) => {
1024        r(e);
1025      });
1026    });
1027  }
1028  onFocus() {
1029    w.batch(() => {
1030      this.queries.forEach((e) => {
1031        e.onFocus();
1032      });
1033    });
1034  }
1035  onOnline() {
1036    w.batch(() => {
1037      this.queries.forEach((e) => {
1038        e.onOnline();
1039      });
1040    });
1041  }
1042}
1043class it extends Fe {
1044  constructor(e) {
1045    super(), this.defaultOptions = e.defaultOptions, this.mutationId = e.mutationId, this.mutationCache = e.mutationCache, this.logger = e.logger || re, this.observers = [], this.state = e.state || ut(), this.setOptions(e.options), this.scheduleGc();
1046  }
1047  setOptions(e) {
1048    this.options = {
1049      ...this.defaultOptions,
1050      ...e
1051    }, this.updateCacheTime(this.options.cacheTime);
1052  }
1053  get meta() {
1054    return this.options.meta;
1055  }
1056  setState(e) {
1057    this.dispatch({
1058      type: "setState",
1059      state: e
1060    });
1061  }
1062  addObserver(e) {
1063    this.observers.indexOf(e) === -1 && (this.observers.push(e), this.clearGcTimeout(), this.mutationCache.notify({
1064      type: "observerAdded",
1065      mutation: this,
1066      observer: e
1067    }));
1068  }
1069  removeObserver(e) {
1070    this.observers = this.observers.filter((r) => r !== e), this.scheduleGc(), this.mutationCache.notify({
1071      type: "observerRemoved",
1072      mutation: this,
1073      observer: e
1074    });
1075  }
1076  optionalRemove() {
1077    this.observers.length || (this.state.status === "loading" ? this.scheduleGc() : this.mutationCache.remove(this));
1078  }
1079  continue() {
1080    var e, r;
1081    return (e = (r = this.retryer) == null ? void 0 : r.continue()) != null ? e : this.execute();
1082  }
1083  async execute() {
1084    const e = () => {
1085      var d;
1086      return this.retryer = qe({
1087        fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
1088        onFail: (v, _) => {
1089          this.dispatch({
1090            type: "failed",
1091            failureCount: v,
1092            error: _
1093          });
1094        },
1095        onPause: () => {
1096          this.dispatch({
1097            type: "pause"
1098          });
1099        },
1100        onContinue: () => {
1101          this.dispatch({
1102            type: "continue"
1103          });
1104        },
1105        retry: (d = this.options.retry) != null ? d : 0,
1106        retryDelay: this.options.retryDelay,
1107        networkMode: this.options.networkMode
1108      }), this.retryer.promise;
1109    }, r = this.state.status === "loading";
1110    try {
1111      var n, s, i, u, o, a, c, h;
1112      if (!r) {
1113        var O, m, f, g;
1114        this.dispatch({
1115          type: "loading",
1116          variables: this.options.variables
1117        }), await ((O = (m = this.mutationCache.config).onMutate) == null ? void 0 : O.call(m, this.state.variables, this));
1118        const v = await ((f = (g = this.options).onMutate) == null ? void 0 : f.call(g, this.state.variables));
1119        v !== this.state.context && this.dispatch({
1120          type: "loading",
1121          context: v,
1122          variables: this.state.variables
1123        });
1124      }
1125      const d = await e();
1126      return await ((n = (s = this.mutationCache.config).onSuccess) == null ? void 0 : n.call(s, d, this.state.variables, this.state.context, this)), await ((i = (u = this.options).onSuccess) == null ? void 0 : i.call(u, d, this.state.variables, this.state.context)), await ((o = (a = this.mutationCache.config).onSettled) == null ? void 0 : o.call(a, d, null, this.state.variables, this.state.context, this)), await ((c = (h = this.options).onSettled) == null ? void 0 : c.call(h, d, null, this.state.variables, this.state.context)), this.dispatch({
1127        type: "success",
1128        data: d
1129      }), d;
1130    } catch (d) {
1131      try {
1132        var P, y, b, q, F, C, M, p;
1133        throw await ((P = (y = this.mutationCache.config).onError) == null ? void 0 : P.call(y, d, this.state.variables, this.state.context, this)), await ((b = (q = this.options).onError) == null ? void 0 : b.call(q, d, this.state.variables, this.state.context)), await ((F = (C = this.mutationCache.config).onSettled) == null ? void 0 : F.call(C, void 0, d, this.state.variables, this.state.context, this)), await ((M = (p = this.options).onSettled) == null ? void 0 : M.call(p, void 0, d, this.state.variables, this.state.context)), d;
1134      } finally {
1135        this.dispatch({
1136          type: "error",
1137          error: d
1138        });
1139      }
1140    }
1141  }
1142  dispatch(e) {
1143    const r = (n) => {
1144      switch (e.type) {
1145        case "failed":
1146          return {
1147            ...n,
1148            failureCount: e.failureCount,
1149            failureReason: e.error
1150          };
1151        case "pause":
1152          return {
1153            ...n,
1154            isPaused: !0
1155          };
1156        case "continue":
1157          return {
1158            ...n,
1159            isPaused: !1
1160          };
1161        case "loading":
1162          return {
1163            ...n,
1164            context: e.context,
1165            data: void 0,
1166            failureCount: 0,
1167            failureReason: null,
1168            error: null,
1169            isPaused: !te(this.options.networkMode),
1170            status: "loading",
1171            variables: e.variables
1172          };
1173        case "success":
1174          return {
1175            ...n,
1176            data: e.data,
1177            failureCount: 0,
1178            failureReason: null,
1179            error: null,
1180            status: "success",
1181            isPaused: !1
1182          };
1183        case "error":
1184          return {
1185            ...n,
1186            data: void 0,
1187            error: e.error,
1188            failureCount: n.failureCount + 1,
1189            failureReason: e.error,
1190            isPaused: !1,
1191            status: "error"
1192          };
1193        case "setState":
1194          return {
1195            ...n,
1196            ...e.state
1197          };
1198      }
1199    };
1200    this.state = r(this.state), w.batch(() => {
1201      this.observers.forEach((n) => {
1202        n.onMutationUpdate(e);
1203      }), this.mutationCache.notify({
1204        mutation: this,
1205        type: "updated",
1206        action: e
1207      });
1208    });
1209  }
1210}
1211function ut() {
1212  return {
1213    context: void 0,
1214    data: void 0,
1215    error: null,
1216    failureCount: 0,
1217    failureReason: null,
1218    isPaused: !1,
1219    status: "idle",
1220    variables: void 0
1221  };
1222}
1223class ot extends L {
1224  constructor(e) {
1225    super(), this.config = e || {}, this.mutations = [], this.mutationId = 0;
1226  }
1227  build(e, r, n) {
1228    const s = new it({
1229      mutationCache: this,
1230      logger: e.getLogger(),
1231      mutationId: ++this.mutationId,
1232      options: e.defaultMutationOptions(r),
1233      state: n,
1234      defaultOptions: r.mutationKey ? e.getMutationDefaults(r.mutationKey) : void 0
1235    });
1236    return this.add(s), s;
1237  }
1238  add(e) {
1239    this.mutations.push(e), this.notify({
1240      type: "added",
1241      mutation: e
1242    });
1243  }
1244  remove(e) {
1245    this.mutations = this.mutations.filter((r) => r !== e), this.notify({
1246      type: "removed",
1247      mutation: e
1248    });
1249  }
1250  clear() {
1251    w.batch(() => {
1252      this.mutations.forEach((e) => {
1253        this.remove(e);
1254      });
1255    });
1256  }
1257  getAll() {
1258    return this.mutations;
1259  }
1260  find(e) {
1261    return typeof e.exact > "u" && (e.exact = !0), this.mutations.find((r) => oe(e, r));
1262  }
1263  findAll(e) {
1264    return this.mutations.filter((r) => oe(e, r));
1265  }
1266  notify(e) {
1267    w.batch(() => {
1268      this.listeners.forEach((r) => {
1269        r(e);
1270      });
1271    });
1272  }
1273  resumePausedMutations() {
1274    var e;
1275    return this.resuming = ((e = this.resuming) != null ? e : Promise.resolve()).then(() => {
1276      const r = this.mutations.filter((n) => n.state.isPaused);
1277      return w.batch(() => r.reduce((n, s) => n.then(() => s.continue().catch(E)), Promise.resolve()));
1278    }).then(() => {
1279      this.resuming = void 0;
1280    }), this.resuming;
1281  }
1282}
1283function at() {
1284  return {
1285    onFetch: (t) => {
1286      t.fetchFn = () => {
1287        var e, r, n, s, i, u;
1288        const o = (e = t.fetchOptions) == null || (r = e.meta) == null ? void 0 : r.refetchPage, a = (n = t.fetchOptions) == null || (s = n.meta) == null ? void 0 : s.fetchMore, c = a == null ? void 0 : a.pageParam, h = (a == null ? void 0 : a.direction) === "forward", O = (a == null ? void 0 : a.direction) === "backward", m = ((i = t.state.data) == null ? void 0 : i.pages) || [], f = ((u = t.state.data) == null ? void 0 : u.pageParams) || [];
1289        let g = f, P = !1;
1290        const y = (p) => {
1291          Object.defineProperty(p, "signal", {
1292            enumerable: !0,
1293            get: () => {
1294              var d;
1295              if ((d = t.signal) != null && d.aborted)
1296                P = !0;
1297              else {
1298                var v;
1299                (v = t.signal) == null || v.addEventListener("abort", () => {
1300                  P = !0;
1301                });
1302              }
1303              return t.signal;
1304            }
1305          });
1306        }, b = t.options.queryFn || (() => Promise.reject("Missing queryFn")), q = (p, d, v, _) => (g = _ ? [d, ...g] : [...g, d], _ ? [v, ...p] : [...p, v]), F = (p, d, v, _) => {
1307          if (P)
1308            return Promise.reject("Cancelled");
1309          if (typeof v > "u" && !d && p.length)
1310            return Promise.resolve(p);
1311          const N = {
1312            queryKey: t.queryKey,
1313            pageParam: v,
1314            meta: t.options.meta
1315          };
1316          y(N);
1317          const $ = b(N);
1318          return Promise.resolve($).then((_e) => q(p, v, _e, _));
1319        };
1320        let C;
1321        if (!m.length)
1322          C = F([]);
1323        else if (h) {
1324          const p = typeof c < "u", d = p ? c : z(t.options, m);
1325          C = F(m, p, d);
1326        } else if (O) {
1327          const p = typeof c < "u", d = p ? c : Ee(t.options, m);
1328          C = F(m, p, d, !0);
1329        } else {
1330          g = [];
1331          const p = typeof t.options.getNextPageParam > "u";
1332          C = (o && m[0] ? o(m[0], 0, m) : !0) ? F([], p, f[0]) : Promise.resolve(q([], f[0], m[0]));
1333          for (let v = 1; v < m.length; v++)
1334            C = C.then((_) => {
1335              if (o && m[v] ? o(m[v], v, m) : !0) {
1336                const $ = p ? f[v] : z(t.options, _);
1337                return F(_, p, $);
1338              }
1339              return Promise.resolve(q(_, f[v], m[v]));
1340            });
1341        }
1342        return C.then((p) => ({
1343          pages: p,
1344          pageParams: g
1345        }));
1346      };
1347    }
1348  };
1349}
1350function z(t, e) {
1351  return t.getNextPageParam == null ? void 0 : t.getNextPageParam(e[e.length - 1], e);
1352}
1353function Ee(t, e) {
1354  return t.getPreviousPageParam == null ? void 0 : t.getPreviousPageParam(e[0], e);
1355}
1356function pt(t, e) {
1357  if (t.getNextPageParam && Array.isArray(e)) {
1358    const r = z(t, e);
1359    return typeof r < "u" && r !== null && r !== !1;
1360  }
1361}
1362function vt(t, e) {
1363  if (t.getPreviousPageParam && Array.isArray(e)) {
1364    const r = Ee(t, e);
1365    return typeof r < "u" && r !== null && r !== !1;
1366  }
1367}
1368class mt {
1369  constructor(e = {}) {
1370    this.queryCache = e.queryCache || new st(), this.mutationCache = e.mutationCache || new ot(), this.logger = e.logger || re, this.defaultOptions = e.defaultOptions || {}, this.queryDefaults = [], this.mutationDefaults = [], this.mountCount = 0;
1371  }
1372  mount() {
1373    this.mountCount++, this.mountCount === 1 && (this.unsubscribeFocus = V.subscribe(() => {
1374      V.isFocused() && (this.resumePausedMutations(), this.queryCache.onFocus());
1375    }), this.unsubscribeOnline = I.subscribe(() => {
1376      I.isOnline() && (this.resumePausedMutations(), this.queryCache.onOnline());
1377    }));
1378  }
1379  unmount() {
1380    var e, r;
1381    this.mountCount--, this.mountCount === 0 && ((e = this.unsubscribeFocus) == null || e.call(this), this.unsubscribeFocus = void 0, (r = this.unsubscribeOnline) == null || r.call(this), this.unsubscribeOnline = void 0);
1382  }
1383  isFetching(e, r) {
1384    const [n] = D(e, r);
1385    return n.fetchStatus = "fetching", this.queryCache.findAll(n).length;
1386  }
1387  isMutating(e) {
1388    return this.mutationCache.findAll({
1389      ...e,
1390      fetching: !0
1391    }).length;
1392  }
1393  getQueryData(e, r) {
1394    var n;
1395    return (n = this.queryCache.find(e, r)) == null ? void 0 : n.state.data;
1396  }
1397  ensureQueryData(e, r, n) {
1398    const s = k(e, r, n), i = this.getQueryData(s.queryKey);
1399    return i ? Promise.resolve(i) : this.fetchQuery(s);
1400  }
1401  getQueriesData(e) {
1402    return this.getQueryCache().findAll(e).map(({
1403      queryKey: r,
1404      state: n
1405    }) => {
1406      const s = n.data;
1407      return [r, s];
1408    });
1409  }
1410  setQueryData(e, r, n) {
1411    const s = this.queryCache.find(e), i = s == null ? void 0 : s.state.data, u = Ve(r, i);
1412    if (typeof u > "u")
1413      return;
1414    const o = k(e), a = this.defaultQueryOptions(o);
1415    return this.queryCache.build(this, a).setData(u, {
1416      ...n,
1417      manual: !0
1418    });
1419  }
1420  setQueriesData(e, r, n) {
1421    return w.batch(() => this.getQueryCache().findAll(e).map(({
1422      queryKey: s
1423    }) => [s, this.setQueryData(s, r, n)]));
1424  }
1425  getQueryState(e, r) {
1426    var n;
1427    return (n = this.queryCache.find(e, r)) == null ? void 0 : n.state;
1428  }
1429  removeQueries(e, r) {
1430    const [n] = D(e, r), s = this.queryCache;
1431    w.batch(() => {
1432      s.findAll(n).forEach((i) => {
1433        s.remove(i);
1434      });
1435    });
1436  }
1437  resetQueries(e, r, n) {
1438    const [s, i] = D(e, r, n), u = this.queryCache, o = {
1439      type: "active",
1440      ...s
1441    };
1442    return w.batch(() => (u.findAll(s).forEach((a) => {
1443      a.reset();
1444    }), this.refetchQueries(o, i)));
1445  }
1446  cancelQueries(e, r, n) {
1447    const [s, i = {}] = D(e, r, n);
1448    typeof i.revert > "u" && (i.revert = !0);
1449    const u = w.batch(() => this.queryCache.findAll(s).map((o) => o.cancel(i)));
1450    return Promise.all(u).then(E).catch(E);
1451  }
1452  invalidateQueries(e, r, n) {
1453    const [s, i] = D(e, r, n);
1454    return w.batch(() => {
1455      var u, o;
1456      if (this.queryCache.findAll(s).forEach((c) => {
1457        c.invalidate();
1458      }), s.refetchType === "none")
1459        return Promise.resolve();
1460      const a = {
1461        ...s,
1462        type: (u = (o = s.refetchType) != null ? o : s.type) != null ? u : "active"
1463      };
1464      return this.refetchQueries(a, i);
1465    });
1466  }
1467  refetchQueries(e, r, n) {
1468    const [s, i] = D(e, r, n), u = w.batch(() => this.queryCache.findAll(s).filter((a) => !a.isDisabled()).map((a) => {
1469      var c;
1470      return a.fetch(void 0, {
1471        ...i,
1472        cancelRefetch: (c = i == null ? void 0 : i.cancelRefetch) != null ? c : !0,
1473        meta: {
1474          refetchPage: s.refetchPage
1475        }
1476      });
1477    }));
1478    let o = Promise.all(u).then(E);
1479    return i != null && i.throwOnError || (o = o.catch(E)), o;
1480  }
1481  fetchQuery(e, r, n) {
1482    const s = k(e, r, n), i = this.defaultQueryOptions(s);
1483    typeof i.retry > "u" && (i.retry = !1);
1484    const u = this.queryCache.build(this, i);
1485    return u.isStaleByTime(i.staleTime) ? u.fetch(i) : Promise.resolve(u.state.data);
1486  }
1487  prefetchQuery(e, r, n) {
1488    return this.fetchQuery(e, r, n).then(E).catch(E);
1489  }
1490  fetchInfiniteQuery(e, r, n) {
1491    const s = k(e, r, n);
1492    return s.behavior = at(), this.fetchQuery(s);
1493  }
1494  prefetchInfiniteQuery(e, r, n) {
1495    return this.fetchInfiniteQuery(e, r, n).then(E).catch(E);
1496  }
1497  resumePausedMutations() {
1498    return this.mutationCache.resumePausedMutations();
1499  }
1500  getQueryCache() {
1501    return this.queryCache;
1502  }
1503  getMutationCache() {
1504    return this.mutationCache;
1505  }
1506  getLogger() {
1507    return this.logger;
1508  }
1509  getDefaultOptions() {
1510    return this.defaultOptions;
1511  }
1512  setDefaultOptions(e) {
1513    this.defaultOptions = e;
1514  }
1515  setQueryDefaults(e, r) {
1516    const n = this.queryDefaults.find((s) => R(e) === R(s.queryKey));
1517    n ? n.defaultOptions = r : this.queryDefaults.push({
1518      queryKey: e,
1519      defaultOptions: r
1520    });
1521  }
1522  getQueryDefaults(e) {
1523    if (!e)
1524      return;
1525    const r = this.queryDefaults.find((n) => K(e, n.queryKey));
1526    return r == null ? void 0 : r.defaultOptions;
1527  }
1528  setMutationDefaults(e, r) {
1529    const n = this.mutationDefaults.find((s) => R(e) === R(s.mutationKey));
1530    n ? n.defaultOptions = r : this.mutationDefaults.push({
1531      mutationKey: e,
1532      defaultOptions: r
1533    });
1534  }
1535  getMutationDefaults(e) {
1536    if (!e)
1537      return;
1538    const r = this.mutationDefaults.find((n) => K(e, n.mutationKey));
1539    return r == null ? void 0 : r.defaultOptions;
1540  }
1541  defaultQueryOptions(e) {
1542    if (e != null && e._defaulted)
1543      return e;
1544    const r = {
1545      ...this.defaultOptions.queries,
1546      ...this.getQueryDefaults(e == null ? void 0 : e.queryKey),
1547      ...e,
1548      _defaulted: !0
1549    };
1550    return !r.queryHash && r.queryKey && (r.queryHash = ee(r.queryKey, r)), typeof r.refetchOnReconnect > "u" && (r.refetchOnReconnect = r.networkMode !== "always"), typeof r.useErrorBoundary > "u" && (r.useErrorBoundary = !!r.suspense), r;
1551  }
1552  defaultMutationOptions(e) {
1553    return e != null && e._defaulted ? e : {
1554      ...this.defaultOptions.mutations,
1555      ...this.getMutationDefaults(e == null ? void 0 : e.mutationKey),
1556      ...e,
1557      _defaulted: !0
1558    };
1559  }
1560  clear() {
1561    this.queryCache.clear(), this.mutationCache.clear();
1562  }
1563}
1564export {
1565  mt as Q,
1566  Be as R,
1567  L as S,
1568  pt as a,
1569  ht as b,
1570  ct as c,
1571  Z as d,
1572  ze as e,
1573  V as f,
1574  Me as g,
1575  vt as h,
1576  at as i,
1577  te as j,
1578  Xe as k,
1579  G as l,
1580  w as m,
1581  E as n,
1582  ft as o,
1583  k as p,
1584  ut as q,
1585  Oe as r,
1586  yt as s,
1587  We as t,
1588  dt as u
1589};
1590//# sourceMappingURL=queryClient-DpZpBkWP.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.