@shiftengineering/folio 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- var Xr = (t) => {
1
+ var Zr = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var Yt = (t, e, r) => e.has(t) || Xr("Cannot " + r);
5
- var a = (t, e, r) => (Yt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), w = (t, e, r) => e.has(t) ? Xr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (Yt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), S = (t, e, r) => (Yt(t, e, "access private method"), r);
4
+ var Jt = (t, e, r) => e.has(t) || Zr("Cannot " + r);
5
+ var a = (t, e, r) => (Jt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), w = (t, e, r) => e.has(t) ? Zr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (Jt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), S = (t, e, r) => (Jt(t, e, "access private method"), r);
6
6
  var It = (t, e, r, n) => ({
7
7
  set _(s) {
8
8
  b(t, e, s, r);
@@ -12,8 +12,8 @@ var It = (t, e, r, n) => ({
12
12
  }
13
13
  });
14
14
  import * as $ from "react";
15
- import Nn, { createContext as Hs, useState as Ws, useMemo as Bs, useEffect as Jt, useContext as Gs } from "react";
16
- var nr = { exports: {} }, ht = {};
15
+ import Ln, { createContext as Hs, useState as Ws, useMemo as Bs, useEffect as Xt, useContext as Gs } from "react";
16
+ var sr = { exports: {} }, dt = {};
17
17
  /**
18
18
  * @license React
19
19
  * react-jsx-runtime.production.min.js
@@ -23,11 +23,11 @@ var nr = { exports: {} }, ht = {};
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
25
  */
26
- var Zr;
26
+ var en;
27
27
  function Ys() {
28
- if (Zr) return ht;
29
- Zr = 1;
30
- var t = Nn, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
28
+ if (en) return dt;
29
+ en = 1;
30
+ var t = Ln, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
31
31
  function u(l, c, d) {
32
32
  var f, h = {}, y = null, p = null;
33
33
  d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (p = c.ref);
@@ -35,9 +35,9 @@ function Ys() {
35
35
  if (l && l.defaultProps) for (f in c = l.defaultProps, c) h[f] === void 0 && (h[f] = c[f]);
36
36
  return { $$typeof: e, type: l, key: y, ref: p, props: h, _owner: s.current };
37
37
  }
38
- return ht.Fragment = r, ht.jsx = u, ht.jsxs = u, ht;
38
+ return dt.Fragment = r, dt.jsx = u, dt.jsxs = u, dt;
39
39
  }
40
- var dt = {};
40
+ var yt = {};
41
41
  /**
42
42
  * @license React
43
43
  * react-jsx-runtime.development.js
@@ -47,10 +47,10 @@ var dt = {};
47
47
  * This source code is licensed under the MIT license found in the
48
48
  * LICENSE file in the root directory of this source tree.
49
49
  */
50
- var en;
50
+ var tn;
51
51
  function Js() {
52
- return en || (en = 1, process.env.NODE_ENV !== "production" && function() {
53
- var t = Nn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), E = Symbol.iterator, g = "@@iterator";
52
+ return tn || (tn = 1, process.env.NODE_ENV !== "production" && function() {
53
+ var t = Ln, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), E = Symbol.iterator, g = "@@iterator";
54
54
  function R(o) {
55
55
  if (o === null || typeof o != "object")
56
56
  return null;
@@ -139,18 +139,18 @@ function Js() {
139
139
  }
140
140
  return null;
141
141
  }
142
- var Fe = Object.assign, lt = 0, xr, Fr, Dr, Ir, _r, kr, jr;
143
- function qr() {
142
+ var Fe = Object.assign, ft = 0, Fr, Dr, Ir, _r, kr, jr, qr;
143
+ function Mr() {
144
144
  }
145
- qr.__reactDisabledLog = !0;
145
+ Mr.__reactDisabledLog = !0;
146
146
  function vs() {
147
147
  {
148
- if (lt === 0) {
149
- xr = console.log, Fr = console.info, Dr = console.warn, Ir = console.error, _r = console.group, kr = console.groupCollapsed, jr = console.groupEnd;
148
+ if (ft === 0) {
149
+ Fr = console.log, Dr = console.info, Ir = console.warn, _r = console.error, kr = console.group, jr = console.groupCollapsed, qr = console.groupEnd;
150
150
  var o = {
151
151
  configurable: !0,
152
152
  enumerable: !0,
153
- value: qr,
153
+ value: Mr,
154
154
  writable: !0
155
155
  };
156
156
  Object.defineProperties(console, {
@@ -163,12 +163,12 @@ function Js() {
163
163
  groupEnd: o
164
164
  });
165
165
  }
166
- lt++;
166
+ ft++;
167
167
  }
168
168
  }
169
169
  function ws() {
170
170
  {
171
- if (lt--, lt === 0) {
171
+ if (ft--, ft === 0) {
172
172
  var o = {
173
173
  configurable: !0,
174
174
  enumerable: !0,
@@ -176,52 +176,52 @@ function Js() {
176
176
  };
177
177
  Object.defineProperties(console, {
178
178
  log: Fe({}, o, {
179
- value: xr
179
+ value: Fr
180
180
  }),
181
181
  info: Fe({}, o, {
182
- value: Fr
182
+ value: Dr
183
183
  }),
184
184
  warn: Fe({}, o, {
185
- value: Dr
185
+ value: Ir
186
186
  }),
187
187
  error: Fe({}, o, {
188
- value: Ir
188
+ value: _r
189
189
  }),
190
190
  group: Fe({}, o, {
191
- value: _r
191
+ value: kr
192
192
  }),
193
193
  groupCollapsed: Fe({}, o, {
194
- value: kr
194
+ value: jr
195
195
  }),
196
196
  groupEnd: Fe({}, o, {
197
- value: jr
197
+ value: qr
198
198
  })
199
199
  });
200
200
  }
201
- lt < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
201
+ ft < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
202
202
  }
203
203
  }
204
- var $t = C.ReactCurrentDispatcher, Kt;
204
+ var Kt = C.ReactCurrentDispatcher, Vt;
205
205
  function At(o, m, v) {
206
206
  {
207
- if (Kt === void 0)
207
+ if (Vt === void 0)
208
208
  try {
209
209
  throw Error();
210
210
  } catch (D) {
211
211
  var O = D.stack.trim().match(/\n( *(at )?)/);
212
- Kt = O && O[1] || "";
212
+ Vt = O && O[1] || "";
213
213
  }
214
214
  return `
215
- ` + Kt + o;
215
+ ` + Vt + o;
216
216
  }
217
217
  }
218
- var Vt = !1, xt;
218
+ var zt = !1, xt;
219
219
  {
220
220
  var Es = typeof WeakMap == "function" ? WeakMap : Map;
221
221
  xt = new Es();
222
222
  }
223
- function Mr(o, m) {
224
- if (!o || Vt)
223
+ function Ur(o, m) {
224
+ if (!o || zt)
225
225
  return "";
226
226
  {
227
227
  var v = xt.get(o);
@@ -229,11 +229,11 @@ function Js() {
229
229
  return v;
230
230
  }
231
231
  var O;
232
- Vt = !0;
232
+ zt = !0;
233
233
  var D = Error.prepareStackTrace;
234
234
  Error.prepareStackTrace = void 0;
235
235
  var k;
236
- k = $t.current, $t.current = null, vs();
236
+ k = Kt.current, Kt.current = null, vs();
237
237
  try {
238
238
  if (m) {
239
239
  var F = function() {
@@ -286,13 +286,13 @@ function Js() {
286
286
  }
287
287
  }
288
288
  } finally {
289
- Vt = !1, $t.current = k, ws(), Error.prepareStackTrace = D;
289
+ zt = !1, Kt.current = k, ws(), Error.prepareStackTrace = D;
290
290
  }
291
- var Ve = o ? o.displayName || o.name : "", De = Ve ? At(Ve) : "";
291
+ var ze = o ? o.displayName || o.name : "", De = ze ? At(ze) : "";
292
292
  return typeof o == "function" && xt.set(o, De), De;
293
293
  }
294
294
  function Rs(o, m, v) {
295
- return Mr(o, !1);
295
+ return Ur(o, !1);
296
296
  }
297
297
  function Os(o) {
298
298
  var m = o.prototype;
@@ -302,7 +302,7 @@ function Js() {
302
302
  if (o == null)
303
303
  return "";
304
304
  if (typeof o == "function")
305
- return Mr(o, Os(o));
305
+ return Ur(o, Os(o));
306
306
  if (typeof o == "string")
307
307
  return At(o);
308
308
  switch (o) {
@@ -327,17 +327,17 @@ function Js() {
327
327
  }
328
328
  return "";
329
329
  }
330
- var ft = Object.prototype.hasOwnProperty, Ur = {}, Nr = C.ReactDebugCurrentFrame;
330
+ var ht = Object.prototype.hasOwnProperty, Nr = {}, Lr = C.ReactDebugCurrentFrame;
331
331
  function Dt(o) {
332
332
  if (o) {
333
333
  var m = o._owner, v = Ft(o.type, o._source, m ? m.type : null);
334
- Nr.setExtraStackFrame(v);
334
+ Lr.setExtraStackFrame(v);
335
335
  } else
336
- Nr.setExtraStackFrame(null);
336
+ Lr.setExtraStackFrame(null);
337
337
  }
338
338
  function Ps(o, m, v, O, D) {
339
339
  {
340
- var k = Function.call.bind(ft);
340
+ var k = Function.call.bind(ht);
341
341
  for (var F in o)
342
342
  if (k(o, F)) {
343
343
  var T = void 0;
@@ -350,12 +350,12 @@ function Js() {
350
350
  } catch (U) {
351
351
  T = U;
352
352
  }
353
- T && !(T instanceof Error) && (Dt(D), P("%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).", O || "React class", v, F, typeof T), Dt(null)), T instanceof Error && !(T.message in Ur) && (Ur[T.message] = !0, Dt(D), P("Failed %s type: %s", v, T.message), Dt(null));
353
+ T && !(T instanceof Error) && (Dt(D), P("%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).", O || "React class", v, F, typeof T), Dt(null)), T instanceof Error && !(T.message in Nr) && (Nr[T.message] = !0, Dt(D), P("Failed %s type: %s", v, T.message), Dt(null));
354
354
  }
355
355
  }
356
356
  }
357
357
  var Ss = Array.isArray;
358
- function zt(o) {
358
+ function Ht(o) {
359
359
  return Ss(o);
360
360
  }
361
361
  function Cs(o) {
@@ -366,26 +366,26 @@ function Js() {
366
366
  }
367
367
  function Ts(o) {
368
368
  try {
369
- return Lr(o), !1;
369
+ return Qr(o), !1;
370
370
  } catch {
371
371
  return !0;
372
372
  }
373
373
  }
374
- function Lr(o) {
374
+ function Qr(o) {
375
375
  return "" + o;
376
376
  }
377
- function Qr(o) {
377
+ function $r(o) {
378
378
  if (Ts(o))
379
- return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cs(o)), Lr(o);
379
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cs(o)), Qr(o);
380
380
  }
381
- var $r = C.ReactCurrentOwner, As = {
381
+ var Kr = C.ReactCurrentOwner, As = {
382
382
  key: !0,
383
383
  ref: !0,
384
384
  __self: !0,
385
385
  __source: !0
386
- }, Kr, Vr;
386
+ }, Vr, zr;
387
387
  function xs(o) {
388
- if (ft.call(o, "ref")) {
388
+ if (ht.call(o, "ref")) {
389
389
  var m = Object.getOwnPropertyDescriptor(o, "ref").get;
390
390
  if (m && m.isReactWarning)
391
391
  return !1;
@@ -393,7 +393,7 @@ function Js() {
393
393
  return o.ref !== void 0;
394
394
  }
395
395
  function Fs(o) {
396
- if (ft.call(o, "key")) {
396
+ if (ht.call(o, "key")) {
397
397
  var m = Object.getOwnPropertyDescriptor(o, "key").get;
398
398
  if (m && m.isReactWarning)
399
399
  return !1;
@@ -401,12 +401,12 @@ function Js() {
401
401
  return o.key !== void 0;
402
402
  }
403
403
  function Ds(o, m) {
404
- typeof o.ref == "string" && $r.current;
404
+ typeof o.ref == "string" && Kr.current;
405
405
  }
406
406
  function Is(o, m) {
407
407
  {
408
408
  var v = function() {
409
- Kr || (Kr = !0, P("%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)", m));
409
+ Vr || (Vr = !0, P("%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)", m));
410
410
  };
411
411
  v.isReactWarning = !0, Object.defineProperty(o, "key", {
412
412
  get: v,
@@ -417,7 +417,7 @@ function Js() {
417
417
  function _s(o, m) {
418
418
  {
419
419
  var v = function() {
420
- Vr || (Vr = !0, P("%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)", m));
420
+ zr || (zr = !0, P("%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)", m));
421
421
  };
422
422
  v.isReactWarning = !0, Object.defineProperty(o, "ref", {
423
423
  get: v,
@@ -457,9 +457,9 @@ function Js() {
457
457
  function js(o, m, v, O, D) {
458
458
  {
459
459
  var k, F = {}, T = null, H = null;
460
- v !== void 0 && (Qr(v), T = "" + v), Fs(m) && (Qr(m.key), T = "" + m.key), xs(m) && (H = m.ref, Ds(m, D));
460
+ v !== void 0 && ($r(v), T = "" + v), Fs(m) && ($r(m.key), T = "" + m.key), xs(m) && (H = m.ref, Ds(m, D));
461
461
  for (k in m)
462
- ft.call(m, k) && !As.hasOwnProperty(k) && (F[k] = m[k]);
462
+ ht.call(m, k) && !As.hasOwnProperty(k) && (F[k] = m[k]);
463
463
  if (o && o.defaultProps) {
464
464
  var U = o.defaultProps;
465
465
  for (k in U)
@@ -469,26 +469,26 @@ function Js() {
469
469
  var N = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
470
470
  T && Is(F, N), H && _s(F, N);
471
471
  }
472
- return ks(o, T, H, D, O, $r.current, F);
472
+ return ks(o, T, H, D, O, Kr.current, F);
473
473
  }
474
474
  }
475
- var Ht = C.ReactCurrentOwner, zr = C.ReactDebugCurrentFrame;
476
- function Ke(o) {
475
+ var Wt = C.ReactCurrentOwner, Hr = C.ReactDebugCurrentFrame;
476
+ function Ve(o) {
477
477
  if (o) {
478
478
  var m = o._owner, v = Ft(o.type, o._source, m ? m.type : null);
479
- zr.setExtraStackFrame(v);
479
+ Hr.setExtraStackFrame(v);
480
480
  } else
481
- zr.setExtraStackFrame(null);
481
+ Hr.setExtraStackFrame(null);
482
482
  }
483
- var Wt;
484
- Wt = !1;
485
- function Bt(o) {
483
+ var Bt;
484
+ Bt = !1;
485
+ function Gt(o) {
486
486
  return typeof o == "object" && o !== null && o.$$typeof === e;
487
487
  }
488
- function Hr() {
488
+ function Wr() {
489
489
  {
490
- if (Ht.current) {
491
- var o = me(Ht.current.type);
490
+ if (Wt.current) {
491
+ var o = me(Wt.current.type);
492
492
  if (o)
493
493
  return `
494
494
 
@@ -500,10 +500,10 @@ Check the render method of \`` + o + "`.";
500
500
  function qs(o) {
501
501
  return "";
502
502
  }
503
- var Wr = {};
503
+ var Br = {};
504
504
  function Ms(o) {
505
505
  {
506
- var m = Hr();
506
+ var m = Wr();
507
507
  if (!m) {
508
508
  var v = typeof o == "string" ? o : o.displayName || o.name;
509
509
  v && (m = `
@@ -513,35 +513,35 @@ Check the top-level render call using <` + v + ">.");
513
513
  return m;
514
514
  }
515
515
  }
516
- function Br(o, m) {
516
+ function Gr(o, m) {
517
517
  {
518
518
  if (!o._store || o._store.validated || o.key != null)
519
519
  return;
520
520
  o._store.validated = !0;
521
521
  var v = Ms(m);
522
- if (Wr[v])
522
+ if (Br[v])
523
523
  return;
524
- Wr[v] = !0;
524
+ Br[v] = !0;
525
525
  var O = "";
526
- o && o._owner && o._owner !== Ht.current && (O = " It was passed a child from " + me(o._owner.type) + "."), Ke(o), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, O), Ke(null);
526
+ o && o._owner && o._owner !== Wt.current && (O = " It was passed a child from " + me(o._owner.type) + "."), Ve(o), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, O), Ve(null);
527
527
  }
528
528
  }
529
- function Gr(o, m) {
529
+ function Yr(o, m) {
530
530
  {
531
531
  if (typeof o != "object")
532
532
  return;
533
- if (zt(o))
533
+ if (Ht(o))
534
534
  for (var v = 0; v < o.length; v++) {
535
535
  var O = o[v];
536
- Bt(O) && Br(O, m);
536
+ Gt(O) && Gr(O, m);
537
537
  }
538
- else if (Bt(o))
538
+ else if (Gt(o))
539
539
  o._store && (o._store.validated = !0);
540
540
  else if (o) {
541
541
  var D = R(o);
542
542
  if (typeof D == "function" && D !== o.entries)
543
543
  for (var k = D.call(o), F; !(F = k.next()).done; )
544
- Bt(F.value) && Br(F.value, m);
544
+ Gt(F.value) && Gr(F.value, m);
545
545
  }
546
546
  }
547
547
  }
@@ -562,8 +562,8 @@ Check the top-level render call using <` + v + ">.");
562
562
  if (v) {
563
563
  var O = me(m);
564
564
  Ps(v, o.props, "prop", O, o);
565
- } else if (m.PropTypes !== void 0 && !Wt) {
566
- Wt = !0;
565
+ } else if (m.PropTypes !== void 0 && !Bt) {
566
+ Bt = !0;
567
567
  var D = me(m);
568
568
  P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
569
569
  }
@@ -575,24 +575,24 @@ Check the top-level render call using <` + v + ">.");
575
575
  for (var m = Object.keys(o.props), v = 0; v < m.length; v++) {
576
576
  var O = m[v];
577
577
  if (O !== "children" && O !== "key") {
578
- Ke(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), Ke(null);
578
+ Ve(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), Ve(null);
579
579
  break;
580
580
  }
581
581
  }
582
- o.ref !== null && (Ke(o), P("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
582
+ o.ref !== null && (Ve(o), P("Invalid attribute `ref` supplied to `React.Fragment`."), Ve(null));
583
583
  }
584
584
  }
585
- var Yr = {};
586
- function Jr(o, m, v, O, D, k) {
585
+ var Jr = {};
586
+ function Xr(o, m, v, O, D, k) {
587
587
  {
588
588
  var F = ye(o);
589
589
  if (!F) {
590
590
  var T = "";
591
591
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
592
592
  var H = qs();
593
- H ? T += H : T += Hr();
593
+ H ? T += H : T += Wr();
594
594
  var U;
595
- o === null ? U = "null" : zt(o) ? U = "array" : o !== void 0 && o.$$typeof === e ? (U = "<" + (me(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof o, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
595
+ o === null ? U = "null" : Ht(o) ? U = "array" : o !== void 0 && o.$$typeof === e ? (U = "<" + (me(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof o, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
596
596
  }
597
597
  var N = js(o, m, v, D, k);
598
598
  if (N == null)
@@ -601,81 +601,81 @@ Check the top-level render call using <` + v + ">.");
601
601
  var Z = m.children;
602
602
  if (Z !== void 0)
603
603
  if (O)
604
- if (zt(Z)) {
605
- for (var Ve = 0; Ve < Z.length; Ve++)
606
- Gr(Z[Ve], o);
604
+ if (Ht(Z)) {
605
+ for (var ze = 0; ze < Z.length; ze++)
606
+ Yr(Z[ze], o);
607
607
  Object.freeze && Object.freeze(Z);
608
608
  } else
609
609
  P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
610
610
  else
611
- Gr(Z, o);
611
+ Yr(Z, o);
612
612
  }
613
- if (ft.call(m, "key")) {
613
+ if (ht.call(m, "key")) {
614
614
  var De = me(o), G = Object.keys(m).filter(function(zs) {
615
615
  return zs !== "key";
616
- }), Gt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
617
- if (!Yr[De + Gt]) {
616
+ }), Yt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
617
+ if (!Jr[De + Yt]) {
618
618
  var Vs = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
619
619
  P(`A props object containing a "key" prop is being spread into JSX:
620
620
  let props = %s;
621
621
  <%s {...props} />
622
622
  React keys must be passed directly to JSX without using spread:
623
623
  let props = %s;
624
- <%s key={someKey} {...props} />`, Gt, De, Vs, De), Yr[De + Gt] = !0;
624
+ <%s key={someKey} {...props} />`, Yt, De, Vs, De), Jr[De + Yt] = !0;
625
625
  }
626
626
  }
627
627
  return o === n ? Ns(N) : Us(N), N;
628
628
  }
629
629
  }
630
630
  function Ls(o, m, v) {
631
- return Jr(o, m, v, !0);
631
+ return Xr(o, m, v, !0);
632
632
  }
633
633
  function Qs(o, m, v) {
634
- return Jr(o, m, v, !1);
634
+ return Xr(o, m, v, !1);
635
635
  }
636
636
  var $s = Qs, Ks = Ls;
637
- dt.Fragment = n, dt.jsx = $s, dt.jsxs = Ks;
638
- }()), dt;
637
+ yt.Fragment = n, yt.jsx = $s, yt.jsxs = Ks;
638
+ }()), yt;
639
639
  }
640
- process.env.NODE_ENV === "production" ? nr.exports = Ys() : nr.exports = Js();
641
- var gt = nr.exports, sr = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(sr || {}), Pr = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(Pr || {});
642
- const yt = 4e3 * 1024 * 1024, Xs = [
640
+ process.env.NODE_ENV === "production" ? sr.exports = Ys() : sr.exports = Js();
641
+ var bt = sr.exports, ir = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(ir || {}), Sr = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(Sr || {});
642
+ const pt = 4e3 * 1024 * 1024, Xs = [
643
643
  ".txt",
644
644
  ".json",
645
645
  ".py",
646
646
  ".ts",
647
647
  ".tsx"
648
- ], Ln = {
648
+ ], Qn = {
649
649
  "application/pdf": {
650
650
  extensions: [".pdf"],
651
- maxSize: yt
651
+ maxSize: pt
652
652
  },
653
653
  "text/plain": {
654
654
  extensions: Xs,
655
- maxSize: yt
655
+ maxSize: pt
656
656
  },
657
657
  "text/csv": {
658
658
  extensions: [".csv"],
659
- maxSize: yt
659
+ maxSize: pt
660
660
  },
661
661
  "inode/directory": {
662
662
  extensions: [],
663
- maxSize: yt
663
+ maxSize: pt
664
664
  },
665
665
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
666
666
  extensions: [".docx"],
667
- maxSize: yt
667
+ maxSize: pt
668
668
  }
669
669
  };
670
- Object.entries(Ln).reduce(
670
+ Object.entries(Qn).reduce(
671
671
  (t, [e, r]) => ({
672
672
  ...t,
673
673
  [e]: r.extensions
674
674
  }),
675
675
  {}
676
676
  );
677
- const Zs = new Set(Object.values(Pr));
678
- var at = class {
677
+ const Zs = new Set(Object.values(Sr));
678
+ var ut = class {
679
679
  constructor() {
680
680
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
681
681
  }
@@ -697,19 +697,19 @@ function te() {
697
697
  function ei(t, e) {
698
698
  return typeof t == "function" ? t(e) : t;
699
699
  }
700
- function ir(t) {
700
+ function or(t) {
701
701
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
702
702
  }
703
- function Qn(t, e) {
703
+ function $n(t, e) {
704
704
  return Math.max(t + (e || 0) - Date.now(), 0);
705
705
  }
706
- function He(t, e) {
706
+ function We(t, e) {
707
707
  return typeof t == "function" ? t(e) : t;
708
708
  }
709
709
  function se(t, e) {
710
710
  return typeof t == "function" ? t(e) : t;
711
711
  }
712
- function tn(t, e) {
712
+ function rn(t, e) {
713
713
  const {
714
714
  type: r = "all",
715
715
  exact: n,
@@ -720,9 +720,9 @@ function tn(t, e) {
720
720
  } = t;
721
721
  if (u) {
722
722
  if (n) {
723
- if (e.queryHash !== Sr(u, e.options))
723
+ if (e.queryHash !== Cr(u, e.options))
724
724
  return !1;
725
- } else if (!bt(e.queryKey, u))
725
+ } else if (!vt(e.queryKey, u))
726
726
  return !1;
727
727
  }
728
728
  if (r !== "all") {
@@ -732,7 +732,7 @@ function tn(t, e) {
732
732
  }
733
733
  return !(typeof l == "boolean" && e.isStale() !== l || s && s !== e.state.fetchStatus || i && !i(e));
734
734
  }
735
- function rn(t, e) {
735
+ function nn(t, e) {
736
736
  const { exact: r, status: n, predicate: s, mutationKey: i } = t;
737
737
  if (i) {
738
738
  if (!e.options.mutationKey)
@@ -740,33 +740,33 @@ function rn(t, e) {
740
740
  if (r) {
741
741
  if ($e(e.options.mutationKey) !== $e(i))
742
742
  return !1;
743
- } else if (!bt(e.options.mutationKey, i))
743
+ } else if (!vt(e.options.mutationKey, i))
744
744
  return !1;
745
745
  }
746
746
  return !(n && e.state.status !== n || s && !s(e));
747
747
  }
748
- function Sr(t, e) {
748
+ function Cr(t, e) {
749
749
  return ((e == null ? void 0 : e.queryKeyHashFn) || $e)(t);
750
750
  }
751
751
  function $e(t) {
752
752
  return JSON.stringify(
753
753
  t,
754
- (e, r) => ar(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
754
+ (e, r) => ur(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
755
755
  );
756
756
  }
757
- function bt(t, e) {
758
- return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !bt(t[r], e[r])) : !1;
757
+ function vt(t, e) {
758
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !vt(t[r], e[r])) : !1;
759
759
  }
760
- function or(t, e) {
760
+ function ar(t, e) {
761
761
  if (t === e)
762
762
  return t;
763
- const r = nn(t) && nn(e);
764
- if (r || ar(t) && ar(e)) {
763
+ const r = sn(t) && sn(e);
764
+ if (r || ur(t) && ur(e)) {
765
765
  const n = r ? t : Object.keys(t), s = n.length, i = r ? e : Object.keys(e), u = i.length, l = r ? [] : {};
766
766
  let c = 0;
767
767
  for (let d = 0; d < u; d++) {
768
768
  const f = r ? d : i[d];
769
- (!r && n.includes(f) || r) && t[f] === void 0 && e[f] === void 0 ? (l[f] = void 0, c++) : (l[f] = or(t[f], e[f]), l[f] === t[f] && t[f] !== void 0 && c++);
769
+ (!r && n.includes(f) || r) && t[f] === void 0 && e[f] === void 0 ? (l[f] = void 0, c++) : (l[f] = ar(t[f], e[f]), l[f] === t[f] && t[f] !== void 0 && c++);
770
770
  }
771
771
  return s === u && c === s ? t : l;
772
772
  }
@@ -780,19 +780,19 @@ function Mt(t, e) {
780
780
  return !1;
781
781
  return !0;
782
782
  }
783
- function nn(t) {
783
+ function sn(t) {
784
784
  return Array.isArray(t) && t.length === Object.keys(t).length;
785
785
  }
786
- function ar(t) {
787
- if (!sn(t))
786
+ function ur(t) {
787
+ if (!on(t))
788
788
  return !1;
789
789
  const e = t.constructor;
790
790
  if (e === void 0)
791
791
  return !0;
792
792
  const r = e.prototype;
793
- return !(!sn(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
793
+ return !(!on(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
794
794
  }
795
- function sn(t) {
795
+ function on(t) {
796
796
  return Object.prototype.toString.call(t) === "[object Object]";
797
797
  }
798
798
  function ti(t) {
@@ -800,19 +800,19 @@ function ti(t) {
800
800
  setTimeout(e, t);
801
801
  });
802
802
  }
803
- function ur(t, e, r) {
803
+ function cr(t, e, r) {
804
804
  if (typeof r.structuralSharing == "function")
805
805
  return r.structuralSharing(t, e);
806
806
  if (r.structuralSharing !== !1) {
807
807
  if (process.env.NODE_ENV !== "production")
808
808
  try {
809
- return or(t, e);
809
+ return ar(t, e);
810
810
  } catch (n) {
811
811
  console.error(
812
812
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`
813
813
  );
814
814
  }
815
- return or(t, e);
815
+ return ar(t, e);
816
816
  }
817
817
  return e;
818
818
  }
@@ -825,18 +825,18 @@ function ni(t, e, r = 0) {
825
825
  return r && n.length > r ? n.slice(0, -1) : n;
826
826
  }
827
827
  var Ut = Symbol();
828
- function $n(t, e) {
828
+ function Kn(t, e) {
829
829
  return process.env.NODE_ENV !== "production" && t.queryFn === Ut && console.error(
830
830
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
831
831
  ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === Ut ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
832
832
  }
833
- var _e, be, We, On, si = (On = class extends at {
833
+ var _e, be, Be, Pn, si = (Pn = class extends ut {
834
834
  constructor() {
835
835
  super();
836
836
  w(this, _e);
837
837
  w(this, be);
838
- w(this, We);
839
- b(this, We, (e) => {
838
+ w(this, Be);
839
+ b(this, Be, (e) => {
840
840
  if (!Qe && window.addEventListener) {
841
841
  const r = () => e();
842
842
  return window.addEventListener("visibilitychange", r, !1), () => {
@@ -846,7 +846,7 @@ var _e, be, We, On, si = (On = class extends at {
846
846
  });
847
847
  }
848
848
  onSubscribe() {
849
- a(this, be) || this.setEventListener(a(this, We));
849
+ a(this, be) || this.setEventListener(a(this, Be));
850
850
  }
851
851
  onUnsubscribe() {
852
852
  var e;
@@ -854,7 +854,7 @@ var _e, be, We, On, si = (On = class extends at {
854
854
  }
855
855
  setEventListener(e) {
856
856
  var r;
857
- b(this, We, e), (r = a(this, be)) == null || r.call(this), b(this, be, e((n) => {
857
+ b(this, Be, e), (r = a(this, be)) == null || r.call(this), b(this, be, e((n) => {
858
858
  typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
859
859
  }));
860
860
  }
@@ -871,13 +871,13 @@ var _e, be, We, On, si = (On = class extends at {
871
871
  var e;
872
872
  return typeof a(this, _e) == "boolean" ? a(this, _e) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
873
873
  }
874
- }, _e = new WeakMap(), be = new WeakMap(), We = new WeakMap(), On), Cr = new si(), Be, ve, Ge, Pn, ii = (Pn = class extends at {
874
+ }, _e = new WeakMap(), be = new WeakMap(), Be = new WeakMap(), Pn), Tr = new si(), Ge, ve, Ye, Sn, ii = (Sn = class extends ut {
875
875
  constructor() {
876
876
  super();
877
- w(this, Be, !0);
877
+ w(this, Ge, !0);
878
878
  w(this, ve);
879
- w(this, Ge);
880
- b(this, Ge, (e) => {
879
+ w(this, Ye);
880
+ b(this, Ye, (e) => {
881
881
  if (!Qe && window.addEventListener) {
882
882
  const r = () => e(!0), n = () => e(!1);
883
883
  return window.addEventListener("online", r, !1), window.addEventListener("offline", n, !1), () => {
@@ -887,7 +887,7 @@ var _e, be, We, On, si = (On = class extends at {
887
887
  });
888
888
  }
889
889
  onSubscribe() {
890
- a(this, ve) || this.setEventListener(a(this, Ge));
890
+ a(this, ve) || this.setEventListener(a(this, Ye));
891
891
  }
892
892
  onUnsubscribe() {
893
893
  var e;
@@ -895,18 +895,18 @@ var _e, be, We, On, si = (On = class extends at {
895
895
  }
896
896
  setEventListener(e) {
897
897
  var r;
898
- b(this, Ge, e), (r = a(this, ve)) == null || r.call(this), b(this, ve, e(this.setOnline.bind(this)));
898
+ b(this, Ye, e), (r = a(this, ve)) == null || r.call(this), b(this, ve, e(this.setOnline.bind(this)));
899
899
  }
900
900
  setOnline(e) {
901
- a(this, Be) !== e && (b(this, Be, e), this.listeners.forEach((n) => {
901
+ a(this, Ge) !== e && (b(this, Ge, e), this.listeners.forEach((n) => {
902
902
  n(e);
903
903
  }));
904
904
  }
905
905
  isOnline() {
906
- return a(this, Be);
906
+ return a(this, Ge);
907
907
  }
908
- }, Be = new WeakMap(), ve = new WeakMap(), Ge = new WeakMap(), Pn), Nt = new ii();
909
- function cr() {
908
+ }, Ge = new WeakMap(), ve = new WeakMap(), Ye = new WeakMap(), Sn), Nt = new ii();
909
+ function lr() {
910
910
  let t, e;
911
911
  const r = new Promise((s, i) => {
912
912
  t = s, e = i;
@@ -931,27 +931,27 @@ function cr() {
931
931
  function oi(t) {
932
932
  return Math.min(1e3 * 2 ** t, 3e4);
933
933
  }
934
- function Kn(t) {
934
+ function Vn(t) {
935
935
  return (t ?? "online") === "online" ? Nt.isOnline() : !0;
936
936
  }
937
- var Vn = class extends Error {
937
+ var zn = class extends Error {
938
938
  constructor(t) {
939
939
  super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
940
940
  }
941
941
  };
942
- function Xt(t) {
943
- return t instanceof Vn;
942
+ function Zt(t) {
943
+ return t instanceof zn;
944
944
  }
945
- function zn(t) {
945
+ function Hn(t) {
946
946
  let e = !1, r = 0, n = !1, s;
947
- const i = cr(), u = (g) => {
947
+ const i = lr(), u = (g) => {
948
948
  var R;
949
- n || (y(new Vn(g)), (R = t.abort) == null || R.call(t));
949
+ n || (y(new zn(g)), (R = t.abort) == null || R.call(t));
950
950
  }, l = () => {
951
951
  e = !0;
952
952
  }, c = () => {
953
953
  e = !1;
954
- }, d = () => Cr.isFocused() && (t.networkMode === "always" || Nt.isOnline()) && t.canRun(), f = () => Kn(t.networkMode) && t.canRun(), h = (g) => {
954
+ }, d = () => Tr.isFocused() && (t.networkMode === "always" || Nt.isOnline()) && t.canRun(), f = () => Vn(t.networkMode) && t.canRun(), h = (g) => {
955
955
  var R;
956
956
  n || (n = !0, (R = t.onSuccess) == null || R.call(t, g), s == null || s(), i.resolve(g));
957
957
  }, y = (g) => {
@@ -1058,7 +1058,7 @@ function ai() {
1058
1058
  }
1059
1059
  };
1060
1060
  }
1061
- var L = ai(), ke, Sn, Hn = (Sn = class {
1061
+ var L = ai(), ke, Cn, Wn = (Cn = class {
1062
1062
  constructor() {
1063
1063
  w(this, ke);
1064
1064
  }
@@ -1066,7 +1066,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1066
1066
  this.clearGcTimeout();
1067
1067
  }
1068
1068
  scheduleGc() {
1069
- this.clearGcTimeout(), ir(this.gcTime) && b(this, ke, setTimeout(() => {
1069
+ this.clearGcTimeout(), or(this.gcTime) && b(this, ke, setTimeout(() => {
1070
1070
  this.optionalRemove();
1071
1071
  }, this.gcTime));
1072
1072
  }
@@ -1079,18 +1079,18 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1079
1079
  clearGcTimeout() {
1080
1080
  a(this, ke) && (clearTimeout(a(this, ke)), b(this, ke, void 0));
1081
1081
  }
1082
- }, ke = new WeakMap(), Sn), Ye, Je, ee, je, V, Ot, qe, re, le, Cn, ui = (Cn = class extends Hn {
1082
+ }, ke = new WeakMap(), Cn), Je, Xe, ee, je, V, Pt, qe, re, le, Tn, ui = (Tn = class extends Wn {
1083
1083
  constructor(e) {
1084
1084
  super();
1085
1085
  w(this, re);
1086
- w(this, Ye);
1087
1086
  w(this, Je);
1087
+ w(this, Xe);
1088
1088
  w(this, ee);
1089
1089
  w(this, je);
1090
1090
  w(this, V);
1091
- w(this, Ot);
1091
+ w(this, Pt);
1092
1092
  w(this, qe);
1093
- b(this, qe, !1), b(this, Ot, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, je, e.client), b(this, ee, a(this, je).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, Ye, ci(this.options)), this.state = e.state ?? a(this, Ye), this.scheduleGc();
1093
+ b(this, qe, !1), b(this, Pt, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, je, e.client), b(this, ee, a(this, je).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, Je, ci(this.options)), this.state = e.state ?? a(this, Je), this.scheduleGc();
1094
1094
  }
1095
1095
  get meta() {
1096
1096
  return this.options.meta;
@@ -1100,13 +1100,13 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1100
1100
  return (e = a(this, V)) == null ? void 0 : e.promise;
1101
1101
  }
1102
1102
  setOptions(e) {
1103
- this.options = { ...a(this, Ot), ...e }, this.updateGcTime(this.options.gcTime);
1103
+ this.options = { ...a(this, Pt), ...e }, this.updateGcTime(this.options.gcTime);
1104
1104
  }
1105
1105
  optionalRemove() {
1106
1106
  !this.observers.length && this.state.fetchStatus === "idle" && a(this, ee).remove(this);
1107
1107
  }
1108
1108
  setData(e, r) {
1109
- const n = ur(this.state.data, e, this.options);
1109
+ const n = cr(this.state.data, e, this.options);
1110
1110
  return S(this, re, le).call(this, {
1111
1111
  data: n,
1112
1112
  type: "success",
@@ -1126,7 +1126,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1126
1126
  super.destroy(), this.cancel({ silent: !0 });
1127
1127
  }
1128
1128
  reset() {
1129
- this.destroy(), this.setState(a(this, Ye));
1129
+ this.destroy(), this.setState(a(this, Je));
1130
1130
  }
1131
1131
  isActive() {
1132
1132
  return this.observers.some(
@@ -1142,7 +1142,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1142
1142
  ) : this.state.data === void 0;
1143
1143
  }
1144
1144
  isStaleByTime(e = 0) {
1145
- return this.state.isInvalidated || this.state.data === void 0 || !Qn(this.state.dataUpdatedAt, e);
1145
+ return this.state.isInvalidated || this.state.data === void 0 || !$n(this.state.dataUpdatedAt, e);
1146
1146
  }
1147
1147
  onFocus() {
1148
1148
  var r;
@@ -1187,7 +1187,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1187
1187
  get: () => (b(this, qe, !0), n.signal)
1188
1188
  });
1189
1189
  }, i = () => {
1190
- const h = $n(this.options, r), y = {
1190
+ const h = Kn(this.options, r), y = {
1191
1191
  client: a(this, je),
1192
1192
  queryKey: this.queryKey,
1193
1193
  meta: this.meta
@@ -1208,13 +1208,13 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1208
1208
  s(u), (c = this.options.behavior) == null || c.onFetch(
1209
1209
  u,
1210
1210
  this
1211
- ), b(this, Je, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && S(this, re, le).call(this, { type: "fetch", meta: (f = u.fetchOptions) == null ? void 0 : f.meta });
1211
+ ), b(this, Xe, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && S(this, re, le).call(this, { type: "fetch", meta: (f = u.fetchOptions) == null ? void 0 : f.meta });
1212
1212
  const l = (h) => {
1213
1213
  var y, p, E, g;
1214
- Xt(h) && h.silent || S(this, re, le).call(this, {
1214
+ Zt(h) && h.silent || S(this, re, le).call(this, {
1215
1215
  type: "error",
1216
1216
  error: h
1217
- }), Xt(h) || ((p = (y = a(this, ee).config).onError) == null || p.call(
1217
+ }), Zt(h) || ((p = (y = a(this, ee).config).onError) == null || p.call(
1218
1218
  y,
1219
1219
  h,
1220
1220
  this
@@ -1225,7 +1225,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1225
1225
  this
1226
1226
  )), this.scheduleGc();
1227
1227
  };
1228
- return b(this, V, zn({
1228
+ return b(this, V, Hn({
1229
1229
  initialPromise: r == null ? void 0 : r.initialPromise,
1230
1230
  fn: u.fetchFn,
1231
1231
  abort: n.abort.bind(n),
@@ -1266,7 +1266,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1266
1266
  canRun: () => !0
1267
1267
  })), a(this, V).start();
1268
1268
  }
1269
- }, Ye = new WeakMap(), Je = new WeakMap(), ee = new WeakMap(), je = new WeakMap(), V = new WeakMap(), Ot = new WeakMap(), qe = new WeakMap(), re = new WeakSet(), le = function(e) {
1269
+ }, Je = new WeakMap(), Xe = new WeakMap(), ee = new WeakMap(), je = new WeakMap(), V = new WeakMap(), Pt = new WeakMap(), qe = new WeakMap(), re = new WeakSet(), le = function(e) {
1270
1270
  const r = (n) => {
1271
1271
  switch (e.type) {
1272
1272
  case "failed":
@@ -1288,7 +1288,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1288
1288
  case "fetch":
1289
1289
  return {
1290
1290
  ...n,
1291
- ...Wn(n.data, this.options),
1291
+ ...Bn(n.data, this.options),
1292
1292
  fetchMeta: e.meta ?? null
1293
1293
  };
1294
1294
  case "success":
@@ -1308,7 +1308,7 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1308
1308
  };
1309
1309
  case "error":
1310
1310
  const s = e.error;
1311
- return Xt(s) && s.revert && a(this, Je) ? { ...a(this, Je), fetchStatus: "idle" } : {
1311
+ return Zt(s) && s.revert && a(this, Xe) ? { ...a(this, Xe), fetchStatus: "idle" } : {
1312
1312
  ...n,
1313
1313
  error: s,
1314
1314
  errorUpdateCount: n.errorUpdateCount + 1,
@@ -1335,12 +1335,12 @@ var L = ai(), ke, Sn, Hn = (Sn = class {
1335
1335
  n.onQueryUpdate();
1336
1336
  }), a(this, ee).notify({ query: this, type: "updated", action: e });
1337
1337
  });
1338
- }, Cn);
1339
- function Wn(t, e) {
1338
+ }, Tn);
1339
+ function Bn(t, e) {
1340
1340
  return {
1341
1341
  fetchFailureCount: 0,
1342
1342
  fetchFailureReason: null,
1343
- fetchStatus: Kn(e.networkMode) ? "fetching" : "paused",
1343
+ fetchStatus: Vn(e.networkMode) ? "fetching" : "paused",
1344
1344
  ...t === void 0 && {
1345
1345
  error: null,
1346
1346
  status: "pending"
@@ -1364,14 +1364,14 @@ function ci(t) {
1364
1364
  fetchStatus: "idle"
1365
1365
  };
1366
1366
  }
1367
- var oe, Tn, li = (Tn = class extends at {
1367
+ var oe, An, li = (An = class extends ut {
1368
1368
  constructor(e = {}) {
1369
1369
  super();
1370
1370
  w(this, oe);
1371
1371
  this.config = e, b(this, oe, /* @__PURE__ */ new Map());
1372
1372
  }
1373
1373
  build(e, r, n) {
1374
- const s = r.queryKey, i = r.queryHash ?? Sr(s, r);
1374
+ const s = r.queryKey, i = r.queryHash ?? Cr(s, r);
1375
1375
  let u = this.get(i);
1376
1376
  return u || (u = new ui({
1377
1377
  client: e,
@@ -1408,12 +1408,12 @@ var oe, Tn, li = (Tn = class extends at {
1408
1408
  find(e) {
1409
1409
  const r = { exact: !0, ...e };
1410
1410
  return this.getAll().find(
1411
- (n) => tn(r, n)
1411
+ (n) => rn(r, n)
1412
1412
  );
1413
1413
  }
1414
1414
  findAll(e = {}) {
1415
1415
  const r = this.getAll();
1416
- return Object.keys(e).length > 0 ? r.filter((n) => tn(e, n)) : r;
1416
+ return Object.keys(e).length > 0 ? r.filter((n) => rn(e, n)) : r;
1417
1417
  }
1418
1418
  notify(e) {
1419
1419
  L.batch(() => {
@@ -1436,14 +1436,14 @@ var oe, Tn, li = (Tn = class extends at {
1436
1436
  });
1437
1437
  });
1438
1438
  }
1439
- }, oe = new WeakMap(), Tn), ae, W, Me, ue, ge, An, fi = (An = class extends Hn {
1439
+ }, oe = new WeakMap(), An), ae, W, Me, ue, ge, xn, fi = (xn = class extends Wn {
1440
1440
  constructor(e) {
1441
1441
  super();
1442
1442
  w(this, ue);
1443
1443
  w(this, ae);
1444
1444
  w(this, W);
1445
1445
  w(this, Me);
1446
- this.mutationId = e.mutationId, b(this, W, e.mutationCache), b(this, ae, []), this.state = e.state || Bn(), this.setOptions(e.options), this.scheduleGc();
1446
+ this.mutationId = e.mutationId, b(this, W, e.mutationCache), b(this, ae, []), this.state = e.state || Gn(), this.setOptions(e.options), this.scheduleGc();
1447
1447
  }
1448
1448
  setOptions(e) {
1449
1449
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1475,7 +1475,7 @@ var oe, Tn, li = (Tn = class extends at {
1475
1475
  }
1476
1476
  async execute(e) {
1477
1477
  var s, i, u, l, c, d, f, h, y, p, E, g, R, C, P, _, Q, z, X, K;
1478
- b(this, Me, zn({
1478
+ b(this, Me, Hn({
1479
1479
  fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
1480
1480
  onFail: (q, j) => {
1481
1481
  S(this, ue, ge).call(this, { type: "failed", failureCount: q, error: j });
@@ -1619,8 +1619,8 @@ var oe, Tn, li = (Tn = class extends at {
1619
1619
  action: e
1620
1620
  });
1621
1621
  });
1622
- }, An);
1623
- function Bn() {
1622
+ }, xn);
1623
+ function Gn() {
1624
1624
  return {
1625
1625
  context: void 0,
1626
1626
  data: void 0,
@@ -1633,18 +1633,18 @@ function Bn() {
1633
1633
  submittedAt: 0
1634
1634
  };
1635
1635
  }
1636
- var fe, ne, Pt, xn, hi = (xn = class extends at {
1636
+ var fe, ne, St, Fn, hi = (Fn = class extends ut {
1637
1637
  constructor(e = {}) {
1638
1638
  super();
1639
1639
  w(this, fe);
1640
1640
  w(this, ne);
1641
- w(this, Pt);
1642
- this.config = e, b(this, fe, /* @__PURE__ */ new Set()), b(this, ne, /* @__PURE__ */ new Map()), b(this, Pt, 0);
1641
+ w(this, St);
1642
+ this.config = e, b(this, fe, /* @__PURE__ */ new Set()), b(this, ne, /* @__PURE__ */ new Map()), b(this, St, 0);
1643
1643
  }
1644
1644
  build(e, r, n) {
1645
1645
  const s = new fi({
1646
1646
  mutationCache: this,
1647
- mutationId: ++It(this, Pt)._,
1647
+ mutationId: ++It(this, St)._,
1648
1648
  options: e.defaultMutationOptions(r),
1649
1649
  state: n
1650
1650
  });
@@ -1705,11 +1705,11 @@ var fe, ne, Pt, xn, hi = (xn = class extends at {
1705
1705
  find(e) {
1706
1706
  const r = { exact: !0, ...e };
1707
1707
  return this.getAll().find(
1708
- (n) => rn(r, n)
1708
+ (n) => nn(r, n)
1709
1709
  );
1710
1710
  }
1711
1711
  findAll(e = {}) {
1712
- return this.getAll().filter((r) => rn(e, r));
1712
+ return this.getAll().filter((r) => nn(e, r));
1713
1713
  }
1714
1714
  notify(e) {
1715
1715
  L.batch(() => {
@@ -1726,12 +1726,12 @@ var fe, ne, Pt, xn, hi = (xn = class extends at {
1726
1726
  )
1727
1727
  );
1728
1728
  }
1729
- }, fe = new WeakMap(), ne = new WeakMap(), Pt = new WeakMap(), xn);
1729
+ }, fe = new WeakMap(), ne = new WeakMap(), St = new WeakMap(), Fn);
1730
1730
  function _t(t) {
1731
1731
  var e;
1732
1732
  return (e = t.options.scope) == null ? void 0 : e.id;
1733
1733
  }
1734
- function on(t) {
1734
+ function an(t) {
1735
1735
  return {
1736
1736
  onFetch: (e, r) => {
1737
1737
  var f, h, y, p, E;
@@ -1746,7 +1746,7 @@ function on(t) {
1746
1746
  g = !0;
1747
1747
  }), e.signal)
1748
1748
  });
1749
- }, C = $n(e.options, e.fetchOptions), P = async (_, Q, z) => {
1749
+ }, C = Kn(e.options, e.fetchOptions), P = async (_, Q, z) => {
1750
1750
  if (g)
1751
1751
  return Promise.reject();
1752
1752
  if (Q == null && _.pages.length)
@@ -1768,7 +1768,7 @@ function on(t) {
1768
1768
  };
1769
1769
  };
1770
1770
  if (s && i.length) {
1771
- const _ = s === "backward", Q = _ ? di : an, z = {
1771
+ const _ = s === "backward", Q = _ ? di : un, z = {
1772
1772
  pages: i,
1773
1773
  pageParams: u
1774
1774
  }, X = Q(n, z);
@@ -1776,7 +1776,7 @@ function on(t) {
1776
1776
  } else {
1777
1777
  const _ = t ?? i.length;
1778
1778
  do {
1779
- const Q = c === 0 ? u[0] ?? n.initialPageParam : an(n, l);
1779
+ const Q = c === 0 ? u[0] ?? n.initialPageParam : un(n, l);
1780
1780
  if (c > 0 && Q == null)
1781
1781
  break;
1782
1782
  l = await P(l, Q), c++;
@@ -1801,7 +1801,7 @@ function on(t) {
1801
1801
  }
1802
1802
  };
1803
1803
  }
1804
- function an(t, { pages: e, pageParams: r }) {
1804
+ function un(t, { pages: e, pageParams: r }) {
1805
1805
  const n = e.length - 1;
1806
1806
  return e.length > 0 ? t.getNextPageParam(
1807
1807
  e[n],
@@ -1814,28 +1814,28 @@ function di(t, { pages: e, pageParams: r }) {
1814
1814
  var n;
1815
1815
  return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
1816
1816
  }
1817
- var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
1817
+ var M, we, Ee, Ze, et, Re, tt, rt, Dn, yi = (Dn = class {
1818
1818
  constructor(t = {}) {
1819
1819
  w(this, M);
1820
1820
  w(this, we);
1821
1821
  w(this, Ee);
1822
- w(this, Xe);
1823
1822
  w(this, Ze);
1824
- w(this, Re);
1825
1823
  w(this, et);
1824
+ w(this, Re);
1826
1825
  w(this, tt);
1827
- b(this, M, t.queryCache || new li()), b(this, we, t.mutationCache || new hi()), b(this, Ee, t.defaultOptions || {}), b(this, Xe, /* @__PURE__ */ new Map()), b(this, Ze, /* @__PURE__ */ new Map()), b(this, Re, 0);
1826
+ w(this, rt);
1827
+ b(this, M, t.queryCache || new li()), b(this, we, t.mutationCache || new hi()), b(this, Ee, t.defaultOptions || {}), b(this, Ze, /* @__PURE__ */ new Map()), b(this, et, /* @__PURE__ */ new Map()), b(this, Re, 0);
1828
1828
  }
1829
1829
  mount() {
1830
- It(this, Re)._++, a(this, Re) === 1 && (b(this, et, Cr.subscribe(async (t) => {
1830
+ It(this, Re)._++, a(this, Re) === 1 && (b(this, tt, Tr.subscribe(async (t) => {
1831
1831
  t && (await this.resumePausedMutations(), a(this, M).onFocus());
1832
- })), b(this, tt, Nt.subscribe(async (t) => {
1832
+ })), b(this, rt, Nt.subscribe(async (t) => {
1833
1833
  t && (await this.resumePausedMutations(), a(this, M).onOnline());
1834
1834
  })));
1835
1835
  }
1836
1836
  unmount() {
1837
1837
  var t, e;
1838
- It(this, Re)._--, a(this, Re) === 0 && ((t = a(this, et)) == null || t.call(this), b(this, et, void 0), (e = a(this, tt)) == null || e.call(this), b(this, tt, void 0));
1838
+ It(this, Re)._--, a(this, Re) === 0 && ((t = a(this, tt)) == null || t.call(this), b(this, tt, void 0), (e = a(this, rt)) == null || e.call(this), b(this, rt, void 0));
1839
1839
  }
1840
1840
  isFetching(t) {
1841
1841
  return a(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
@@ -1850,7 +1850,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
1850
1850
  }
1851
1851
  ensureQueryData(t) {
1852
1852
  const e = this.defaultQueryOptions(t), r = a(this, M).build(this, e), n = r.state.data;
1853
- return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(He(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
1853
+ return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(We(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
1854
1854
  }
1855
1855
  getQueriesData(t) {
1856
1856
  return a(this, M).findAll(t).map(({ queryKey: e, state: r }) => {
@@ -1934,20 +1934,20 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
1934
1934
  e.retry === void 0 && (e.retry = !1);
1935
1935
  const r = a(this, M).build(this, e);
1936
1936
  return r.isStaleByTime(
1937
- He(e.staleTime, r)
1937
+ We(e.staleTime, r)
1938
1938
  ) ? r.fetch(e) : Promise.resolve(r.state.data);
1939
1939
  }
1940
1940
  prefetchQuery(t) {
1941
1941
  return this.fetchQuery(t).then(te).catch(te);
1942
1942
  }
1943
1943
  fetchInfiniteQuery(t) {
1944
- return t.behavior = on(t.pages), this.fetchQuery(t);
1944
+ return t.behavior = an(t.pages), this.fetchQuery(t);
1945
1945
  }
1946
1946
  prefetchInfiniteQuery(t) {
1947
1947
  return this.fetchInfiniteQuery(t).then(te).catch(te);
1948
1948
  }
1949
1949
  ensureInfiniteQueryData(t) {
1950
- return t.behavior = on(t.pages), this.ensureQueryData(t);
1950
+ return t.behavior = an(t.pages), this.ensureQueryData(t);
1951
1951
  }
1952
1952
  resumePausedMutations() {
1953
1953
  return Nt.isOnline() ? a(this, we).resumePausedMutations() : Promise.resolve();
@@ -1965,27 +1965,27 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
1965
1965
  b(this, Ee, t);
1966
1966
  }
1967
1967
  setQueryDefaults(t, e) {
1968
- a(this, Xe).set($e(t), {
1968
+ a(this, Ze).set($e(t), {
1969
1969
  queryKey: t,
1970
1970
  defaultOptions: e
1971
1971
  });
1972
1972
  }
1973
1973
  getQueryDefaults(t) {
1974
- const e = [...a(this, Xe).values()], r = {};
1974
+ const e = [...a(this, Ze).values()], r = {};
1975
1975
  return e.forEach((n) => {
1976
- bt(t, n.queryKey) && Object.assign(r, n.defaultOptions);
1976
+ vt(t, n.queryKey) && Object.assign(r, n.defaultOptions);
1977
1977
  }), r;
1978
1978
  }
1979
1979
  setMutationDefaults(t, e) {
1980
- a(this, Ze).set($e(t), {
1980
+ a(this, et).set($e(t), {
1981
1981
  mutationKey: t,
1982
1982
  defaultOptions: e
1983
1983
  });
1984
1984
  }
1985
1985
  getMutationDefaults(t) {
1986
- const e = [...a(this, Ze).values()], r = {};
1986
+ const e = [...a(this, et).values()], r = {};
1987
1987
  return e.forEach((n) => {
1988
- bt(t, n.mutationKey) && Object.assign(r, n.defaultOptions);
1988
+ vt(t, n.mutationKey) && Object.assign(r, n.defaultOptions);
1989
1989
  }), r;
1990
1990
  }
1991
1991
  defaultQueryOptions(t) {
@@ -1997,7 +1997,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
1997
1997
  ...t,
1998
1998
  _defaulted: !0
1999
1999
  };
2000
- return e.queryHash || (e.queryHash = Sr(
2000
+ return e.queryHash || (e.queryHash = Cr(
2001
2001
  e.queryKey,
2002
2002
  e
2003
2003
  )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Ut && (e.enabled = !1), e;
@@ -2013,28 +2013,28 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2013
2013
  clear() {
2014
2014
  a(this, M).clear(), a(this, we).clear();
2015
2015
  }
2016
- }, M = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Re = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Fn), Y, A, St, B, Ue, rt, Oe, ce, Ct, nt, st, Ne, Le, Pe, it, I, pt, lr, fr, hr, dr, yr, pr, mr, Gn, Dn, pi = (Dn = class extends at {
2016
+ }, M = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), Re = new WeakMap(), tt = new WeakMap(), rt = new WeakMap(), Dn), Y, A, Ct, B, Ue, nt, Oe, ce, Tt, st, it, Ne, Le, Pe, ot, I, mt, fr, hr, dr, yr, pr, mr, gr, Yn, In, pi = (In = class extends ut {
2017
2017
  constructor(e, r) {
2018
2018
  super();
2019
2019
  w(this, I);
2020
2020
  w(this, Y);
2021
2021
  w(this, A);
2022
- w(this, St);
2022
+ w(this, Ct);
2023
2023
  w(this, B);
2024
2024
  w(this, Ue);
2025
- w(this, rt);
2025
+ w(this, nt);
2026
2026
  w(this, Oe);
2027
2027
  w(this, ce);
2028
- w(this, Ct);
2029
- w(this, nt);
2028
+ w(this, Tt);
2029
+ w(this, st);
2030
2030
  // This property keeps track of the last query with defined data.
2031
2031
  // It will be used to pass the previous data and query to the placeholder function between renders.
2032
- w(this, st);
2032
+ w(this, it);
2033
2033
  w(this, Ne);
2034
2034
  w(this, Le);
2035
2035
  w(this, Pe);
2036
- w(this, it, /* @__PURE__ */ new Set());
2037
- this.options = r, b(this, Y, e), b(this, ce, null), b(this, Oe, cr()), this.options.experimental_prefetchInRender || a(this, Oe).reject(
2036
+ w(this, ot, /* @__PURE__ */ new Set());
2037
+ this.options = r, b(this, Y, e), b(this, ce, null), b(this, Oe, lr()), this.options.experimental_prefetchInRender || a(this, Oe).reject(
2038
2038
  new Error("experimental_prefetchInRender feature flag is not enabled")
2039
2039
  ), this.bindMethods(), this.setOptions(r);
2040
2040
  }
@@ -2042,27 +2042,27 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2042
2042
  this.refetch = this.refetch.bind(this);
2043
2043
  }
2044
2044
  onSubscribe() {
2045
- this.listeners.size === 1 && (a(this, A).addObserver(this), un(a(this, A), this.options) ? S(this, I, pt).call(this) : this.updateResult(), S(this, I, dr).call(this));
2045
+ this.listeners.size === 1 && (a(this, A).addObserver(this), cn(a(this, A), this.options) ? S(this, I, mt).call(this) : this.updateResult(), S(this, I, yr).call(this));
2046
2046
  }
2047
2047
  onUnsubscribe() {
2048
2048
  this.hasListeners() || this.destroy();
2049
2049
  }
2050
2050
  shouldFetchOnReconnect() {
2051
- return gr(
2051
+ return br(
2052
2052
  a(this, A),
2053
2053
  this.options,
2054
2054
  this.options.refetchOnReconnect
2055
2055
  );
2056
2056
  }
2057
2057
  shouldFetchOnWindowFocus() {
2058
- return gr(
2058
+ return br(
2059
2059
  a(this, A),
2060
2060
  this.options,
2061
2061
  this.options.refetchOnWindowFocus
2062
2062
  );
2063
2063
  }
2064
2064
  destroy() {
2065
- this.listeners = /* @__PURE__ */ new Set(), S(this, I, yr).call(this), S(this, I, pr).call(this), a(this, A).removeObserver(this);
2065
+ this.listeners = /* @__PURE__ */ new Set(), S(this, I, pr).call(this), S(this, I, mr).call(this), a(this, A).removeObserver(this);
2066
2066
  }
2067
2067
  setOptions(e, r) {
2068
2068
  const n = this.options, s = a(this, A);
@@ -2070,24 +2070,24 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2070
2070
  throw new Error(
2071
2071
  "Expected enabled to be a boolean or a callback that returns a boolean"
2072
2072
  );
2073
- S(this, I, mr).call(this), a(this, A).setOptions(this.options), n._defaulted && !Mt(this.options, n) && a(this, Y).getQueryCache().notify({
2073
+ S(this, I, gr).call(this), a(this, A).setOptions(this.options), n._defaulted && !Mt(this.options, n) && a(this, Y).getQueryCache().notify({
2074
2074
  type: "observerOptionsUpdated",
2075
2075
  query: a(this, A),
2076
2076
  observer: this
2077
2077
  });
2078
2078
  const i = this.hasListeners();
2079
- i && cn(
2079
+ i && ln(
2080
2080
  a(this, A),
2081
2081
  s,
2082
2082
  this.options,
2083
2083
  n
2084
- ) && S(this, I, pt).call(this), this.updateResult(r), i && (a(this, A) !== s || se(this.options.enabled, a(this, A)) !== se(n.enabled, a(this, A)) || He(this.options.staleTime, a(this, A)) !== He(n.staleTime, a(this, A))) && S(this, I, lr).call(this);
2085
- const u = S(this, I, fr).call(this);
2086
- i && (a(this, A) !== s || se(this.options.enabled, a(this, A)) !== se(n.enabled, a(this, A)) || u !== a(this, Pe)) && S(this, I, hr).call(this, u);
2084
+ ) && S(this, I, mt).call(this), this.updateResult(r), i && (a(this, A) !== s || se(this.options.enabled, a(this, A)) !== se(n.enabled, a(this, A)) || We(this.options.staleTime, a(this, A)) !== We(n.staleTime, a(this, A))) && S(this, I, fr).call(this);
2085
+ const u = S(this, I, hr).call(this);
2086
+ i && (a(this, A) !== s || se(this.options.enabled, a(this, A)) !== se(n.enabled, a(this, A)) || u !== a(this, Pe)) && S(this, I, dr).call(this, u);
2087
2087
  }
2088
2088
  getOptimisticResult(e) {
2089
2089
  const r = a(this, Y).getQueryCache().build(a(this, Y), e), n = this.createResult(r, e);
2090
- return gi(this, n) && (b(this, B, n), b(this, rt, this.options), b(this, Ue, a(this, A).state)), n;
2090
+ return gi(this, n) && (b(this, B, n), b(this, nt, this.options), b(this, Ue, a(this, A).state)), n;
2091
2091
  }
2092
2092
  getCurrentResult() {
2093
2093
  return a(this, B);
@@ -2103,7 +2103,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2103
2103
  }), n;
2104
2104
  }
2105
2105
  trackProp(e) {
2106
- a(this, it).add(e);
2106
+ a(this, ot).add(e);
2107
2107
  }
2108
2108
  getCurrentQuery() {
2109
2109
  return a(this, A);
@@ -2118,29 +2118,29 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2118
2118
  return n.fetch().then(() => this.createResult(n, r));
2119
2119
  }
2120
2120
  fetch(e) {
2121
- return S(this, I, pt).call(this, {
2121
+ return S(this, I, mt).call(this, {
2122
2122
  ...e,
2123
2123
  cancelRefetch: e.cancelRefetch ?? !0
2124
2124
  }).then(() => (this.updateResult(), a(this, B)));
2125
2125
  }
2126
2126
  createResult(e, r) {
2127
2127
  var q;
2128
- const n = a(this, A), s = this.options, i = a(this, B), u = a(this, Ue), l = a(this, rt), d = e !== n ? e.state : a(this, St), { state: f } = e;
2128
+ const n = a(this, A), s = this.options, i = a(this, B), u = a(this, Ue), l = a(this, nt), d = e !== n ? e.state : a(this, Ct), { state: f } = e;
2129
2129
  let h = { ...f }, y = !1, p;
2130
2130
  if (r._optimisticResults) {
2131
- const j = this.hasListeners(), ye = !j && un(e, r), pe = j && cn(e, n, r, s);
2131
+ const j = this.hasListeners(), ye = !j && cn(e, r), pe = j && ln(e, n, r, s);
2132
2132
  (ye || pe) && (h = {
2133
2133
  ...h,
2134
- ...Wn(f.data, e.options)
2134
+ ...Bn(f.data, e.options)
2135
2135
  }), r._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
2136
2136
  }
2137
2137
  let { error: E, errorUpdatedAt: g, status: R } = h;
2138
2138
  if (r.select && h.data !== void 0)
2139
- if (i && h.data === (u == null ? void 0 : u.data) && r.select === a(this, Ct))
2140
- p = a(this, nt);
2139
+ if (i && h.data === (u == null ? void 0 : u.data) && r.select === a(this, Tt))
2140
+ p = a(this, st);
2141
2141
  else
2142
2142
  try {
2143
- b(this, Ct, r.select), p = r.select(h.data), p = ur(i == null ? void 0 : i.data, p, r), b(this, nt, p), b(this, ce, null);
2143
+ b(this, Tt, r.select), p = r.select(h.data), p = cr(i == null ? void 0 : i.data, p, r), b(this, st, p), b(this, ce, null);
2144
2144
  } catch (j) {
2145
2145
  b(this, ce, j);
2146
2146
  }
@@ -2151,21 +2151,21 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2151
2151
  if (i != null && i.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData))
2152
2152
  j = i.data;
2153
2153
  else if (j = typeof r.placeholderData == "function" ? r.placeholderData(
2154
- (q = a(this, st)) == null ? void 0 : q.state.data,
2155
- a(this, st)
2154
+ (q = a(this, it)) == null ? void 0 : q.state.data,
2155
+ a(this, it)
2156
2156
  ) : r.placeholderData, r.select && j !== void 0)
2157
2157
  try {
2158
2158
  j = r.select(j), b(this, ce, null);
2159
2159
  } catch (ye) {
2160
2160
  b(this, ce, ye);
2161
2161
  }
2162
- j !== void 0 && (R = "success", p = ur(
2162
+ j !== void 0 && (R = "success", p = cr(
2163
2163
  i == null ? void 0 : i.data,
2164
2164
  j,
2165
2165
  r
2166
2166
  ), y = !0);
2167
2167
  }
2168
- a(this, ce) && (E = a(this, ce), p = a(this, nt), g = Date.now(), R = "error");
2168
+ a(this, ce) && (E = a(this, ce), p = a(this, st), g = Date.now(), R = "error");
2169
2169
  const C = h.fetchStatus === "fetching", P = R === "pending", _ = R === "error", Q = P && C, z = p !== void 0, K = {
2170
2170
  status: R,
2171
2171
  fetchStatus: h.fetchStatus,
@@ -2189,7 +2189,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2189
2189
  isPaused: h.fetchStatus === "paused",
2190
2190
  isPlaceholderData: y,
2191
2191
  isRefetchError: _ && z,
2192
- isStale: Tr(e, r),
2192
+ isStale: Ar(e, r),
2193
2193
  refetch: this.refetch,
2194
2194
  promise: a(this, Oe)
2195
2195
  };
@@ -2197,7 +2197,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2197
2197
  const j = (xe) => {
2198
2198
  K.status === "error" ? xe.reject(K.error) : K.data !== void 0 && xe.resolve(K.data);
2199
2199
  }, ye = () => {
2200
- const xe = b(this, Oe, K.promise = cr());
2200
+ const xe = b(this, Oe, K.promise = lr());
2201
2201
  j(xe);
2202
2202
  }, pe = a(this, Oe);
2203
2203
  switch (pe.status) {
@@ -2216,66 +2216,66 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2216
2216
  }
2217
2217
  updateResult(e) {
2218
2218
  const r = a(this, B), n = this.createResult(a(this, A), this.options);
2219
- if (b(this, Ue, a(this, A).state), b(this, rt, this.options), a(this, Ue).data !== void 0 && b(this, st, a(this, A)), Mt(n, r))
2219
+ if (b(this, Ue, a(this, A).state), b(this, nt, this.options), a(this, Ue).data !== void 0 && b(this, it, a(this, A)), Mt(n, r))
2220
2220
  return;
2221
2221
  b(this, B, n);
2222
2222
  const s = {}, i = () => {
2223
2223
  if (!r)
2224
2224
  return !0;
2225
2225
  const { notifyOnChangeProps: u } = this.options, l = typeof u == "function" ? u() : u;
2226
- if (l === "all" || !l && !a(this, it).size)
2226
+ if (l === "all" || !l && !a(this, ot).size)
2227
2227
  return !0;
2228
2228
  const c = new Set(
2229
- l ?? a(this, it)
2229
+ l ?? a(this, ot)
2230
2230
  );
2231
2231
  return this.options.throwOnError && c.add("error"), Object.keys(a(this, B)).some((d) => {
2232
2232
  const f = d;
2233
2233
  return a(this, B)[f] !== r[f] && c.has(f);
2234
2234
  });
2235
2235
  };
2236
- (e == null ? void 0 : e.listeners) !== !1 && i() && (s.listeners = !0), S(this, I, Gn).call(this, { ...s, ...e });
2236
+ (e == null ? void 0 : e.listeners) !== !1 && i() && (s.listeners = !0), S(this, I, Yn).call(this, { ...s, ...e });
2237
2237
  }
2238
2238
  onQueryUpdate() {
2239
- this.updateResult(), this.hasListeners() && S(this, I, dr).call(this);
2239
+ this.updateResult(), this.hasListeners() && S(this, I, yr).call(this);
2240
2240
  }
2241
- }, Y = new WeakMap(), A = new WeakMap(), St = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(), rt = new WeakMap(), Oe = new WeakMap(), ce = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), it = new WeakMap(), I = new WeakSet(), pt = function(e) {
2242
- S(this, I, mr).call(this);
2241
+ }, Y = new WeakMap(), A = new WeakMap(), Ct = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(), nt = new WeakMap(), Oe = new WeakMap(), ce = new WeakMap(), Tt = new WeakMap(), st = new WeakMap(), it = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), ot = new WeakMap(), I = new WeakSet(), mt = function(e) {
2242
+ S(this, I, gr).call(this);
2243
2243
  let r = a(this, A).fetch(
2244
2244
  this.options,
2245
2245
  e
2246
2246
  );
2247
2247
  return e != null && e.throwOnError || (r = r.catch(te)), r;
2248
- }, lr = function() {
2249
- S(this, I, yr).call(this);
2250
- const e = He(
2248
+ }, fr = function() {
2249
+ S(this, I, pr).call(this);
2250
+ const e = We(
2251
2251
  this.options.staleTime,
2252
2252
  a(this, A)
2253
2253
  );
2254
- if (Qe || a(this, B).isStale || !ir(e))
2254
+ if (Qe || a(this, B).isStale || !or(e))
2255
2255
  return;
2256
- const n = Qn(a(this, B).dataUpdatedAt, e) + 1;
2256
+ const n = $n(a(this, B).dataUpdatedAt, e) + 1;
2257
2257
  b(this, Ne, setTimeout(() => {
2258
2258
  a(this, B).isStale || this.updateResult();
2259
2259
  }, n));
2260
- }, fr = function() {
2260
+ }, hr = function() {
2261
2261
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, A)) : this.options.refetchInterval) ?? !1;
2262
- }, hr = function(e) {
2263
- S(this, I, pr).call(this), b(this, Pe, e), !(Qe || se(this.options.enabled, a(this, A)) === !1 || !ir(a(this, Pe)) || a(this, Pe) === 0) && b(this, Le, setInterval(() => {
2264
- (this.options.refetchIntervalInBackground || Cr.isFocused()) && S(this, I, pt).call(this);
2262
+ }, dr = function(e) {
2263
+ S(this, I, mr).call(this), b(this, Pe, e), !(Qe || se(this.options.enabled, a(this, A)) === !1 || !or(a(this, Pe)) || a(this, Pe) === 0) && b(this, Le, setInterval(() => {
2264
+ (this.options.refetchIntervalInBackground || Tr.isFocused()) && S(this, I, mt).call(this);
2265
2265
  }, a(this, Pe)));
2266
- }, dr = function() {
2267
- S(this, I, lr).call(this), S(this, I, hr).call(this, S(this, I, fr).call(this));
2268
2266
  }, yr = function() {
2269
- a(this, Ne) && (clearTimeout(a(this, Ne)), b(this, Ne, void 0));
2267
+ S(this, I, fr).call(this), S(this, I, dr).call(this, S(this, I, hr).call(this));
2270
2268
  }, pr = function() {
2271
- a(this, Le) && (clearInterval(a(this, Le)), b(this, Le, void 0));
2269
+ a(this, Ne) && (clearTimeout(a(this, Ne)), b(this, Ne, void 0));
2272
2270
  }, mr = function() {
2271
+ a(this, Le) && (clearInterval(a(this, Le)), b(this, Le, void 0));
2272
+ }, gr = function() {
2273
2273
  const e = a(this, Y).getQueryCache().build(a(this, Y), this.options);
2274
2274
  if (e === a(this, A))
2275
2275
  return;
2276
2276
  const r = a(this, A);
2277
- b(this, A, e), b(this, St, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
2278
- }, Gn = function(e) {
2277
+ b(this, A, e), b(this, Ct, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
2278
+ }, Yn = function(e) {
2279
2279
  L.batch(() => {
2280
2280
  e.listeners && this.listeners.forEach((r) => {
2281
2281
  r(a(this, B));
@@ -2284,30 +2284,30 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, yi = (Fn = class {
2284
2284
  type: "observerResultsUpdated"
2285
2285
  });
2286
2286
  });
2287
- }, Dn);
2287
+ }, In);
2288
2288
  function mi(t, e) {
2289
2289
  return se(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
2290
2290
  }
2291
- function un(t, e) {
2292
- return mi(t, e) || t.state.data !== void 0 && gr(t, e, e.refetchOnMount);
2291
+ function cn(t, e) {
2292
+ return mi(t, e) || t.state.data !== void 0 && br(t, e, e.refetchOnMount);
2293
2293
  }
2294
- function gr(t, e, r) {
2294
+ function br(t, e, r) {
2295
2295
  if (se(e.enabled, t) !== !1) {
2296
2296
  const n = typeof r == "function" ? r(t) : r;
2297
- return n === "always" || n !== !1 && Tr(t, e);
2297
+ return n === "always" || n !== !1 && Ar(t, e);
2298
2298
  }
2299
2299
  return !1;
2300
2300
  }
2301
- function cn(t, e, r, n) {
2302
- return (t !== e || se(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && Tr(t, r);
2301
+ function ln(t, e, r, n) {
2302
+ return (t !== e || se(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && Ar(t, r);
2303
2303
  }
2304
- function Tr(t, e) {
2305
- return se(e.enabled, t) !== !1 && t.isStaleByTime(He(e.staleTime, t));
2304
+ function Ar(t, e) {
2305
+ return se(e.enabled, t) !== !1 && t.isStaleByTime(We(e.staleTime, t));
2306
2306
  }
2307
2307
  function gi(t, e) {
2308
2308
  return !Mt(t.getCurrentResult(), e);
2309
2309
  }
2310
- var Se, Ce, J, he, de, jt, br, In, bi = (In = class extends at {
2310
+ var Se, Ce, J, he, de, jt, vr, _n, bi = (_n = class extends ut {
2311
2311
  constructor(e, r) {
2312
2312
  super();
2313
2313
  w(this, de);
@@ -2334,14 +2334,14 @@ var Se, Ce, J, he, de, jt, br, In, bi = (In = class extends at {
2334
2334
  this.hasListeners() || (e = a(this, J)) == null || e.removeObserver(this);
2335
2335
  }
2336
2336
  onMutationUpdate(e) {
2337
- S(this, de, jt).call(this), S(this, de, br).call(this, e);
2337
+ S(this, de, jt).call(this), S(this, de, vr).call(this, e);
2338
2338
  }
2339
2339
  getCurrentResult() {
2340
2340
  return a(this, Ce);
2341
2341
  }
2342
2342
  reset() {
2343
2343
  var e;
2344
- (e = a(this, J)) == null || e.removeObserver(this), b(this, J, void 0), S(this, de, jt).call(this), S(this, de, br).call(this);
2344
+ (e = a(this, J)) == null || e.removeObserver(this), b(this, J, void 0), S(this, de, jt).call(this), S(this, de, vr).call(this);
2345
2345
  }
2346
2346
  mutate(e, r) {
2347
2347
  var n;
@@ -2349,7 +2349,7 @@ var Se, Ce, J, he, de, jt, br, In, bi = (In = class extends at {
2349
2349
  }
2350
2350
  }, Se = new WeakMap(), Ce = new WeakMap(), J = new WeakMap(), he = new WeakMap(), de = new WeakSet(), jt = function() {
2351
2351
  var r;
2352
- const e = ((r = a(this, J)) == null ? void 0 : r.state) ?? Bn();
2352
+ const e = ((r = a(this, J)) == null ? void 0 : r.state) ?? Gn();
2353
2353
  b(this, Ce, {
2354
2354
  ...e,
2355
2355
  isPending: e.status === "pending",
@@ -2359,7 +2359,7 @@ var Se, Ce, J, he, de, jt, br, In, bi = (In = class extends at {
2359
2359
  mutate: this.mutate,
2360
2360
  reset: this.reset
2361
2361
  });
2362
- }, br = function(e) {
2362
+ }, vr = function(e) {
2363
2363
  L.batch(() => {
2364
2364
  var r, n, s, i, u, l, c, d;
2365
2365
  if (a(this, he) && this.hasListeners()) {
@@ -2376,10 +2376,10 @@ var Se, Ce, J, he, de, jt, br, In, bi = (In = class extends at {
2376
2376
  f(a(this, Ce));
2377
2377
  });
2378
2378
  });
2379
- }, In), Yn = $.createContext(
2379
+ }, _n), Jn = $.createContext(
2380
2380
  void 0
2381
- ), Tt = (t) => {
2382
- const e = $.useContext(Yn);
2381
+ ), ct = (t) => {
2382
+ const e = $.useContext(Jn);
2383
2383
  if (!e)
2384
2384
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
2385
2385
  return e;
@@ -2388,8 +2388,8 @@ var Se, Ce, J, he, de, jt, br, In, bi = (In = class extends at {
2388
2388
  children: e
2389
2389
  }) => ($.useEffect(() => (t.mount(), () => {
2390
2390
  t.unmount();
2391
- }), [t]), /* @__PURE__ */ gt.jsx(Yn.Provider, { value: t, children: e })), Jn = $.createContext(!1), wi = () => $.useContext(Jn);
2392
- Jn.Provider;
2391
+ }), [t]), /* @__PURE__ */ bt.jsx(Jn.Provider, { value: t, children: e })), Xn = $.createContext(!1), wi = () => $.useContext(Xn);
2392
+ Xn.Provider;
2393
2393
  function Ei() {
2394
2394
  let t = !1;
2395
2395
  return {
@@ -2403,10 +2403,10 @@ function Ei() {
2403
2403
  };
2404
2404
  }
2405
2405
  var Ri = $.createContext(Ei()), Oi = () => $.useContext(Ri);
2406
- function Xn(t, e) {
2406
+ function Zn(t, e) {
2407
2407
  return typeof t == "function" ? t(...e) : !!t;
2408
2408
  }
2409
- function vr() {
2409
+ function wr() {
2410
2410
  }
2411
2411
  var Pi = (t, e) => {
2412
2412
  (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
@@ -2420,10 +2420,10 @@ var Pi = (t, e) => {
2420
2420
  throwOnError: r,
2421
2421
  query: n,
2422
2422
  suspense: s
2423
- }) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 || Xn(r, [t.error, n])), Ti = (t) => {
2423
+ }) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 || Zn(r, [t.error, n])), Ti = (t) => {
2424
2424
  const e = t.staleTime;
2425
2425
  t.suspense && (t.staleTime = typeof e == "function" ? (...r) => Math.max(e(...r), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
2426
- }, Ai = (t, e) => t.isLoading && t.isFetching && !e, xi = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, ln = (t, e, r) => e.fetchOptimistic(t).catch(() => {
2426
+ }, Ai = (t, e) => t.isLoading && t.isFetching && !e, xi = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, fn = (t, e, r) => e.fetchOptimistic(t).catch(() => {
2427
2427
  r.clearReset();
2428
2428
  });
2429
2429
  function Fi(t, e, r) {
@@ -2432,7 +2432,7 @@ function Fi(t, e, r) {
2432
2432
  throw new Error(
2433
2433
  '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'
2434
2434
  );
2435
- const n = Tt(), s = wi(), i = Oi(), u = n.defaultQueryOptions(t);
2435
+ const n = ct(), s = wi(), i = Oi(), u = n.defaultQueryOptions(t);
2436
2436
  (y = (h = n.getDefaultOptions().queries) == null ? void 0 : h._experimental_beforeQuery) == null || y.call(
2437
2437
  h,
2438
2438
  u
@@ -2448,7 +2448,7 @@ function Fi(t, e, r) {
2448
2448
  if ($.useSyncExternalStore(
2449
2449
  $.useCallback(
2450
2450
  (R) => {
2451
- const C = f ? c.subscribe(L.batchCalls(R)) : vr;
2451
+ const C = f ? c.subscribe(L.batchCalls(R)) : wr;
2452
2452
  return c.updateResult(), C;
2453
2453
  },
2454
2454
  [c, f]
@@ -2458,7 +2458,7 @@ function Fi(t, e, r) {
2458
2458
  ), $.useEffect(() => {
2459
2459
  c.setOptions(u, { listeners: !1 });
2460
2460
  }, [u, c]), xi(u, d))
2461
- throw ln(u, c, i);
2461
+ throw fn(u, c, i);
2462
2462
  if (Ci({
2463
2463
  result: d,
2464
2464
  errorResetBoundary: i,
@@ -2474,22 +2474,22 @@ function Fi(t, e, r) {
2474
2474
  ), u.experimental_prefetchInRender && !Qe && Ai(d, s)) {
2475
2475
  const R = l ? (
2476
2476
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
2477
- ln(u, c, i)
2477
+ fn(u, c, i)
2478
2478
  ) : (
2479
2479
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
2480
2480
  (g = n.getQueryCache().get(u.queryHash)) == null ? void 0 : g.promise
2481
2481
  );
2482
- R == null || R.catch(vr).finally(() => {
2482
+ R == null || R.catch(wr).finally(() => {
2483
2483
  c.updateResult();
2484
2484
  });
2485
2485
  }
2486
2486
  return u.notifyOnChangeProps ? d : c.trackResult(d);
2487
2487
  }
2488
- function Zn(t, e) {
2488
+ function xr(t, e) {
2489
2489
  return Fi(t, pi);
2490
2490
  }
2491
- function Ar(t, e) {
2492
- const r = Tt(), [n] = $.useState(
2491
+ function Qt(t, e) {
2492
+ const r = ct(), [n] = $.useState(
2493
2493
  () => new bi(
2494
2494
  r,
2495
2495
  t
@@ -2507,15 +2507,15 @@ function Ar(t, e) {
2507
2507
  () => n.getCurrentResult()
2508
2508
  ), i = $.useCallback(
2509
2509
  (u, l) => {
2510
- n.mutate(u, l).catch(vr);
2510
+ n.mutate(u, l).catch(wr);
2511
2511
  },
2512
2512
  [n]
2513
2513
  );
2514
- if (s.error && Xn(n.options.throwOnError, [s.error]))
2514
+ if (s.error && Zn(n.options.throwOnError, [s.error]))
2515
2515
  throw s.error;
2516
2516
  return { ...s, mutate: i, mutateAsync: s.mutate };
2517
2517
  }
2518
- function ut(t) {
2518
+ function lt(t) {
2519
2519
  const e = {
2520
2520
  subscribe(r) {
2521
2521
  let n = null, s = !1, i = !1, u = !1;
@@ -2604,7 +2604,7 @@ function _i(t) {
2604
2604
  n = null, l.unsubscribe();
2605
2605
  }
2606
2606
  }
2607
- return ut((l) => (r++, s.push(l), i(), {
2607
+ return lt((l) => (r++, s.push(l), i(), {
2608
2608
  unsubscribe() {
2609
2609
  r--, u();
2610
2610
  const c = s.findIndex((d) => d === l);
@@ -2614,7 +2614,7 @@ function _i(t) {
2614
2614
  };
2615
2615
  }
2616
2616
  function ki(t) {
2617
- return (e) => ut((r) => e.subscribe({
2617
+ return (e) => lt((r) => e.subscribe({
2618
2618
  next(n) {
2619
2619
  var s;
2620
2620
  (s = t.next) == null || s.call(t, n), r.next(n);
@@ -2635,7 +2635,7 @@ function ji(t) {
2635
2635
  e !== void 0 && u.next(e), r.push(u);
2636
2636
  }, s = (u) => {
2637
2637
  r.splice(r.indexOf(u), 1);
2638
- }, i = ut((u) => (n(u), () => {
2638
+ }, i = lt((u) => (n(u), () => {
2639
2639
  s(u);
2640
2640
  }));
2641
2641
  return i.next = (u) => {
@@ -2647,7 +2647,7 @@ function ji(t) {
2647
2647
  }, i.get = () => e, i;
2648
2648
  }
2649
2649
  function qi(t) {
2650
- return ut((e) => {
2650
+ return lt((e) => {
2651
2651
  function r(s = 0, i = t.op) {
2652
2652
  const u = t.links[s];
2653
2653
  if (!u)
@@ -2663,7 +2663,7 @@ function qi(t) {
2663
2663
  });
2664
2664
  }
2665
2665
  const es = () => {
2666
- }, fn = (t) => {
2666
+ }, hn = (t) => {
2667
2667
  Object.freeze && Object.freeze(t);
2668
2668
  };
2669
2669
  function ts(t, e, r) {
@@ -2691,7 +2691,7 @@ function ts(t, e, r) {
2691
2691
  } : d === "apply" && (f = {
2692
2692
  args: c.length >= 2 ? c[1] : [],
2693
2693
  path: e.slice(0, -1)
2694
- }), fn(f.args), fn(f.path), t(f);
2694
+ }), hn(f.args), hn(f.path), t(f);
2695
2695
  }
2696
2696
  })), r[i];
2697
2697
  }
@@ -2701,7 +2701,7 @@ const Mi = (t) => ts(t, [], /* @__PURE__ */ Object.create(null)), Ui = (t) => ne
2701
2701
  return t(r);
2702
2702
  }
2703
2703
  });
2704
- function vt(t) {
2704
+ function wt(t) {
2705
2705
  return !!t && !Array.isArray(t) && typeof t == "object";
2706
2706
  }
2707
2707
  function Ni(t, e) {
@@ -2726,7 +2726,7 @@ function Ni(t, e) {
2726
2726
  }
2727
2727
  };
2728
2728
  }
2729
- class Zt extends Error {
2729
+ class er extends Error {
2730
2730
  constructor() {
2731
2731
  super("Unable to transform response from server");
2732
2732
  }
@@ -2736,20 +2736,20 @@ function Li(t, e) {
2736
2736
  try {
2737
2737
  r = Ni(t, e);
2738
2738
  } catch {
2739
- throw new Zt();
2739
+ throw new er();
2740
2740
  }
2741
- if (!r.ok && (!vt(r.error.error) || typeof r.error.error.code != "number"))
2742
- throw new Zt();
2743
- if (r.ok && !vt(r.result))
2744
- throw new Zt();
2741
+ if (!r.ok && (!wt(r.error.error) || typeof r.error.error.code != "number"))
2742
+ throw new er();
2743
+ if (r.ok && !wt(r.result))
2744
+ throw new er();
2745
2745
  return r;
2746
2746
  }
2747
- var hn, dn;
2748
- (hn = Symbol).dispose ?? (hn.dispose = Symbol());
2749
- (dn = Symbol).asyncDispose ?? (dn.asyncDispose = Symbol());
2750
- var _n, kn, jn, qn, Mn, Un;
2747
+ var dn, yn;
2748
+ (dn = Symbol).dispose ?? (dn.dispose = Symbol());
2749
+ (yn = Symbol).asyncDispose ?? (yn.asyncDispose = Symbol());
2750
+ var kn, jn, qn, Mn, Un, Nn;
2751
2751
  typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
2752
- ((kn = (_n = globalThis.process) == null ? void 0 : _n.env) == null ? void 0 : kn.NODE_ENV) === "test" || (qn = (jn = globalThis.process) == null ? void 0 : jn.env) != null && qn.JEST_WORKER_ID || (Un = (Mn = globalThis.process) == null ? void 0 : Mn.env) != null && Un.VITEST_WORKER_ID;
2752
+ ((jn = (kn = globalThis.process) == null ? void 0 : kn.env) == null ? void 0 : jn.NODE_ENV) === "test" || (Mn = (qn = globalThis.process) == null ? void 0 : qn.env) != null && Mn.JEST_WORKER_ID || (Nn = (Un = globalThis.process) == null ? void 0 : Un.env) != null && Nn.VITEST_WORKER_ID;
2753
2753
  function kt(t, e, r) {
2754
2754
  return e in t ? Object.defineProperty(t, e, {
2755
2755
  value: r,
@@ -2766,10 +2766,10 @@ function Qi(t) {
2766
2766
  t instanceof Error && t.name === "TRPCClientError";
2767
2767
  }
2768
2768
  function $i(t) {
2769
- return vt(t) && vt(t.error) && typeof t.error.code == "number" && typeof t.error.message == "string";
2769
+ return wt(t) && wt(t.error) && typeof t.error.code == "number" && typeof t.error.message == "string";
2770
2770
  }
2771
2771
  function Ki(t, e) {
2772
- return typeof t == "string" ? t : vt(t) && typeof t.message == "string" ? t.message : e;
2772
+ return typeof t == "string" ? t : wt(t) && typeof t.message == "string" ? t.message : e;
2773
2773
  }
2774
2774
  class Te extends Error {
2775
2775
  static from(e, r = {}) {
@@ -2799,7 +2799,7 @@ class Te extends Error {
2799
2799
  kt(this, "meta", void 0), this.meta = r == null ? void 0 : r.meta, this.cause = n, this.shape = (s = r == null ? void 0 : r.result) == null ? void 0 : s.error, this.data = (i = r == null ? void 0 : r.result) == null ? void 0 : i.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, Te.prototype);
2800
2800
  }
2801
2801
  }
2802
- function er(t, e, r) {
2802
+ function tr(t, e, r) {
2803
2803
  return e in t ? Object.defineProperty(t, e, {
2804
2804
  value: r,
2805
2805
  enumerable: !0,
@@ -2887,7 +2887,7 @@ class Vi {
2887
2887
  });
2888
2888
  }
2889
2889
  constructor(e) {
2890
- er(this, "links", void 0), er(this, "runtime", void 0), er(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = e.links.map((r) => r(this.runtime));
2890
+ tr(this, "links", void 0), tr(this, "runtime", void 0), tr(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = e.links.map((r) => r(this.runtime));
2891
2891
  }
2892
2892
  }
2893
2893
  const zi = Symbol.for("trpc_untypedClient"), Hi = {
@@ -2908,20 +2908,20 @@ function Gi(t) {
2908
2908
  const e = new Vi(t);
2909
2909
  return Bi(e);
2910
2910
  }
2911
- const yn = (t) => typeof t == "function";
2911
+ const pn = (t) => typeof t == "function";
2912
2912
  function Yi(t) {
2913
2913
  if (t)
2914
2914
  return t;
2915
- if (typeof window < "u" && yn(window.fetch))
2915
+ if (typeof window < "u" && pn(window.fetch))
2916
2916
  return window.fetch;
2917
- if (typeof globalThis < "u" && yn(globalThis.fetch))
2917
+ if (typeof globalThis < "u" && pn(globalThis.fetch))
2918
2918
  return globalThis.fetch;
2919
2919
  throw new Error("No fetch implementation found");
2920
2920
  }
2921
- const pn = () => {
2921
+ const mn = () => {
2922
2922
  throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
2923
2923
  };
2924
- function mn(t) {
2924
+ function gn(t) {
2925
2925
  let e = null, r = null;
2926
2926
  const n = () => {
2927
2927
  clearTimeout(r), r = null, e = null;
@@ -2991,8 +2991,8 @@ function mn(t) {
2991
2991
  aborted: !1,
2992
2992
  key: l,
2993
2993
  batch: null,
2994
- resolve: pn,
2995
- reject: pn
2994
+ resolve: mn,
2995
+ reject: mn
2996
2996
  }, d = new Promise((f, h) => {
2997
2997
  c.reject = h, c.resolve = f, e || (e = []), e.push(c);
2998
2998
  });
@@ -3149,11 +3149,11 @@ function uo(t) {
3149
3149
  json: g
3150
3150
  }));
3151
3151
  }
3152
- }), s = mn(n("query")), i = mn(n("mutation")), u = {
3152
+ }), s = gn(n("query")), i = gn(n("mutation")), u = {
3153
3153
  query: s,
3154
3154
  mutation: i
3155
3155
  };
3156
- return ({ op: l }) => ut((c) => {
3156
+ return ({ op: l }) => lt((c) => {
3157
3157
  /* istanbul ignore if -- @preserve */
3158
3158
  if (l.type === "subscription")
3159
3159
  throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
@@ -3184,7 +3184,7 @@ function uo(t) {
3184
3184
  function co(t) {
3185
3185
  return typeof FormData > "u" ? !1 : t instanceof FormData;
3186
3186
  }
3187
- const tr = {
3187
+ const rr = {
3188
3188
  css: {
3189
3189
  query: [
3190
3190
  "72e3ff",
@@ -3238,10 +3238,10 @@ function lo(t) {
3238
3238
  if (t.colorMode === "none")
3239
3239
  l.push(e === "up" ? ">>" : "<<", r, `#${i}`, s);
3240
3240
  else if (t.colorMode === "ansi") {
3241
- const [d, f] = tr.ansi.regular[r], [h, y] = tr.ansi.bold[r];
3241
+ const [d, f] = rr.ansi.regular[r], [h, y] = rr.ansi.bold[r];
3242
3242
  l.push(e === "up" ? d : f, e === "up" ? ">>" : "<<", r, e === "up" ? h : y, `#${i}`, s, "\x1B[0m");
3243
3243
  } else {
3244
- const [d, f] = tr.css[r], h = `
3244
+ const [d, f] = rr.css[r], h = `
3245
3245
  background-color: #${e === "up" ? d : f};
3246
3246
  color: ${e === "up" ? "black" : "white"};
3247
3247
  padding: 2px;
@@ -3282,7 +3282,7 @@ function ho(t = {}) {
3282
3282
  colorMode: r,
3283
3283
  withContext: n
3284
3284
  }) } = t;
3285
- return () => ({ op: i, next: u }) => ut((l) => {
3285
+ return () => ({ op: i, next: u }) => lt((l) => {
3286
3286
  e({
3287
3287
  ...i,
3288
3288
  direction: "up"
@@ -3483,13 +3483,13 @@ function Ro(t, e) {
3483
3483
  return i;
3484
3484
  }
3485
3485
  }
3486
- function ot(t, e) {
3486
+ function at(t, e) {
3487
3487
  Object.entries(t).forEach(([r, n]) => e(n, r));
3488
3488
  }
3489
3489
  function qt(t, e) {
3490
3490
  return t.indexOf(e) !== -1;
3491
3491
  }
3492
- function gn(t, e) {
3492
+ function bn(t, e) {
3493
3493
  for (let r = 0; r < t.length; r++) {
3494
3494
  const n = t[r];
3495
3495
  if (e(n))
@@ -3510,7 +3510,7 @@ class Oo {
3510
3510
  return this.transfomers[e];
3511
3511
  }
3512
3512
  }
3513
- const Po = (t) => Object.prototype.toString.call(t).slice(8, -1), is = (t) => typeof t > "u", So = (t) => t === null, wt = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, wr = (t) => wt(t) && Object.keys(t).length === 0, Ae = (t) => Array.isArray(t), Co = (t) => typeof t == "string", To = (t) => typeof t == "number" && !isNaN(t), Ao = (t) => typeof t == "boolean", xo = (t) => t instanceof RegExp, Et = (t) => t instanceof Map, Rt = (t) => t instanceof Set, os = (t) => Po(t) === "Symbol", Fo = (t) => t instanceof Date && !isNaN(t.valueOf()), Do = (t) => t instanceof Error, bn = (t) => typeof t == "number" && isNaN(t), Io = (t) => Ao(t) || So(t) || is(t) || To(t) || Co(t) || os(t), _o = (t) => typeof t == "bigint", ko = (t) => t === 1 / 0 || t === -1 / 0, jo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), qo = (t) => t instanceof URL, as = (t) => t.replace(/\./g, "\\."), rr = (t) => t.map(String).map(as).join("."), mt = (t) => {
3513
+ const Po = (t) => Object.prototype.toString.call(t).slice(8, -1), is = (t) => typeof t > "u", So = (t) => t === null, Et = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, Er = (t) => Et(t) && Object.keys(t).length === 0, Ae = (t) => Array.isArray(t), Co = (t) => typeof t == "string", To = (t) => typeof t == "number" && !isNaN(t), Ao = (t) => typeof t == "boolean", xo = (t) => t instanceof RegExp, Rt = (t) => t instanceof Map, Ot = (t) => t instanceof Set, os = (t) => Po(t) === "Symbol", Fo = (t) => t instanceof Date && !isNaN(t.valueOf()), Do = (t) => t instanceof Error, vn = (t) => typeof t == "number" && isNaN(t), Io = (t) => Ao(t) || So(t) || is(t) || To(t) || Co(t) || os(t), _o = (t) => typeof t == "bigint", ko = (t) => t === 1 / 0 || t === -1 / 0, jo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), qo = (t) => t instanceof URL, as = (t) => t.replace(/\./g, "\\."), nr = (t) => t.map(String).map(as).join("."), gt = (t) => {
3514
3514
  const e = [];
3515
3515
  let r = "";
3516
3516
  for (let s = 0; s < t.length; s++) {
@@ -3560,19 +3560,19 @@ const us = [
3560
3560
  return new RegExp(e, r);
3561
3561
  }),
3562
3562
  ie(
3563
- Rt,
3563
+ Ot,
3564
3564
  "set",
3565
3565
  // (sets only exist in es6+)
3566
3566
  // eslint-disable-next-line es5/no-es6-methods
3567
3567
  (t) => [...t.values()],
3568
3568
  (t) => new Set(t)
3569
3569
  ),
3570
- ie(Et, "map", (t) => [...t.entries()], (t) => new Map(t)),
3571
- ie((t) => bn(t) || ko(t), "number", (t) => bn(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
3570
+ ie(Rt, "map", (t) => [...t.entries()], (t) => new Map(t)),
3571
+ ie((t) => vn(t) || ko(t), "number", (t) => vn(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
3572
3572
  ie((t) => t === 0 && 1 / t === -1 / 0, "number", () => "-0", Number),
3573
3573
  ie(qo, "URL", (t) => t.toString(), (t) => new URL(t))
3574
3574
  ];
3575
- function Qt(t, e, r, n) {
3575
+ function $t(t, e, r, n) {
3576
3576
  return {
3577
3577
  isApplicable: t,
3578
3578
  annotation: e,
@@ -3580,7 +3580,7 @@ function Qt(t, e, r, n) {
3580
3580
  untransform: n
3581
3581
  };
3582
3582
  }
3583
- const cs = Qt((t, e) => os(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e) => ["symbol", e.symbolRegistry.getIdentifier(t)], (t) => t.description, (t, e, r) => {
3583
+ const cs = $t((t, e) => os(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e) => ["symbol", e.symbolRegistry.getIdentifier(t)], (t) => t.description, (t, e, r) => {
3584
3584
  const n = r.symbolRegistry.getValue(e[1]);
3585
3585
  if (!n)
3586
3586
  throw new Error("Trying to deserialize unknown symbol");
@@ -3595,7 +3595,7 @@ const cs = Qt((t, e) => os(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e)
3595
3595
  Float32Array,
3596
3596
  Float64Array,
3597
3597
  Uint8ClampedArray
3598
- ].reduce((t, e) => (t[e.name] = e, t), {}), ls = Qt(jo, (t) => ["typed-array", t.constructor.name], (t) => [...t], (t, e) => {
3598
+ ].reduce((t, e) => (t[e.name] = e, t), {}), ls = $t(jo, (t) => ["typed-array", t.constructor.name], (t) => [...t], (t, e) => {
3599
3599
  const r = Mo[e[1]];
3600
3600
  if (!r)
3601
3601
  throw new Error("Trying to deserialize unknown typed array");
@@ -3604,7 +3604,7 @@ const cs = Qt((t, e) => os(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e)
3604
3604
  function fs(t, e) {
3605
3605
  return t != null && t.constructor ? !!e.classRegistry.getIdentifier(t.constructor) : !1;
3606
3606
  }
3607
- const hs = Qt(fs, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructor)], (t, e) => {
3607
+ const hs = $t(fs, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructor)], (t, e) => {
3608
3608
  const r = e.classRegistry.getAllowedProps(t.constructor);
3609
3609
  if (!r)
3610
3610
  return { ...t };
@@ -3617,19 +3617,19 @@ const hs = Qt(fs, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructo
3617
3617
  if (!n)
3618
3618
  throw new Error(`Trying to deserialize unknown class '${e[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3619
3619
  return Object.assign(Object.create(n.prototype), t);
3620
- }), ds = Qt((t, e) => !!e.customTransformerRegistry.findApplicable(t), (t, e) => ["custom", e.customTransformerRegistry.findApplicable(t).name], (t, e) => e.customTransformerRegistry.findApplicable(t).serialize(t), (t, e, r) => {
3620
+ }), ds = $t((t, e) => !!e.customTransformerRegistry.findApplicable(t), (t, e) => ["custom", e.customTransformerRegistry.findApplicable(t).name], (t, e) => e.customTransformerRegistry.findApplicable(t).serialize(t), (t, e, r) => {
3621
3621
  const n = r.customTransformerRegistry.findByName(e[1]);
3622
3622
  if (!n)
3623
3623
  throw new Error("Trying to deserialize unknown custom value");
3624
3624
  return n.deserialize(t);
3625
- }), Uo = [hs, cs, ds, ls], vn = (t, e) => {
3626
- const r = gn(Uo, (s) => s.isApplicable(t, e));
3625
+ }), Uo = [hs, cs, ds, ls], wn = (t, e) => {
3626
+ const r = bn(Uo, (s) => s.isApplicable(t, e));
3627
3627
  if (r)
3628
3628
  return {
3629
3629
  value: r.transform(t, e),
3630
3630
  type: r.annotation(t, e)
3631
3631
  };
3632
- const n = gn(us, (s) => s.isApplicable(t, e));
3632
+ const n = bn(us, (s) => s.isApplicable(t, e));
3633
3633
  if (n)
3634
3634
  return {
3635
3635
  value: n.transform(t, e),
@@ -3659,7 +3659,7 @@ const No = (t, e, r) => {
3659
3659
  throw new Error("Unknown transformation: " + e);
3660
3660
  return n.untransform(t, r);
3661
3661
  }
3662
- }, ze = (t, e) => {
3662
+ }, He = (t, e) => {
3663
3663
  if (e > t.size)
3664
3664
  throw new Error("index out of bounds");
3665
3665
  const r = t.keys();
@@ -3679,10 +3679,10 @@ const Lo = (t, e) => {
3679
3679
  ps(e);
3680
3680
  for (let r = 0; r < e.length; r++) {
3681
3681
  const n = e[r];
3682
- if (Rt(t))
3683
- t = ze(t, +n);
3684
- else if (Et(t)) {
3685
- const s = +n, i = +e[++r] == 0 ? "key" : "value", u = ze(t, s);
3682
+ if (Ot(t))
3683
+ t = He(t, +n);
3684
+ else if (Rt(t)) {
3685
+ const s = +n, i = +e[++r] == 0 ? "key" : "value", u = He(t, s);
3686
3686
  switch (i) {
3687
3687
  case "key":
3688
3688
  t = u;
@@ -3695,7 +3695,7 @@ const Lo = (t, e) => {
3695
3695
  t = t[n];
3696
3696
  }
3697
3697
  return t;
3698
- }, Er = (t, e, r) => {
3698
+ }, Rr = (t, e, r) => {
3699
3699
  if (ps(e), e.length === 0)
3700
3700
  return r(t);
3701
3701
  let n = t;
@@ -3704,15 +3704,15 @@ const Lo = (t, e) => {
3704
3704
  if (Ae(n)) {
3705
3705
  const l = +u;
3706
3706
  n = n[l];
3707
- } else if (wt(n))
3707
+ } else if (Et(n))
3708
3708
  n = n[u];
3709
- else if (Rt(n)) {
3709
+ else if (Ot(n)) {
3710
3710
  const l = +u;
3711
- n = ze(n, l);
3712
- } else if (Et(n)) {
3711
+ n = He(n, l);
3712
+ } else if (Rt(n)) {
3713
3713
  if (i === e.length - 2)
3714
3714
  break;
3715
- const c = +u, d = +e[++i] == 0 ? "key" : "value", f = ze(n, c);
3715
+ const c = +u, d = +e[++i] == 0 ? "key" : "value", f = He(n, c);
3716
3716
  switch (d) {
3717
3717
  case "key":
3718
3718
  n = f;
@@ -3724,12 +3724,12 @@ const Lo = (t, e) => {
3724
3724
  }
3725
3725
  }
3726
3726
  const s = e[e.length - 1];
3727
- if (Ae(n) ? n[+s] = r(n[+s]) : wt(n) && (n[s] = r(n[s])), Rt(n)) {
3728
- const i = ze(n, +s), u = r(i);
3727
+ if (Ae(n) ? n[+s] = r(n[+s]) : Et(n) && (n[s] = r(n[s])), Ot(n)) {
3728
+ const i = He(n, +s), u = r(i);
3729
3729
  i !== u && (n.delete(i), n.add(u));
3730
3730
  }
3731
- if (Et(n)) {
3732
- const i = +e[e.length - 2], u = ze(n, i);
3731
+ if (Rt(n)) {
3732
+ const i = +e[e.length - 2], u = He(n, i);
3733
3733
  switch (+s == 0 ? "key" : "value") {
3734
3734
  case "key": {
3735
3735
  const c = r(u);
@@ -3744,40 +3744,40 @@ const Lo = (t, e) => {
3744
3744
  }
3745
3745
  return t;
3746
3746
  };
3747
- function Rr(t, e, r = []) {
3747
+ function Or(t, e, r = []) {
3748
3748
  if (!t)
3749
3749
  return;
3750
3750
  if (!Ae(t)) {
3751
- ot(t, (i, u) => Rr(i, e, [...r, ...mt(u)]));
3751
+ at(t, (i, u) => Or(i, e, [...r, ...gt(u)]));
3752
3752
  return;
3753
3753
  }
3754
3754
  const [n, s] = t;
3755
- s && ot(s, (i, u) => {
3756
- Rr(i, e, [...r, ...mt(u)]);
3755
+ s && at(s, (i, u) => {
3756
+ Or(i, e, [...r, ...gt(u)]);
3757
3757
  }), e(n, r);
3758
3758
  }
3759
3759
  function Qo(t, e, r) {
3760
- return Rr(e, (n, s) => {
3761
- t = Er(t, s, (i) => No(i, n, r));
3760
+ return Or(e, (n, s) => {
3761
+ t = Rr(t, s, (i) => No(i, n, r));
3762
3762
  }), t;
3763
3763
  }
3764
3764
  function $o(t, e) {
3765
3765
  function r(n, s) {
3766
- const i = Lo(t, mt(s));
3767
- n.map(mt).forEach((u) => {
3768
- t = Er(t, u, () => i);
3766
+ const i = Lo(t, gt(s));
3767
+ n.map(gt).forEach((u) => {
3768
+ t = Rr(t, u, () => i);
3769
3769
  });
3770
3770
  }
3771
3771
  if (Ae(e)) {
3772
3772
  const [n, s] = e;
3773
3773
  n.forEach((i) => {
3774
- t = Er(t, mt(i), () => t);
3775
- }), s && ot(s, r);
3774
+ t = Rr(t, gt(i), () => t);
3775
+ }), s && at(s, r);
3776
3776
  } else
3777
- ot(e, r);
3777
+ at(e, r);
3778
3778
  return t;
3779
3779
  }
3780
- const Ko = (t, e) => wt(t) || Ae(t) || Et(t) || Rt(t) || fs(t, e);
3780
+ const Ko = (t, e) => Et(t) || Ae(t) || Rt(t) || Ot(t) || fs(t, e);
3781
3781
  function Vo(t, e, r) {
3782
3782
  const n = r.get(t);
3783
3783
  n ? n.push(e) : r.set(t, [e]);
@@ -3790,8 +3790,8 @@ function zo(t, e) {
3790
3790
  return;
3791
3791
  e || (s = s.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
3792
3792
  const [i, ...u] = s;
3793
- i.length === 0 ? n = u.map(rr) : r[rr(i)] = u.map(rr);
3794
- }), n ? wr(r) ? [n] : [n, r] : wr(r) ? void 0 : r;
3793
+ i.length === 0 ? n = u.map(nr) : r[nr(i)] = u.map(nr);
3794
+ }), n ? Er(r) ? [n] : [n, r] : Er(r) ? void 0 : r;
3795
3795
  }
3796
3796
  const ms = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
3797
3797
  const l = Io(t);
@@ -3804,7 +3804,7 @@ const ms = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
3804
3804
  } : p;
3805
3805
  }
3806
3806
  if (!Ko(t, r)) {
3807
- const p = vn(t, r), E = p ? {
3807
+ const p = wn(t, r), E = p ? {
3808
3808
  transformedValue: p.value,
3809
3809
  annotations: [p.type]
3810
3810
  } : {
@@ -3816,16 +3816,16 @@ const ms = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
3816
3816
  return {
3817
3817
  transformedValue: null
3818
3818
  };
3819
- const c = vn(t, r), d = (c == null ? void 0 : c.value) ?? t, f = Ae(d) ? [] : {}, h = {};
3820
- ot(d, (p, E) => {
3819
+ const c = wn(t, r), d = (c == null ? void 0 : c.value) ?? t, f = Ae(d) ? [] : {}, h = {};
3820
+ at(d, (p, E) => {
3821
3821
  if (E === "__proto__" || E === "constructor" || E === "prototype")
3822
3822
  throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
3823
3823
  const g = ms(p, e, r, n, [...s, E], [...i, t], u);
3824
- f[E] = g.transformedValue, Ae(g.annotations) ? h[E] = g.annotations : wt(g.annotations) && ot(g.annotations, (R, C) => {
3824
+ f[E] = g.transformedValue, Ae(g.annotations) ? h[E] = g.annotations : Et(g.annotations) && at(g.annotations, (R, C) => {
3825
3825
  h[as(E) + "." + C] = R;
3826
3826
  });
3827
3827
  });
3828
- const y = wr(h) ? {
3828
+ const y = Er(h) ? {
3829
3829
  transformedValue: f,
3830
3830
  annotations: c ? [c.type] : void 0
3831
3831
  } : {
@@ -3837,7 +3837,7 @@ const ms = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
3837
3837
  function gs(t) {
3838
3838
  return Object.prototype.toString.call(t).slice(8, -1);
3839
3839
  }
3840
- function wn(t) {
3840
+ function En(t) {
3841
3841
  return gs(t) === "Array";
3842
3842
  }
3843
3843
  function Ho(t) {
@@ -3855,16 +3855,16 @@ function Wo(t, e, r, n, s) {
3855
3855
  configurable: !0
3856
3856
  });
3857
3857
  }
3858
- function Or(t, e = {}) {
3859
- if (wn(t))
3860
- return t.map((s) => Or(s, e));
3858
+ function Pr(t, e = {}) {
3859
+ if (En(t))
3860
+ return t.map((s) => Pr(s, e));
3861
3861
  if (!Ho(t))
3862
3862
  return t;
3863
3863
  const r = Object.getOwnPropertyNames(t), n = Object.getOwnPropertySymbols(t);
3864
3864
  return [...r, ...n].reduce((s, i) => {
3865
- if (wn(e.props) && !e.props.includes(i))
3865
+ if (En(e.props) && !e.props.includes(i))
3866
3866
  return s;
3867
- const u = t[i], l = Or(u, e);
3867
+ const u = t[i], l = Pr(u, e);
3868
3868
  return Wo(s, i, l, t, e.nonenumerable), s;
3869
3869
  }, {});
3870
3870
  }
@@ -3891,7 +3891,7 @@ class x {
3891
3891
  }
3892
3892
  deserialize(e) {
3893
3893
  const { json: r, meta: n } = e;
3894
- let s = Or(r);
3894
+ let s = Pr(r);
3895
3895
  return n != null && n.values && (s = Qo(s, n.values, this)), n != null && n.referentialEqualities && (s = $o(s, n.referentialEqualities)), s;
3896
3896
  }
3897
3897
  stringify(e) {
@@ -3949,7 +3949,7 @@ function Bo(t, e) {
3949
3949
  })
3950
3950
  ]
3951
3951
  }), n = async (s, i, u = null) => {
3952
- const l = Object.entries(Ln).reduce(
3952
+ const l = Object.entries(Qn).reduce(
3953
3953
  (y, [p, E]) => (E.extensions.forEach((g) => {
3954
3954
  y.set(g, p);
3955
3955
  }), y),
@@ -3980,7 +3980,7 @@ function Bo(t, e) {
3980
3980
  metadata: null,
3981
3981
  isArtifact: !1,
3982
3982
  summary: null,
3983
- chunkingStatus: sr.NOT_CHUNKED,
3983
+ chunkingStatus: ir.NOT_CHUNKED,
3984
3984
  isDirectory: !1,
3985
3985
  parentId: u
3986
3986
  })) };
@@ -4065,7 +4065,7 @@ function Bo(t, e) {
4065
4065
  const f = await r.fileRouter.createFile.mutate({
4066
4066
  file: {
4067
4067
  projectId: s,
4068
- mimeType: Pr.DIRECTORY,
4068
+ mimeType: Sr.DIRECTORY,
4069
4069
  path: "",
4070
4070
  name: i,
4071
4071
  size: 0,
@@ -4075,7 +4075,7 @@ function Bo(t, e) {
4075
4075
  parentId: null,
4076
4076
  // Always at the root level
4077
4077
  summary: null,
4078
- chunkingStatus: sr.NOT_CHUNKED
4078
+ chunkingStatus: ir.NOT_CHUNKED
4079
4079
  }
4080
4080
  });
4081
4081
  if (l.length === 0)
@@ -4163,16 +4163,16 @@ function Zo({
4163
4163
  }),
4164
4164
  []
4165
4165
  );
4166
- return Jt(() => {
4166
+ return Xt(() => {
4167
4167
  const f = `${e}:${r}`, h = Bo(f, n);
4168
4168
  c(h);
4169
- }, [e, r, n]), Jt(() => {
4169
+ }, [e, r, n]), Xt(() => {
4170
4170
  if (!l || !s) return;
4171
4171
  const f = JSON.stringify(s);
4172
4172
  l.updateUserMetadata(f).catch((h) => {
4173
4173
  console.error("Failed to update user metadata:", h);
4174
4174
  });
4175
- }, [l, s]), Jt(() => {
4175
+ }, [l, s]), Xt(() => {
4176
4176
  if (!i) return;
4177
4177
  const f = (y) => {
4178
4178
  i(y.detail);
@@ -4189,7 +4189,7 @@ function Zo({
4189
4189
  f
4190
4190
  ), window.removeEventListener("message", h);
4191
4191
  };
4192
- }, [i]), /* @__PURE__ */ gt.jsx(vi, { client: d, children: /* @__PURE__ */ gt.jsx(
4192
+ }, [i]), /* @__PURE__ */ bt.jsx(vi, { client: d, children: /* @__PURE__ */ bt.jsx(
4193
4193
  bs.Provider,
4194
4194
  {
4195
4195
  value: { host: e, port: r, client: l, token: n, passTokenInQueryParam: u },
@@ -4197,13 +4197,13 @@ function Zo({
4197
4197
  }
4198
4198
  ) });
4199
4199
  }
4200
- function ct() {
4200
+ function Ke() {
4201
4201
  const t = Gs(bs);
4202
4202
  if (!t)
4203
4203
  throw new Error("useFolioContext must be used within a FolioProvider");
4204
4204
  return t;
4205
4205
  }
4206
- const En = "folio-token", { useEffect: Rn, useRef: Go, useState: Yo } = $;
4206
+ const Rn = "folio-token", { useEffect: On, useRef: Go, useState: Yo } = $;
4207
4207
  function ea({
4208
4208
  width: t = "100%",
4209
4209
  height: e = "100vh",
@@ -4218,20 +4218,20 @@ function ea({
4218
4218
  port: c,
4219
4219
  token: d,
4220
4220
  passTokenInQueryParam: f
4221
- } = ct(), h = Go(null), [y, p] = Yo(), E = `${l}:${c}`, g = u !== void 0 ? u : f;
4222
- Rn(() => {
4221
+ } = Ke(), h = Go(null), [y, p] = Yo(), E = `${l}:${c}`, g = u !== void 0 ? u : f;
4222
+ On(() => {
4223
4223
  (() => {
4224
4224
  let P = E;
4225
4225
  g && (P = `${E}?jwt=${encodeURIComponent(d)}`), p(P);
4226
4226
  })();
4227
- }, [l, c, d, E, g]), Rn(() => {
4227
+ }, [l, c, d, E, g]), On(() => {
4228
4228
  if (g || !h.current) return;
4229
4229
  const C = (P) => {
4230
4230
  var _;
4231
4231
  if (((_ = P.data) == null ? void 0 : _.type) === "folio-request-token" && !(!P.source || typeof P.source.postMessage != "function"))
4232
4232
  try {
4233
4233
  P.source.postMessage(
4234
- { type: En, token: d },
4234
+ { type: Rn, token: d },
4235
4235
  "*"
4236
4236
  );
4237
4237
  } catch {
@@ -4244,13 +4244,13 @@ function ea({
4244
4244
  if (!(g || !((C = h.current) != null && C.contentWindow)))
4245
4245
  try {
4246
4246
  h.current.contentWindow.postMessage(
4247
- { type: En, token: d },
4247
+ { type: Rn, token: d },
4248
4248
  "*"
4249
4249
  );
4250
4250
  } catch {
4251
4251
  }
4252
4252
  };
4253
- return y ? /* @__PURE__ */ gt.jsx(
4253
+ return y ? /* @__PURE__ */ bt.jsx(
4254
4254
  "div",
4255
4255
  {
4256
4256
  className: `folio-embed-container ${s}`,
@@ -4260,7 +4260,7 @@ function ea({
4260
4260
  overflow: "hidden",
4261
4261
  ...n
4262
4262
  },
4263
- children: /* @__PURE__ */ gt.jsx(
4263
+ children: /* @__PURE__ */ bt.jsx(
4264
4264
  "iframe",
4265
4265
  {
4266
4266
  ref: h,
@@ -4283,7 +4283,7 @@ function ea({
4283
4283
  ) : null;
4284
4284
  }
4285
4285
  function ta() {
4286
- const { client: t } = ct(), e = Zn({
4286
+ const { client: t } = Ke(), e = xr({
4287
4287
  queryKey: ["folioProjects"],
4288
4288
  queryFn: async () => {
4289
4289
  if (!t) throw new Error("Folio client not initialized");
@@ -4299,8 +4299,37 @@ function ta() {
4299
4299
  refetch: e.refetch
4300
4300
  };
4301
4301
  }
4302
- function ra(t) {
4303
- const { client: e } = ct(), r = Zn({
4302
+ function ra() {
4303
+ const { client: t } = Ke(), e = ct(), r = xr({
4304
+ queryKey: ["folioUserMetadata"],
4305
+ queryFn: async () => {
4306
+ if (!t) throw new Error("Folio client not initialized");
4307
+ return t.getUserMetadata();
4308
+ },
4309
+ enabled: !!t
4310
+ }), n = Qt({
4311
+ mutationFn: async (s) => {
4312
+ if (!t) throw new Error("Folio client not initialized");
4313
+ const i = JSON.stringify(s);
4314
+ return t.updateUserMetadata(i);
4315
+ },
4316
+ onSuccess: () => {
4317
+ e.invalidateQueries({ queryKey: ["folioUserMetadata"] });
4318
+ }
4319
+ });
4320
+ return {
4321
+ metadata: r.data,
4322
+ isLoading: r.isLoading,
4323
+ isError: r.isError,
4324
+ error: r.error,
4325
+ updateMetadata: n.mutate,
4326
+ updateMetadataAsync: n.mutateAsync,
4327
+ isUpdating: n.isPending,
4328
+ refetch: r.refetch
4329
+ };
4330
+ }
4331
+ function na(t) {
4332
+ const { client: e } = Ke(), r = xr({
4304
4333
  queryKey: ["folioFiles", t],
4305
4334
  queryFn: async () => {
4306
4335
  if (!e) throw new Error("Folio client not initialized");
@@ -4317,8 +4346,8 @@ function ra(t) {
4317
4346
  refetch: r.refetch
4318
4347
  };
4319
4348
  }
4320
- function na() {
4321
- const { client: t } = ct(), e = Tt(), r = Ar({
4349
+ function sa() {
4350
+ const { client: t } = Ke(), e = ct(), r = Qt({
4322
4351
  mutationFn: async (n) => {
4323
4352
  if (!t) throw new Error("Folio client not initialized");
4324
4353
  return t.addProjectForUser(n);
@@ -4336,8 +4365,8 @@ function na() {
4336
4365
  newProject: r.data
4337
4366
  };
4338
4367
  }
4339
- function sa(t) {
4340
- const { client: e } = ct(), r = Tt(), n = Ar({
4368
+ function ia(t) {
4369
+ const { client: e } = Ke(), r = ct(), n = Qt({
4341
4370
  mutationFn: async (s) => {
4342
4371
  if (!e) throw new Error("Folio client not initialized");
4343
4372
  if (!t) throw new Error("Project ID is required");
@@ -4356,8 +4385,8 @@ function sa(t) {
4356
4385
  newFiles: n.data
4357
4386
  };
4358
4387
  }
4359
- function ia(t) {
4360
- const { client: e } = ct(), r = Tt(), n = Ar({
4388
+ function oa(t) {
4389
+ const { client: e } = Ke(), r = ct(), n = Qt({
4361
4390
  mutationFn: async (s) => {
4362
4391
  if (!e) throw new Error("Folio client not initialized");
4363
4392
  if (!t) throw new Error("Project ID is required");
@@ -4389,9 +4418,10 @@ function ia(t) {
4389
4418
  export {
4390
4419
  ea as FolioEmbed,
4391
4420
  Zo as FolioProvider,
4392
- ia as useAddFolioDirectoriesWithFiles,
4393
- sa as useAddFolioFiles,
4394
- na as useAddFolioProject,
4395
- ra as useFolioFiles,
4396
- ta as useFolioProjects
4421
+ oa as useAddFolioDirectoriesWithFiles,
4422
+ ia as useAddFolioFiles,
4423
+ sa as useAddFolioProject,
4424
+ na as useFolioFiles,
4425
+ ta as useFolioProjects,
4426
+ ra as useFolioUserMetadata
4397
4427
  };