zudoku 0.25.3 → 0.26.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 (162) hide show
  1. package/dist/cli/dev/handler.js +2 -2
  2. package/dist/cli/dev/handler.js.map +1 -1
  3. package/dist/config/validators/common.d.ts +28 -28
  4. package/dist/config/validators/icon-types.d.ts +1 -1
  5. package/dist/config/validators/validate.d.ts +12 -12
  6. package/dist/lib/components/navigation/SidebarCategory.js +1 -1
  7. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  8. package/dist/lib/plugins/openapi/OperationList.js +3 -0
  9. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  10. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  11. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  12. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +2 -1
  13. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -2
  14. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  15. package/dist/lib/plugins/openapi/Sidecar.js +9 -6
  16. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  17. package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
  18. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  19. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +2 -1
  20. package/dist/lib/plugins/openapi/SidecarExamples.js +7 -4
  21. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  22. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +1 -1
  23. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  24. package/dist/lib/ui/Badge.d.ts +1 -1
  25. package/dist/lib/ui/Badge.js +1 -0
  26. package/dist/lib/ui/Badge.js.map +1 -1
  27. package/dist/vite/config.test.js +5 -1
  28. package/dist/vite/config.test.js.map +1 -1
  29. package/lib/{AnchorLink-DFZZbmvr.js → AnchorLink-_Vu02ceN.js} +3 -3
  30. package/lib/{AnchorLink-DFZZbmvr.js.map → AnchorLink-_Vu02ceN.js.map} +1 -1
  31. package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-DNXBcsVN.js} +4 -4
  32. package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-DNXBcsVN.js.map} +1 -1
  33. package/lib/{Button-DeAoTouo.js → Button-oroWHXAy.js} +3 -3
  34. package/lib/{Button-DeAoTouo.js.map → Button-oroWHXAy.js.map} +1 -1
  35. package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
  36. package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
  37. package/lib/{Command-9x_kZHr4.js → Command-D5DE0DD7.js} +136 -136
  38. package/lib/Command-D5DE0DD7.js.map +1 -0
  39. package/lib/{Markdown-CZDLNOFc.js → Markdown-BrfrjEk_.js} +1041 -1041
  40. package/lib/{Markdown-CZDLNOFc.js.map → Markdown-BrfrjEk_.js.map} +1 -1
  41. package/lib/{MdxPage-DKMbBROv.js → MdxPage-LNZLj_A5.js} +24 -24
  42. package/lib/{MdxPage-DKMbBROv.js.map → MdxPage-LNZLj_A5.js.map} +1 -1
  43. package/lib/{OperationList-B8bHMKme.js → OperationList-PCwzTp1r.js} +1489 -1473
  44. package/lib/OperationList-PCwzTp1r.js.map +1 -0
  45. package/lib/{Route-DYwKZ_c_.js → Route-Pzk6qwIk.js} +5 -5
  46. package/lib/{Route-DYwKZ_c_.js.map → Route-Pzk6qwIk.js.map} +1 -1
  47. package/lib/{Select-B_IxRUUC.js → Select-DkOpAG0c.js} +36 -36
  48. package/lib/{Select-B_IxRUUC.js.map → Select-DkOpAG0c.js.map} +1 -1
  49. package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-DPbx9KdU.js} +53 -53
  50. package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-DPbx9KdU.js.map} +1 -1
  51. package/lib/{Spinner-DuxJLLNE.js → Spinner-C5gHXrVz.js} +2 -2
  52. package/lib/{Spinner-DuxJLLNE.js.map → Spinner-C5gHXrVz.js.map} +1 -1
  53. package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-CJCSPG1F.js} +297 -301
  54. package/lib/{SyntaxHighlight-Bz-lOJtH.js.map → SyntaxHighlight-CJCSPG1F.js.map} +1 -1
  55. package/lib/{ZudokuContext-hmLMUdf2.js → ZudokuContext-D3ayHjP-.js} +357 -356
  56. package/lib/ZudokuContext-D3ayHjP-.js.map +1 -0
  57. package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-KWlHsT7t.js} +407 -410
  58. package/lib/chunk-SYFQ2XB5-KWlHsT7t.js.map +1 -0
  59. package/lib/context-rwLGh-6_.js +22 -0
  60. package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
  61. package/lib/{createServer-BznDkeSA.js → createServer-BcaswoFO.js} +1274 -1286
  62. package/lib/createServer-BcaswoFO.js.map +1 -0
  63. package/lib/{hook-CHq7pFyz.js → hook-DUyACbIK.js} +17 -17
  64. package/lib/{hook-CHq7pFyz.js.map → hook-DUyACbIK.js.map} +1 -1
  65. package/lib/{index-sD8L1_Dl.js → index-CaILD1AV.js} +132 -132
  66. package/lib/{index-sD8L1_Dl.js.map → index-CaILD1AV.js.map} +1 -1
  67. package/lib/index-Djenk2Hj.js +36 -0
  68. package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
  69. package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
  70. package/lib/index-Dl3Yl0yb.js.map +1 -0
  71. package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
  72. package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
  73. package/lib/index.esm-CrSoEshU.js +1207 -0
  74. package/lib/index.esm-CrSoEshU.js.map +1 -0
  75. package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
  76. package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
  77. package/lib/post-processors/removeExtensions.js +3 -3
  78. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  79. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  80. package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
  81. package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  82. package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
  83. package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  84. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  85. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  86. package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
  87. package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  88. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  89. package/lib/state-mM7uaXTW.js +202 -0
  90. package/lib/state-mM7uaXTW.js.map +1 -0
  91. package/lib/ui/Accordion.js +1 -1
  92. package/lib/ui/ActionButton.js +3 -3
  93. package/lib/ui/Alert.js +2 -2
  94. package/lib/ui/AlertDialog.js +1 -1
  95. package/lib/ui/Badge.js +3 -2
  96. package/lib/ui/Badge.js.map +1 -1
  97. package/lib/ui/Breadcrumb.js +1 -1
  98. package/lib/ui/Button.js +2 -2
  99. package/lib/ui/Callout.js +1 -1
  100. package/lib/ui/Card.js +1 -1
  101. package/lib/ui/Carousel.js +3 -3
  102. package/lib/ui/Carousel.js.map +1 -1
  103. package/lib/ui/Checkbox.js +2 -2
  104. package/lib/ui/Command.js +2 -2
  105. package/lib/ui/Dialog.js +1 -1
  106. package/lib/ui/Drawer.js +520 -519
  107. package/lib/ui/Drawer.js.map +1 -1
  108. package/lib/ui/DropdownMenu.js +1 -1
  109. package/lib/ui/Form.js +2 -2
  110. package/lib/ui/HoverCard.js +1 -1
  111. package/lib/ui/Input.js +1 -1
  112. package/lib/ui/Label.js +2 -2
  113. package/lib/ui/Pagination.js +7 -7
  114. package/lib/ui/Popover.js +1 -1
  115. package/lib/ui/Progress.js +1 -1
  116. package/lib/ui/RadioGroup.js +1 -1
  117. package/lib/ui/ScrollArea.js +1 -1
  118. package/lib/ui/Select.js +1 -1
  119. package/lib/ui/Skeleton.js +1 -1
  120. package/lib/ui/Slider.js +1 -1
  121. package/lib/ui/Switch.js +1 -1
  122. package/lib/ui/Tabs.js +1 -1
  123. package/lib/ui/Textarea.js +1 -1
  124. package/lib/ui/Toggle.js +2 -2
  125. package/lib/ui/ToggleGroup.js +1 -1
  126. package/lib/ui/Tooltip.js +1 -1
  127. package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-BBHR7aLM.js} +2 -2
  128. package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-BBHR7aLM.js.map} +1 -1
  129. package/lib/zudoku.auth-auth0.js +1 -1
  130. package/lib/zudoku.auth-clerk.js +18 -18
  131. package/lib/zudoku.auth-openid.js +5 -5
  132. package/lib/zudoku.components.js +492 -477
  133. package/lib/zudoku.components.js.map +1 -1
  134. package/lib/zudoku.plugin-api-catalog.js +5 -5
  135. package/lib/zudoku.plugin-api-keys.js +7 -7
  136. package/lib/zudoku.plugin-custom-pages.js +3 -3
  137. package/lib/zudoku.plugin-markdown.js +2 -2
  138. package/lib/zudoku.plugin-openapi.js +5 -5
  139. package/lib/zudoku.plugin-redirect.js +1 -1
  140. package/lib/zudoku.plugin-search-inkeep.js +9 -9
  141. package/package.json +48 -48
  142. package/src/lib/components/navigation/SidebarCategory.tsx +2 -2
  143. package/src/lib/plugins/openapi/OperationList.tsx +4 -0
  144. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -5
  145. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +8 -2
  146. package/src/lib/plugins/openapi/Sidecar.tsx +14 -7
  147. package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
  148. package/src/lib/plugins/openapi/SidecarExamples.tsx +14 -6
  149. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +1 -1
  150. package/src/lib/ui/Badge.tsx +1 -0
  151. package/lib/Command-9x_kZHr4.js.map +0 -1
  152. package/lib/OperationList-B8bHMKme.js.map +0 -1
  153. package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
  154. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
  155. package/lib/context-h_UkBLvr.js +0 -22
  156. package/lib/createServer-BznDkeSA.js.map +0 -1
  157. package/lib/index-CBXSgjaE.js.map +0 -1
  158. package/lib/index-CPNSgwSb.js +0 -36
  159. package/lib/index.esm-BnnBRKJX.js +0 -1214
  160. package/lib/index.esm-BnnBRKJX.js.map +0 -1
  161. package/lib/state-CFQsUZUP.js +0 -202
  162. package/lib/state-CFQsUZUP.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  var _e = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var be = (t, e, s) => e.has(t) || _e("Cannot " + s);
5
- var i = (t, e, s) => (be(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (be(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), b = (t, e, s) => (be(t, e, "access private method"), s);
4
+ var me = (t, e, s) => e.has(t) || _e("Cannot " + s);
5
+ var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), f = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), m = (t, e, s) => (me(t, e, "access private method"), s);
6
6
  import * as T from "react";
7
7
  import { createContext as ft, useContext as yt } from "react";
8
- import { j as pt } from "./jsx-runtime-Dx-03ztt.js";
9
- import { u as pe, m as vt } from "./chunk-D52XG6IA-Dl7HLe6j.js";
8
+ import { j as pt } from "./jsx-runtime-Bdg6XQ1m.js";
9
+ import { u as pe, m as bt } from "./chunk-SYFQ2XB5-KWlHsT7t.js";
10
10
  var Qe = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -29,7 +29,7 @@ function ge() {
29
29
  function Zt(t, e) {
30
30
  return typeof t == "function" ? t(e) : t;
31
31
  }
32
- function Re(t) {
32
+ function Se(t) {
33
33
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
34
34
  }
35
35
  function et(t, e) {
@@ -45,14 +45,14 @@ function Wt(t, e) {
45
45
  const {
46
46
  type: s = "all",
47
47
  exact: r,
48
- fetchStatus: n,
49
- predicate: u,
48
+ fetchStatus: i,
49
+ predicate: o,
50
50
  queryKey: a,
51
- stale: o
51
+ stale: u
52
52
  } = t;
53
53
  if (a) {
54
54
  if (r) {
55
- if (e.queryHash !== bt(a, e.options))
55
+ if (e.queryHash !== mt(a, e.options))
56
56
  return !1;
57
57
  } else if (!qe(e.queryKey, a))
58
58
  return !1;
@@ -62,28 +62,28 @@ function Wt(t, e) {
62
62
  if (s === "active" && !l || s === "inactive" && l)
63
63
  return !1;
64
64
  }
65
- return !(typeof o == "boolean" && e.isStale() !== o || n && n !== e.state.fetchStatus || u && !u(e));
65
+ return !(typeof u == "boolean" && e.isStale() !== u || i && i !== e.state.fetchStatus || o && !o(e));
66
66
  }
67
67
  function Jt(t, e) {
68
- const { exact: s, status: r, predicate: n, mutationKey: u } = t;
69
- if (u) {
68
+ const { exact: s, status: r, predicate: i, mutationKey: o } = t;
69
+ if (o) {
70
70
  if (!e.options.mutationKey)
71
71
  return !1;
72
72
  if (s) {
73
- if (Se(e.options.mutationKey) !== Se(u))
73
+ if (Re(e.options.mutationKey) !== Re(o))
74
74
  return !1;
75
- } else if (!qe(e.options.mutationKey, u))
75
+ } else if (!qe(e.options.mutationKey, o))
76
76
  return !1;
77
77
  }
78
- return !(r && e.state.status !== r || n && !n(e));
78
+ return !(r && e.state.status !== r || i && !i(e));
79
79
  }
80
- function bt(t, e) {
81
- return ((e == null ? void 0 : e.queryKeyHashFn) || Se)(t);
80
+ function mt(t, e) {
81
+ return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
82
82
  }
83
- function Se(t) {
83
+ function Re(t) {
84
84
  return JSON.stringify(
85
85
  t,
86
- (e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
86
+ (e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s
87
87
  );
88
88
  }
89
89
  function qe(t, e) {
@@ -94,13 +94,13 @@ function Ce(t, e) {
94
94
  return t;
95
95
  const s = He(t) && He(e);
96
96
  if (s || Ee(t) && Ee(e)) {
97
- const r = s ? t : Object.keys(t), n = r.length, u = s ? e : Object.keys(e), a = u.length, o = s ? [] : {};
97
+ const r = s ? t : Object.keys(t), i = r.length, o = s ? e : Object.keys(e), a = o.length, u = s ? [] : {};
98
98
  let l = 0;
99
- for (let R = 0; R < a; R++) {
100
- const v = s ? R : u[R];
101
- (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] = Ce(t[v], e[v]), o[v] === t[v] && t[v] !== void 0 && l++);
99
+ for (let S = 0; S < a; S++) {
100
+ const v = s ? S : o[S];
101
+ (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (u[v] = void 0, l++) : (u[v] = Ce(t[v], e[v]), u[v] === t[v] && t[v] !== void 0 && l++);
102
102
  }
103
- return n === a && l === n ? t : o;
103
+ return i === a && l === i ? t : u;
104
104
  }
105
105
  return e;
106
106
  }
@@ -127,7 +127,7 @@ function Ee(t) {
127
127
  function Be(t) {
128
128
  return Object.prototype.toString.call(t) === "[object Object]";
129
129
  }
130
- function mt(t) {
130
+ function vt(t) {
131
131
  return new Promise((e) => {
132
132
  setTimeout(e, t);
133
133
  });
@@ -162,12 +162,12 @@ function gt(t, e) {
162
162
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
163
163
  ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ye ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
164
164
  }
165
- var K, q, J, Ze, Rt = (Ze = class extends Qe {
165
+ var K, q, J, Ze, St = (Ze = class extends Qe {
166
166
  constructor() {
167
167
  super();
168
- y(this, K);
169
- y(this, q);
170
- y(this, J);
168
+ f(this, K);
169
+ f(this, q);
170
+ f(this, J);
171
171
  c(this, J, (e) => {
172
172
  if (!V && window.addEventListener) {
173
173
  const s = () => e();
@@ -178,20 +178,20 @@ var K, q, J, Ze, Rt = (Ze = class extends Qe {
178
178
  });
179
179
  }
180
180
  onSubscribe() {
181
- i(this, q) || this.setEventListener(i(this, J));
181
+ n(this, q) || this.setEventListener(n(this, J));
182
182
  }
183
183
  onUnsubscribe() {
184
184
  var e;
185
- this.hasListeners() || ((e = i(this, q)) == null || e.call(this), c(this, q, void 0));
185
+ this.hasListeners() || ((e = n(this, q)) == null || e.call(this), c(this, q, void 0));
186
186
  }
187
187
  setEventListener(e) {
188
188
  var s;
189
- c(this, J, e), (s = i(this, q)) == null || s.call(this), c(this, q, e((r) => {
189
+ c(this, J, e), (s = n(this, q)) == null || s.call(this), c(this, q, e((r) => {
190
190
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
191
191
  }));
192
192
  }
193
193
  setFocused(e) {
194
- i(this, K) !== e && (c(this, K, e), this.onFocus());
194
+ n(this, K) !== e && (c(this, K, e), this.onFocus());
195
195
  }
196
196
  onFocus() {
197
197
  const e = this.isFocused();
@@ -201,14 +201,14 @@ var K, q, J, Ze, Rt = (Ze = class extends Qe {
201
201
  }
202
202
  isFocused() {
203
203
  var e;
204
- return typeof i(this, K) == "boolean" ? i(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
204
+ return typeof n(this, K) == "boolean" ? n(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
205
205
  }
206
- }, K = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Ze), tt = new Rt(), X, A, Y, We, St = (We = class extends Qe {
206
+ }, K = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Ze), tt = new St(), X, A, Y, We, Rt = (We = class extends Qe {
207
207
  constructor() {
208
208
  super();
209
- y(this, X, !0);
210
- y(this, A);
211
- y(this, Y);
209
+ f(this, X, !0);
210
+ f(this, A);
211
+ f(this, Y);
212
212
  c(this, Y, (e) => {
213
213
  if (!V && window.addEventListener) {
214
214
  const s = () => e(!0), r = () => e(!1);
@@ -219,45 +219,45 @@ var K, q, J, Ze, Rt = (Ze = class extends Qe {
219
219
  });
220
220
  }
221
221
  onSubscribe() {
222
- i(this, A) || this.setEventListener(i(this, Y));
222
+ n(this, A) || this.setEventListener(n(this, Y));
223
223
  }
224
224
  onUnsubscribe() {
225
225
  var e;
226
- this.hasListeners() || ((e = i(this, A)) == null || e.call(this), c(this, A, void 0));
226
+ this.hasListeners() || ((e = n(this, A)) == null || e.call(this), c(this, A, void 0));
227
227
  }
228
228
  setEventListener(e) {
229
229
  var s;
230
- c(this, Y, e), (s = i(this, A)) == null || s.call(this), c(this, A, e(this.setOnline.bind(this)));
230
+ c(this, Y, e), (s = n(this, A)) == null || s.call(this), c(this, A, e(this.setOnline.bind(this)));
231
231
  }
232
232
  setOnline(e) {
233
- i(this, X) !== e && (c(this, X, e), this.listeners.forEach((r) => {
233
+ n(this, X) !== e && (c(this, X, e), this.listeners.forEach((r) => {
234
234
  r(e);
235
235
  }));
236
236
  }
237
237
  isOnline() {
238
- return i(this, X);
238
+ return n(this, X);
239
239
  }
240
- }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), st = new St();
240
+ }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), st = new Rt();
241
241
  function Fe() {
242
242
  let t, e;
243
- const s = new Promise((n, u) => {
244
- t = n, e = u;
243
+ const s = new Promise((i, o) => {
244
+ t = i, e = o;
245
245
  });
246
246
  s.status = "pending", s.catch(() => {
247
247
  });
248
- function r(n) {
249
- Object.assign(s, n), delete s.resolve, delete s.reject;
248
+ function r(i) {
249
+ Object.assign(s, i), delete s.resolve, delete s.reject;
250
250
  }
251
- return s.resolve = (n) => {
251
+ return s.resolve = (i) => {
252
252
  r({
253
253
  status: "fulfilled",
254
- value: n
255
- }), t(n);
256
- }, s.reject = (n) => {
254
+ value: i
255
+ }), t(i);
256
+ }, s.reject = (i) => {
257
257
  r({
258
258
  status: "rejected",
259
- reason: n
260
- }), e(n);
259
+ reason: i
260
+ }), e(i);
261
261
  }, s;
262
262
  }
263
263
  function Ct(t) {
@@ -266,97 +266,97 @@ function Ct(t) {
266
266
  function rt(t) {
267
267
  return (t ?? "online") === "online" ? st.isOnline() : !0;
268
268
  }
269
- var it = class extends Error {
269
+ var nt = class extends Error {
270
270
  constructor(t) {
271
271
  super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
272
272
  }
273
273
  };
274
- function me(t) {
275
- return t instanceof it;
274
+ function ve(t) {
275
+ return t instanceof nt;
276
276
  }
277
277
  function wt(t) {
278
- let e = !1, s = 0, r = !1, n;
279
- const u = Fe(), a = (f) => {
280
- var g;
281
- r || (m(new it(f)), (g = t.abort) == null || g.call(t));
282
- }, o = () => {
278
+ let e = !1, s = 0, r = !1, i;
279
+ const o = Fe(), a = (b) => {
280
+ var p;
281
+ r || (R(new nt(b)), (p = t.abort) == null || p.call(t));
282
+ }, u = () => {
283
283
  e = !0;
284
284
  }, l = () => {
285
285
  e = !1;
286
- }, R = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), h = (f) => {
287
- var g;
288
- r || (r = !0, (g = t.onSuccess) == null || g.call(t, f), n == null || n(), u.resolve(f));
289
- }, m = (f) => {
290
- var g;
291
- r || (r = !0, (g = t.onError) == null || g.call(t, f), n == null || n(), u.reject(f));
292
- }, S = () => new Promise((f) => {
293
- var g;
294
- n = (P) => {
295
- (r || R()) && f(P);
296
- }, (g = t.onPause) == null || g.call(t);
286
+ }, S = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), h = (b) => {
287
+ var p;
288
+ r || (r = !0, (p = t.onSuccess) == null || p.call(t, b), i == null || i(), o.resolve(b));
289
+ }, R = (b) => {
290
+ var p;
291
+ r || (r = !0, (p = t.onError) == null || p.call(t, b), i == null || i(), o.reject(b));
292
+ }, g = () => new Promise((b) => {
293
+ var p;
294
+ i = (E) => {
295
+ (r || S()) && b(E);
296
+ }, (p = t.onPause) == null || p.call(t);
297
297
  }).then(() => {
298
- var f;
299
- n = void 0, r || (f = t.onContinue) == null || f.call(t);
298
+ var b;
299
+ i = void 0, r || (b = t.onContinue) == null || b.call(t);
300
300
  }), w = () => {
301
301
  if (r)
302
302
  return;
303
- let f;
304
- const g = s === 0 ? t.initialPromise : void 0;
303
+ let b;
304
+ const p = s === 0 ? t.initialPromise : void 0;
305
305
  try {
306
- f = g ?? t.fn();
307
- } catch (P) {
308
- f = Promise.reject(P);
306
+ b = p ?? t.fn();
307
+ } catch (E) {
308
+ b = Promise.reject(E);
309
309
  }
310
- Promise.resolve(f).then(h).catch((P) => {
311
- var ve;
310
+ Promise.resolve(b).then(h).catch((E) => {
311
+ var be;
312
312
  if (r)
313
313
  return;
314
- const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Ct, ce = typeof N == "function" ? N(s, P) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, P);
314
+ const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Ct, ce = typeof N == "function" ? N(s, E) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, E);
315
315
  if (e || !le) {
316
- m(P);
316
+ R(E);
317
317
  return;
318
318
  }
319
- s++, (ve = t.onFail) == null || ve.call(t, s, P), mt(ce).then(() => R() ? void 0 : S()).then(() => {
320
- e ? m(P) : w();
319
+ s++, (be = t.onFail) == null || be.call(t, s, E), vt(ce).then(() => S() ? void 0 : g()).then(() => {
320
+ e ? R(E) : w();
321
321
  });
322
322
  });
323
323
  };
324
324
  return {
325
- promise: u,
325
+ promise: o,
326
326
  cancel: a,
327
- continue: () => (n == null || n(), u),
328
- cancelRetry: o,
327
+ continue: () => (i == null || i(), o),
328
+ cancelRetry: u,
329
329
  continueRetry: l,
330
330
  canStart: v,
331
- start: () => (v() ? w() : S().then(w), u)
331
+ start: () => (v() ? w() : g().then(w), o)
332
332
  };
333
333
  }
334
334
  function Et() {
335
- let t = [], e = 0, s = (o) => {
336
- o();
337
- }, r = (o) => {
338
- o();
339
- }, n = (o) => setTimeout(o, 0);
340
- const u = (o) => {
341
- e ? t.push(o) : n(() => {
342
- s(o);
335
+ let t = [], e = 0, s = (u) => {
336
+ u();
337
+ }, r = (u) => {
338
+ u();
339
+ }, i = (u) => setTimeout(u, 0);
340
+ const o = (u) => {
341
+ e ? t.push(u) : i(() => {
342
+ s(u);
343
343
  });
344
344
  }, a = () => {
345
- const o = t;
346
- t = [], o.length && n(() => {
345
+ const u = t;
346
+ t = [], u.length && i(() => {
347
347
  r(() => {
348
- o.forEach((l) => {
348
+ u.forEach((l) => {
349
349
  s(l);
350
350
  });
351
351
  });
352
352
  });
353
353
  };
354
354
  return {
355
- batch: (o) => {
355
+ batch: (u) => {
356
356
  let l;
357
357
  e++;
358
358
  try {
359
- l = o();
359
+ l = u();
360
360
  } finally {
361
361
  e--, e || a();
362
362
  }
@@ -365,40 +365,40 @@ function Et() {
365
365
  /**
366
366
  * All calls to the wrapped function will be batched.
367
367
  */
368
- batchCalls: (o) => (...l) => {
369
- u(() => {
370
- o(...l);
368
+ batchCalls: (u) => (...l) => {
369
+ o(() => {
370
+ u(...l);
371
371
  });
372
372
  },
373
- schedule: u,
373
+ schedule: o,
374
374
  /**
375
375
  * Use this method to set a custom notify function.
376
376
  * This can be used to for example wrap notifications with `React.act` while running tests.
377
377
  */
378
- setNotifyFunction: (o) => {
379
- s = o;
378
+ setNotifyFunction: (u) => {
379
+ s = u;
380
380
  },
381
381
  /**
382
382
  * Use this method to set a custom function to batch notifications together into a single tick.
383
383
  * By default React Query will use the batch function provided by ReactDOM or React Native.
384
384
  */
385
- setBatchNotifyFunction: (o) => {
386
- r = o;
385
+ setBatchNotifyFunction: (u) => {
386
+ r = u;
387
387
  },
388
- setScheduler: (o) => {
389
- n = o;
388
+ setScheduler: (u) => {
389
+ i = u;
390
390
  }
391
391
  };
392
392
  }
393
393
  var Ae = Et(), _, Je, Ot = (Je = class {
394
394
  constructor() {
395
- y(this, _);
395
+ f(this, _);
396
396
  }
397
397
  destroy() {
398
398
  this.clearGcTimeout();
399
399
  }
400
400
  scheduleGc() {
401
- this.clearGcTimeout(), Re(this.gcTime) && c(this, _, setTimeout(() => {
401
+ this.clearGcTimeout(), Se(this.gcTime) && c(this, _, setTimeout(() => {
402
402
  this.optionalRemove();
403
403
  }, this.gcTime));
404
404
  }
@@ -409,36 +409,36 @@ var Ae = Et(), _, Je, Ot = (Je = class {
409
409
  );
410
410
  }
411
411
  clearGcTimeout() {
412
- i(this, _) && (clearTimeout(i(this, _)), c(this, _, void 0));
412
+ n(this, _) && (clearTimeout(n(this, _)), c(this, _, void 0));
413
413
  }
414
- }, _ = new WeakMap(), Je), ee, te, I, C, oe, H, D, Q, Xe, es = (Xe = class extends Ot {
414
+ }, _ = new WeakMap(), Je), ee, te, I, C, ue, H, D, Q, Xe, es = (Xe = class extends Ot {
415
415
  constructor(e) {
416
416
  super();
417
- y(this, D);
418
- y(this, ee);
419
- y(this, te);
420
- y(this, I);
421
- y(this, C);
422
- y(this, oe);
423
- y(this, H);
424
- c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ft(this.options)), this.state = e.state ?? i(this, ee), this.scheduleGc();
417
+ f(this, D);
418
+ f(this, ee);
419
+ f(this, te);
420
+ f(this, I);
421
+ f(this, C);
422
+ f(this, ue);
423
+ f(this, H);
424
+ c(this, H, !1), c(this, ue, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ft(this.options)), this.state = e.state ?? n(this, ee), this.scheduleGc();
425
425
  }
426
426
  get meta() {
427
427
  return this.options.meta;
428
428
  }
429
429
  get promise() {
430
430
  var e;
431
- return (e = i(this, C)) == null ? void 0 : e.promise;
431
+ return (e = n(this, C)) == null ? void 0 : e.promise;
432
432
  }
433
433
  setOptions(e) {
434
- this.options = { ...i(this, oe), ...e }, this.updateGcTime(this.options.gcTime);
434
+ this.options = { ...n(this, ue), ...e }, this.updateGcTime(this.options.gcTime);
435
435
  }
436
436
  optionalRemove() {
437
- !this.observers.length && this.state.fetchStatus === "idle" && i(this, I).remove(this);
437
+ !this.observers.length && this.state.fetchStatus === "idle" && n(this, I).remove(this);
438
438
  }
439
439
  setData(e, s) {
440
440
  const r = Oe(this.state.data, e, this.options);
441
- return b(this, D, Q).call(this, {
441
+ return m(this, D, Q).call(this, {
442
442
  data: r,
443
443
  type: "success",
444
444
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -446,18 +446,18 @@ var Ae = Et(), _, Je, Ot = (Je = class {
446
446
  }), r;
447
447
  }
448
448
  setState(e, s) {
449
- b(this, D, Q).call(this, { type: "setState", state: e, setStateOptions: s });
449
+ m(this, D, Q).call(this, { type: "setState", state: e, setStateOptions: s });
450
450
  }
451
451
  cancel(e) {
452
- var r, n;
453
- const s = (r = i(this, C)) == null ? void 0 : r.promise;
454
- return (n = i(this, C)) == null || n.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
452
+ var r, i;
453
+ const s = (r = n(this, C)) == null ? void 0 : r.promise;
454
+ return (i = n(this, C)) == null || i.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
455
455
  }
456
456
  destroy() {
457
457
  super.destroy(), this.cancel({ silent: !0 });
458
458
  }
459
459
  reset() {
460
- this.destroy(), this.setState(i(this, ee));
460
+ this.destroy(), this.setState(n(this, ee));
461
461
  }
462
462
  isActive() {
463
463
  return this.observers.some(
@@ -478,76 +478,76 @@ var Ae = Et(), _, Je, Ot = (Je = class {
478
478
  onFocus() {
479
479
  var s;
480
480
  const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
481
- e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
481
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, C)) == null || s.continue();
482
482
  }
483
483
  onOnline() {
484
484
  var s;
485
485
  const e = this.observers.find((r) => r.shouldFetchOnReconnect());
486
- e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
486
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, C)) == null || s.continue();
487
487
  }
488
488
  addObserver(e) {
489
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, I).notify({ type: "observerAdded", query: this, observer: e }));
489
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, I).notify({ type: "observerAdded", query: this, observer: e }));
490
490
  }
491
491
  removeObserver(e) {
492
- this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, C) && (i(this, H) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, I).notify({ type: "observerRemoved", query: this, observer: e }));
492
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, C) && (n(this, H) ? n(this, C).cancel({ revert: !0 }) : n(this, C).cancelRetry()), this.scheduleGc()), n(this, I).notify({ type: "observerRemoved", query: this, observer: e }));
493
493
  }
494
494
  getObserversCount() {
495
495
  return this.observers.length;
496
496
  }
497
497
  invalidate() {
498
- this.state.isInvalidated || b(this, D, Q).call(this, { type: "invalidate" });
498
+ this.state.isInvalidated || m(this, D, Q).call(this, { type: "invalidate" });
499
499
  }
500
500
  fetch(e, s) {
501
- var l, R, v;
501
+ var l, S, v;
502
502
  if (this.state.fetchStatus !== "idle") {
503
503
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
504
504
  this.cancel({ silent: !0 });
505
- else if (i(this, C))
506
- return i(this, C).continueRetry(), i(this, C).promise;
505
+ else if (n(this, C))
506
+ return n(this, C).continueRetry(), n(this, C).promise;
507
507
  }
508
508
  if (e && this.setOptions(e), !this.options.queryFn) {
509
- const h = this.observers.find((m) => m.options.queryFn);
509
+ const h = this.observers.find((R) => R.options.queryFn);
510
510
  h && this.setOptions(h.options);
511
511
  }
512
512
  process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
513
513
  "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
514
514
  ));
515
- const r = new AbortController(), n = (h) => {
515
+ const r = new AbortController(), i = (h) => {
516
516
  Object.defineProperty(h, "signal", {
517
517
  enumerable: !0,
518
518
  get: () => (c(this, H, !0), r.signal)
519
519
  });
520
- }, u = () => {
521
- const h = gt(this.options, s), m = {
520
+ }, o = () => {
521
+ const h = gt(this.options, s), R = {
522
522
  queryKey: this.queryKey,
523
523
  meta: this.meta
524
524
  };
525
- return n(m), c(this, H, !1), this.options.persister ? this.options.persister(
525
+ return i(R), c(this, H, !1), this.options.persister ? this.options.persister(
526
526
  h,
527
- m,
527
+ R,
528
528
  this
529
- ) : h(m);
529
+ ) : h(R);
530
530
  }, a = {
531
531
  fetchOptions: s,
532
532
  options: this.options,
533
533
  queryKey: this.queryKey,
534
534
  state: this.state,
535
- fetchFn: u
535
+ fetchFn: o
536
536
  };
537
- n(a), (l = this.options.behavior) == null || l.onFetch(
537
+ i(a), (l = this.options.behavior) == null || l.onFetch(
538
538
  a,
539
539
  this
540
- ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = a.fetchOptions) == null ? void 0 : R.meta)) && b(this, D, Q).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
541
- const o = (h) => {
542
- var m, S, w, f;
543
- me(h) && h.silent || b(this, D, Q).call(this, {
540
+ ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((S = a.fetchOptions) == null ? void 0 : S.meta)) && m(this, D, Q).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
541
+ const u = (h) => {
542
+ var R, g, w, b;
543
+ ve(h) && h.silent || m(this, D, Q).call(this, {
544
544
  type: "error",
545
545
  error: h
546
- }), me(h) || ((S = (m = i(this, I).config).onError) == null || S.call(
547
- m,
546
+ }), ve(h) || ((g = (R = n(this, I).config).onError) == null || g.call(
547
+ R,
548
548
  h,
549
549
  this
550
- ), (f = (w = i(this, I).config).onSettled) == null || f.call(
550
+ ), (b = (w = n(this, I).config).onSettled) == null || b.call(
551
551
  w,
552
552
  this.state.data,
553
553
  h,
@@ -559,43 +559,43 @@ var Ae = Et(), _, Je, Ot = (Je = class {
559
559
  fn: a.fetchFn,
560
560
  abort: r.abort.bind(r),
561
561
  onSuccess: (h) => {
562
- var m, S, w, f;
562
+ var R, g, w, b;
563
563
  if (h === void 0) {
564
564
  process.env.NODE_ENV !== "production" && console.error(
565
565
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
566
- ), o(new Error(`${this.queryHash} data is undefined`));
566
+ ), u(new Error(`${this.queryHash} data is undefined`));
567
567
  return;
568
568
  }
569
569
  try {
570
570
  this.setData(h);
571
- } catch (g) {
572
- o(g);
571
+ } catch (p) {
572
+ u(p);
573
573
  return;
574
574
  }
575
- (S = (m = i(this, I).config).onSuccess) == null || S.call(m, h, this), (f = (w = i(this, I).config).onSettled) == null || f.call(
575
+ (g = (R = n(this, I).config).onSuccess) == null || g.call(R, h, this), (b = (w = n(this, I).config).onSettled) == null || b.call(
576
576
  w,
577
577
  h,
578
578
  this.state.error,
579
579
  this
580
580
  ), this.scheduleGc();
581
581
  },
582
- onError: o,
583
- onFail: (h, m) => {
584
- b(this, D, Q).call(this, { type: "failed", failureCount: h, error: m });
582
+ onError: u,
583
+ onFail: (h, R) => {
584
+ m(this, D, Q).call(this, { type: "failed", failureCount: h, error: R });
585
585
  },
586
586
  onPause: () => {
587
- b(this, D, Q).call(this, { type: "pause" });
587
+ m(this, D, Q).call(this, { type: "pause" });
588
588
  },
589
589
  onContinue: () => {
590
- b(this, D, Q).call(this, { type: "continue" });
590
+ m(this, D, Q).call(this, { type: "continue" });
591
591
  },
592
592
  retry: a.options.retry,
593
593
  retryDelay: a.options.retryDelay,
594
594
  networkMode: a.options.networkMode,
595
595
  canRun: () => !0
596
- })), i(this, C).start();
596
+ })), n(this, C).start();
597
597
  }
598
- }, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(), C = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), D = new WeakSet(), Q = function(e) {
598
+ }, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(), C = new WeakMap(), ue = new WeakMap(), H = new WeakMap(), D = new WeakSet(), Q = function(e) {
599
599
  const s = (r) => {
600
600
  switch (e.type) {
601
601
  case "failed":
@@ -617,7 +617,7 @@ var Ae = Et(), _, Je, Ot = (Je = class {
617
617
  case "fetch":
618
618
  return {
619
619
  ...r,
620
- ...nt(r.data, this.options),
620
+ ...it(r.data, this.options),
621
621
  fetchMeta: e.meta ?? null
622
622
  };
623
623
  case "success":
@@ -636,14 +636,14 @@ var Ae = Et(), _, Je, Ot = (Je = class {
636
636
  }
637
637
  };
638
638
  case "error":
639
- const n = e.error;
640
- return me(n) && n.revert && i(this, te) ? { ...i(this, te), fetchStatus: "idle" } : {
639
+ const i = e.error;
640
+ return ve(i) && i.revert && n(this, te) ? { ...n(this, te), fetchStatus: "idle" } : {
641
641
  ...r,
642
- error: n,
642
+ error: i,
643
643
  errorUpdateCount: r.errorUpdateCount + 1,
644
644
  errorUpdatedAt: Date.now(),
645
645
  fetchFailureCount: r.fetchFailureCount + 1,
646
- fetchFailureReason: n,
646
+ fetchFailureReason: i,
647
647
  fetchStatus: "idle",
648
648
  status: "error"
649
649
  };
@@ -662,10 +662,10 @@ var Ae = Et(), _, Je, Ot = (Je = class {
662
662
  this.state = s(this.state), Ae.batch(() => {
663
663
  this.observers.forEach((r) => {
664
664
  r.onQueryUpdate();
665
- }), i(this, I).notify({ query: this, type: "updated", action: e });
665
+ }), n(this, I).notify({ query: this, type: "updated", action: e });
666
666
  });
667
667
  }, Xe);
668
- function nt(t, e) {
668
+ function it(t, e) {
669
669
  return {
670
670
  fetchFailureCount: 0,
671
671
  fetchFailureReason: null,
@@ -693,28 +693,28 @@ function Ft(t) {
693
693
  fetchStatus: "idle"
694
694
  };
695
695
  }
696
- var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe, je, ke, ot, Ye, at = (Ye = class extends Qe {
696
+ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe, je, ke, ut, Ye, at = (Ye = class extends Qe {
697
697
  constructor(e, s) {
698
698
  super();
699
- y(this, p);
700
- y(this, F);
701
- y(this, d);
702
- y(this, ue);
703
- y(this, O);
704
- y(this, B);
705
- y(this, se);
706
- y(this, L);
707
- y(this, k);
708
- y(this, he);
709
- y(this, re);
699
+ f(this, y);
700
+ f(this, P);
701
+ f(this, d);
702
+ f(this, oe);
703
+ f(this, F);
704
+ f(this, B);
705
+ f(this, se);
706
+ f(this, M);
707
+ f(this, k);
708
+ f(this, he);
709
+ f(this, re);
710
710
  // This property keeps track of the last query with defined data.
711
711
  // It will be used to pass the previous data and query to the placeholder function between renders.
712
- y(this, ie);
713
- y(this, G);
714
- y(this, z);
715
- y(this, M);
716
- y(this, ne, /* @__PURE__ */ new Set());
717
- this.options = s, c(this, F, e), c(this, k, null), c(this, L, Fe()), this.options.experimental_prefetchInRender || i(this, L).reject(
712
+ f(this, ne);
713
+ f(this, G);
714
+ f(this, z);
715
+ f(this, L);
716
+ f(this, ie, /* @__PURE__ */ new Set());
717
+ this.options = s, c(this, P, e), c(this, k, null), c(this, M, Fe()), this.options.experimental_prefetchInRender || n(this, M).reject(
718
718
  new Error("experimental_prefetchInRender feature flag is not enabled")
719
719
  ), this.bindMethods(), this.setOptions(s);
720
720
  }
@@ -722,71 +722,71 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe
722
722
  this.refetch = this.refetch.bind(this);
723
723
  }
724
724
  onSubscribe() {
725
- this.listeners.size === 1 && (i(this, d).addObserver(this), Ge(i(this, d), this.options) ? b(this, p, ae).call(this) : this.updateResult(), b(this, p, De).call(this));
725
+ this.listeners.size === 1 && (n(this, d).addObserver(this), Ge(n(this, d), this.options) ? m(this, y, ae).call(this) : this.updateResult(), m(this, y, De).call(this));
726
726
  }
727
727
  onUnsubscribe() {
728
728
  this.hasListeners() || this.destroy();
729
729
  }
730
730
  shouldFetchOnReconnect() {
731
731
  return Ue(
732
- i(this, d),
732
+ n(this, d),
733
733
  this.options,
734
734
  this.options.refetchOnReconnect
735
735
  );
736
736
  }
737
737
  shouldFetchOnWindowFocus() {
738
738
  return Ue(
739
- i(this, d),
739
+ n(this, d),
740
740
  this.options,
741
741
  this.options.refetchOnWindowFocus
742
742
  );
743
743
  }
744
744
  destroy() {
745
- this.listeners = /* @__PURE__ */ new Set(), b(this, p, xe).call(this), b(this, p, je).call(this), i(this, d).removeObserver(this);
745
+ this.listeners = /* @__PURE__ */ new Set(), m(this, y, xe).call(this), m(this, y, je).call(this), n(this, d).removeObserver(this);
746
746
  }
747
747
  setOptions(e, s) {
748
- const r = this.options, n = i(this, d);
749
- if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, i(this, d)) != "boolean")
748
+ const r = this.options, i = n(this, d);
749
+ if (this.options = n(this, P).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, d)) != "boolean")
750
750
  throw new Error(
751
751
  "Expected enabled to be a boolean or a callback that returns a boolean"
752
752
  );
753
- b(this, p, ke).call(this), i(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && i(this, F).getQueryCache().notify({
753
+ m(this, y, ke).call(this), n(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && n(this, P).getQueryCache().notify({
754
754
  type: "observerOptionsUpdated",
755
- query: i(this, d),
755
+ query: n(this, d),
756
756
  observer: this
757
757
  });
758
- const u = this.hasListeners();
759
- u && ze(
760
- i(this, d),
761
- n,
758
+ const o = this.hasListeners();
759
+ o && ze(
760
+ n(this, d),
761
+ i,
762
762
  this.options,
763
763
  r
764
- ) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || fe(this.options.staleTime, i(this, d)) !== fe(r.staleTime, i(this, d))) && b(this, p, Pe).call(this);
765
- const a = b(this, p, Ie).call(this);
766
- u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || a !== i(this, M)) && b(this, p, Te).call(this, a);
764
+ ) && m(this, y, ae).call(this), this.updateResult(s), o && (n(this, d) !== i || x(this.options.enabled, n(this, d)) !== x(r.enabled, n(this, d)) || fe(this.options.staleTime, n(this, d)) !== fe(r.staleTime, n(this, d))) && m(this, y, Pe).call(this);
765
+ const a = m(this, y, Ie).call(this);
766
+ o && (n(this, d) !== i || x(this.options.enabled, n(this, d)) !== x(r.enabled, n(this, d)) || a !== n(this, L)) && m(this, y, Te).call(this, a);
767
767
  }
768
768
  getOptimisticResult(e) {
769
- const s = i(this, F).getQueryCache().build(i(this, F), e), r = this.createResult(s, e);
770
- return It(this, r) && (c(this, O, r), c(this, se, this.options), c(this, B, i(this, d).state)), r;
769
+ const s = n(this, P).getQueryCache().build(n(this, P), e), r = this.createResult(s, e);
770
+ return It(this, r) && (c(this, F, r), c(this, se, this.options), c(this, B, n(this, d).state)), r;
771
771
  }
772
772
  getCurrentResult() {
773
- return i(this, O);
773
+ return n(this, F);
774
774
  }
775
775
  trackResult(e, s) {
776
776
  const r = {};
777
- return Object.keys(e).forEach((n) => {
778
- Object.defineProperty(r, n, {
777
+ return Object.keys(e).forEach((i) => {
778
+ Object.defineProperty(r, i, {
779
779
  configurable: !1,
780
780
  enumerable: !0,
781
- get: () => (this.trackProp(n), s == null || s(n), e[n])
781
+ get: () => (this.trackProp(i), s == null || s(i), e[i])
782
782
  });
783
783
  }), r;
784
784
  }
785
785
  trackProp(e) {
786
- i(this, ne).add(e);
786
+ n(this, ie).add(e);
787
787
  }
788
788
  getCurrentQuery() {
789
- return i(this, d);
789
+ return n(this, d);
790
790
  }
791
791
  refetch({ ...e } = {}) {
792
792
  return this.fetch({
@@ -794,95 +794,95 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe
794
794
  });
795
795
  }
796
796
  fetchOptimistic(e) {
797
- const s = i(this, F).defaultQueryOptions(e), r = i(this, F).getQueryCache().build(i(this, F), s);
797
+ const s = n(this, P).defaultQueryOptions(e), r = n(this, P).getQueryCache().build(n(this, P), s);
798
798
  return r.fetch().then(() => this.createResult(r, s));
799
799
  }
800
800
  fetch(e) {
801
- return b(this, p, ae).call(this, {
801
+ return m(this, y, ae).call(this, {
802
802
  ...e,
803
803
  cancelRefetch: e.cancelRefetch ?? !0
804
- }).then(() => (this.updateResult(), i(this, O)));
804
+ }).then(() => (this.updateResult(), n(this, F)));
805
805
  }
806
806
  createResult(e, s) {
807
807
  var Ke;
808
- const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se), R = e !== r ? e.state : i(this, ue), { state: v } = e;
809
- let h = { ...v }, m = !1, S;
808
+ const r = n(this, d), i = this.options, o = n(this, F), a = n(this, B), u = n(this, se), S = e !== r ? e.state : n(this, oe), { state: v } = e;
809
+ let h = { ...v }, R = !1, g;
810
810
  if (s._optimisticResults) {
811
- const E = this.hasListeners(), Z = !E && Ge(e, s), W = E && ze(e, r, s, n);
811
+ const O = this.hasListeners(), Z = !O && Ge(e, s), W = O && ze(e, r, s, i);
812
812
  (Z || W) && (h = {
813
813
  ...h,
814
- ...nt(v.data, e.options)
814
+ ...it(v.data, e.options)
815
815
  }), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
816
816
  }
817
- let { error: w, errorUpdatedAt: f, status: g } = h;
817
+ let { error: w, errorUpdatedAt: b, status: p } = h;
818
818
  if (s.select && h.data !== void 0)
819
- if (u && h.data === (a == null ? void 0 : a.data) && s.select === i(this, he))
820
- S = i(this, re);
819
+ if (o && h.data === (a == null ? void 0 : a.data) && s.select === n(this, he))
820
+ g = n(this, re);
821
821
  else
822
822
  try {
823
- c(this, he, s.select), S = s.select(h.data), S = Oe(u == null ? void 0 : u.data, S, s), c(this, re, S), c(this, k, null);
824
- } catch (E) {
825
- c(this, k, E);
823
+ c(this, he, s.select), g = s.select(h.data), g = Oe(o == null ? void 0 : o.data, g, s), c(this, re, g), c(this, k, null);
824
+ } catch (O) {
825
+ c(this, k, O);
826
826
  }
827
827
  else
828
- S = h.data;
829
- if (s.placeholderData !== void 0 && S === void 0 && g === "pending") {
830
- let E;
831
- if (u != null && u.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
832
- E = u.data;
833
- else if (E = typeof s.placeholderData == "function" ? s.placeholderData(
834
- (Ke = i(this, ie)) == null ? void 0 : Ke.state.data,
835
- i(this, ie)
836
- ) : s.placeholderData, s.select && E !== void 0)
828
+ g = h.data;
829
+ if (s.placeholderData !== void 0 && g === void 0 && p === "pending") {
830
+ let O;
831
+ if (o != null && o.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
832
+ O = o.data;
833
+ else if (O = typeof s.placeholderData == "function" ? s.placeholderData(
834
+ (Ke = n(this, ne)) == null ? void 0 : Ke.state.data,
835
+ n(this, ne)
836
+ ) : s.placeholderData, s.select && O !== void 0)
837
837
  try {
838
- E = s.select(E), c(this, k, null);
838
+ O = s.select(O), c(this, k, null);
839
839
  } catch (Z) {
840
840
  c(this, k, Z);
841
841
  }
842
- E !== void 0 && (g = "success", S = Oe(
843
- u == null ? void 0 : u.data,
844
- E,
842
+ O !== void 0 && (p = "success", g = Oe(
843
+ o == null ? void 0 : o.data,
844
+ O,
845
845
  s
846
- ), m = !0);
846
+ ), R = !0);
847
847
  }
848
- i(this, k) && (w = i(this, k), S = i(this, re), f = Date.now(), g = "error");
849
- const P = h.fetchStatus === "fetching", U = g === "pending", N = g === "error", ce = U && P, le = S !== void 0, j = {
850
- status: g,
848
+ n(this, k) && (w = n(this, k), g = n(this, re), b = Date.now(), p = "error");
849
+ const E = h.fetchStatus === "fetching", U = p === "pending", N = p === "error", ce = U && E, le = g !== void 0, j = {
850
+ status: p,
851
851
  fetchStatus: h.fetchStatus,
852
852
  isPending: U,
853
- isSuccess: g === "success",
853
+ isSuccess: p === "success",
854
854
  isError: N,
855
855
  isInitialLoading: ce,
856
856
  isLoading: ce,
857
- data: S,
857
+ data: g,
858
858
  dataUpdatedAt: h.dataUpdatedAt,
859
859
  error: w,
860
- errorUpdatedAt: f,
860
+ errorUpdatedAt: b,
861
861
  failureCount: h.fetchFailureCount,
862
862
  failureReason: h.fetchFailureReason,
863
863
  errorUpdateCount: h.errorUpdateCount,
864
864
  isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
865
- isFetchedAfterMount: h.dataUpdateCount > R.dataUpdateCount || h.errorUpdateCount > R.errorUpdateCount,
866
- isFetching: P,
867
- isRefetching: P && !U,
865
+ isFetchedAfterMount: h.dataUpdateCount > S.dataUpdateCount || h.errorUpdateCount > S.errorUpdateCount,
866
+ isFetching: E,
867
+ isRefetching: E && !U,
868
868
  isLoadingError: N && !le,
869
869
  isPaused: h.fetchStatus === "paused",
870
- isPlaceholderData: m,
870
+ isPlaceholderData: R,
871
871
  isRefetchError: N && le,
872
- isStale: Le(e, s),
872
+ isStale: Me(e, s),
873
873
  refetch: this.refetch,
874
- promise: i(this, L)
874
+ promise: n(this, M)
875
875
  };
876
876
  if (this.options.experimental_prefetchInRender) {
877
- const E = (de) => {
877
+ const O = (de) => {
878
878
  j.status === "error" ? de.reject(j.error) : j.data !== void 0 && de.resolve(j.data);
879
879
  }, Z = () => {
880
- const de = c(this, L, j.promise = Fe());
881
- E(de);
882
- }, W = i(this, L);
880
+ const de = c(this, M, j.promise = Fe());
881
+ O(de);
882
+ }, W = n(this, M);
883
883
  switch (W.status) {
884
884
  case "pending":
885
- e.queryHash === r.queryHash && E(W);
885
+ e.queryHash === r.queryHash && O(W);
886
886
  break;
887
887
  case "fulfilled":
888
888
  (j.status === "error" || j.data !== W.value) && Z();
@@ -895,72 +895,72 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe
895
895
  return j;
896
896
  }
897
897
  updateResult(e) {
898
- const s = i(this, O), r = this.createResult(i(this, d), this.options);
899
- if (c(this, B, i(this, d).state), c(this, se, this.options), i(this, B).data !== void 0 && c(this, ie, i(this, d)), we(r, s))
898
+ const s = n(this, F), r = this.createResult(n(this, d), this.options);
899
+ if (c(this, B, n(this, d).state), c(this, se, this.options), n(this, B).data !== void 0 && c(this, ne, n(this, d)), we(r, s))
900
900
  return;
901
- c(this, O, r);
902
- const n = {}, u = () => {
901
+ c(this, F, r);
902
+ const i = {}, o = () => {
903
903
  if (!s)
904
904
  return !0;
905
- const { notifyOnChangeProps: a } = this.options, o = typeof a == "function" ? a() : a;
906
- if (o === "all" || !o && !i(this, ne).size)
905
+ const { notifyOnChangeProps: a } = this.options, u = typeof a == "function" ? a() : a;
906
+ if (u === "all" || !u && !n(this, ie).size)
907
907
  return !0;
908
908
  const l = new Set(
909
- o ?? i(this, ne)
909
+ u ?? n(this, ie)
910
910
  );
911
- return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((R) => {
912
- const v = R;
913
- return i(this, O)[v] !== s[v] && l.has(v);
911
+ return this.options.throwOnError && l.add("error"), Object.keys(n(this, F)).some((S) => {
912
+ const v = S;
913
+ return n(this, F)[v] !== s[v] && l.has(v);
914
914
  });
915
915
  };
916
- (e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p, ot).call(this, { ...n, ...e });
916
+ (e == null ? void 0 : e.listeners) !== !1 && o() && (i.listeners = !0), m(this, y, ut).call(this, { ...i, ...e });
917
917
  }
918
918
  onQueryUpdate() {
919
- this.updateResult(), this.hasListeners() && b(this, p, De).call(this);
919
+ this.updateResult(), this.hasListeners() && m(this, y, De).call(this);
920
920
  }
921
- }, F = new WeakMap(), d = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), B = new WeakMap(), se = new WeakMap(), L = new WeakMap(), k = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), G = new WeakMap(), z = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), p = new WeakSet(), ae = function(e) {
922
- b(this, p, ke).call(this);
923
- let s = i(this, d).fetch(
921
+ }, P = new WeakMap(), d = new WeakMap(), oe = new WeakMap(), F = new WeakMap(), B = new WeakMap(), se = new WeakMap(), M = new WeakMap(), k = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), G = new WeakMap(), z = new WeakMap(), L = new WeakMap(), ie = new WeakMap(), y = new WeakSet(), ae = function(e) {
922
+ m(this, y, ke).call(this);
923
+ let s = n(this, d).fetch(
924
924
  this.options,
925
925
  e
926
926
  );
927
927
  return e != null && e.throwOnError || (s = s.catch(ge)), s;
928
928
  }, Pe = function() {
929
- b(this, p, xe).call(this);
929
+ m(this, y, xe).call(this);
930
930
  const e = fe(
931
931
  this.options.staleTime,
932
- i(this, d)
932
+ n(this, d)
933
933
  );
934
- if (V || i(this, O).isStale || !Re(e))
934
+ if (V || n(this, F).isStale || !Se(e))
935
935
  return;
936
- const r = et(i(this, O).dataUpdatedAt, e) + 1;
936
+ const r = et(n(this, F).dataUpdatedAt, e) + 1;
937
937
  c(this, G, setTimeout(() => {
938
- i(this, O).isStale || this.updateResult();
938
+ n(this, F).isStale || this.updateResult();
939
939
  }, r));
940
940
  }, Ie = function() {
941
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
941
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, d)) : this.options.refetchInterval) ?? !1;
942
942
  }, Te = function(e) {
943
- b(this, p, je).call(this), c(this, M, e), !(V || x(this.options.enabled, i(this, d)) === !1 || !Re(i(this, M)) || i(this, M) === 0) && c(this, z, setInterval(() => {
944
- (this.options.refetchIntervalInBackground || tt.isFocused()) && b(this, p, ae).call(this);
945
- }, i(this, M)));
943
+ m(this, y, je).call(this), c(this, L, e), !(V || x(this.options.enabled, n(this, d)) === !1 || !Se(n(this, L)) || n(this, L) === 0) && c(this, z, setInterval(() => {
944
+ (this.options.refetchIntervalInBackground || tt.isFocused()) && m(this, y, ae).call(this);
945
+ }, n(this, L)));
946
946
  }, De = function() {
947
- b(this, p, Pe).call(this), b(this, p, Te).call(this, b(this, p, Ie).call(this));
947
+ m(this, y, Pe).call(this), m(this, y, Te).call(this, m(this, y, Ie).call(this));
948
948
  }, xe = function() {
949
- i(this, G) && (clearTimeout(i(this, G)), c(this, G, void 0));
949
+ n(this, G) && (clearTimeout(n(this, G)), c(this, G, void 0));
950
950
  }, je = function() {
951
- i(this, z) && (clearInterval(i(this, z)), c(this, z, void 0));
951
+ n(this, z) && (clearInterval(n(this, z)), c(this, z, void 0));
952
952
  }, ke = function() {
953
- const e = i(this, F).getQueryCache().build(i(this, F), this.options);
954
- if (e === i(this, d))
953
+ const e = n(this, P).getQueryCache().build(n(this, P), this.options);
954
+ if (e === n(this, d))
955
955
  return;
956
- const s = i(this, d);
957
- c(this, d, e), c(this, ue, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
958
- }, ot = function(e) {
956
+ const s = n(this, d);
957
+ c(this, d, e), c(this, oe, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
958
+ }, ut = function(e) {
959
959
  Ae.batch(() => {
960
960
  e.listeners && this.listeners.forEach((s) => {
961
- s(i(this, O));
962
- }), i(this, F).getQueryCache().notify({
963
- query: i(this, d),
961
+ s(n(this, F));
962
+ }), n(this, P).getQueryCache().notify({
963
+ query: n(this, d),
964
964
  type: "observerResultsUpdated"
965
965
  });
966
966
  });
@@ -974,23 +974,23 @@ function Ge(t, e) {
974
974
  function Ue(t, e, s) {
975
975
  if (x(e.enabled, t) !== !1) {
976
976
  const r = typeof s == "function" ? s(t) : s;
977
- return r === "always" || r !== !1 && Le(t, e);
977
+ return r === "always" || r !== !1 && Me(t, e);
978
978
  }
979
979
  return !1;
980
980
  }
981
981
  function ze(t, e, s, r) {
982
- return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Le(t, s);
982
+ return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Me(t, s);
983
983
  }
984
- function Le(t, e) {
984
+ function Me(t, e) {
985
985
  return x(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
986
986
  }
987
987
  function It(t, e) {
988
988
  return !we(t.getCurrentResult(), e);
989
989
  }
990
- var ut = T.createContext(
990
+ var ot = T.createContext(
991
991
  void 0
992
992
  ), Tt = (t) => {
993
- const e = T.useContext(ut);
993
+ const e = T.useContext(ot);
994
994
  if (t)
995
995
  return t;
996
996
  if (!e)
@@ -1001,7 +1001,7 @@ var ut = T.createContext(
1001
1001
  children: e
1002
1002
  }) => (T.useEffect(() => (t.mount(), () => {
1003
1003
  t.unmount();
1004
- }), [t]), /* @__PURE__ */ pt.jsx(ut.Provider, { value: t, children: e })), ht = T.createContext(!1), Dt = () => T.useContext(ht);
1004
+ }), [t]), /* @__PURE__ */ pt.jsx(ot.Provider, { value: t, children: e })), ht = T.createContext(!1), Dt = () => T.useContext(ht);
1005
1005
  ht.Provider;
1006
1006
  function xt() {
1007
1007
  let t = !1;
@@ -1032,66 +1032,67 @@ var Qt = (t, e) => {
1032
1032
  errorResetBoundary: e,
1033
1033
  throwOnError: s,
1034
1034
  query: r
1035
- }) => t.isError && !e.isReset() && !t.isFetching && r && Ut(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Mt = (t) => {
1036
- t.suspense && (t.staleTime === void 0 && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1035
+ }) => t.isError && !e.isReset() && !t.isFetching && r && Ut(s, [t.error, r]), Mt = (t, e) => e.state.data === void 0, Lt = (t) => {
1036
+ const e = t.staleTime;
1037
+ t.suspense && (t.staleTime = typeof e == "function" ? (...s) => Math.max(e(...s), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1037
1038
  }, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, $e = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1038
1039
  s.clearReset();
1039
1040
  });
1040
1041
  function ct(t, e, s) {
1041
- var v, h, m, S, w;
1042
+ var h, R, g, w, b;
1042
1043
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1043
1044
  throw new Error(
1044
1045
  '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'
1045
1046
  );
1046
- const r = Tt(s), n = Dt(), u = kt(), a = r.defaultQueryOptions(t);
1047
- (h = (v = r.getDefaultOptions().queries) == null ? void 0 : v._experimental_beforeQuery) == null || h.call(
1048
- v,
1047
+ const r = Tt(s), i = Dt(), o = kt(), a = r.defaultQueryOptions(t);
1048
+ (R = (h = r.getDefaultOptions().queries) == null ? void 0 : h._experimental_beforeQuery) == null || R.call(
1049
+ h,
1049
1050
  a
1050
- ), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a), Qt(a, u), qt(u);
1051
- const o = !r.getQueryCache().get(a.queryHash), [l] = T.useState(
1051
+ ), a._optimisticResults = i ? "isRestoring" : "optimistic", Lt(a), Qt(a, o), qt(o);
1052
+ const u = !r.getQueryCache().get(a.queryHash), [l] = T.useState(
1052
1053
  () => new e(
1053
1054
  r,
1054
1055
  a
1055
1056
  )
1056
- ), R = l.getOptimisticResult(a);
1057
+ ), S = l.getOptimisticResult(a), v = !i && t.subscribed !== !1;
1057
1058
  if (T.useSyncExternalStore(
1058
1059
  T.useCallback(
1059
- (f) => {
1060
- const g = n ? Ve : l.subscribe(Ae.batchCalls(f));
1061
- return l.updateResult(), g;
1060
+ (p) => {
1061
+ const E = v ? l.subscribe(Ae.batchCalls(p)) : Ve;
1062
+ return l.updateResult(), E;
1062
1063
  },
1063
- [l, n]
1064
+ [l, v]
1064
1065
  ),
1065
1066
  () => l.getCurrentResult(),
1066
1067
  () => l.getCurrentResult()
1067
1068
  ), T.useEffect(() => {
1068
1069
  l.setOptions(a, { listeners: !1 });
1069
- }, [a, l]), Kt(a, R))
1070
- throw $e(a, l, u);
1070
+ }, [a, l]), Kt(a, S))
1071
+ throw $e(a, l, o);
1071
1072
  if (At({
1072
- result: R,
1073
- errorResetBoundary: u,
1073
+ result: S,
1074
+ errorResetBoundary: o,
1074
1075
  throwOnError: a.throwOnError,
1075
1076
  query: r.getQueryCache().get(a.queryHash)
1076
1077
  }))
1077
- throw R.error;
1078
- if ((S = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || S.call(
1079
- m,
1078
+ throw S.error;
1079
+ if ((w = (g = r.getDefaultOptions().queries) == null ? void 0 : g._experimental_afterQuery) == null || w.call(
1080
+ g,
1080
1081
  a,
1081
- R
1082
- ), a.experimental_prefetchInRender && !V && Nt(R, n)) {
1083
- const f = o ? (
1082
+ S
1083
+ ), a.experimental_prefetchInRender && !V && Nt(S, i)) {
1084
+ const p = u ? (
1084
1085
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1085
- $e(a, l, u)
1086
+ $e(a, l, o)
1086
1087
  ) : (
1087
1088
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1088
- (w = r.getQueryCache().get(a.queryHash)) == null ? void 0 : w.promise
1089
+ (b = r.getQueryCache().get(a.queryHash)) == null ? void 0 : b.promise
1089
1090
  );
1090
- f == null || f.catch(Ve).finally(() => {
1091
+ p == null || p.catch(Ve).finally(() => {
1091
1092
  l.updateResult();
1092
1093
  });
1093
1094
  }
1094
- return a.notifyOnChangeProps ? R : l.trackResult(R);
1095
+ return a.notifyOnChangeProps ? S : l.trackResult(S);
1095
1096
  }
1096
1097
  function _t(t, e) {
1097
1098
  return ct(t, at, e);
@@ -1102,7 +1103,7 @@ function Ht(t, e) {
1102
1103
  ...t,
1103
1104
  enabled: !0,
1104
1105
  suspense: !0,
1105
- throwOnError: Lt,
1106
+ throwOnError: Mt,
1106
1107
  placeholderData: void 0
1107
1108
  },
1108
1109
  at,
@@ -1112,7 +1113,7 @@ function Ht(t, e) {
1112
1113
  const $ = (...t) => {
1113
1114
  const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1114
1115
  return e ? `/${e}` : "/";
1115
- }, Me = (t, e) => {
1116
+ }, Le = (t, e) => {
1116
1117
  for (const s of t) {
1117
1118
  const r = Ne(s, e);
1118
1119
  if (r !== void 0) return r;
@@ -1121,16 +1122,16 @@ const $ = (...t) => {
1121
1122
  const r = e(t, s);
1122
1123
  if (r !== void 0) return r;
1123
1124
  if (t.type === "category")
1124
- for (const n of t.items) {
1125
- const u = Ne(n, e, [
1125
+ for (const i of t.items) {
1126
+ const o = Ne(i, e, [
1126
1127
  ...s,
1127
1128
  t
1128
1129
  ]);
1129
- if (u !== void 0) return u;
1130
+ if (o !== void 0) return o;
1130
1131
  }
1131
1132
  }, ss = () => {
1132
1133
  const t = pe(), s = dt().sidebar;
1133
- return Me(s, (r) => {
1134
+ return Le(s, (r) => {
1134
1135
  if (r.type === "doc" && $(r.id) === t.pathname)
1135
1136
  return r;
1136
1137
  });
@@ -1140,17 +1141,17 @@ const $ = (...t) => {
1140
1141
  if (s.type === "category" && s.link && $(s.link.id) === e.pathname || s.type === "doc" && $(s.id) === e.pathname)
1141
1142
  return !0;
1142
1143
  });
1143
- }, is = () => {
1144
+ }, ns = () => {
1144
1145
  const t = pe().pathname, s = dt().sidebar;
1145
- let r, n, u = !1;
1146
- return Me(s, (a) => {
1147
- const o = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
1148
- if (o) {
1149
- if (u)
1150
- return n = { label: a.label, id: o }, !0;
1151
- t === o ? u = !0 : r = { label: a.label, id: o };
1146
+ let r, i, o = !1;
1147
+ return Le(s, (a) => {
1148
+ const u = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
1149
+ if (u) {
1150
+ if (o)
1151
+ return i = { label: a.label, id: u }, !0;
1152
+ t === u ? o = !0 : r = { label: a.label, id: u };
1152
1153
  }
1153
- }), { prev: r, next: n };
1154
+ }), { prev: r, next: i };
1154
1155
  }, Bt = ft(
1155
1156
  void 0
1156
1157
  ), lt = () => {
@@ -1158,23 +1159,23 @@ const $ = (...t) => {
1158
1159
  if (!t)
1159
1160
  throw new Error("useZudoku must be used within a ZudokuProvider.");
1160
1161
  return t;
1161
- }, ns = () => {
1162
+ }, is = () => {
1162
1163
  const { getApiIdentities: t } = lt();
1163
1164
  return _t({
1164
1165
  queryFn: t,
1165
1166
  queryKey: ["api-identities"]
1166
1167
  });
1167
1168
  }, dt = () => {
1168
- const { getPluginSidebar: t, sidebars: e, topNavigation: s } = lt(), r = pe(), n = Object.entries(e).find(([, o]) => Me(o, (l) => {
1169
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s } = lt(), r = pe(), i = Object.entries(e).find(([, u]) => Le(u, (l) => {
1169
1170
  if ((l.type === "doc" ? $(l.id) : l.type === "category" && l.link ? $(l.link.id) : void 0) === r.pathname)
1170
1171
  return l;
1171
- })), u = s.find((o) => o.id === (n == null ? void 0 : n[0])) ?? s.find((o) => vt(o.id, r.pathname)), { data: a } = Ht({
1172
+ })), o = s.find((u) => u.id === (i == null ? void 0 : i[0])) ?? s.find((u) => bt(u.id, r.pathname)), { data: a } = Ht({
1172
1173
  queryFn: () => t(r.pathname),
1173
1174
  queryKey: ["plugin-sidebar", r.pathname]
1174
1175
  });
1175
1176
  return {
1176
- sidebar: [...n ? n[1] : [], ...a],
1177
- topNavItem: u
1177
+ sidebar: [...i ? i[1] : [], ...a],
1178
+ topNavItem: o
1178
1179
  };
1179
1180
  };
1180
1181
  export {
@@ -1182,7 +1183,7 @@ export {
1182
1183
  ts as B,
1183
1184
  rs as C,
1184
1185
  dt as D,
1185
- Me as E,
1186
+ Le as E,
1186
1187
  es as Q,
1187
1188
  Ot as R,
1188
1189
  Qe as S,
@@ -1190,15 +1191,15 @@ export {
1190
1191
  lt as a,
1191
1192
  ss as b,
1192
1193
  wt as c,
1193
- is as d,
1194
+ ns as d,
1194
1195
  Tt as e,
1195
1196
  Ve as f,
1196
1197
  Ut as g,
1197
- Se as h,
1198
- ns as i,
1198
+ Re as h,
1199
+ is as i,
1199
1200
  $ as j,
1200
1201
  _t as k,
1201
- bt as l,
1202
+ mt as l,
1202
1203
  Wt as m,
1203
1204
  Ae as n,
1204
1205
  Jt as o,
@@ -1214,4 +1215,4 @@ export {
1214
1215
  Zt as y,
1215
1216
  qe as z
1216
1217
  };
1217
- //# sourceMappingURL=ZudokuContext-hmLMUdf2.js.map
1218
+ //# sourceMappingURL=ZudokuContext-D3ayHjP-.js.map