zudoku 0.0.0-zce59fc03 → 0.0.0-zd57c18df

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 (232) hide show
  1. package/dist/app/main.js +1 -1
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/create-plugin.d.ts +2 -0
  4. package/dist/config/create-plugin.js +55 -0
  5. package/dist/config/create-plugin.js.map +1 -0
  6. package/dist/config/loader.js +2 -2
  7. package/dist/config/loader.js.map +1 -1
  8. package/dist/config/validators/InputNavigationSchema.d.ts +118 -68
  9. package/dist/config/validators/InputNavigationSchema.js +17 -0
  10. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  11. package/dist/config/validators/NavigationSchema.d.ts +10 -2
  12. package/dist/config/validators/NavigationSchema.js +7 -0
  13. package/dist/config/validators/NavigationSchema.js.map +1 -1
  14. package/dist/config/validators/validate.d.ts +5 -4
  15. package/dist/config/validators/validate.js +2 -0
  16. package/dist/config/validators/validate.js.map +1 -1
  17. package/dist/flat-config.d.ts +12 -0
  18. package/dist/index.d.ts +2 -1
  19. package/dist/index.js +1 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/components/Bootstrap.js +1 -2
  22. package/dist/lib/components/Bootstrap.js.map +1 -1
  23. package/dist/lib/components/MobileTopNavigation.js +2 -1
  24. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  25. package/dist/lib/components/Slot.test.js +1 -1
  26. package/dist/lib/components/Slot.test.js.map +1 -1
  27. package/dist/lib/components/TopNavigation.d.ts +7 -1
  28. package/dist/lib/components/TopNavigation.js +7 -2
  29. package/dist/lib/components/TopNavigation.js.map +1 -1
  30. package/dist/lib/components/Zudoku.d.ts +4 -1
  31. package/dist/lib/components/Zudoku.js +4 -7
  32. package/dist/lib/components/Zudoku.js.map +1 -1
  33. package/dist/lib/components/context/ZudokuContext.d.ts +9 -4
  34. package/dist/lib/components/context/ZudokuContext.js +4 -2
  35. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  36. package/dist/lib/components/context/ZudokuProvider.js +1 -1
  37. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  38. package/dist/lib/components/context/ZudokuReactContext.d.ts +11 -0
  39. package/dist/lib/components/context/ZudokuReactContext.js +4 -0
  40. package/dist/lib/components/context/ZudokuReactContext.js.map +1 -0
  41. package/dist/lib/components/navigation/Navigation.js +4 -3
  42. package/dist/lib/components/navigation/Navigation.js.map +1 -1
  43. package/dist/lib/components/navigation/NavigationCategory.js +8 -0
  44. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  45. package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
  46. package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
  47. package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
  48. package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
  49. package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
  50. package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
  51. package/dist/lib/components/navigation/NavigationItem.js +11 -1
  52. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  53. package/dist/lib/components/navigation/utils.d.ts +2 -1
  54. package/dist/lib/components/navigation/utils.js +22 -1
  55. package/dist/lib/components/navigation/utils.js.map +1 -1
  56. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  57. package/dist/lib/core/ZudokuContext.js +3 -1
  58. package/dist/lib/core/ZudokuContext.js.map +1 -1
  59. package/dist/lib/core/__internal.d.ts +1 -0
  60. package/dist/lib/core/__internal.js +2 -0
  61. package/dist/lib/core/__internal.js.map +1 -1
  62. package/dist/lib/core/plugins.d.ts +5 -1
  63. package/dist/lib/core/plugins.js.map +1 -1
  64. package/dist/lib/core/transform-config.d.ts +4 -2
  65. package/dist/lib/core/transform-config.js +33 -13
  66. package/dist/lib/core/transform-config.js.map +1 -1
  67. package/dist/lib/core/transform-config.test.d.ts +1 -0
  68. package/dist/lib/core/transform-config.test.js +83 -0
  69. package/dist/lib/core/transform-config.test.js.map +1 -0
  70. package/dist/lib/errors/ErrorAlert.js +1 -2
  71. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  72. package/dist/lib/hooks/useEvent.test.js +1 -1
  73. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  74. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
  75. package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
  76. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
  78. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
  79. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
  80. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
  81. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  82. package/dist/lib/ui/Alert.d.ts +3 -2
  83. package/dist/lib/ui/Alert.js +9 -5
  84. package/dist/lib/ui/Alert.js.map +1 -1
  85. package/dist/lib/ui/InputGroup.d.ts +16 -0
  86. package/dist/lib/ui/InputGroup.js +65 -0
  87. package/dist/lib/ui/InputGroup.js.map +1 -0
  88. package/dist/lib/ui/Secret.js +2 -2
  89. package/dist/lib/ui/Secret.js.map +1 -1
  90. package/dist/vite/config.js +5 -2
  91. package/dist/vite/config.js.map +1 -1
  92. package/dist/vite/plugin-config.js +16 -4
  93. package/dist/vite/plugin-config.js.map +1 -1
  94. package/dist/vite/plugin-theme.js +2 -1
  95. package/dist/vite/plugin-theme.js.map +1 -1
  96. package/dist/vite/prerender/prerender.js +3 -1
  97. package/dist/vite/prerender/prerender.js.map +1 -1
  98. package/dist/vite/prerender/worker.js +3 -1
  99. package/dist/vite/prerender/worker.js.map +1 -1
  100. package/lib/{ClaudeLogo-C6q-Xn_l.js → ClaudeLogo-Br8C_vTq.js} +3 -3
  101. package/lib/{ClaudeLogo-C6q-Xn_l.js.map → ClaudeLogo-Br8C_vTq.js.map} +1 -1
  102. package/lib/{HydrationBoundary-CNF2ZV3E.js → HydrationBoundary-CJu4vUlG.js} +6 -6
  103. package/lib/{HydrationBoundary-CNF2ZV3E.js.map → HydrationBoundary-CJu4vUlG.js.map} +1 -1
  104. package/lib/{MdxPage-B1G4W1TK.js → MdxPage-C0QFAsgv.js} +6 -6
  105. package/lib/{MdxPage-B1G4W1TK.js.map → MdxPage-C0QFAsgv.js.map} +1 -1
  106. package/lib/Mermaid-Chx5BPHn.js +104 -0
  107. package/lib/Mermaid-Chx5BPHn.js.map +1 -0
  108. package/lib/{OAuthErrorPage-01Ke086W.js → OAuthErrorPage-CFz_gBFx.js} +11 -10
  109. package/lib/{OAuthErrorPage-01Ke086W.js.map → OAuthErrorPage-CFz_gBFx.js.map} +1 -1
  110. package/lib/{OasProvider-oHPiMJZg.js → OasProvider-BQ60YgAd.js} +3 -3
  111. package/lib/{OasProvider-oHPiMJZg.js.map → OasProvider-BQ60YgAd.js.map} +1 -1
  112. package/lib/{OperationList-CZ4OK8Pm.js → OperationList-D31urxqy.js} +40 -39
  113. package/lib/{OperationList-CZ4OK8Pm.js.map → OperationList-D31urxqy.js.map} +1 -1
  114. package/lib/{RouteGuard-B1lCR0C_.js → RouteGuard-CVs3yvEs.js} +3 -3
  115. package/lib/{RouteGuard-B1lCR0C_.js.map → RouteGuard-CVs3yvEs.js.map} +1 -1
  116. package/lib/{SchemaList-DoQFkJgM.js → SchemaList-CSVFH585.js} +7 -7
  117. package/lib/{SchemaList-DoQFkJgM.js.map → SchemaList-CSVFH585.js.map} +1 -1
  118. package/lib/{SchemaView-D2k6ZJck.js → SchemaView-D4marpgk.js} +3 -3
  119. package/lib/{SchemaView-D2k6ZJck.js.map → SchemaView-D4marpgk.js.map} +1 -1
  120. package/lib/{Secret-BDBqq4p3.js → Secret-DUpgv4V3.js} +92 -72
  121. package/lib/Secret-DUpgv4V3.js.map +1 -0
  122. package/lib/{SignUp-8kDBaLbO.js → SignUp-Dug1jAGC.js} +4 -4
  123. package/lib/{SignUp-8kDBaLbO.js.map → SignUp-Dug1jAGC.js.map} +1 -1
  124. package/lib/{SyntaxHighlight-hZOFnYl0.js → SyntaxHighlight-BMu0b_hF.js} +8 -8
  125. package/lib/{SyntaxHighlight-hZOFnYl0.js.map → SyntaxHighlight-BMu0b_hF.js.map} +1 -1
  126. package/lib/{Toc-qEIii_-W.js → Toc-BiJ2YL0O.js} +2 -2
  127. package/lib/{Toc-qEIii_-W.js.map → Toc-BiJ2YL0O.js.map} +1 -1
  128. package/lib/{Zudoku-DUsdmPME.js → Zudoku-iyiXgWFY.js} +2777 -2622
  129. package/lib/Zudoku-iyiXgWFY.js.map +1 -0
  130. package/lib/ZudokuContext-CYyb_PB_.js +175 -0
  131. package/lib/ZudokuContext-CYyb_PB_.js.map +1 -0
  132. package/lib/ZudokuReactContext-DGJAP1sN.js +222 -0
  133. package/lib/ZudokuReactContext-DGJAP1sN.js.map +1 -0
  134. package/lib/{circular-D9tSKG2c.js → circular-cPOX8BVJ.js} +2 -2
  135. package/lib/{circular-D9tSKG2c.js.map → circular-cPOX8BVJ.js.map} +1 -1
  136. package/lib/{createServer-BprC4n85.js → createServer-SJT25uZH.js} +4 -4
  137. package/lib/{createServer-BprC4n85.js.map → createServer-SJT25uZH.js.map} +1 -1
  138. package/lib/{errors-7hgPDs1h.js → errors-B77S9iOc.js} +2 -2
  139. package/lib/{errors-7hgPDs1h.js.map → errors-B77S9iOc.js.map} +1 -1
  140. package/lib/{firebase-Dwn-2ju-.js → firebase-C7XKRGLf.js} +25 -24
  141. package/lib/{firebase-Dwn-2ju-.js.map → firebase-C7XKRGLf.js.map} +1 -1
  142. package/lib/{hook-ZEd1Es7D.js → hook-Dz_n9SoE.js} +16 -15
  143. package/lib/{hook-ZEd1Es7D.js.map → hook-Dz_n9SoE.js.map} +1 -1
  144. package/lib/{index-Dxdhrp-I.js → index-BDp2MTiq.js} +2 -2
  145. package/lib/{index-Dxdhrp-I.js.map → index-BDp2MTiq.js.map} +1 -1
  146. package/lib/{index-CyIW9rHv.js → index-Bc2mE-53.js} +642 -606
  147. package/lib/index-Bc2mE-53.js.map +1 -0
  148. package/lib/{index.esm-DG4KaDKR.js → index.esm-Cth49JBv.js} +2 -2
  149. package/lib/index.esm-Cth49JBv.js.map +1 -0
  150. package/lib/{mutation-BISOc7OM.js → mutation-B7eFBLZY.js} +2 -2
  151. package/lib/{mutation-BISOc7OM.js.map → mutation-B7eFBLZY.js.map} +1 -1
  152. package/lib/ui/Alert.js +32 -20
  153. package/lib/ui/Alert.js.map +1 -1
  154. package/lib/ui/InputGroup.js +155 -0
  155. package/lib/ui/InputGroup.js.map +1 -0
  156. package/lib/ui/Secret.js +2 -2
  157. package/lib/ui/Secret.js.map +1 -1
  158. package/lib/ui/SyntaxHighlight.js +2 -2
  159. package/lib/{useMutation-CFMGlAMW.js → useMutation-CErliDZ9.js} +5 -5
  160. package/lib/{useMutation-CFMGlAMW.js.map → useMutation-CErliDZ9.js.map} +1 -1
  161. package/lib/{useSuspenseQuery-CSB_rVek.js → useQuery-ht7aWJ3S.js} +432 -446
  162. package/lib/useQuery-ht7aWJ3S.js.map +1 -0
  163. package/lib/useSuspenseQuery-DQH4Bmc2.js +18 -0
  164. package/lib/useSuspenseQuery-DQH4Bmc2.js.map +1 -0
  165. package/lib/zudoku.__internal.js +524 -500
  166. package/lib/zudoku.__internal.js.map +1 -1
  167. package/lib/zudoku.auth-auth0.js +6 -5
  168. package/lib/zudoku.auth-auth0.js.map +1 -1
  169. package/lib/zudoku.auth-azureb2c.js +14 -13
  170. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  171. package/lib/zudoku.auth-clerk.js +2 -2
  172. package/lib/zudoku.auth-firebase.js +4 -4
  173. package/lib/zudoku.auth-openid.js +7 -6
  174. package/lib/zudoku.auth-openid.js.map +1 -1
  175. package/lib/zudoku.auth-supabase.js +4 -4
  176. package/lib/zudoku.components.js +3 -3
  177. package/lib/zudoku.hooks.js +3 -3
  178. package/lib/zudoku.mermaid.js +3 -3
  179. package/lib/zudoku.plugin-api-catalog.js +28 -27
  180. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  181. package/lib/zudoku.plugin-api-keys.js +98 -96
  182. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  183. package/lib/zudoku.plugin-custom-pages.js +1 -1
  184. package/lib/zudoku.plugin-markdown.js +1 -1
  185. package/lib/zudoku.plugin-openapi.js +2 -2
  186. package/lib/zudoku.plugin-search-pagefind.js +19 -18
  187. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  188. package/lib/zudoku.plugins.js.map +1 -1
  189. package/lib/zudoku.react-query.js +26 -25
  190. package/lib/zudoku.react-query.js.map +1 -1
  191. package/package.json +10 -4
  192. package/src/app/defaultTheme.css +4 -0
  193. package/src/app/main.css +2 -0
  194. package/src/app/main.tsx +1 -1
  195. package/src/lib/components/Bootstrap.tsx +1 -4
  196. package/src/lib/components/MobileTopNavigation.tsx +13 -8
  197. package/src/lib/components/Slot.test.tsx +1 -1
  198. package/src/lib/components/TopNavigation.tsx +25 -7
  199. package/src/lib/components/Zudoku.tsx +18 -14
  200. package/src/lib/components/context/ZudokuContext.ts +3 -6
  201. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  202. package/src/lib/components/context/ZudokuReactContext.tsx +17 -0
  203. package/src/lib/components/navigation/Navigation.tsx +4 -3
  204. package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
  205. package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
  206. package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
  207. package/src/lib/components/navigation/NavigationItem.tsx +17 -1
  208. package/src/lib/components/navigation/utils.ts +32 -1
  209. package/src/lib/core/ZudokuContext.ts +7 -1
  210. package/src/lib/core/__internal.tsx +2 -0
  211. package/src/lib/core/plugins.ts +7 -3
  212. package/src/lib/core/transform-config.test.tsx +99 -0
  213. package/src/lib/core/transform-config.ts +57 -19
  214. package/src/lib/errors/ErrorAlert.tsx +1 -6
  215. package/src/lib/hooks/useEvent.test.tsx +1 -1
  216. package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
  217. package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
  218. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
  219. package/src/lib/ui/Alert.tsx +17 -5
  220. package/src/lib/ui/InputGroup.tsx +168 -0
  221. package/src/lib/ui/Secret.tsx +2 -2
  222. package/lib/Mermaid-B1xNo-pf.js +0 -103
  223. package/lib/Mermaid-B1xNo-pf.js.map +0 -1
  224. package/lib/Secret-BDBqq4p3.js.map +0 -1
  225. package/lib/Separator-BXt1LYnm.js +0 -27
  226. package/lib/Separator-BXt1LYnm.js.map +0 -1
  227. package/lib/Zudoku-DUsdmPME.js.map +0 -1
  228. package/lib/ZudokuContext-BBI06sOx.js +0 -387
  229. package/lib/ZudokuContext-BBI06sOx.js.map +0 -1
  230. package/lib/index-CyIW9rHv.js.map +0 -1
  231. package/lib/index.esm-DG4KaDKR.js.map +0 -1
  232. package/lib/useSuspenseQuery-CSB_rVek.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import * as p from "react";
2
- import { j as ee } from "./jsx-runtime-BzflLqGi.js";
2
+ import { j as tt } from "./jsx-runtime-BzflLqGi.js";
3
3
  var H = class {
4
4
  constructor() {
5
5
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
6
6
  }
7
- subscribe(e) {
8
- return this.listeners.add(e), this.onSubscribe(), () => {
9
- this.listeners.delete(e), this.onUnsubscribe();
7
+ subscribe(t) {
8
+ return this.listeners.add(t), this.onSubscribe(), () => {
9
+ this.listeners.delete(t), this.onUnsubscribe();
10
10
  };
11
11
  }
12
12
  hasListeners() {
@@ -16,7 +16,7 @@ var H = class {
16
16
  }
17
17
  onUnsubscribe() {
18
18
  }
19
- }, fe = {
19
+ }, ht = {
20
20
  // We need the wrapper function syntax below instead of direct references to
21
21
  // global setTimeout etc.
22
22
  //
@@ -27,60 +27,60 @@ var H = class {
27
27
  // replace the global setTimeout (like tests) won't work since we'll already
28
28
  // have a hard reference to the original implementation at the time when this
29
29
  // file was imported.
30
- setTimeout: (e, t) => setTimeout(e, t),
31
- clearTimeout: (e) => clearTimeout(e),
32
- setInterval: (e, t) => setInterval(e, t),
33
- clearInterval: (e) => clearInterval(e)
34
- }, de = class {
30
+ setTimeout: (t, e) => setTimeout(t, e),
31
+ clearTimeout: (t) => clearTimeout(t),
32
+ setInterval: (t, e) => setInterval(t, e),
33
+ clearInterval: (t) => clearInterval(t)
34
+ }, lt = class {
35
35
  // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
36
36
  // type at app boot; and if we leave that type, then any new timer provider
37
37
  // would need to support ReturnType<typeof setTimeout>, which is infeasible.
38
38
  //
39
39
  // We settle for type safety for the TimeoutProvider type, and accept that
40
40
  // this class is unsafe internally to allow for extension.
41
- #t = fe;
42
- #e = !1;
43
- setTimeoutProvider(e) {
44
- process.env.NODE_ENV !== "production" && this.#e && e !== this.#t && console.error(
41
+ #e = ht;
42
+ #t = !1;
43
+ setTimeoutProvider(t) {
44
+ process.env.NODE_ENV !== "production" && this.#t && t !== this.#e && console.error(
45
45
  "[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",
46
- { previous: this.#t, provider: e }
47
- ), this.#t = e, process.env.NODE_ENV !== "production" && (this.#e = !1);
46
+ { previous: this.#e, provider: t }
47
+ ), this.#e = t, process.env.NODE_ENV !== "production" && (this.#t = !1);
48
48
  }
49
- setTimeout(e, t) {
50
- return process.env.NODE_ENV !== "production" && (this.#e = !0), this.#t.setTimeout(e, t);
49
+ setTimeout(t, e) {
50
+ return process.env.NODE_ENV !== "production" && (this.#t = !0), this.#e.setTimeout(t, e);
51
51
  }
52
- clearTimeout(e) {
53
- this.#t.clearTimeout(e);
52
+ clearTimeout(t) {
53
+ this.#e.clearTimeout(t);
54
54
  }
55
- setInterval(e, t) {
56
- return process.env.NODE_ENV !== "production" && (this.#e = !0), this.#t.setInterval(e, t);
55
+ setInterval(t, e) {
56
+ return process.env.NODE_ENV !== "production" && (this.#t = !0), this.#e.setInterval(t, e);
57
57
  }
58
- clearInterval(e) {
59
- this.#t.clearInterval(e);
58
+ clearInterval(t) {
59
+ this.#e.clearInterval(t);
60
60
  }
61
- }, w = new de();
62
- function pe(e) {
63
- setTimeout(e, 0);
61
+ }, w = new lt();
62
+ function ft(t) {
63
+ setTimeout(t, 0);
64
64
  }
65
65
  var E = typeof window > "u" || "Deno" in globalThis;
66
66
  function C() {
67
67
  }
68
- function Le(e, t) {
69
- return typeof e == "function" ? e(t) : e;
68
+ function _t(t, e) {
69
+ return typeof t == "function" ? t(e) : t;
70
70
  }
71
- function j(e) {
72
- return typeof e == "number" && e >= 0 && e !== 1 / 0;
71
+ function Q(t) {
72
+ return typeof t == "number" && t >= 0 && t !== 1 / 0;
73
73
  }
74
- function te(e, t) {
75
- return Math.max(e + (t || 0) - Date.now(), 0);
74
+ function et(t, e) {
75
+ return Math.max(t + (e || 0) - Date.now(), 0);
76
76
  }
77
- function I(e, t) {
78
- return typeof e == "function" ? e(t) : e;
77
+ function I(t, e) {
78
+ return typeof t == "function" ? t(e) : t;
79
79
  }
80
- function v(e, t) {
81
- return typeof e == "function" ? e(t) : e;
80
+ function v(t, e) {
81
+ return typeof t == "function" ? t(e) : t;
82
82
  }
83
- function Ke(e, t) {
83
+ function Lt(t, e) {
84
84
  const {
85
85
  type: s = "all",
86
86
  exact: r,
@@ -88,175 +88,175 @@ function Ke(e, t) {
88
88
  predicate: u,
89
89
  queryKey: a,
90
90
  stale: i
91
- } = e;
91
+ } = t;
92
92
  if (a) {
93
93
  if (r) {
94
- if (t.queryHash !== ye(a, t.options))
94
+ if (e.queryHash !== dt(a, e.options))
95
95
  return !1;
96
- } else if (!V(t.queryKey, a))
96
+ } else if (!V(e.queryKey, a))
97
97
  return !1;
98
98
  }
99
99
  if (s !== "all") {
100
- const o = t.isActive();
100
+ const o = e.isActive();
101
101
  if (s === "active" && !o || s === "inactive" && o)
102
102
  return !1;
103
103
  }
104
- return !(typeof i == "boolean" && t.isStale() !== i || n && n !== t.state.fetchStatus || u && !u(t));
104
+ return !(typeof i == "boolean" && e.isStale() !== i || n && n !== e.state.fetchStatus || u && !u(e));
105
105
  }
106
- function He(e, t) {
107
- const { exact: s, status: r, predicate: n, mutationKey: u } = e;
106
+ function Kt(t, e) {
107
+ const { exact: s, status: r, predicate: n, mutationKey: u } = t;
108
108
  if (u) {
109
- if (!t.options.mutationKey)
109
+ if (!e.options.mutationKey)
110
110
  return !1;
111
111
  if (s) {
112
- if (q(t.options.mutationKey) !== q(u))
112
+ if (j(e.options.mutationKey) !== j(u))
113
113
  return !1;
114
- } else if (!V(t.options.mutationKey, u))
114
+ } else if (!V(e.options.mutationKey, u))
115
115
  return !1;
116
116
  }
117
- return !(r && t.state.status !== r || n && !n(t));
117
+ return !(r && e.state.status !== r || n && !n(e));
118
118
  }
119
- function ye(e, t) {
120
- return (t?.queryKeyHashFn || q)(e);
119
+ function dt(t, e) {
120
+ return (e?.queryKeyHashFn || j)(t);
121
121
  }
122
- function q(e) {
122
+ function j(t) {
123
123
  return JSON.stringify(
124
- e,
125
- (t, s) => A(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
124
+ t,
125
+ (e, s) => A(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
126
126
  );
127
127
  }
128
- function V(e, t) {
129
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => V(e[s], t[s])) : !1;
128
+ function V(t, e) {
129
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((s) => V(t[s], e[s])) : !1;
130
130
  }
131
- var ve = Object.prototype.hasOwnProperty;
132
- function N(e, t) {
133
- if (e === t)
134
- return e;
135
- const s = z(e) && z(t);
136
- if (!s && !(A(e) && A(t))) return t;
137
- const n = (s ? e : Object.keys(e)).length, u = s ? t : Object.keys(t), a = u.length, i = s ? new Array(a) : {};
131
+ var pt = Object.prototype.hasOwnProperty;
132
+ function q(t, e) {
133
+ if (t === e)
134
+ return t;
135
+ const s = z(t) && z(e);
136
+ if (!s && !(A(t) && A(e))) return e;
137
+ const n = (s ? t : Object.keys(t)).length, u = s ? e : Object.keys(e), a = u.length, i = s ? new Array(a) : {};
138
138
  let o = 0;
139
139
  for (let l = 0; l < a; l++) {
140
- const c = s ? l : u[l], d = e[c], h = t[c];
140
+ const c = s ? l : u[l], d = t[c], h = e[c];
141
141
  if (d === h) {
142
- i[c] = d, (s ? l < n : ve.call(e, c)) && o++;
142
+ i[c] = d, (s ? l < n : pt.call(t, c)) && o++;
143
143
  continue;
144
144
  }
145
145
  if (d === null || h === null || typeof d != "object" || typeof h != "object") {
146
146
  i[c] = h;
147
147
  continue;
148
148
  }
149
- const R = N(d, h);
149
+ const R = q(d, h);
150
150
  i[c] = R, R === d && o++;
151
151
  }
152
- return n === a && o === n ? e : i;
152
+ return n === a && o === n ? t : i;
153
153
  }
154
- function k(e, t) {
155
- if (!t || Object.keys(e).length !== Object.keys(t).length)
154
+ function N(t, e) {
155
+ if (!e || Object.keys(t).length !== Object.keys(e).length)
156
156
  return !1;
157
- for (const s in e)
158
- if (e[s] !== t[s])
157
+ for (const s in t)
158
+ if (t[s] !== e[s])
159
159
  return !1;
160
160
  return !0;
161
161
  }
162
- function z(e) {
163
- return Array.isArray(e) && e.length === Object.keys(e).length;
162
+ function z(t) {
163
+ return Array.isArray(t) && t.length === Object.keys(t).length;
164
164
  }
165
- function A(e) {
166
- if (!$(e))
165
+ function A(t) {
166
+ if (!$(t))
167
167
  return !1;
168
- const t = e.constructor;
169
- if (t === void 0)
168
+ const e = t.constructor;
169
+ if (e === void 0)
170
170
  return !0;
171
- const s = t.prototype;
172
- return !(!$(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
171
+ const s = e.prototype;
172
+ return !(!$(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
173
173
  }
174
- function $(e) {
175
- return Object.prototype.toString.call(e) === "[object Object]";
174
+ function $(t) {
175
+ return Object.prototype.toString.call(t) === "[object Object]";
176
176
  }
177
- function me(e) {
178
- return new Promise((t) => {
179
- w.setTimeout(t, e);
177
+ function yt(t) {
178
+ return new Promise((e) => {
179
+ w.setTimeout(e, t);
180
180
  });
181
181
  }
182
- function _(e, t, s) {
182
+ function k(t, e, s) {
183
183
  if (typeof s.structuralSharing == "function")
184
- return s.structuralSharing(e, t);
184
+ return s.structuralSharing(t, e);
185
185
  if (s.structuralSharing !== !1) {
186
186
  if (process.env.NODE_ENV !== "production")
187
187
  try {
188
- return N(e, t);
188
+ return q(t, e);
189
189
  } catch (r) {
190
190
  throw console.error(
191
191
  `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}`
192
192
  ), r;
193
193
  }
194
- return N(e, t);
194
+ return q(t, e);
195
195
  }
196
- return t;
197
- }
198
- function Ve(e) {
199
196
  return e;
200
197
  }
201
- function Be(e, t, s = 0) {
202
- const r = [...e, t];
198
+ function Ht(t) {
199
+ return t;
200
+ }
201
+ function Vt(t, e, s = 0) {
202
+ const r = [...t, e];
203
203
  return s && r.length > s ? r.slice(1) : r;
204
204
  }
205
- function Ge(e, t, s = 0) {
206
- const r = [t, ...e];
205
+ function Bt(t, e, s = 0) {
206
+ const r = [e, ...t];
207
207
  return s && r.length > s ? r.slice(0, -1) : r;
208
208
  }
209
- var U = Symbol();
210
- function be(e, t) {
211
- return process.env.NODE_ENV !== "production" && e.queryFn === U && console.error(
212
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
213
- ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === U ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
209
+ var _ = Symbol();
210
+ function vt(t, e) {
211
+ return process.env.NODE_ENV !== "production" && t.queryFn === _ && console.error(
212
+ `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
213
+ ), !t.queryFn && e?.initialPromise ? () => e.initialPromise : !t.queryFn || t.queryFn === _ ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
214
214
  }
215
- function ge(e, t) {
216
- return typeof e == "function" ? e(...t) : !!e;
215
+ function mt(t, e) {
216
+ return typeof t == "function" ? t(...e) : !!t;
217
217
  }
218
- var Se = class extends H {
219
- #t;
218
+ var bt = class extends H {
220
219
  #e;
220
+ #t;
221
221
  #s;
222
222
  constructor() {
223
- super(), this.#s = (e) => {
223
+ super(), this.#s = (t) => {
224
224
  if (!E && window.addEventListener) {
225
- const t = () => e();
226
- return window.addEventListener("visibilitychange", t, !1), () => {
227
- window.removeEventListener("visibilitychange", t);
225
+ const e = () => t();
226
+ return window.addEventListener("visibilitychange", e, !1), () => {
227
+ window.removeEventListener("visibilitychange", e);
228
228
  };
229
229
  }
230
230
  };
231
231
  }
232
232
  onSubscribe() {
233
- this.#e || this.setEventListener(this.#s);
233
+ this.#t || this.setEventListener(this.#s);
234
234
  }
235
235
  onUnsubscribe() {
236
- this.hasListeners() || (this.#e?.(), this.#e = void 0);
236
+ this.hasListeners() || (this.#t?.(), this.#t = void 0);
237
237
  }
238
- setEventListener(e) {
239
- this.#s = e, this.#e?.(), this.#e = e((t) => {
240
- typeof t == "boolean" ? this.setFocused(t) : this.onFocus();
238
+ setEventListener(t) {
239
+ this.#s = t, this.#t?.(), this.#t = t((e) => {
240
+ typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
241
241
  });
242
242
  }
243
- setFocused(e) {
244
- this.#t !== e && (this.#t = e, this.onFocus());
243
+ setFocused(t) {
244
+ this.#e !== t && (this.#e = t, this.onFocus());
245
245
  }
246
246
  onFocus() {
247
- const e = this.isFocused();
248
- this.listeners.forEach((t) => {
249
- t(e);
247
+ const t = this.isFocused();
248
+ this.listeners.forEach((e) => {
249
+ e(t);
250
250
  });
251
251
  }
252
252
  isFocused() {
253
- return typeof this.#t == "boolean" ? this.#t : globalThis.document?.visibilityState !== "hidden";
253
+ return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
254
254
  }
255
- }, se = new Se();
255
+ }, st = new bt();
256
256
  function L() {
257
- let e, t;
257
+ let t, e;
258
258
  const s = new Promise((n, u) => {
259
- e = n, t = u;
259
+ t = n, e = u;
260
260
  });
261
261
  s.status = "pending", s.catch(() => {
262
262
  });
@@ -267,33 +267,33 @@ function L() {
267
267
  r({
268
268
  status: "fulfilled",
269
269
  value: n
270
- }), e(n);
270
+ }), t(n);
271
271
  }, s.reject = (n) => {
272
272
  r({
273
273
  status: "rejected",
274
274
  reason: n
275
- }), t(n);
275
+ }), e(n);
276
276
  }, s;
277
277
  }
278
- function ze(e) {
279
- let t;
280
- if (e.then((s) => (t = s, s), C)?.catch(C), t !== void 0)
281
- return { data: t };
278
+ function Gt(t) {
279
+ let e;
280
+ if (t.then((s) => (e = s, s), C)?.catch(C), e !== void 0)
281
+ return { data: e };
282
282
  }
283
- var Re = pe;
284
- function Oe() {
285
- let e = [], t = 0, s = (i) => {
283
+ var gt = ft;
284
+ function St() {
285
+ let t = [], e = 0, s = (i) => {
286
286
  i();
287
287
  }, r = (i) => {
288
288
  i();
289
- }, n = Re;
289
+ }, n = gt;
290
290
  const u = (i) => {
291
- t ? e.push(i) : n(() => {
291
+ e ? t.push(i) : n(() => {
292
292
  s(i);
293
293
  });
294
294
  }, a = () => {
295
- const i = e;
296
- e = [], i.length && n(() => {
295
+ const i = t;
296
+ t = [], i.length && n(() => {
297
297
  r(() => {
298
298
  i.forEach((o) => {
299
299
  s(o);
@@ -304,11 +304,11 @@ function Oe() {
304
304
  return {
305
305
  batch: (i) => {
306
306
  let o;
307
- t++;
307
+ e++;
308
308
  try {
309
309
  o = i();
310
310
  } finally {
311
- t--, t || a();
311
+ e--, e || a();
312
312
  }
313
313
  return o;
314
314
  },
@@ -340,93 +340,93 @@ function Oe() {
340
340
  }
341
341
  };
342
342
  }
343
- var B = Oe(), we = class extends H {
344
- #t = !0;
345
- #e;
343
+ var B = St(), Rt = class extends H {
344
+ #e = !0;
345
+ #t;
346
346
  #s;
347
347
  constructor() {
348
- super(), this.#s = (e) => {
348
+ super(), this.#s = (t) => {
349
349
  if (!E && window.addEventListener) {
350
- const t = () => e(!0), s = () => e(!1);
351
- return window.addEventListener("online", t, !1), window.addEventListener("offline", s, !1), () => {
352
- window.removeEventListener("online", t), window.removeEventListener("offline", s);
350
+ const e = () => t(!0), s = () => t(!1);
351
+ return window.addEventListener("online", e, !1), window.addEventListener("offline", s, !1), () => {
352
+ window.removeEventListener("online", e), window.removeEventListener("offline", s);
353
353
  };
354
354
  }
355
355
  };
356
356
  }
357
357
  onSubscribe() {
358
- this.#e || this.setEventListener(this.#s);
358
+ this.#t || this.setEventListener(this.#s);
359
359
  }
360
360
  onUnsubscribe() {
361
- this.hasListeners() || (this.#e?.(), this.#e = void 0);
361
+ this.hasListeners() || (this.#t?.(), this.#t = void 0);
362
362
  }
363
- setEventListener(e) {
364
- this.#s = e, this.#e?.(), this.#e = e(this.setOnline.bind(this));
363
+ setEventListener(t) {
364
+ this.#s = t, this.#t?.(), this.#t = t(this.setOnline.bind(this));
365
365
  }
366
- setOnline(e) {
367
- this.#t !== e && (this.#t = e, this.listeners.forEach((s) => {
368
- s(e);
366
+ setOnline(t) {
367
+ this.#e !== t && (this.#e = t, this.listeners.forEach((s) => {
368
+ s(t);
369
369
  }));
370
370
  }
371
371
  isOnline() {
372
- return this.#t;
372
+ return this.#e;
373
373
  }
374
- }, re = new we();
375
- function Ee(e) {
376
- return Math.min(1e3 * 2 ** e, 3e4);
374
+ }, rt = new Rt();
375
+ function Ot(t) {
376
+ return Math.min(1e3 * 2 ** t, 3e4);
377
377
  }
378
- function ie(e) {
379
- return (e ?? "online") === "online" ? re.isOnline() : !0;
378
+ function it(t) {
379
+ return (t ?? "online") === "online" ? rt.isOnline() : !0;
380
380
  }
381
- var Q = class extends Error {
382
- constructor(e) {
383
- super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
381
+ var U = class extends Error {
382
+ constructor(t) {
383
+ super("CancelledError"), this.revert = t?.revert, this.silent = t?.silent;
384
384
  }
385
385
  };
386
- function $e(e) {
387
- return e instanceof Q;
386
+ function zt(t) {
387
+ return t instanceof U;
388
388
  }
389
- function Ce(e) {
390
- let t = !1, s = 0, r;
389
+ function wt(t) {
390
+ let e = !1, s = 0, r;
391
391
  const n = L(), u = () => n.status !== "pending", a = (f) => {
392
392
  if (!u()) {
393
- const g = new Q(f);
394
- h(g), e.onCancel?.(g);
393
+ const g = new U(f);
394
+ h(g), t.onCancel?.(g);
395
395
  }
396
396
  }, i = () => {
397
- t = !0;
397
+ e = !0;
398
398
  }, o = () => {
399
- t = !1;
400
- }, l = () => se.isFocused() && (e.networkMode === "always" || re.isOnline()) && e.canRun(), c = () => ie(e.networkMode) && e.canRun(), d = (f) => {
399
+ e = !1;
400
+ }, l = () => st.isFocused() && (t.networkMode === "always" || rt.isOnline()) && t.canRun(), c = () => it(t.networkMode) && t.canRun(), d = (f) => {
401
401
  u() || (r?.(), n.resolve(f));
402
402
  }, h = (f) => {
403
403
  u() || (r?.(), n.reject(f));
404
404
  }, R = () => new Promise((f) => {
405
405
  r = (g) => {
406
406
  (u() || l()) && f(g);
407
- }, e.onPause?.();
407
+ }, t.onPause?.();
408
408
  }).then(() => {
409
- r = void 0, u() || e.onContinue?.();
409
+ r = void 0, u() || t.onContinue?.();
410
410
  }), F = () => {
411
411
  if (u())
412
412
  return;
413
413
  let f;
414
- const g = s === 0 ? e.initialPromise : void 0;
414
+ const g = s === 0 ? t.initialPromise : void 0;
415
415
  try {
416
- f = g ?? e.fn();
416
+ f = g ?? t.fn();
417
417
  } catch (m) {
418
418
  f = Promise.reject(m);
419
419
  }
420
420
  Promise.resolve(f).then(d).catch((m) => {
421
421
  if (u())
422
422
  return;
423
- const S = e.retry ?? (E ? 0 : 3), O = e.retryDelay ?? Ee, P = typeof O == "function" ? O(s, m) : O, D = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, m);
424
- if (t || !D) {
423
+ const S = t.retry ?? (E ? 0 : 3), O = t.retryDelay ?? Ot, P = typeof O == "function" ? O(s, m) : O, D = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, m);
424
+ if (e || !D) {
425
425
  h(m);
426
426
  return;
427
427
  }
428
- s++, e.onFail?.(s, m), me(P).then(() => l() ? void 0 : R()).then(() => {
429
- t ? h(m) : F();
428
+ s++, t.onFail?.(s, m), yt(P).then(() => l() ? void 0 : R()).then(() => {
429
+ e ? h(m) : F();
430
430
  });
431
431
  });
432
432
  };
@@ -441,35 +441,35 @@ function Ce(e) {
441
441
  start: () => (c() ? F() : R().then(F), n)
442
442
  };
443
443
  }
444
- var Fe = class {
445
- #t;
444
+ var Et = class {
445
+ #e;
446
446
  destroy() {
447
447
  this.clearGcTimeout();
448
448
  }
449
449
  scheduleGc() {
450
- this.clearGcTimeout(), j(this.gcTime) && (this.#t = w.setTimeout(() => {
450
+ this.clearGcTimeout(), Q(this.gcTime) && (this.#e = w.setTimeout(() => {
451
451
  this.optionalRemove();
452
452
  }, this.gcTime));
453
453
  }
454
- updateGcTime(e) {
454
+ updateGcTime(t) {
455
455
  this.gcTime = Math.max(
456
456
  this.gcTime || 0,
457
- e ?? (E ? 1 / 0 : 300 * 1e3)
457
+ t ?? (E ? 1 / 0 : 300 * 1e3)
458
458
  );
459
459
  }
460
460
  clearGcTimeout() {
461
- this.#t && (w.clearTimeout(this.#t), this.#t = void 0);
461
+ this.#e && (w.clearTimeout(this.#e), this.#e = void 0);
462
462
  }
463
- }, Je = class extends Fe {
464
- #t;
463
+ }, $t = class extends Et {
465
464
  #e;
465
+ #t;
466
466
  #s;
467
467
  #i;
468
468
  #r;
469
469
  #o;
470
470
  #a;
471
- constructor(e) {
472
- super(), this.#a = !1, this.#o = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#i = e.client, this.#s = this.#i.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = W(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
471
+ constructor(t) {
472
+ super(), this.#a = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#i = t.client, this.#s = this.#i.getQueryCache(), this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = W(this.options), this.state = t.state ?? this.#e, this.scheduleGc();
473
473
  }
474
474
  get meta() {
475
475
  return this.options.meta;
@@ -477,71 +477,71 @@ var Fe = class {
477
477
  get promise() {
478
478
  return this.#r?.promise;
479
479
  }
480
- setOptions(e) {
481
- if (this.options = { ...this.#o, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
482
- const t = W(this.options);
483
- t.data !== void 0 && (this.setState(
484
- J(t.data, t.dataUpdatedAt)
485
- ), this.#t = t);
480
+ setOptions(t) {
481
+ if (this.options = { ...this.#o, ...t }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
482
+ const e = W(this.options);
483
+ e.data !== void 0 && (this.setState(
484
+ J(e.data, e.dataUpdatedAt)
485
+ ), this.#e = e);
486
486
  }
487
487
  }
488
488
  optionalRemove() {
489
489
  !this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
490
490
  }
491
- setData(e, t) {
492
- const s = _(this.state.data, e, this.options);
491
+ setData(t, e) {
492
+ const s = k(this.state.data, t, this.options);
493
493
  return this.#n({
494
494
  data: s,
495
495
  type: "success",
496
- dataUpdatedAt: t?.updatedAt,
497
- manual: t?.manual
496
+ dataUpdatedAt: e?.updatedAt,
497
+ manual: e?.manual
498
498
  }), s;
499
499
  }
500
- setState(e, t) {
501
- this.#n({ type: "setState", state: e, setStateOptions: t });
500
+ setState(t, e) {
501
+ this.#n({ type: "setState", state: t, setStateOptions: e });
502
502
  }
503
- cancel(e) {
504
- const t = this.#r?.promise;
505
- return this.#r?.cancel(e), t ? t.then(C).catch(C) : Promise.resolve();
503
+ cancel(t) {
504
+ const e = this.#r?.promise;
505
+ return this.#r?.cancel(t), e ? e.then(C).catch(C) : Promise.resolve();
506
506
  }
507
507
  destroy() {
508
508
  super.destroy(), this.cancel({ silent: !0 });
509
509
  }
510
510
  reset() {
511
- this.destroy(), this.setState(this.#t);
511
+ this.destroy(), this.setState(this.#e);
512
512
  }
513
513
  isActive() {
514
514
  return this.observers.some(
515
- (e) => v(e.options.enabled, this) !== !1
515
+ (t) => v(t.options.enabled, this) !== !1
516
516
  );
517
517
  }
518
518
  isDisabled() {
519
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === U || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
519
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === _ || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
520
520
  }
521
521
  isStatic() {
522
522
  return this.getObserversCount() > 0 ? this.observers.some(
523
- (e) => I(e.options.staleTime, this) === "static"
523
+ (t) => I(t.options.staleTime, this) === "static"
524
524
  ) : !1;
525
525
  }
526
526
  isStale() {
527
527
  return this.getObserversCount() > 0 ? this.observers.some(
528
- (e) => e.getCurrentResult().isStale
528
+ (t) => t.getCurrentResult().isStale
529
529
  ) : this.state.data === void 0 || this.state.isInvalidated;
530
530
  }
531
- isStaleByTime(e = 0) {
532
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !te(this.state.dataUpdatedAt, e);
531
+ isStaleByTime(t = 0) {
532
+ return this.state.data === void 0 ? !0 : t === "static" ? !1 : this.state.isInvalidated ? !0 : !et(this.state.dataUpdatedAt, t);
533
533
  }
534
534
  onFocus() {
535
- this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
535
+ this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
536
536
  }
537
537
  onOnline() {
538
- this.observers.find((t) => t.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
538
+ this.observers.find((e) => e.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
539
539
  }
540
- addObserver(e) {
541
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), this.#s.notify({ type: "observerAdded", query: this, observer: e }));
540
+ addObserver(t) {
541
+ this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), this.#s.notify({ type: "observerAdded", query: this, observer: t }));
542
542
  }
543
- removeObserver(e) {
544
- this.observers.includes(e) && (this.observers = this.observers.filter((t) => t !== e), this.observers.length || (this.#r && (this.#a ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#s.notify({ type: "observerRemoved", query: this, observer: e }));
543
+ removeObserver(t) {
544
+ this.observers.includes(t) && (this.observers = this.observers.filter((e) => e !== t), this.observers.length || (this.#r && (this.#a ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#s.notify({ type: "observerRemoved", query: this, observer: t }));
545
545
  }
546
546
  getObserversCount() {
547
547
  return this.observers.length;
@@ -549,17 +549,17 @@ var Fe = class {
549
549
  invalidate() {
550
550
  this.state.isInvalidated || this.#n({ type: "invalidate" });
551
551
  }
552
- async fetch(e, t) {
552
+ async fetch(t, e) {
553
553
  if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
554
554
  // re-start the fetch; there is a chance that the query is still in a
555
555
  // pending state when that happens
556
556
  this.#r?.status() !== "rejected") {
557
- if (this.state.data !== void 0 && t?.cancelRefetch)
557
+ if (this.state.data !== void 0 && e?.cancelRefetch)
558
558
  this.cancel({ silent: !0 });
559
559
  else if (this.#r)
560
560
  return this.#r.continueRetry(), this.#r.promise;
561
561
  }
562
- if (e && this.setOptions(e), !this.options.queryFn) {
562
+ if (t && this.setOptions(t), !this.options.queryFn) {
563
563
  const i = this.observers.find((o) => o.options.queryFn);
564
564
  i && this.setOptions(i.options);
565
565
  }
@@ -572,7 +572,7 @@ var Fe = class {
572
572
  get: () => (this.#a = !0, s.signal)
573
573
  });
574
574
  }, n = () => {
575
- const i = be(this.options, t), l = (() => {
575
+ const i = vt(this.options, e), l = (() => {
576
576
  const c = {
577
577
  client: this.#i,
578
578
  queryKey: this.queryKey,
@@ -587,7 +587,7 @@ var Fe = class {
587
587
  ) : i(l);
588
588
  }, a = (() => {
589
589
  const i = {
590
- fetchOptions: t,
590
+ fetchOptions: e,
591
591
  options: this.options,
592
592
  queryKey: this.queryKey,
593
593
  client: this.#i,
@@ -596,12 +596,12 @@ var Fe = class {
596
596
  };
597
597
  return r(i), i;
598
598
  })();
599
- this.options.behavior?.onFetch(a, this), this.#e = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#n({ type: "fetch", meta: a.fetchOptions?.meta }), this.#r = Ce({
600
- initialPromise: t?.initialPromise,
599
+ this.options.behavior?.onFetch(a, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#n({ type: "fetch", meta: a.fetchOptions?.meta }), this.#r = wt({
600
+ initialPromise: e?.initialPromise,
601
601
  fn: a.fetchFn,
602
602
  onCancel: (i) => {
603
- i instanceof Q && i.revert && this.setState({
604
- ...this.#e,
603
+ i instanceof U && i.revert && this.setState({
604
+ ...this.#t,
605
605
  fetchStatus: "idle"
606
606
  }), s.abort();
607
607
  },
@@ -631,7 +631,7 @@ var Fe = class {
631
631
  this
632
632
  ), i;
633
633
  } catch (i) {
634
- if (i instanceof Q) {
634
+ if (i instanceof U) {
635
635
  if (i.silent)
636
636
  return this.#r.promise;
637
637
  if (i.revert) {
@@ -655,14 +655,14 @@ var Fe = class {
655
655
  this.scheduleGc();
656
656
  }
657
657
  }
658
- #n(e) {
659
- const t = (s) => {
660
- switch (e.type) {
658
+ #n(t) {
659
+ const e = (s) => {
660
+ switch (t.type) {
661
661
  case "failed":
662
662
  return {
663
663
  ...s,
664
- fetchFailureCount: e.failureCount,
665
- fetchFailureReason: e.error
664
+ fetchFailureCount: t.failureCount,
665
+ fetchFailureReason: t.error
666
666
  };
667
667
  case "pause":
668
668
  return {
@@ -677,23 +677,23 @@ var Fe = class {
677
677
  case "fetch":
678
678
  return {
679
679
  ...s,
680
- ...ne(s.data, this.options),
681
- fetchMeta: e.meta ?? null
680
+ ...nt(s.data, this.options),
681
+ fetchMeta: t.meta ?? null
682
682
  };
683
683
  case "success":
684
684
  const r = {
685
685
  ...s,
686
- ...J(e.data, e.dataUpdatedAt),
686
+ ...J(t.data, t.dataUpdatedAt),
687
687
  dataUpdateCount: s.dataUpdateCount + 1,
688
- ...!e.manual && {
688
+ ...!t.manual && {
689
689
  fetchStatus: "idle",
690
690
  fetchFailureCount: 0,
691
691
  fetchFailureReason: null
692
692
  }
693
693
  };
694
- return this.#e = e.manual ? r : void 0, r;
694
+ return this.#t = t.manual ? r : void 0, r;
695
695
  case "error":
696
- const n = e.error;
696
+ const n = t.error;
697
697
  return {
698
698
  ...s,
699
699
  error: n,
@@ -712,41 +712,41 @@ var Fe = class {
712
712
  case "setState":
713
713
  return {
714
714
  ...s,
715
- ...e.state
715
+ ...t.state
716
716
  };
717
717
  }
718
718
  };
719
- this.state = t(this.state), B.batch(() => {
719
+ this.state = e(this.state), B.batch(() => {
720
720
  this.observers.forEach((s) => {
721
721
  s.onQueryUpdate();
722
- }), this.#s.notify({ query: this, type: "updated", action: e });
722
+ }), this.#s.notify({ query: this, type: "updated", action: t });
723
723
  });
724
724
  }
725
725
  };
726
- function ne(e, t) {
726
+ function nt(t, e) {
727
727
  return {
728
728
  fetchFailureCount: 0,
729
729
  fetchFailureReason: null,
730
- fetchStatus: ie(t.networkMode) ? "fetching" : "paused",
731
- ...e === void 0 && {
730
+ fetchStatus: it(e.networkMode) ? "fetching" : "paused",
731
+ ...t === void 0 && {
732
732
  error: null,
733
733
  status: "pending"
734
734
  }
735
735
  };
736
736
  }
737
- function J(e, t) {
737
+ function J(t, e) {
738
738
  return {
739
- data: e,
740
- dataUpdatedAt: t ?? Date.now(),
739
+ data: t,
740
+ dataUpdatedAt: e ?? Date.now(),
741
741
  error: null,
742
742
  isInvalidated: !1,
743
743
  status: "success"
744
744
  };
745
745
  }
746
- function W(e) {
747
- 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;
746
+ function W(t) {
747
+ const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
748
748
  return {
749
- data: t,
749
+ data: e,
750
750
  dataUpdateCount: 0,
751
751
  dataUpdatedAt: s ? r ?? Date.now() : 0,
752
752
  error: null,
@@ -760,12 +760,12 @@ function W(e) {
760
760
  fetchStatus: "idle"
761
761
  };
762
762
  }
763
- var ae = class extends H {
764
- constructor(e, t) {
765
- super(), this.options = t, this.#t = e, this.#n = null, this.#a = L(), this.bindMethods(), this.setOptions(t);
763
+ var Ct = class extends H {
764
+ constructor(t, e) {
765
+ super(), this.options = e, this.#e = t, this.#n = null, this.#a = L(), this.bindMethods(), this.setOptions(e);
766
766
  }
767
- #t;
768
- #e = void 0;
767
+ #e;
768
+ #t = void 0;
769
769
  #s = void 0;
770
770
  #i = void 0;
771
771
  #r;
@@ -785,113 +785,113 @@ var ae = class extends H {
785
785
  this.refetch = this.refetch.bind(this);
786
786
  }
787
787
  onSubscribe() {
788
- this.listeners.size === 1 && (this.#e.addObserver(this), Z(this.#e, this.options) ? this.#l() : this.updateResult(), this.#g());
788
+ this.listeners.size === 1 && (this.#t.addObserver(this), Z(this.#t, this.options) ? this.#l() : this.updateResult(), this.#g());
789
789
  }
790
790
  onUnsubscribe() {
791
791
  this.hasListeners() || this.destroy();
792
792
  }
793
793
  shouldFetchOnReconnect() {
794
794
  return K(
795
- this.#e,
795
+ this.#t,
796
796
  this.options,
797
797
  this.options.refetchOnReconnect
798
798
  );
799
799
  }
800
800
  shouldFetchOnWindowFocus() {
801
801
  return K(
802
- this.#e,
802
+ this.#t,
803
803
  this.options,
804
804
  this.options.refetchOnWindowFocus
805
805
  );
806
806
  }
807
807
  destroy() {
808
- this.listeners = /* @__PURE__ */ new Set(), this.#S(), this.#R(), this.#e.removeObserver(this);
808
+ this.listeners = /* @__PURE__ */ new Set(), this.#S(), this.#R(), this.#t.removeObserver(this);
809
809
  }
810
- setOptions(e) {
811
- const t = this.options, s = this.#e;
812
- if (this.options = this.#t.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof v(this.options.enabled, this.#e) != "boolean")
810
+ setOptions(t) {
811
+ const e = this.options, s = this.#t;
812
+ if (this.options = this.#e.defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof v(this.options.enabled, this.#t) != "boolean")
813
813
  throw new Error(
814
814
  "Expected enabled to be a boolean or a callback that returns a boolean"
815
815
  );
816
- this.#O(), this.#e.setOptions(this.options), t._defaulted && !k(this.options, t) && this.#t.getQueryCache().notify({
816
+ this.#O(), this.#t.setOptions(this.options), e._defaulted && !N(this.options, e) && this.#e.getQueryCache().notify({
817
817
  type: "observerOptionsUpdated",
818
- query: this.#e,
818
+ query: this.#t,
819
819
  observer: this
820
820
  });
821
821
  const r = this.hasListeners();
822
822
  r && X(
823
- this.#e,
823
+ this.#t,
824
824
  s,
825
825
  this.options,
826
- t
827
- ) && this.#l(), this.updateResult(), r && (this.#e !== s || v(this.options.enabled, this.#e) !== v(t.enabled, this.#e) || I(this.options.staleTime, this.#e) !== I(t.staleTime, this.#e)) && this.#v();
826
+ e
827
+ ) && this.#l(), this.updateResult(), r && (this.#t !== s || v(this.options.enabled, this.#t) !== v(e.enabled, this.#t) || I(this.options.staleTime, this.#t) !== I(e.staleTime, this.#t)) && this.#v();
828
828
  const n = this.#m();
829
- r && (this.#e !== s || v(this.options.enabled, this.#e) !== v(t.enabled, this.#e) || n !== this.#u) && this.#b(n);
829
+ r && (this.#t !== s || v(this.options.enabled, this.#t) !== v(e.enabled, this.#t) || n !== this.#u) && this.#b(n);
830
830
  }
831
- getOptimisticResult(e) {
832
- const t = this.#t.getQueryCache().build(this.#t, e), s = this.createResult(t, e);
833
- return Ie(this, s) && (this.#i = s, this.#o = this.options, this.#r = this.#e.state), s;
831
+ getOptimisticResult(t) {
832
+ const e = this.#e.getQueryCache().build(this.#e, t), s = this.createResult(e, t);
833
+ return Tt(this, s) && (this.#i = s, this.#o = this.options, this.#r = this.#t.state), s;
834
834
  }
835
835
  getCurrentResult() {
836
836
  return this.#i;
837
837
  }
838
- trackResult(e, t) {
839
- return new Proxy(e, {
840
- get: (s, r) => (this.trackProp(r), t?.(r), r === "promise" && (this.trackProp("data"), !this.options.experimental_prefetchInRender && this.#a.status === "pending" && this.#a.reject(
838
+ trackResult(t, e) {
839
+ return new Proxy(t, {
840
+ get: (s, r) => (this.trackProp(r), e?.(r), r === "promise" && (this.trackProp("data"), !this.options.experimental_prefetchInRender && this.#a.status === "pending" && this.#a.reject(
841
841
  new Error(
842
842
  "experimental_prefetchInRender feature flag is not enabled"
843
843
  )
844
844
  )), Reflect.get(s, r))
845
845
  });
846
846
  }
847
- trackProp(e) {
848
- this.#p.add(e);
847
+ trackProp(t) {
848
+ this.#p.add(t);
849
849
  }
850
850
  getCurrentQuery() {
851
- return this.#e;
851
+ return this.#t;
852
852
  }
853
- refetch({ ...e } = {}) {
853
+ refetch({ ...t } = {}) {
854
854
  return this.fetch({
855
- ...e
855
+ ...t
856
856
  });
857
857
  }
858
- fetchOptimistic(e) {
859
- const t = this.#t.defaultQueryOptions(e), s = this.#t.getQueryCache().build(this.#t, t);
860
- return s.fetch().then(() => this.createResult(s, t));
858
+ fetchOptimistic(t) {
859
+ const e = this.#e.defaultQueryOptions(t), s = this.#e.getQueryCache().build(this.#e, e);
860
+ return s.fetch().then(() => this.createResult(s, e));
861
861
  }
862
- fetch(e) {
862
+ fetch(t) {
863
863
  return this.#l({
864
- ...e,
865
- cancelRefetch: e.cancelRefetch ?? !0
864
+ ...t,
865
+ cancelRefetch: t.cancelRefetch ?? !0
866
866
  }).then(() => (this.updateResult(), this.#i));
867
867
  }
868
- #l(e) {
868
+ #l(t) {
869
869
  this.#O();
870
- let t = this.#e.fetch(
870
+ let e = this.#t.fetch(
871
871
  this.options,
872
- e
872
+ t
873
873
  );
874
- return e?.throwOnError || (t = t.catch(C)), t;
874
+ return t?.throwOnError || (e = e.catch(C)), e;
875
875
  }
876
876
  #v() {
877
877
  this.#S();
878
- const e = I(
878
+ const t = I(
879
879
  this.options.staleTime,
880
- this.#e
880
+ this.#t
881
881
  );
882
- if (E || this.#i.isStale || !j(e))
882
+ if (E || this.#i.isStale || !Q(t))
883
883
  return;
884
- const s = te(this.#i.dataUpdatedAt, e) + 1;
884
+ const s = et(this.#i.dataUpdatedAt, t) + 1;
885
885
  this.#c = w.setTimeout(() => {
886
886
  this.#i.isStale || this.updateResult();
887
887
  }, s);
888
888
  }
889
889
  #m() {
890
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
890
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
891
891
  }
892
- #b(e) {
893
- this.#R(), this.#u = e, !(E || v(this.options.enabled, this.#e) === !1 || !j(this.#u) || this.#u === 0) && (this.#h = w.setInterval(() => {
894
- (this.options.refetchIntervalInBackground || se.isFocused()) && this.#l();
892
+ #b(t) {
893
+ this.#R(), this.#u = t, !(E || v(this.options.enabled, this.#t) === !1 || !Q(this.#u) || this.#u === 0) && (this.#h = w.setInterval(() => {
894
+ (this.options.refetchIntervalInBackground || st.isFocused()) && this.#l();
895
895
  }, this.#u));
896
896
  }
897
897
  #g() {
@@ -903,36 +903,36 @@ var ae = class extends H {
903
903
  #R() {
904
904
  this.#h && (w.clearInterval(this.#h), this.#h = void 0);
905
905
  }
906
- createResult(e, t) {
907
- const s = this.#e, r = this.options, n = this.#i, u = this.#r, a = this.#o, o = e !== s ? e.state : this.#s, { state: l } = e;
906
+ createResult(t, e) {
907
+ const s = this.#t, r = this.options, n = this.#i, u = this.#r, a = this.#o, o = t !== s ? t.state : this.#s, { state: l } = t;
908
908
  let c = { ...l }, d = !1, h;
909
- if (t._optimisticResults) {
910
- const y = this.hasListeners(), M = !y && Z(e, t), T = y && X(e, s, t, r);
909
+ if (e._optimisticResults) {
910
+ const y = this.hasListeners(), M = !y && Z(t, e), T = y && X(t, s, e, r);
911
911
  (M || T) && (c = {
912
912
  ...c,
913
- ...ne(l.data, e.options)
914
- }), t._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
913
+ ...nt(l.data, t.options)
914
+ }), e._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
915
915
  }
916
916
  let { error: R, errorUpdatedAt: F, status: f } = c;
917
917
  h = c.data;
918
918
  let g = !1;
919
- if (t.placeholderData !== void 0 && h === void 0 && f === "pending") {
919
+ if (e.placeholderData !== void 0 && h === void 0 && f === "pending") {
920
920
  let y;
921
- n?.isPlaceholderData && t.placeholderData === a?.placeholderData ? (y = n.data, g = !0) : y = typeof t.placeholderData == "function" ? t.placeholderData(
921
+ n?.isPlaceholderData && e.placeholderData === a?.placeholderData ? (y = n.data, g = !0) : y = typeof e.placeholderData == "function" ? e.placeholderData(
922
922
  this.#d?.state.data,
923
923
  this.#d
924
- ) : t.placeholderData, y !== void 0 && (f = "success", h = _(
924
+ ) : e.placeholderData, y !== void 0 && (f = "success", h = k(
925
925
  n?.data,
926
926
  y,
927
- t
927
+ e
928
928
  ), d = !0);
929
929
  }
930
- if (t.select && h !== void 0 && !g)
931
- if (n && h === u?.data && t.select === this.#y)
930
+ if (e.select && h !== void 0 && !g)
931
+ if (n && h === u?.data && e.select === this.#y)
932
932
  h = this.#f;
933
933
  else
934
934
  try {
935
- this.#y = t.select, h = t.select(h), h = _(n?.data, h, t), this.#f = h, this.#n = null;
935
+ this.#y = e.select, h = e.select(h), h = k(n?.data, h, e), this.#f = h, this.#n = null;
936
936
  } catch (y) {
937
937
  this.#n = y;
938
938
  }
@@ -960,10 +960,10 @@ var ae = class extends H {
960
960
  isPaused: c.fetchStatus === "paused",
961
961
  isPlaceholderData: d,
962
962
  isRefetchError: O && D,
963
- isStale: G(e, t),
963
+ isStale: G(t, e),
964
964
  refetch: this.refetch,
965
965
  promise: this.#a,
966
- isEnabled: v(t.enabled, e) !== !1
966
+ isEnabled: v(e.enabled, t) !== !1
967
967
  };
968
968
  if (this.options.experimental_prefetchInRender) {
969
969
  const y = (x) => {
@@ -974,7 +974,7 @@ var ae = class extends H {
974
974
  }, T = this.#a;
975
975
  switch (T.status) {
976
976
  case "pending":
977
- e.queryHash === s.queryHash && y(T);
977
+ t.queryHash === s.queryHash && y(T);
978
978
  break;
979
979
  case "fulfilled":
980
980
  (b.status === "error" || b.data !== T.value) && M();
@@ -987,12 +987,12 @@ var ae = class extends H {
987
987
  return b;
988
988
  }
989
989
  updateResult() {
990
- const e = this.#i, t = this.createResult(this.#e, this.options);
991
- if (this.#r = this.#e.state, this.#o = this.options, this.#r.data !== void 0 && (this.#d = this.#e), k(t, e))
990
+ const t = this.#i, e = this.createResult(this.#t, this.options);
991
+ if (this.#r = this.#t.state, this.#o = this.options, this.#r.data !== void 0 && (this.#d = this.#t), N(e, t))
992
992
  return;
993
- this.#i = t;
993
+ this.#i = e;
994
994
  const s = () => {
995
- if (!e)
995
+ if (!t)
996
996
  return !0;
997
997
  const { notifyOnChangeProps: r } = this.options, n = typeof r == "function" ? r() : r;
998
998
  if (n === "all" || !n && !this.#p.size)
@@ -1002,126 +1002,126 @@ var ae = class extends H {
1002
1002
  );
1003
1003
  return this.options.throwOnError && u.add("error"), Object.keys(this.#i).some((a) => {
1004
1004
  const i = a;
1005
- return this.#i[i] !== e[i] && u.has(i);
1005
+ return this.#i[i] !== t[i] && u.has(i);
1006
1006
  });
1007
1007
  };
1008
1008
  this.#w({ listeners: s() });
1009
1009
  }
1010
1010
  #O() {
1011
- const e = this.#t.getQueryCache().build(this.#t, this.options);
1012
- if (e === this.#e)
1011
+ const t = this.#e.getQueryCache().build(this.#e, this.options);
1012
+ if (t === this.#t)
1013
1013
  return;
1014
- const t = this.#e;
1015
- this.#e = e, this.#s = e.state, this.hasListeners() && (t?.removeObserver(this), e.addObserver(this));
1014
+ const e = this.#t;
1015
+ this.#t = t, this.#s = t.state, this.hasListeners() && (e?.removeObserver(this), t.addObserver(this));
1016
1016
  }
1017
1017
  onQueryUpdate() {
1018
1018
  this.updateResult(), this.hasListeners() && this.#g();
1019
1019
  }
1020
- #w(e) {
1020
+ #w(t) {
1021
1021
  B.batch(() => {
1022
- e.listeners && this.listeners.forEach((t) => {
1023
- t(this.#i);
1024
- }), this.#t.getQueryCache().notify({
1025
- query: this.#e,
1022
+ t.listeners && this.listeners.forEach((e) => {
1023
+ e(this.#i);
1024
+ }), this.#e.getQueryCache().notify({
1025
+ query: this.#t,
1026
1026
  type: "observerResultsUpdated"
1027
1027
  });
1028
1028
  });
1029
1029
  }
1030
1030
  };
1031
- function Te(e, t) {
1032
- return v(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1031
+ function Ft(t, e) {
1032
+ return v(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
1033
1033
  }
1034
- function Z(e, t) {
1035
- return Te(e, t) || e.state.data !== void 0 && K(e, t, t.refetchOnMount);
1034
+ function Z(t, e) {
1035
+ return Ft(t, e) || t.state.data !== void 0 && K(t, e, e.refetchOnMount);
1036
1036
  }
1037
- function K(e, t, s) {
1038
- if (v(t.enabled, e) !== !1 && I(t.staleTime, e) !== "static") {
1039
- const r = typeof s == "function" ? s(e) : s;
1040
- return r === "always" || r !== !1 && G(e, t);
1037
+ function K(t, e, s) {
1038
+ if (v(e.enabled, t) !== !1 && I(e.staleTime, t) !== "static") {
1039
+ const r = typeof s == "function" ? s(t) : s;
1040
+ return r === "always" || r !== !1 && G(t, e);
1041
1041
  }
1042
1042
  return !1;
1043
1043
  }
1044
- function X(e, t, s, r) {
1045
- return (e !== t || v(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && G(e, s);
1044
+ function X(t, e, s, r) {
1045
+ return (t !== e || v(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && G(t, s);
1046
1046
  }
1047
- function G(e, t) {
1048
- return v(t.enabled, e) !== !1 && e.isStaleByTime(I(t.staleTime, e));
1047
+ function G(t, e) {
1048
+ return v(e.enabled, t) !== !1 && t.isStaleByTime(I(e.staleTime, t));
1049
1049
  }
1050
- function Ie(e, t) {
1051
- return !k(e.getCurrentResult(), t);
1050
+ function Tt(t, e) {
1051
+ return !N(t.getCurrentResult(), e);
1052
1052
  }
1053
- var oe = p.createContext(
1053
+ var at = p.createContext(
1054
1054
  void 0
1055
- ), Pe = (e) => {
1056
- const t = p.useContext(oe);
1057
- if (e)
1058
- return e;
1059
- if (!t)
1055
+ ), It = (t) => {
1056
+ const e = p.useContext(at);
1057
+ if (t)
1058
+ return t;
1059
+ if (!e)
1060
1060
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1061
- return t;
1062
- }, We = ({
1063
- client: e,
1064
- children: t
1065
- }) => (p.useEffect(() => (e.mount(), () => {
1066
- e.unmount();
1067
- }), [e]), /* @__PURE__ */ ee.jsx(oe.Provider, { value: e, children: t })), ue = p.createContext(!1), De = () => p.useContext(ue), Ze = ue.Provider;
1068
- function ce() {
1069
- let e = !1;
1061
+ return e;
1062
+ }, Jt = ({
1063
+ client: t,
1064
+ children: e
1065
+ }) => (p.useEffect(() => (t.mount(), () => {
1066
+ t.unmount();
1067
+ }), [t]), /* @__PURE__ */ tt.jsx(at.Provider, { value: t, children: e })), ot = p.createContext(!1), Pt = () => p.useContext(ot), Wt = ot.Provider;
1068
+ function ut() {
1069
+ let t = !1;
1070
1070
  return {
1071
1071
  clearReset: () => {
1072
- e = !1;
1072
+ t = !1;
1073
1073
  },
1074
1074
  reset: () => {
1075
- e = !0;
1075
+ t = !0;
1076
1076
  },
1077
- isReset: () => e
1077
+ isReset: () => t
1078
1078
  };
1079
1079
  }
1080
- var he = p.createContext(ce()), Me = () => p.useContext(he), Xe = ({
1081
- children: e
1080
+ var ct = p.createContext(ut()), Dt = () => p.useContext(ct), Zt = ({
1081
+ children: t
1082
1082
  }) => {
1083
- const [t] = p.useState(() => ce());
1084
- return /* @__PURE__ */ ee.jsx(he.Provider, { value: t, children: typeof e == "function" ? e(t) : e });
1085
- }, xe = (e, t) => {
1086
- (e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
1087
- }, Ue = (e) => {
1083
+ const [e] = p.useState(() => ut());
1084
+ return /* @__PURE__ */ tt.jsx(ct.Provider, { value: e, children: typeof t == "function" ? t(e) : t });
1085
+ }, Mt = (t, e) => {
1086
+ (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
1087
+ }, xt = (t) => {
1088
1088
  p.useEffect(() => {
1089
- e.clearReset();
1090
- }, [e]);
1091
- }, Qe = ({
1092
- result: e,
1093
- errorResetBoundary: t,
1089
+ t.clearReset();
1090
+ }, [t]);
1091
+ }, Ut = ({
1092
+ result: t,
1093
+ errorResetBoundary: e,
1094
1094
  throwOnError: s,
1095
1095
  query: r,
1096
1096
  suspense: n
1097
- }) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || ge(s, [e.error, r])), je = (e, t) => t.state.data === void 0, qe = (e) => {
1098
- if (e.suspense) {
1099
- const s = (n) => n === "static" ? n : Math.max(n ?? 1e3, 1e3), r = e.staleTime;
1100
- e.staleTime = typeof r == "function" ? (...n) => s(r(...n)) : s(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(
1101
- e.gcTime,
1097
+ }) => t.isError && !e.isReset() && !t.isFetching && r && (n && t.data === void 0 || mt(s, [t.error, r])), Xt = (t, e) => e.state.data === void 0, Qt = (t) => {
1098
+ if (t.suspense) {
1099
+ const s = (n) => n === "static" ? n : Math.max(n ?? 1e3, 1e3), r = t.staleTime;
1100
+ t.staleTime = typeof r == "function" ? (...n) => s(r(...n)) : s(r), typeof t.gcTime == "number" && (t.gcTime = Math.max(
1101
+ t.gcTime,
1102
1102
  1e3
1103
1103
  ));
1104
1104
  }
1105
- }, Ne = (e, t) => e.isLoading && e.isFetching && !t, ke = (e, t) => e?.suspense && t.isPending, Y = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1105
+ }, jt = (t, e) => t.isLoading && t.isFetching && !e, qt = (t, e) => t?.suspense && e.isPending, Y = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1106
1106
  s.clearReset();
1107
1107
  });
1108
- function le(e, t, s) {
1109
- if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
1108
+ function Nt(t, e, s) {
1109
+ if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1110
1110
  throw new Error(
1111
1111
  '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'
1112
1112
  );
1113
- const r = De(), n = Me(), u = Pe(s), a = u.defaultQueryOptions(e);
1113
+ const r = Pt(), n = Dt(), u = It(s), a = u.defaultQueryOptions(t);
1114
1114
  u.getDefaultOptions().queries?._experimental_beforeQuery?.(
1115
1115
  a
1116
1116
  ), process.env.NODE_ENV !== "production" && (a.queryFn || console.error(
1117
1117
  `[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
1118
- )), a._optimisticResults = r ? "isRestoring" : "optimistic", qe(a), xe(a, n), Ue(n);
1118
+ )), a._optimisticResults = r ? "isRestoring" : "optimistic", Qt(a), Mt(a, n), xt(n);
1119
1119
  const i = !u.getQueryCache().get(a.queryHash), [o] = p.useState(
1120
- () => new t(
1120
+ () => new e(
1121
1121
  u,
1122
1122
  a
1123
1123
  )
1124
- ), l = o.getOptimisticResult(a), c = !r && e.subscribed !== !1;
1124
+ ), l = o.getOptimisticResult(a), c = !r && t.subscribed !== !1;
1125
1125
  if (p.useSyncExternalStore(
1126
1126
  p.useCallback(
1127
1127
  (d) => {
@@ -1134,9 +1134,9 @@ function le(e, t, s) {
1134
1134
  () => o.getCurrentResult()
1135
1135
  ), p.useEffect(() => {
1136
1136
  o.setOptions(a);
1137
- }, [a, o]), ke(a, l))
1137
+ }, [a, o]), qt(a, l))
1138
1138
  throw Y(a, o, n);
1139
- if (Qe({
1139
+ if (Ut({
1140
1140
  result: l,
1141
1141
  errorResetBoundary: n,
1142
1142
  throwOnError: a.throwOnError,
@@ -1147,7 +1147,7 @@ function le(e, t, s) {
1147
1147
  return u.getDefaultOptions().queries?._experimental_afterQuery?.(
1148
1148
  a,
1149
1149
  l
1150
- ), a.experimental_prefetchInRender && !E && Ne(l, r) && (i ? (
1150
+ ), a.experimental_prefetchInRender && !E && jt(l, r) && (i ? (
1151
1151
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1152
1152
  Y(a, o, n)
1153
1153
  ) : (
@@ -1157,70 +1157,56 @@ function le(e, t, s) {
1157
1157
  o.updateResult();
1158
1158
  }), a.notifyOnChangeProps ? l : o.trackResult(l);
1159
1159
  }
1160
- function Ye(e, t) {
1161
- return le(e, ae, t);
1162
- }
1163
- function et(e, t) {
1164
- return process.env.NODE_ENV !== "production" && e.queryFn === U && console.error("skipToken is not allowed for useSuspenseQuery"), le(
1165
- {
1166
- ...e,
1167
- enabled: !0,
1168
- suspense: !0,
1169
- throwOnError: je,
1170
- placeholderData: void 0
1171
- },
1172
- ae,
1173
- t
1174
- );
1160
+ function Yt(t, e) {
1161
+ return Nt(t, Ct, e);
1175
1162
  }
1176
1163
  export {
1177
- Me as A,
1178
- qe as B,
1179
- xe as C,
1180
- Ue as D,
1181
- ke as E,
1182
- Y as F,
1183
- Ne as G,
1184
- Qe as H,
1185
- le as I,
1186
- je as J,
1187
- Ze as K,
1188
- oe as L,
1189
- We as M,
1190
- Xe as N,
1191
- Q as O,
1192
- Re as P,
1193
- Je as Q,
1194
- Fe as R,
1164
+ Pt as A,
1165
+ Dt as B,
1166
+ Qt as C,
1167
+ Mt as D,
1168
+ xt as E,
1169
+ qt as F,
1170
+ Y as G,
1171
+ jt as H,
1172
+ Ut as I,
1173
+ Wt as J,
1174
+ at as K,
1175
+ Jt as L,
1176
+ Zt as M,
1177
+ U as N,
1178
+ gt as O,
1179
+ zt as P,
1180
+ Ct as Q,
1181
+ Et as R,
1195
1182
  H as S,
1196
- $e as T,
1197
- E as U,
1198
- w as V,
1199
- Pe as a,
1200
- C as b,
1201
- Ce as c,
1202
- ge as d,
1203
- Ye as e,
1204
- be as f,
1205
- Ge as g,
1206
- q as h,
1207
- Be as i,
1208
- ye as j,
1209
- Ve as k,
1210
- Ke as l,
1211
- He as m,
1183
+ E as T,
1184
+ w as U,
1185
+ N as a,
1186
+ It as b,
1187
+ wt as c,
1188
+ Xt as d,
1189
+ C as e,
1190
+ mt as f,
1191
+ Yt as g,
1192
+ j as h,
1193
+ vt as i,
1194
+ Bt as j,
1195
+ Ht as k,
1196
+ Vt as l,
1197
+ Kt as m,
1212
1198
  B as n,
1213
- se as o,
1214
- re as p,
1215
- Le as q,
1216
- I as r,
1217
- k as s,
1218
- ze as t,
1219
- et as u,
1220
- V as v,
1221
- U as w,
1222
- ae as x,
1223
- N as y,
1224
- De as z
1199
+ dt as o,
1200
+ $t as p,
1201
+ Lt as q,
1202
+ st as r,
1203
+ _ as s,
1204
+ Gt as t,
1205
+ Nt as u,
1206
+ rt as v,
1207
+ I as w,
1208
+ _t as x,
1209
+ V as y,
1210
+ q as z
1225
1211
  };
1226
- //# sourceMappingURL=useSuspenseQuery-CSB_rVek.js.map
1212
+ //# sourceMappingURL=useQuery-ht7aWJ3S.js.map