@pdf-viewer/react 1.13.1 → 1.13.2-rc.0

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.
Files changed (98) hide show
  1. package/dist/{ToolbarLayout.module-eac6ee00.js → ToolbarLayout.module-6e50511c.js} +2 -2
  2. package/dist/components/RPConfig.js +127 -123
  3. package/dist/components/RPController.js +3 -3
  4. package/dist/components/RPPages.js +3 -3
  5. package/dist/components/RPProvider.js +3 -3
  6. package/dist/components/layout/LayoutContainer.js +3 -3
  7. package/dist/components/layout/RPDefaultLayout.js +3 -3
  8. package/dist/components/layout/RPLayout.js +3 -3
  9. package/dist/components/layout/sidebar/RPSidebar.js +3 -3
  10. package/dist/components/layout/sidebar/Thumbnail.js +3 -3
  11. package/dist/components/layout/sidebar/Thumbnails.js +3 -3
  12. package/dist/components/layout/toolbar/DarkModeTool.js +1 -1
  13. package/dist/components/layout/toolbar/DocumentDialog.js +3 -3
  14. package/dist/components/layout/toolbar/DocumentProperties.js +2 -2
  15. package/dist/components/layout/toolbar/FileDownloadTool.js +3 -3
  16. package/dist/components/layout/toolbar/FileUploadTool.js +2 -2
  17. package/dist/components/layout/toolbar/FullScreenTool.js +2 -2
  18. package/dist/components/layout/toolbar/MenuItem.js +2 -2
  19. package/dist/components/layout/toolbar/MenuSeparator.js +2 -2
  20. package/dist/components/layout/toolbar/MostPageTool.js +3 -3
  21. package/dist/components/layout/toolbar/OtherTool.js +3 -3
  22. package/dist/components/layout/toolbar/Paginate.js +3 -3
  23. package/dist/components/layout/toolbar/PrintTool.js +3 -3
  24. package/dist/components/layout/toolbar/RPMenuItem.js +2 -2
  25. package/dist/components/layout/toolbar/RPMoreOptions.js +3 -3
  26. package/dist/components/layout/toolbar/RPToolbar.js +3 -3
  27. package/dist/components/layout/toolbar/RPToolbarEnd.js +3 -3
  28. package/dist/components/layout/toolbar/RotateTool.js +2 -2
  29. package/dist/components/layout/toolbar/ScrollModeTool.js +2 -2
  30. package/dist/components/layout/toolbar/SearchCloseButton.js +1 -1
  31. package/dist/components/layout/toolbar/SearchResultNavigator.js +3 -3
  32. package/dist/components/layout/toolbar/SearchTool.js +3 -3
  33. package/dist/components/layout/toolbar/SelectionModeTool.js +2 -2
  34. package/dist/components/layout/toolbar/ThumbnailTool.js +3 -3
  35. package/dist/components/layout/toolbar/ToolbarCustom.js +3 -3
  36. package/dist/components/layout/toolbar/ToolbarDefault.js +3 -3
  37. package/dist/components/layout/toolbar/ToolbarLayout.js +3 -3
  38. package/dist/components/layout/toolbar/ViewModeTool.js +2 -2
  39. package/dist/components/layout/toolbar/ZoomTool.js +3 -3
  40. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +3 -3
  41. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -3
  42. package/dist/components/layout/toolbar/tools/FileUploadTool.js +1 -1
  43. package/dist/components/layout/toolbar/tools/FullScreenTool.js +1 -1
  44. package/dist/components/layout/toolbar/tools/InputPageTool.js +3 -3
  45. package/dist/components/layout/toolbar/tools/NextPageTool.js +3 -3
  46. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +3 -3
  47. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
  48. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +1 -1
  49. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +1 -1
  50. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +1 -1
  51. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +3 -3
  52. package/dist/components/layout/toolbar/tools/ZoomInTool.js +1 -1
  53. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +3 -3
  54. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +3 -3
  55. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +1 -1
  56. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +3 -3
  57. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +3 -3
  58. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +2 -2
  59. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +3 -3
  60. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +3 -3
  61. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +2 -2
  62. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +3 -3
  63. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +3 -3
  64. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +2 -2
  65. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +2 -2
  66. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +2 -2
  67. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +2 -2
  68. package/dist/components/page/AnnotationLayer.js +3 -3
  69. package/dist/components/page/CanvasLayer.js +3 -3
  70. package/dist/components/page/DualPage.js +3 -3
  71. package/dist/components/page/RPPage.js +3 -3
  72. package/dist/components/page/SinglePage.js +3 -3
  73. package/dist/components/page/TextHighlightLayer.js +3 -3
  74. package/dist/components/page/TextLayer.js +3 -3
  75. package/dist/components/ui/DropDown.js +2 -2
  76. package/dist/components/ui/LoadingIndicator.js +3 -3
  77. package/dist/components/ui/RPTooltip.js +430 -200
  78. package/dist/contexts/PaginationContext.js +3 -3
  79. package/dist/contexts/PrintContext.js +3 -3
  80. package/dist/contexts/RenderQueueProvider.js +3 -3
  81. package/dist/contexts/SearchContext.js +3 -3
  82. package/dist/contexts/ThumbnailsContext.js +3 -3
  83. package/dist/floating-ui.react-dom-d22a10b4.js +1474 -0
  84. package/dist/index-27c30844.js +1889 -0
  85. package/dist/main.js +3 -3
  86. package/dist/utils/hooks/useFileDownload.js +3 -3
  87. package/dist/utils/hooks/useLicense.js +1 -1
  88. package/dist/utils/hooks/usePaginate.js +3 -3
  89. package/dist/utils/hooks/usePresentPage.js +3 -3
  90. package/dist/utils/hooks/usePrint.js +3 -3
  91. package/dist/utils/hooks/useScrollToPage.js +3 -3
  92. package/dist/utils/hooks/useSearch.js +3 -3
  93. package/dist/utils/hooks/useThumbnail.js +3 -3
  94. package/dist/utils/hooks/useVirtualReactWindow.js +3 -3
  95. package/dist/utils/injectPrintCSS.js +1 -1
  96. package/package.json +1 -1
  97. package/dist/index-808ea7bf.js +0 -1685
  98. package/dist/index-a48ec088.js +0 -1672
@@ -16,11 +16,11 @@ var bt = (e, t, s, r) => ({
16
16
  }
17
17
  }), F = (e, t, s) => (St(e, t, "access private method"), s);
18
18
  import { jsx as dt } from "react/jsx-runtime";
19
- import { RPTheme as te } from "./RPTheme.js";
20
- import { ConfigContextProvider as ee } from "../contexts/ConfigContext.js";
21
- import { useLoadWorker as se } from "../utils/hooks/useLoadWorker.js";
22
- import * as Bt from "react";
23
- import { LicenseProvider as re } from "../contexts/LicenseContext.js";
19
+ import { RPTheme as ee } from "./RPTheme.js";
20
+ import { ConfigContextProvider as se } from "../contexts/ConfigContext.js";
21
+ import { useLoadWorker as re } from "../utils/hooks/useLoadWorker.js";
22
+ import * as Jt from "react";
23
+ import { LicenseProvider as ie } from "../contexts/LicenseContext.js";
24
24
  import "../contexts/ThemeContext.js";
25
25
  import "pdfjs-dist";
26
26
  import "../utils/hooks/useLicense.js";
@@ -41,7 +41,7 @@ var Ct = class {
41
41
  }
42
42
  onUnsubscribe() {
43
43
  }
44
- }, ie = {
44
+ }, ne = {
45
45
  // We need the wrapper function syntax below instead of direct references to
46
46
  // global setTimeout etc.
47
47
  //
@@ -56,7 +56,7 @@ var Ct = class {
56
56
  clearTimeout: (e) => clearTimeout(e),
57
57
  setInterval: (e, t) => setInterval(e, t),
58
58
  clearInterval: (e) => clearInterval(e)
59
- }, x, W, Ut, ne = (Ut = class {
59
+ }, x, W, Nt, ae = (Nt = class {
60
60
  constructor() {
61
61
  // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
62
62
  // type at app boot; and if we leave that type, then any new timer provider
@@ -64,7 +64,7 @@ var Ct = class {
64
64
  //
65
65
  // We settle for type safety for the TimeoutProvider type, and accept that
66
66
  // this class is unsafe internally to allow for extension.
67
- c(this, x, ie);
67
+ c(this, x, ne);
68
68
  c(this, W, !1);
69
69
  }
70
70
  setTimeoutProvider(e) {
@@ -85,26 +85,26 @@ var Ct = class {
85
85
  clearInterval(e) {
86
86
  i(this, x).clearInterval(e);
87
87
  }
88
- }, x = new WeakMap(), W = new WeakMap(), Ut), Et = new ne();
89
- function ae(e) {
88
+ }, x = new WeakMap(), W = new WeakMap(), Nt), Et = new ae();
89
+ function oe(e) {
90
90
  setTimeout(e, 0);
91
91
  }
92
92
  var Ft = typeof window > "u" || "Deno" in globalThis;
93
93
  function R() {
94
94
  }
95
- function oe(e, t) {
95
+ function ue(e, t) {
96
96
  return typeof e == "function" ? e(t) : e;
97
97
  }
98
- function ue(e) {
98
+ function he(e) {
99
99
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
100
100
  }
101
- function he(e, t) {
101
+ function ce(e, t) {
102
102
  return Math.max(e + (t || 0) - Date.now(), 0);
103
103
  }
104
- function Dt(e, t) {
104
+ function qt(e, t) {
105
105
  return typeof e == "function" ? e(t) : e;
106
106
  }
107
- function ce(e, t) {
107
+ function le(e, t) {
108
108
  return typeof e == "function" ? e(t) : e;
109
109
  }
110
110
  function Tt(e, t) {
@@ -155,8 +155,8 @@ function ft(e) {
155
155
  function yt(e, t) {
156
156
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => yt(e[s], t[s])) : !1;
157
157
  }
158
- var le = Object.prototype.hasOwnProperty;
159
- function qt(e, t) {
158
+ var de = Object.prototype.hasOwnProperty;
159
+ function Dt(e, t) {
160
160
  if (e === t)
161
161
  return e;
162
162
  const s = It(e) && It(t);
@@ -167,15 +167,15 @@ function qt(e, t) {
167
167
  for (let O = 0; O < l; O++) {
168
168
  const v = s ? O : a[O], C = e[v], g = t[v];
169
169
  if (C === g) {
170
- u[v] = C, (s ? O < n : le.call(e, v)) && f++;
170
+ u[v] = C, (s ? O < n : de.call(e, v)) && f++;
171
171
  continue;
172
172
  }
173
173
  if (C === null || g === null || typeof C != "object" || typeof g != "object") {
174
174
  u[v] = g;
175
175
  continue;
176
176
  }
177
- const q = qt(C, g);
178
- u[v] = q, q === C && f++;
177
+ const D = Dt(C, g);
178
+ u[v] = D, D === C && f++;
179
179
  }
180
180
  return n === l && f === n ? e : u;
181
181
  }
@@ -194,42 +194,42 @@ function At(e) {
194
194
  function jt(e) {
195
195
  return Object.prototype.toString.call(e) === "[object Object]";
196
196
  }
197
- function de(e) {
197
+ function fe(e) {
198
198
  return new Promise((t) => {
199
199
  Et.setTimeout(t, e);
200
200
  });
201
201
  }
202
- function fe(e, t, s) {
202
+ function ye(e, t, s) {
203
203
  if (typeof s.structuralSharing == "function")
204
204
  return s.structuralSharing(e, t);
205
205
  if (s.structuralSharing !== !1) {
206
206
  if (process.env.NODE_ENV !== "production")
207
207
  try {
208
- return qt(e, t);
208
+ return Dt(e, t);
209
209
  } catch (r) {
210
210
  throw console.error(
211
211
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
212
212
  ), r;
213
213
  }
214
- return qt(e, t);
214
+ return Dt(e, t);
215
215
  }
216
216
  return t;
217
217
  }
218
- function ye(e, t, s = 0) {
218
+ function pe(e, t, s = 0) {
219
219
  const r = [...e, t];
220
220
  return s && r.length > s ? r.slice(1) : r;
221
221
  }
222
- function pe(e, t, s = 0) {
222
+ function me(e, t, s = 0) {
223
223
  const r = [t, ...e];
224
224
  return s && r.length > s ? r.slice(0, -1) : r;
225
225
  }
226
226
  var Pt = Symbol();
227
- function Jt(e, t) {
227
+ function Wt(e, t) {
228
228
  return process.env.NODE_ENV !== "production" && e.queryFn === Pt && console.error(
229
229
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
230
230
  ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === Pt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
231
231
  }
232
- var Z, G, rt, Nt, me = (Nt = class extends Ct {
232
+ var Z, G, rt, Ht, ve = (Ht = class extends Ct {
233
233
  constructor() {
234
234
  super();
235
235
  c(this, Z, void 0);
@@ -270,8 +270,8 @@ var Z, G, rt, Nt, me = (Nt = class extends Ct {
270
270
  var t;
271
271
  return typeof i(this, Z) == "boolean" ? i(this, Z) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
272
272
  }
273
- }, Z = new WeakMap(), G = new WeakMap(), rt = new WeakMap(), Nt), Wt = new me();
274
- function ve() {
273
+ }, Z = new WeakMap(), G = new WeakMap(), rt = new WeakMap(), Ht), Zt = new ve();
274
+ function ge() {
275
275
  let e, t;
276
276
  const s = new Promise((n, a) => {
277
277
  e = n, t = a;
@@ -293,13 +293,13 @@ function ve() {
293
293
  }), t(n);
294
294
  }, s;
295
295
  }
296
- var ge = ae;
297
- function be() {
296
+ var be = oe;
297
+ function we() {
298
298
  let e = [], t = 0, s = (u) => {
299
299
  u();
300
300
  }, r = (u) => {
301
301
  u();
302
- }, n = ge;
302
+ }, n = be;
303
303
  const a = (u) => {
304
304
  t ? e.push(u) : n(() => {
305
305
  s(u);
@@ -353,7 +353,7 @@ function be() {
353
353
  }
354
354
  };
355
355
  }
356
- var D = be(), it, _, nt, Ht, we = (Ht = class extends Ct {
356
+ var q = we(), it, _, nt, Lt, Pe = (Lt = class extends Ct {
357
357
  constructor() {
358
358
  super();
359
359
  c(this, it, !0);
@@ -387,11 +387,11 @@ var D = be(), it, _, nt, Ht, we = (Ht = class extends Ct {
387
387
  isOnline() {
388
388
  return i(this, it);
389
389
  }
390
- }, it = new WeakMap(), _ = new WeakMap(), nt = new WeakMap(), Ht), Ot = new we();
391
- function Pe(e) {
390
+ }, it = new WeakMap(), _ = new WeakMap(), nt = new WeakMap(), Lt), Ot = new Pe();
391
+ function Oe(e) {
392
392
  return Math.min(1e3 * 2 ** e, 3e4);
393
393
  }
394
- function Zt(e) {
394
+ function Xt(e) {
395
395
  return (e ?? "online") === "online" ? Ot.isOnline() : !0;
396
396
  }
397
397
  var Qt = class extends Error {
@@ -399,9 +399,9 @@ var Qt = class extends Error {
399
399
  super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
400
400
  }
401
401
  };
402
- function Xt(e) {
402
+ function Yt(e) {
403
403
  let t = !1, s = 0, r;
404
- const n = ve(), a = () => n.status !== "pending", l = (d) => {
404
+ const n = ge(), a = () => n.status !== "pending", l = (d) => {
405
405
  var b;
406
406
  if (!a()) {
407
407
  const m = new Qt(d);
@@ -411,11 +411,11 @@ function Xt(e) {
411
411
  t = !0;
412
412
  }, f = () => {
413
413
  t = !1;
414
- }, O = () => Wt.isFocused() && (e.networkMode === "always" || Ot.isOnline()) && e.canRun(), v = () => Zt(e.networkMode) && e.canRun(), C = (d) => {
414
+ }, O = () => Zt.isFocused() && (e.networkMode === "always" || Ot.isOnline()) && e.canRun(), v = () => Xt(e.networkMode) && e.canRun(), C = (d) => {
415
415
  a() || (r == null || r(), n.resolve(d));
416
416
  }, g = (d) => {
417
417
  a() || (r == null || r(), n.reject(d));
418
- }, q = () => new Promise((d) => {
418
+ }, D = () => new Promise((d) => {
419
419
  var b;
420
420
  r = (m) => {
421
421
  (a() || O()) && d(m);
@@ -437,12 +437,12 @@ function Xt(e) {
437
437
  var T;
438
438
  if (a())
439
439
  return;
440
- const A = e.retry ?? (Ft ? 0 : 3), p = e.retryDelay ?? Pe, h = typeof p == "function" ? p(s, m) : p, S = A === !0 || typeof A == "number" && s < A || typeof A == "function" && A(s, m);
440
+ const A = e.retry ?? (Ft ? 0 : 3), p = e.retryDelay ?? Oe, h = typeof p == "function" ? p(s, m) : p, S = A === !0 || typeof A == "number" && s < A || typeof A == "function" && A(s, m);
441
441
  if (t || !S) {
442
442
  g(m);
443
443
  return;
444
444
  }
445
- s++, (T = e.onFail) == null || T.call(e, s, m), de(h).then(() => O() ? void 0 : q()).then(() => {
445
+ s++, (T = e.onFail) == null || T.call(e, s, m), fe(h).then(() => O() ? void 0 : D()).then(() => {
446
446
  t ? g(m) : Q();
447
447
  });
448
448
  });
@@ -455,10 +455,10 @@ function Xt(e) {
455
455
  cancelRetry: u,
456
456
  continueRetry: f,
457
457
  canStart: v,
458
- start: () => (v() ? Q() : q().then(Q), n)
458
+ start: () => (v() ? Q() : D().then(Q), n)
459
459
  };
460
460
  }
461
- var X, Lt, Yt = (Lt = class {
461
+ var X, Gt, te = (Gt = class {
462
462
  constructor() {
463
463
  c(this, X, void 0);
464
464
  }
@@ -466,7 +466,7 @@ var X, Lt, Yt = (Lt = class {
466
466
  this.clearGcTimeout();
467
467
  }
468
468
  scheduleGc() {
469
- this.clearGcTimeout(), ue(this.gcTime) && o(this, X, Et.setTimeout(() => {
469
+ this.clearGcTimeout(), he(this.gcTime) && o(this, X, Et.setTimeout(() => {
470
470
  this.optionalRemove();
471
471
  }, this.gcTime));
472
472
  }
@@ -479,7 +479,7 @@ var X, Lt, Yt = (Lt = class {
479
479
  clearGcTimeout() {
480
480
  i(this, X) && (Et.clearTimeout(i(this, X)), o(this, X, void 0));
481
481
  }
482
- }, X = new WeakMap(), Lt), Y, at, M, tt, P, pt, et, I, N, Gt, Oe = (Gt = class extends Yt {
482
+ }, X = new WeakMap(), Gt), Y, at, M, tt, P, pt, et, I, N, _t, Ce = (_t = class extends te {
483
483
  constructor(t) {
484
484
  super();
485
485
  c(this, I);
@@ -490,7 +490,7 @@ var X, Lt, Yt = (Lt = class {
490
490
  c(this, P, void 0);
491
491
  c(this, pt, void 0);
492
492
  c(this, et, void 0);
493
- o(this, et, !1), o(this, pt, t.defaultOptions), this.setOptions(t.options), this.observers = [], o(this, tt, t.client), o(this, M, i(this, tt).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, o(this, Y, xt(this.options)), this.state = t.state ?? i(this, Y), this.scheduleGc();
493
+ o(this, et, !1), o(this, pt, t.defaultOptions), this.setOptions(t.options), this.observers = [], o(this, tt, t.client), o(this, M, i(this, tt).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, o(this, Y, kt(this.options)), this.state = t.state ?? i(this, Y), this.scheduleGc();
494
494
  }
495
495
  get meta() {
496
496
  return this.options.meta;
@@ -501,18 +501,17 @@ var X, Lt, Yt = (Lt = class {
501
501
  }
502
502
  setOptions(t) {
503
503
  if (this.options = { ...i(this, pt), ...t }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
504
- const s = xt(this.options);
505
- s.data !== void 0 && (this.setData(s.data, {
506
- updatedAt: s.dataUpdatedAt,
507
- manual: !0
508
- }), o(this, Y, s));
504
+ const s = kt(this.options);
505
+ s.data !== void 0 && (this.setState(
506
+ xt(s.data, s.dataUpdatedAt)
507
+ ), o(this, Y, s));
509
508
  }
510
509
  }
511
510
  optionalRemove() {
512
511
  !this.observers.length && this.state.fetchStatus === "idle" && i(this, M).remove(this);
513
512
  }
514
513
  setData(t, s) {
515
- const r = fe(this.state.data, t, this.options);
514
+ const r = ye(this.state.data, t, this.options);
516
515
  return F(this, I, N).call(this, {
517
516
  data: r,
518
517
  type: "success",
@@ -536,7 +535,7 @@ var X, Lt, Yt = (Lt = class {
536
535
  }
537
536
  isActive() {
538
537
  return this.observers.some(
539
- (t) => ce(t.options.enabled, this) !== !1
538
+ (t) => le(t.options.enabled, this) !== !1
540
539
  );
541
540
  }
542
541
  isDisabled() {
@@ -544,7 +543,7 @@ var X, Lt, Yt = (Lt = class {
544
543
  }
545
544
  isStatic() {
546
545
  return this.getObserversCount() > 0 ? this.observers.some(
547
- (t) => Dt(t.options.staleTime, this) === "static"
546
+ (t) => qt(t.options.staleTime, this) === "static"
548
547
  ) : !1;
549
548
  }
550
549
  isStale() {
@@ -553,7 +552,7 @@ var X, Lt, Yt = (Lt = class {
553
552
  ) : this.state.data === void 0 || this.state.isInvalidated;
554
553
  }
555
554
  isStaleByTime(t = 0) {
556
- return this.state.data === void 0 ? !0 : t === "static" ? !1 : this.state.isInvalidated ? !0 : !he(this.state.dataUpdatedAt, t);
555
+ return this.state.data === void 0 ? !0 : t === "static" ? !1 : this.state.isInvalidated ? !0 : !ce(this.state.dataUpdatedAt, t);
557
556
  }
558
557
  onFocus() {
559
558
  var s;
@@ -578,7 +577,7 @@ var X, Lt, Yt = (Lt = class {
578
577
  this.state.isInvalidated || F(this, I, N).call(this, { type: "invalidate" });
579
578
  }
580
579
  async fetch(t, s) {
581
- var f, O, v, C, g, q, Q, d, b, m, A, p;
580
+ var f, O, v, C, g, D, Q, d, b, m, A, p;
582
581
  if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
583
582
  // re-start the fetch; there is a chance that the query is still in a
584
583
  // pending state when that happens
@@ -601,7 +600,7 @@ var X, Lt, Yt = (Lt = class {
601
600
  get: () => (o(this, et, !0), r.signal)
602
601
  });
603
602
  }, a = () => {
604
- const h = Jt(this.options, s), T = (() => {
603
+ const h = Wt(this.options, s), T = (() => {
605
604
  const B = {
606
605
  client: i(this, tt),
607
606
  queryKey: this.queryKey,
@@ -625,7 +624,7 @@ var X, Lt, Yt = (Lt = class {
625
624
  };
626
625
  return n(h), h;
627
626
  })();
628
- (O = this.options.behavior) == null || O.onFetch(u, this), o(this, at, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((v = u.fetchOptions) == null ? void 0 : v.meta)) && F(this, I, N).call(this, { type: "fetch", meta: (C = u.fetchOptions) == null ? void 0 : C.meta }), o(this, P, Xt({
627
+ (O = this.options.behavior) == null || O.onFetch(u, this), o(this, at, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((v = u.fetchOptions) == null ? void 0 : v.meta)) && F(this, I, N).call(this, { type: "fetch", meta: (C = u.fetchOptions) == null ? void 0 : C.meta }), o(this, P, Yt({
629
628
  initialPromise: s == null ? void 0 : s.initialPromise,
630
629
  fn: u.fetchFn,
631
630
  onCancel: (h) => {
@@ -654,7 +653,7 @@ var X, Lt, Yt = (Lt = class {
654
653
  throw process.env.NODE_ENV !== "production" && console.error(
655
654
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
656
655
  ), new Error(`${this.queryHash} data is undefined`);
657
- return this.setData(h), (q = (g = i(this, M).config).onSuccess) == null || q.call(g, h, this), (d = (Q = i(this, M).config).onSettled) == null || d.call(
656
+ return this.setData(h), (D = (g = i(this, M).config).onSuccess) == null || D.call(g, h, this), (d = (Q = i(this, M).config).onSettled) == null || d.call(
658
657
  Q,
659
658
  h,
660
659
  this.state.error,
@@ -709,18 +708,14 @@ var X, Lt, Yt = (Lt = class {
709
708
  case "fetch":
710
709
  return {
711
710
  ...r,
712
- ...Ce(r.data, this.options),
711
+ ...Fe(r.data, this.options),
713
712
  fetchMeta: t.meta ?? null
714
713
  };
715
714
  case "success":
716
715
  const n = {
717
716
  ...r,
718
- data: t.data,
717
+ ...xt(t.data, t.dataUpdatedAt),
719
718
  dataUpdateCount: r.dataUpdateCount + 1,
720
- dataUpdatedAt: t.dataUpdatedAt ?? Date.now(),
721
- error: null,
722
- isInvalidated: !1,
723
- status: "success",
724
719
  ...!t.manual && {
725
720
  fetchStatus: "idle",
726
721
  fetchFailureCount: 0,
@@ -752,24 +747,33 @@ var X, Lt, Yt = (Lt = class {
752
747
  };
753
748
  }
754
749
  };
755
- this.state = s(this.state), D.batch(() => {
750
+ this.state = s(this.state), q.batch(() => {
756
751
  this.observers.forEach((r) => {
757
752
  r.onQueryUpdate();
758
753
  }), i(this, M).notify({ query: this, type: "updated", action: t });
759
754
  });
760
- }, Gt);
761
- function Ce(e, t) {
755
+ }, _t);
756
+ function Fe(e, t) {
762
757
  return {
763
758
  fetchFailureCount: 0,
764
759
  fetchFailureReason: null,
765
- fetchStatus: Zt(t.networkMode) ? "fetching" : "paused",
760
+ fetchStatus: Xt(t.networkMode) ? "fetching" : "paused",
766
761
  ...e === void 0 && {
767
762
  error: null,
768
763
  status: "pending"
769
764
  }
770
765
  };
771
766
  }
772
- function xt(e) {
767
+ function xt(e, t) {
768
+ return {
769
+ data: e,
770
+ dataUpdatedAt: t ?? Date.now(),
771
+ error: null,
772
+ isInvalidated: !1,
773
+ status: "success"
774
+ };
775
+ }
776
+ function kt(e) {
773
777
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
774
778
  return {
775
779
  data: t,
@@ -786,11 +790,11 @@ function xt(e) {
786
790
  fetchStatus: "idle"
787
791
  };
788
792
  }
789
- function kt(e) {
793
+ function Kt(e) {
790
794
  return {
791
795
  onFetch: (t, s) => {
792
- var v, C, g, q, Q;
793
- const r = t.options, n = (g = (C = (v = t.fetchOptions) == null ? void 0 : v.meta) == null ? void 0 : C.fetchMore) == null ? void 0 : g.direction, a = ((q = t.state.data) == null ? void 0 : q.pages) || [], l = ((Q = t.state.data) == null ? void 0 : Q.pageParams) || [];
796
+ var v, C, g, D, Q;
797
+ const r = t.options, n = (g = (C = (v = t.fetchOptions) == null ? void 0 : v.meta) == null ? void 0 : C.fetchMore) == null ? void 0 : g.direction, a = ((D = t.state.data) == null ? void 0 : D.pages) || [], l = ((Q = t.state.data) == null ? void 0 : Q.pageParams) || [];
794
798
  let u = { pages: [], pageParams: [] }, f = 0;
795
799
  const O = async () => {
796
800
  let d = !1;
@@ -801,7 +805,7 @@ function kt(e) {
801
805
  d = !0;
802
806
  }), t.signal)
803
807
  });
804
- }, m = Jt(t.options, t.fetchOptions), A = async (p, h, S) => {
808
+ }, m = Wt(t.options, t.fetchOptions), A = async (p, h, S) => {
805
809
  if (d)
806
810
  return Promise.reject();
807
811
  if (h == null && p.pages.length)
@@ -815,14 +819,14 @@ function kt(e) {
815
819
  meta: t.options.meta
816
820
  };
817
821
  return b(J), J;
818
- })(), gt = await m(B), { maxPages: lt } = t.options, w = S ? pe : ye;
822
+ })(), gt = await m(B), { maxPages: lt } = t.options, w = S ? me : pe;
819
823
  return {
820
824
  pages: w(p.pages, gt, lt),
821
825
  pageParams: w(p.pageParams, h, lt)
822
826
  };
823
827
  };
824
828
  if (n && a.length) {
825
- const p = n === "backward", h = p ? Fe : Kt, S = {
829
+ const p = n === "backward", h = p ? Se : Ut, S = {
826
830
  pages: a,
827
831
  pageParams: l
828
832
  }, T = h(r, S);
@@ -830,7 +834,7 @@ function kt(e) {
830
834
  } else {
831
835
  const p = e ?? a.length;
832
836
  do {
833
- const h = f === 0 ? l[0] ?? r.initialPageParam : Kt(r, u);
837
+ const h = f === 0 ? l[0] ?? r.initialPageParam : Ut(r, u);
834
838
  if (f > 0 && h == null)
835
839
  break;
836
840
  u = await A(u, h), f++;
@@ -855,7 +859,7 @@ function kt(e) {
855
859
  }
856
860
  };
857
861
  }
858
- function Kt(e, { pages: t, pageParams: s }) {
862
+ function Ut(e, { pages: t, pageParams: s }) {
859
863
  const r = t.length - 1;
860
864
  return t.length > 0 ? e.getNextPageParam(
861
865
  t[r],
@@ -864,11 +868,11 @@ function Kt(e, { pages: t, pageParams: s }) {
864
868
  s
865
869
  ) : void 0;
866
870
  }
867
- function Fe(e, { pages: t, pageParams: s }) {
871
+ function Se(e, { pages: t, pageParams: s }) {
868
872
  var r;
869
873
  return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, s[0], s) : void 0;
870
874
  }
871
- var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
875
+ var mt, k, E, st, K, L, Vt, Ee = (Vt = class extends te {
872
876
  constructor(t) {
873
877
  super();
874
878
  c(this, K);
@@ -876,7 +880,7 @@ var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
876
880
  c(this, k, void 0);
877
881
  c(this, E, void 0);
878
882
  c(this, st, void 0);
879
- o(this, mt, t.client), this.mutationId = t.mutationId, o(this, E, t.mutationCache), o(this, k, []), this.state = t.state || Ee(), this.setOptions(t.options), this.scheduleGc();
883
+ o(this, mt, t.client), this.mutationId = t.mutationId, o(this, E, t.mutationCache), o(this, k, []), this.state = t.state || qe(), this.setOptions(t.options), this.scheduleGc();
880
884
  }
881
885
  setOptions(t) {
882
886
  this.options = t, this.updateGcTime(this.options.gcTime);
@@ -907,7 +911,7 @@ var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
907
911
  this.execute(this.state.variables);
908
912
  }
909
913
  async execute(t) {
910
- var l, u, f, O, v, C, g, q, Q, d, b, m, A, p, h, S, T, B, gt, lt;
914
+ var l, u, f, O, v, C, g, D, Q, d, b, m, A, p, h, S, T, B, gt, lt;
911
915
  const s = () => {
912
916
  F(this, K, L).call(this, { type: "continue" });
913
917
  }, r = {
@@ -915,7 +919,7 @@ var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
915
919
  meta: this.options.meta,
916
920
  mutationKey: this.options.mutationKey
917
921
  };
918
- o(this, st, Xt({
922
+ o(this, st, Yt({
919
923
  fn: () => this.options.mutationFn ? this.options.mutationFn(t, r) : Promise.reject(new Error("No mutationFn found")),
920
924
  onFail: (w, J) => {
921
925
  F(this, K, L).call(this, { type: "failed", failureCount: w, error: J });
@@ -960,7 +964,7 @@ var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
960
964
  this.state.context,
961
965
  this,
962
966
  r
963
- )), await ((q = (g = this.options).onSuccess) == null ? void 0 : q.call(
967
+ )), await ((D = (g = this.options).onSuccess) == null ? void 0 : D.call(
964
968
  g,
965
969
  w,
966
970
  t,
@@ -1074,7 +1078,7 @@ var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
1074
1078
  };
1075
1079
  }
1076
1080
  };
1077
- this.state = s(this.state), D.batch(() => {
1081
+ this.state = s(this.state), q.batch(() => {
1078
1082
  i(this, k).forEach((r) => {
1079
1083
  r.onMutationUpdate(t);
1080
1084
  }), i(this, E).notify({
@@ -1083,8 +1087,8 @@ var mt, k, E, st, K, L, _t, Se = (_t = class extends Yt {
1083
1087
  action: t
1084
1088
  });
1085
1089
  });
1086
- }, _t);
1087
- function Ee() {
1090
+ }, Vt);
1091
+ function qe() {
1088
1092
  return {
1089
1093
  context: void 0,
1090
1094
  data: void 0,
@@ -1097,7 +1101,7 @@ function Ee() {
1097
1101
  submittedAt: 0
1098
1102
  };
1099
1103
  }
1100
- var H, j, vt, Vt, De = (Vt = class extends Ct {
1104
+ var H, j, vt, $t, De = ($t = class extends Ct {
1101
1105
  constructor(t = {}) {
1102
1106
  super();
1103
1107
  c(this, H, void 0);
@@ -1106,7 +1110,7 @@ var H, j, vt, Vt, De = (Vt = class extends Ct {
1106
1110
  this.config = t, o(this, H, /* @__PURE__ */ new Set()), o(this, j, /* @__PURE__ */ new Map()), o(this, vt, 0);
1107
1111
  }
1108
1112
  build(t, s, r) {
1109
- const n = new Se({
1113
+ const n = new Ee({
1110
1114
  client: t,
1111
1115
  mutationCache: this,
1112
1116
  mutationId: ++bt(this, vt)._,
@@ -1159,7 +1163,7 @@ var H, j, vt, Vt, De = (Vt = class extends Ct {
1159
1163
  return Promise.resolve();
1160
1164
  }
1161
1165
  clear() {
1162
- D.batch(() => {
1166
+ q.batch(() => {
1163
1167
  i(this, H).forEach((t) => {
1164
1168
  this.notify({ type: "removed", mutation: t });
1165
1169
  }), i(this, H).clear(), i(this, j).clear();
@@ -1178,7 +1182,7 @@ var H, j, vt, Vt, De = (Vt = class extends Ct {
1178
1182
  return this.getAll().filter((s) => Rt(t, s));
1179
1183
  }
1180
1184
  notify(t) {
1181
- D.batch(() => {
1185
+ q.batch(() => {
1182
1186
  this.listeners.forEach((s) => {
1183
1187
  s(t);
1184
1188
  });
@@ -1186,18 +1190,18 @@ var H, j, vt, Vt, De = (Vt = class extends Ct {
1186
1190
  }
1187
1191
  resumePausedMutations() {
1188
1192
  const t = this.getAll().filter((s) => s.state.isPaused);
1189
- return D.batch(
1193
+ return q.batch(
1190
1194
  () => Promise.all(
1191
1195
  t.map((s) => s.continue().catch(R))
1192
1196
  )
1193
1197
  );
1194
1198
  }
1195
- }, H = new WeakMap(), j = new WeakMap(), vt = new WeakMap(), Vt);
1199
+ }, H = new WeakMap(), j = new WeakMap(), vt = new WeakMap(), $t);
1196
1200
  function wt(e) {
1197
1201
  var t;
1198
1202
  return (t = e.options.scope) == null ? void 0 : t.id;
1199
1203
  }
1200
- var U, $t, qe = ($t = class extends Ct {
1204
+ var U, zt, Ae = (zt = class extends Ct {
1201
1205
  constructor(t = {}) {
1202
1206
  super();
1203
1207
  c(this, U, void 0);
@@ -1206,7 +1210,7 @@ var U, $t, qe = ($t = class extends Ct {
1206
1210
  build(t, s, r) {
1207
1211
  const n = s.queryKey, a = s.queryHash ?? Mt(n, s);
1208
1212
  let l = this.get(a);
1209
- return l || (l = new Oe({
1213
+ return l || (l = new Ce({
1210
1214
  client: t,
1211
1215
  queryKey: n,
1212
1216
  queryHash: a,
@@ -1226,7 +1230,7 @@ var U, $t, qe = ($t = class extends Ct {
1226
1230
  s && (t.destroy(), s === t && i(this, U).delete(t.queryHash), this.notify({ type: "removed", query: t }));
1227
1231
  }
1228
1232
  clear() {
1229
- D.batch(() => {
1233
+ q.batch(() => {
1230
1234
  this.getAll().forEach((t) => {
1231
1235
  this.remove(t);
1232
1236
  });
@@ -1249,27 +1253,27 @@ var U, $t, qe = ($t = class extends Ct {
1249
1253
  return Object.keys(t).length > 0 ? s.filter((r) => Tt(t, r)) : s;
1250
1254
  }
1251
1255
  notify(t) {
1252
- D.batch(() => {
1256
+ q.batch(() => {
1253
1257
  this.listeners.forEach((s) => {
1254
1258
  s(t);
1255
1259
  });
1256
1260
  });
1257
1261
  }
1258
1262
  onFocus() {
1259
- D.batch(() => {
1263
+ q.batch(() => {
1260
1264
  this.getAll().forEach((t) => {
1261
1265
  t.onFocus();
1262
1266
  });
1263
1267
  });
1264
1268
  }
1265
1269
  onOnline() {
1266
- D.batch(() => {
1270
+ q.batch(() => {
1267
1271
  this.getAll().forEach((t) => {
1268
1272
  t.onOnline();
1269
1273
  });
1270
1274
  });
1271
1275
  }
1272
- }, U = new WeakMap(), $t), y, V, $, ot, ut, z, ht, ct, zt, Ae = (zt = class {
1276
+ }, U = new WeakMap(), zt), y, V, $, ot, ut, z, ht, ct, Bt, Qe = (Bt = class {
1273
1277
  constructor(e = {}) {
1274
1278
  c(this, y, void 0);
1275
1279
  c(this, V, void 0);
@@ -1279,10 +1283,10 @@ var U, $t, qe = ($t = class extends Ct {
1279
1283
  c(this, z, void 0);
1280
1284
  c(this, ht, void 0);
1281
1285
  c(this, ct, void 0);
1282
- o(this, y, e.queryCache || new qe()), o(this, V, e.mutationCache || new De()), o(this, $, e.defaultOptions || {}), o(this, ot, /* @__PURE__ */ new Map()), o(this, ut, /* @__PURE__ */ new Map()), o(this, z, 0);
1286
+ o(this, y, e.queryCache || new Ae()), o(this, V, e.mutationCache || new De()), o(this, $, e.defaultOptions || {}), o(this, ot, /* @__PURE__ */ new Map()), o(this, ut, /* @__PURE__ */ new Map()), o(this, z, 0);
1283
1287
  }
1284
1288
  mount() {
1285
- bt(this, z)._++, i(this, z) === 1 && (o(this, ht, Wt.subscribe(async (e) => {
1289
+ bt(this, z)._++, i(this, z) === 1 && (o(this, ht, Zt.subscribe(async (e) => {
1286
1290
  e && (await this.resumePausedMutations(), i(this, y).onFocus());
1287
1291
  })), o(this, ct, Ot.subscribe(async (e) => {
1288
1292
  e && (await this.resumePausedMutations(), i(this, y).onOnline());
@@ -1312,7 +1316,7 @@ var U, $t, qe = ($t = class extends Ct {
1312
1316
  }
1313
1317
  ensureQueryData(e) {
1314
1318
  const t = this.defaultQueryOptions(e), s = i(this, y).build(this, t), r = s.state.data;
1315
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(Dt(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
1319
+ return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(qt(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
1316
1320
  }
1317
1321
  getQueriesData(e) {
1318
1322
  return i(this, y).findAll(e).map(({ queryKey: t, state: s }) => {
@@ -1323,12 +1327,12 @@ var U, $t, qe = ($t = class extends Ct {
1323
1327
  setQueryData(e, t, s) {
1324
1328
  const r = this.defaultQueryOptions({ queryKey: e }), n = i(this, y).get(
1325
1329
  r.queryHash
1326
- ), a = n == null ? void 0 : n.state.data, l = oe(t, a);
1330
+ ), a = n == null ? void 0 : n.state.data, l = ue(t, a);
1327
1331
  if (l !== void 0)
1328
1332
  return i(this, y).build(this, r).setData(l, { ...s, manual: !0 });
1329
1333
  }
1330
1334
  setQueriesData(e, t, s) {
1331
- return D.batch(
1335
+ return q.batch(
1332
1336
  () => i(this, y).findAll(e).map(({ queryKey: r }) => [
1333
1337
  r,
1334
1338
  this.setQueryData(r, t, s)
@@ -1344,7 +1348,7 @@ var U, $t, qe = ($t = class extends Ct {
1344
1348
  }
1345
1349
  removeQueries(e) {
1346
1350
  const t = i(this, y);
1347
- D.batch(() => {
1351
+ q.batch(() => {
1348
1352
  t.findAll(e).forEach((s) => {
1349
1353
  t.remove(s);
1350
1354
  });
@@ -1352,7 +1356,7 @@ var U, $t, qe = ($t = class extends Ct {
1352
1356
  }
1353
1357
  resetQueries(e, t) {
1354
1358
  const s = i(this, y);
1355
- return D.batch(() => (s.findAll(e).forEach((r) => {
1359
+ return q.batch(() => (s.findAll(e).forEach((r) => {
1356
1360
  r.reset();
1357
1361
  }), this.refetchQueries(
1358
1362
  {
@@ -1363,13 +1367,13 @@ var U, $t, qe = ($t = class extends Ct {
1363
1367
  )));
1364
1368
  }
1365
1369
  cancelQueries(e, t = {}) {
1366
- const s = { revert: !0, ...t }, r = D.batch(
1370
+ const s = { revert: !0, ...t }, r = q.batch(
1367
1371
  () => i(this, y).findAll(e).map((n) => n.cancel(s))
1368
1372
  );
1369
1373
  return Promise.all(r).then(R).catch(R);
1370
1374
  }
1371
1375
  invalidateQueries(e, t = {}) {
1372
- return D.batch(() => (i(this, y).findAll(e).forEach((s) => {
1376
+ return q.batch(() => (i(this, y).findAll(e).forEach((s) => {
1373
1377
  s.invalidate();
1374
1378
  }), (e == null ? void 0 : e.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
1375
1379
  {
@@ -1383,7 +1387,7 @@ var U, $t, qe = ($t = class extends Ct {
1383
1387
  const s = {
1384
1388
  ...t,
1385
1389
  cancelRefetch: t.cancelRefetch ?? !0
1386
- }, r = D.batch(
1390
+ }, r = q.batch(
1387
1391
  () => i(this, y).findAll(e).filter((n) => !n.isDisabled() && !n.isStatic()).map((n) => {
1388
1392
  let a = n.fetch(void 0, s);
1389
1393
  return s.throwOnError || (a = a.catch(R)), n.state.fetchStatus === "paused" ? Promise.resolve() : a;
@@ -1396,20 +1400,20 @@ var U, $t, qe = ($t = class extends Ct {
1396
1400
  t.retry === void 0 && (t.retry = !1);
1397
1401
  const s = i(this, y).build(this, t);
1398
1402
  return s.isStaleByTime(
1399
- Dt(t.staleTime, s)
1403
+ qt(t.staleTime, s)
1400
1404
  ) ? s.fetch(t) : Promise.resolve(s.state.data);
1401
1405
  }
1402
1406
  prefetchQuery(e) {
1403
1407
  return this.fetchQuery(e).then(R).catch(R);
1404
1408
  }
1405
1409
  fetchInfiniteQuery(e) {
1406
- return e.behavior = kt(e.pages), this.fetchQuery(e);
1410
+ return e.behavior = Kt(e.pages), this.fetchQuery(e);
1407
1411
  }
1408
1412
  prefetchInfiniteQuery(e) {
1409
1413
  return this.fetchInfiniteQuery(e).then(R).catch(R);
1410
1414
  }
1411
1415
  ensureInfiniteQueryData(e) {
1412
- return e.behavior = kt(e.pages), this.ensureQueryData(e);
1416
+ return e.behavior = Kt(e.pages), this.ensureQueryData(e);
1413
1417
  }
1414
1418
  resumePausedMutations() {
1415
1419
  return Ot.isOnline() ? i(this, V).resumePausedMutations() : Promise.resolve();
@@ -1475,18 +1479,18 @@ var U, $t, qe = ($t = class extends Ct {
1475
1479
  clear() {
1476
1480
  i(this, y).clear(), i(this, V).clear();
1477
1481
  }
1478
- }, y = new WeakMap(), V = new WeakMap(), $ = new WeakMap(), ot = new WeakMap(), ut = new WeakMap(), z = new WeakMap(), ht = new WeakMap(), ct = new WeakMap(), zt), Qe = Bt.createContext(
1482
+ }, y = new WeakMap(), V = new WeakMap(), $ = new WeakMap(), ot = new WeakMap(), ut = new WeakMap(), z = new WeakMap(), ht = new WeakMap(), ct = new WeakMap(), Bt), Me = Jt.createContext(
1479
1483
  void 0
1480
- ), Me = ({
1484
+ ), Te = ({
1481
1485
  client: e,
1482
1486
  children: t
1483
- }) => (Bt.useEffect(() => (e.mount(), () => {
1487
+ }) => (Jt.useEffect(() => (e.mount(), () => {
1484
1488
  e.unmount();
1485
- }), [e]), /* @__PURE__ */ dt(Qe.Provider, { value: e, children: t }));
1486
- const Te = new Ae(), Ge = (e) => {
1487
- const { children: t, customVariables: s, customDarkVariables: r, workerUrl: n, licenseKey: a, ...l } = e, { workerUrlAdded: u } = se(n);
1488
- return /* @__PURE__ */ dt(Me, { client: Te, children: /* @__PURE__ */ dt(re, { licenseKey: a, children: /* @__PURE__ */ dt(ee, { workerUrlAdded: u, ...l, children: /* @__PURE__ */ dt(te, { customDarkVariables: r, customVariables: s, children: t }) }) }) });
1489
+ }), [e]), /* @__PURE__ */ dt(Me.Provider, { value: e, children: t }));
1490
+ const Re = new Qe(), _e = (e) => {
1491
+ const { children: t, customVariables: s, customDarkVariables: r, workerUrl: n, licenseKey: a, ...l } = e, { workerUrlAdded: u } = re(n);
1492
+ return /* @__PURE__ */ dt(Te, { client: Re, children: /* @__PURE__ */ dt(ie, { licenseKey: a, children: /* @__PURE__ */ dt(se, { workerUrlAdded: u, ...l, children: /* @__PURE__ */ dt(ee, { customDarkVariables: r, customVariables: s, children: t }) }) }) });
1489
1493
  };
1490
1494
  export {
1491
- Ge as RPConfig
1495
+ _e as RPConfig
1492
1496
  };