zudoku 0.39.5 → 0.40.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 (242) hide show
  1. package/dist/app/entry.client.js +2 -0
  2. package/dist/app/entry.client.js.map +1 -1
  3. package/dist/config/config.d.ts +3 -1
  4. package/dist/config/loader.d.ts +1 -0
  5. package/dist/config/loader.js +1 -1
  6. package/dist/config/loader.js.map +1 -1
  7. package/dist/config/validators/BuildSchema.d.ts +59 -0
  8. package/dist/config/validators/BuildSchema.js +31 -0
  9. package/dist/config/validators/BuildSchema.js.map +1 -0
  10. package/dist/config/validators/common.d.ts +7 -51
  11. package/dist/config/validators/common.js +1 -7
  12. package/dist/config/validators/common.js.map +1 -1
  13. package/dist/config/validators/icon-types.d.ts +1 -1
  14. package/dist/config/validators/validate.d.ts +2 -18
  15. package/dist/index.d.ts +1 -1
  16. package/dist/lib/authentication/providers/clerk.js +2 -2
  17. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  18. package/dist/lib/components/Footer.js +2 -2
  19. package/dist/lib/components/Footer.js.map +1 -1
  20. package/dist/lib/components/Layout.js +2 -1
  21. package/dist/lib/components/Layout.js.map +1 -1
  22. package/dist/lib/components/Search.js +7 -1
  23. package/dist/lib/components/Search.js.map +1 -1
  24. package/dist/lib/components/navigation/Sidebar.js +3 -1
  25. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  26. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  27. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  28. package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
  29. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
  30. package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
  31. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
  32. package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
  33. package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
  34. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
  35. package/dist/lib/ui/Callout.js +1 -1
  36. package/dist/lib/ui/Callout.js.map +1 -1
  37. package/dist/lib/ui/Form.d.ts +1 -1
  38. package/dist/lib/util/MdxComponents.d.ts +1 -0
  39. package/dist/lib/util/MdxComponents.js +2 -0
  40. package/dist/lib/util/MdxComponents.js.map +1 -1
  41. package/dist/lib/util/detectOS.d.ts +1 -0
  42. package/dist/lib/util/detectOS.js +11 -0
  43. package/dist/lib/util/detectOS.js.map +1 -0
  44. package/dist/vite/plugin-api.js +34 -13
  45. package/dist/vite/plugin-api.js.map +1 -1
  46. package/dist/vite/plugin-sidebar.js +1 -1
  47. package/dist/vite/plugin-sidebar.js.map +1 -1
  48. package/dist/zuplo/with-zuplo-processors.js +3 -3
  49. package/dist/zuplo/with-zuplo-processors.js.map +1 -1
  50. package/dist/zuplo/with-zuplo.d.ts +1 -1
  51. package/lib/{AuthenticationPlugin-foqdvvkf.js → AuthenticationPlugin-CJOFRBk3.js} +4 -4
  52. package/lib/{AuthenticationPlugin-foqdvvkf.js.map → AuthenticationPlugin-CJOFRBk3.js.map} +1 -1
  53. package/lib/{Button-Fp19CMUr.js → Button-BBNrKpQd.js} +2 -2
  54. package/lib/{Button-Fp19CMUr.js.map → Button-BBNrKpQd.js.map} +1 -1
  55. package/lib/{Callout-B2vsR09t.js → Callout-D3Ja4OPX.js} +14 -13
  56. package/lib/{Callout-B2vsR09t.js.map → Callout-D3Ja4OPX.js.map} +1 -1
  57. package/lib/{CategoryHeading-DpB47wvk.js → CategoryHeading-D06WK_Wo.js} +2 -2
  58. package/lib/{CategoryHeading-DpB47wvk.js.map → CategoryHeading-D06WK_Wo.js.map} +1 -1
  59. package/lib/{Dialog-sbgekbjb.js → Dialog-ByYz4ABw.js} +2 -2
  60. package/lib/{Dialog-sbgekbjb.js.map → Dialog-ByYz4ABw.js.map} +1 -1
  61. package/lib/{Drawer-kDAfOq_2.js → Drawer-CEwbkLDb.js} +2 -2
  62. package/lib/Drawer-CEwbkLDb.js.map +1 -0
  63. package/lib/{Markdown-aF5FdsNi.js → Markdown-C5h6bxbE.js} +4239 -4073
  64. package/lib/Markdown-C5h6bxbE.js.map +1 -0
  65. package/lib/{MdxPage-Vw_dc9Yz.js → MdxPage-B66ht0D_.js} +9 -9
  66. package/lib/{MdxPage-Vw_dc9Yz.js.map → MdxPage-B66ht0D_.js.map} +1 -1
  67. package/lib/{OasProvider-C5paEivQ.js → OasProvider-BKPF0Pbt.js} +6 -6
  68. package/lib/{OasProvider-C5paEivQ.js.map → OasProvider-BKPF0Pbt.js.map} +1 -1
  69. package/lib/{OperationList-Ds9Izgkn.js → OperationList-0bhBU7ME.js} +16 -16
  70. package/lib/{OperationList-Ds9Izgkn.js.map → OperationList-0bhBU7ME.js.map} +1 -1
  71. package/lib/{Pagination-SdlocK96.js → Pagination-Bt1czAiJ.js} +4 -4
  72. package/lib/{Pagination-SdlocK96.js.map → Pagination-Bt1czAiJ.js.map} +1 -1
  73. package/lib/{RouteGuard-CqZPoZYJ.js → RouteGuard-BZ_VsiXc.js} +6 -6
  74. package/lib/{RouteGuard-CqZPoZYJ.js.map → RouteGuard-BZ_VsiXc.js.map} +1 -1
  75. package/lib/{SchemaList-NZbDXAV5.js → SchemaList-CsTIT1pi.js} +10 -10
  76. package/lib/{SchemaList-NZbDXAV5.js.map → SchemaList-CsTIT1pi.js.map} +1 -1
  77. package/lib/{SchemaView-B3fOPR4V.js → SchemaView-DCSWtnYr.js} +5 -5
  78. package/lib/{SchemaView-B3fOPR4V.js.map → SchemaView-DCSWtnYr.js.map} +1 -1
  79. package/lib/{Select-DVFRKf1R.js → Select-Dg5R11Dx.js} +4 -4
  80. package/lib/{Select-DVFRKf1R.js.map → Select-Dg5R11Dx.js.map} +1 -1
  81. package/lib/{SlotletProvider-DXvc0aY6.js → SlotletProvider-VUmTNmLZ.js} +41 -39
  82. package/lib/SlotletProvider-VUmTNmLZ.js.map +1 -0
  83. package/lib/{Spinner-CE68iCm0.js → Spinner-mNLZ6awP.js} +2 -2
  84. package/lib/{Spinner-CE68iCm0.js.map → Spinner-mNLZ6awP.js.map} +1 -1
  85. package/lib/{SyntaxHighlight-BEoSoPEo.js → SyntaxHighlight-CxhyyMkF.js} +6 -6
  86. package/lib/{SyntaxHighlight-BEoSoPEo.js.map → SyntaxHighlight-CxhyyMkF.js.map} +1 -1
  87. package/lib/{Toc-YBsgI72s.js → Toc-BK39DQvI.js} +3 -3
  88. package/lib/{Toc-YBsgI72s.js.map → Toc-BK39DQvI.js.map} +1 -1
  89. package/lib/{_commonjsHelpers-BkfeUUK-.js → _commonjsHelpers-B4e78b8K.js} +2 -2
  90. package/lib/_commonjsHelpers-B4e78b8K.js.map +1 -0
  91. package/lib/{chunk-HA7DTUK3-C4gP41vD.js → chunk-KNED5TY2-BUPjb3LQ.js} +314 -313
  92. package/lib/chunk-KNED5TY2-BUPjb3LQ.js.map +1 -0
  93. package/lib/{context-DLCwaMXN.js → context-Lrf2Y9bR.js} +2 -2
  94. package/lib/{context-DLCwaMXN.js.map → context-Lrf2Y9bR.js.map} +1 -1
  95. package/lib/{createServer-mYvGvmc0.js → createServer-DLN7APz_.js} +5381 -5517
  96. package/lib/createServer-DLN7APz_.js.map +1 -0
  97. package/lib/{hook-CqpVYDqN.js → hook-pPrHCB6G.js} +460 -465
  98. package/lib/hook-pPrHCB6G.js.map +1 -0
  99. package/lib/{index-PGJOZ6R-.js → index-Ba_X7EnR.js} +16 -16
  100. package/lib/{index-PGJOZ6R-.js.map → index-Ba_X7EnR.js.map} +1 -1
  101. package/lib/index-CuBIgTKC.js +316 -0
  102. package/lib/index-CuBIgTKC.js.map +1 -0
  103. package/lib/{index-Dl3Yl0yb.js → index-DcHeSvkE.js} +51 -38
  104. package/lib/index-DcHeSvkE.js.map +1 -0
  105. package/lib/index-DwT-v3zK.js.map +1 -1
  106. package/lib/{index-D48iOQvJ.js → index-tpbiZmWp.js} +586 -543
  107. package/lib/index-tpbiZmWp.js.map +1 -0
  108. package/lib/index.esm-D2ZUREQN.js +1216 -0
  109. package/lib/index.esm-D2ZUREQN.js.map +1 -0
  110. package/lib/jsx-runtime-C5mzlN2N.js +285 -0
  111. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
  112. package/lib/{mutation-8LjrN7uz.js → mutation-Csa9eQDM.js} +70 -67
  113. package/lib/mutation-Csa9eQDM.js.map +1 -0
  114. package/lib/{prism-csharp.min-bQAo2pmx.js → prism-csharp.min-C43x1RY2.js} +2 -2
  115. package/lib/{prism-csharp.min-bQAo2pmx.js.map → prism-csharp.min-C43x1RY2.js.map} +1 -1
  116. package/lib/{prism-java.min-BpvsOuIa.js → prism-java.min-CQzr40NQ.js} +2 -2
  117. package/lib/{prism-java.min-BpvsOuIa.js.map → prism-java.min-CQzr40NQ.js.map} +1 -1
  118. package/lib/{prism-ruby.min-Dx9KO9ds.js → prism-ruby.min-L9OdQ6tU.js} +2 -2
  119. package/lib/{prism-ruby.min-Dx9KO9ds.js.map → prism-ruby.min-L9OdQ6tU.js.map} +1 -1
  120. package/lib/{prism-typescript.min-CD7H2IYQ.js → prism-typescript.min-qTySPvCh.js} +2 -2
  121. package/lib/{prism-typescript.min-CD7H2IYQ.js.map → prism-typescript.min-qTySPvCh.js.map} +1 -1
  122. package/lib/processors/removeExtensions.js.map +1 -0
  123. package/lib/processors/removeParameters.js.map +1 -0
  124. package/lib/processors/removePaths.js.map +1 -0
  125. package/lib/ui/Accordion.js +1 -1
  126. package/lib/ui/ActionButton.js +3 -3
  127. package/lib/ui/Alert.js +1 -1
  128. package/lib/ui/AlertDialog.js +1 -1
  129. package/lib/ui/Badge.js +1 -1
  130. package/lib/ui/Breadcrumb.js +1 -1
  131. package/lib/ui/Button.js +1 -1
  132. package/lib/ui/Callout.js +10 -9
  133. package/lib/ui/Callout.js.map +1 -1
  134. package/lib/ui/Card.js +1 -1
  135. package/lib/ui/Carousel.js +207 -207
  136. package/lib/ui/Carousel.js.map +1 -1
  137. package/lib/ui/Checkbox.js +1 -1
  138. package/lib/ui/Command.js +3 -3
  139. package/lib/ui/Dialog.js +1 -1
  140. package/lib/ui/Drawer.js +2 -2
  141. package/lib/ui/DropdownMenu.js +1 -1
  142. package/lib/ui/Form.js +2 -2
  143. package/lib/ui/HoverCard.js +1 -1
  144. package/lib/ui/Input.js +1 -1
  145. package/lib/ui/Label.js +1 -1
  146. package/lib/ui/Pagination.js +1 -1
  147. package/lib/ui/Popover.js +1 -1
  148. package/lib/ui/Progress.js +1 -1
  149. package/lib/ui/RadioGroup.js +1 -1
  150. package/lib/ui/ScrollArea.js +1 -1
  151. package/lib/ui/Select.js +1 -1
  152. package/lib/ui/Skeleton.js +1 -1
  153. package/lib/ui/Slider.js +1 -1
  154. package/lib/ui/Stepper.js +1 -1
  155. package/lib/ui/Switch.js +1 -1
  156. package/lib/ui/SyntaxHighlight.js +2 -2
  157. package/lib/ui/Tabs.js +1 -1
  158. package/lib/ui/Textarea.js +1 -1
  159. package/lib/ui/Toggle.js +1 -1
  160. package/lib/ui/ToggleGroup.js +1 -1
  161. package/lib/ui/Tooltip.js +1 -1
  162. package/lib/{useExposedProps-B9qXJedG.js → useExposedProps-Dq2yUQIG.js} +2 -2
  163. package/lib/{useExposedProps-B9qXJedG.js.map → useExposedProps-Dq2yUQIG.js.map} +1 -1
  164. package/lib/zudoku.auth-auth0.js +1 -1
  165. package/lib/zudoku.auth-clerk.js +4 -4
  166. package/lib/zudoku.auth-clerk.js.map +1 -1
  167. package/lib/zudoku.auth-openid.js +5 -5
  168. package/lib/zudoku.components.js +7 -7
  169. package/lib/zudoku.hooks.js +1 -1
  170. package/lib/zudoku.icons.js +1 -1
  171. package/lib/zudoku.plugin-api-catalog.js +6 -6
  172. package/lib/zudoku.plugin-api-keys.js +6 -6
  173. package/lib/zudoku.plugin-custom-pages.js +3 -3
  174. package/lib/zudoku.plugin-markdown.js +2 -2
  175. package/lib/zudoku.plugin-openapi.js +4 -4
  176. package/lib/zudoku.plugin-redirect.js +1 -1
  177. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  178. package/lib/zudoku.plugin-search-pagefind.js +7 -7
  179. package/package.json +62 -63
  180. package/src/app/entry.client.tsx +2 -0
  181. package/src/app/main.css +8 -2
  182. package/src/lib/authentication/providers/clerk.tsx +2 -2
  183. package/src/lib/components/Footer.tsx +6 -3
  184. package/src/lib/components/Layout.tsx +8 -1
  185. package/src/lib/components/Search.tsx +14 -3
  186. package/src/lib/components/navigation/Sidebar.tsx +8 -1
  187. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
  188. package/src/lib/ui/Callout.tsx +1 -0
  189. package/src/lib/util/MdxComponents.tsx +2 -0
  190. package/src/lib/util/detectOS.ts +9 -0
  191. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +0 -1
  192. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +0 -1
  193. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +0 -1
  194. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +0 -1
  195. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +0 -1
  196. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +0 -1
  197. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +0 -1
  198. package/lib/Drawer-kDAfOq_2.js.map +0 -1
  199. package/lib/Markdown-aF5FdsNi.js.map +0 -1
  200. package/lib/SlotletProvider-DXvc0aY6.js.map +0 -1
  201. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  202. package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +0 -1
  203. package/lib/createServer-mYvGvmc0.js.map +0 -1
  204. package/lib/hook-CqpVYDqN.js.map +0 -1
  205. package/lib/index-D48iOQvJ.js.map +0 -1
  206. package/lib/index-Dl3Yl0yb.js.map +0 -1
  207. package/lib/index-gQD2h1wX.js +0 -447
  208. package/lib/index-gQD2h1wX.js.map +0 -1
  209. package/lib/index.esm--gIChbWs.js +0 -1207
  210. package/lib/index.esm--gIChbWs.js.map +0 -1
  211. package/lib/jsx-runtime-CYK1ROHF.js +0 -446
  212. package/lib/jsx-runtime-CYK1ROHF.js.map +0 -1
  213. package/lib/mutation-8LjrN7uz.js.map +0 -1
  214. package/lib/post-processors/removeExtensions.js.map +0 -1
  215. package/lib/post-processors/removeParameters.js.map +0 -1
  216. package/lib/post-processors/removePaths.js.map +0 -1
  217. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.d.ts +0 -0
  218. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.js +0 -0
  219. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.d.ts +0 -0
  220. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.js +0 -0
  221. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.d.ts +0 -0
  222. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.js +0 -0
  223. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.d.ts +0 -0
  224. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.js +0 -0
  225. /package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.d.ts +0 -0
  226. /package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.js +0 -0
  227. /package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.test.d.ts +0 -0
  228. /package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.test.js +0 -0
  229. /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.d.ts +0 -0
  230. /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.js +0 -0
  231. /package/lib/{post-processors → processors}/removeExtensions.js +0 -0
  232. /package/lib/{post-processors → processors}/removeParameters.js +0 -0
  233. /package/lib/{post-processors → processors}/removePaths.js +0 -0
  234. /package/lib/{post-processors → processors}/traverse.js +0 -0
  235. /package/lib/{post-processors → processors}/traverse.js.map +0 -0
  236. /package/src/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.ts +0 -0
  237. /package/src/lib/plugins/openapi/{post-processors → processors}/removeExtensions.ts +0 -0
  238. /package/src/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.ts +0 -0
  239. /package/src/lib/plugins/openapi/{post-processors → processors}/removeParameters.ts +0 -0
  240. /package/src/lib/plugins/openapi/{post-processors → processors}/removePaths.test.ts +0 -0
  241. /package/src/lib/plugins/openapi/{post-processors → processors}/removePaths.ts +0 -0
  242. /package/src/lib/plugins/openapi/{post-processors → processors}/traverse.ts +0 -0
@@ -1,13 +1,13 @@
1
1
  var $e = (t) => {
2
2
  throw TypeError(t);
3
3
  };
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)), g = (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), d = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (me(t, e, "access private method"), s);
4
+ var be = (t, e, s) => e.has(t) || $e("Cannot " + s);
5
+ var n = (t, e, s) => (be(t, e, "read from private field"), s ? s.call(t) : e.get(t)), b = (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), f = (t, e, s, r) => (be(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (be(t, e, "access private method"), s);
6
6
  import * as j from "react";
7
7
  import Ge, { createContext as Et, useContext as Ct } from "react";
8
- import { j as Ot } from "./jsx-runtime-CYK1ROHF.js";
9
- import { u as ve, m as ze } from "./chunk-HA7DTUK3-C4gP41vD.js";
10
- var qe = class {
8
+ import { j as Ot } from "./jsx-runtime-C5mzlN2N.js";
9
+ import { u as me, m as ze } from "./chunk-KNED5TY2-BUPjb3LQ.js";
10
+ var Qe = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -23,10 +23,10 @@ var qe = class {
23
23
  }
24
24
  onUnsubscribe() {
25
25
  }
26
- }, V = typeof window > "u" || "Deno" in globalThis;
26
+ }, J = typeof window > "u" || "Deno" in globalThis;
27
27
  function Se() {
28
28
  }
29
- function bs(t, e) {
29
+ function gs(t, e) {
30
30
  return typeof t == "function" ? t(e) : t;
31
31
  }
32
32
  function we(t) {
@@ -35,26 +35,26 @@ function we(t) {
35
35
  function ot(t, e) {
36
36
  return Math.max(t + (e || 0) - Date.now(), 0);
37
37
  }
38
- function ye(t, e) {
38
+ function pe(t, e) {
39
39
  return typeof t == "function" ? t(e) : t;
40
40
  }
41
- function x(t, e) {
41
+ function k(t, e) {
42
42
  return typeof t == "function" ? t(e) : t;
43
43
  }
44
- function ms(t, e) {
44
+ function Ss(t, e) {
45
45
  const {
46
46
  type: s = "all",
47
47
  exact: r,
48
48
  fetchStatus: i,
49
49
  predicate: a,
50
- queryKey: u,
51
- stale: o
50
+ queryKey: o,
51
+ stale: u
52
52
  } = t;
53
- if (u) {
53
+ if (o) {
54
54
  if (r) {
55
- if (e.queryHash !== It(u, e.options))
55
+ if (e.queryHash !== Ft(o, e.options))
56
56
  return !1;
57
- } else if (!Le(e.queryKey, u))
57
+ } else if (!Ne(e.queryKey, o))
58
58
  return !1;
59
59
  }
60
60
  if (s !== "all") {
@@ -62,9 +62,9 @@ function ms(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 || i && i !== e.state.fetchStatus || a && !a(e));
65
+ return !(typeof u == "boolean" && e.isStale() !== u || i && i !== e.state.fetchStatus || a && !a(e));
66
66
  }
67
- function gs(t, e) {
67
+ function ws(t, e) {
68
68
  const { exact: s, status: r, predicate: i, mutationKey: a } = t;
69
69
  if (a) {
70
70
  if (!e.options.mutationKey)
@@ -72,12 +72,12 @@ function gs(t, e) {
72
72
  if (s) {
73
73
  if (Re(e.options.mutationKey) !== Re(a))
74
74
  return !1;
75
- } else if (!Le(e.options.mutationKey, a))
75
+ } else if (!Ne(e.options.mutationKey, a))
76
76
  return !1;
77
77
  }
78
78
  return !(r && e.state.status !== r || i && !i(e));
79
79
  }
80
- function It(t, e) {
80
+ function Ft(t, e) {
81
81
  return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
82
82
  }
83
83
  function Re(t) {
@@ -86,21 +86,21 @@ function Re(t) {
86
86
  (e, s) => Oe(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s
87
87
  );
88
88
  }
89
- function Le(t, e) {
90
- return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Le(t[s], e[s])) : !1;
89
+ function Ne(t, e) {
90
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((s) => Ne(t[s], e[s])) : !1;
91
91
  }
92
92
  function Ee(t, e) {
93
93
  if (t === e)
94
94
  return t;
95
- const s = Je(t) && Je(e);
95
+ const s = Ve(t) && Ve(e);
96
96
  if (s || Oe(t) && Oe(e)) {
97
- const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), u = a.length, o = s ? [] : {};
97
+ const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), o = a.length, u = s ? [] : {};
98
98
  let l = 0;
99
- for (let f = 0; f < u; f++) {
100
- const m = s ? f : a[f];
101
- (!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (o[m] = void 0, l++) : (o[m] = Ee(t[m], e[m]), o[m] === t[m] && t[m] !== void 0 && l++);
99
+ for (let y = 0; y < o; y++) {
100
+ const g = s ? y : a[y];
101
+ (!s && r.includes(g) || s) && t[g] === void 0 && e[g] === void 0 ? (u[g] = void 0, l++) : (u[g] = Ee(t[g], e[g]), u[g] === t[g] && t[g] !== void 0 && l++);
102
102
  }
103
- return i === u && l === i ? t : o;
103
+ return i === o && l === i ? t : u;
104
104
  }
105
105
  return e;
106
106
  }
@@ -112,27 +112,27 @@ function Ce(t, e) {
112
112
  return !1;
113
113
  return !0;
114
114
  }
115
- function Je(t) {
115
+ function Ve(t) {
116
116
  return Array.isArray(t) && t.length === Object.keys(t).length;
117
117
  }
118
118
  function Oe(t) {
119
- if (!Ve(t))
119
+ if (!Je(t))
120
120
  return !1;
121
121
  const e = t.constructor;
122
122
  if (e === void 0)
123
123
  return !0;
124
124
  const s = e.prototype;
125
- return !(!Ve(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
125
+ return !(!Je(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
126
126
  }
127
- function Ve(t) {
127
+ function Je(t) {
128
128
  return Object.prototype.toString.call(t) === "[object Object]";
129
129
  }
130
- function Ft(t) {
130
+ function It(t) {
131
131
  return new Promise((e) => {
132
132
  setTimeout(e, t);
133
133
  });
134
134
  }
135
- function Ie(t, e, s) {
135
+ function Fe(t, e, s) {
136
136
  if (typeof s.structuralSharing == "function")
137
137
  return s.structuralSharing(t, e);
138
138
  if (s.structuralSharing !== !1) {
@@ -140,39 +140,39 @@ function Ie(t, e, s) {
140
140
  try {
141
141
  return Ee(t, e);
142
142
  } catch (r) {
143
- console.error(
143
+ throw console.error(
144
144
  `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}`
145
- );
145
+ ), r;
146
146
  }
147
147
  return Ee(t, e);
148
148
  }
149
149
  return e;
150
150
  }
151
- function Ss(t) {
151
+ function Rs(t) {
152
152
  return t;
153
153
  }
154
- function ws(t, e, s = 0) {
154
+ function Es(t, e, s = 0) {
155
155
  const r = [...t, e];
156
156
  return s && r.length > s ? r.slice(1) : r;
157
157
  }
158
- function Rs(t, e, s = 0) {
158
+ function Cs(t, e, s = 0) {
159
159
  const r = [e, ...t];
160
160
  return s && r.length > s ? r.slice(0, -1) : r;
161
161
  }
162
- var pe = Symbol();
162
+ var ve = Symbol();
163
163
  function Pt(t, e) {
164
- return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error(
164
+ return process.env.NODE_ENV !== "production" && t.queryFn === ve && console.error(
165
165
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
166
- ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === pe ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
166
+ ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ve ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
167
167
  }
168
- var H, L, X, st, Tt = (st = class extends qe {
168
+ var H, Q, Y, st, Tt = (st = class extends Qe {
169
169
  constructor() {
170
170
  super();
171
- g(this, H);
172
- g(this, L);
173
- g(this, X);
174
- d(this, X, (e) => {
175
- if (!V && window.addEventListener) {
171
+ b(this, H);
172
+ b(this, Q);
173
+ b(this, Y);
174
+ f(this, Y, (e) => {
175
+ if (!J && window.addEventListener) {
176
176
  const s = () => e();
177
177
  return window.addEventListener("visibilitychange", s, !1), () => {
178
178
  window.removeEventListener("visibilitychange", s);
@@ -181,20 +181,20 @@ var H, L, X, st, Tt = (st = class extends qe {
181
181
  });
182
182
  }
183
183
  onSubscribe() {
184
- n(this, L) || this.setEventListener(n(this, X));
184
+ n(this, Q) || this.setEventListener(n(this, Y));
185
185
  }
186
186
  onUnsubscribe() {
187
187
  var e;
188
- this.hasListeners() || ((e = n(this, L)) == null || e.call(this), d(this, L, void 0));
188
+ this.hasListeners() || ((e = n(this, Q)) == null || e.call(this), f(this, Q, void 0));
189
189
  }
190
190
  setEventListener(e) {
191
191
  var s;
192
- d(this, X, e), (s = n(this, L)) == null || s.call(this), d(this, L, e((r) => {
192
+ f(this, Y, e), (s = n(this, Q)) == null || s.call(this), f(this, Q, e((r) => {
193
193
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
194
194
  }));
195
195
  }
196
196
  setFocused(e) {
197
- n(this, H) !== e && (d(this, H, e), this.onFocus());
197
+ n(this, H) !== e && (f(this, H, e), this.onFocus());
198
198
  }
199
199
  onFocus() {
200
200
  const e = this.isFocused();
@@ -206,14 +206,14 @@ var H, L, X, st, Tt = (st = class extends qe {
206
206
  var e;
207
207
  return typeof n(this, H) == "boolean" ? n(this, H) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
208
208
  }
209
- }, H = new WeakMap(), L = new WeakMap(), X = new WeakMap(), st), ut = new Tt(), ee, M, te, rt, Dt = (rt = class extends qe {
209
+ }, H = new WeakMap(), Q = new WeakMap(), Y = new WeakMap(), st), ut = new Tt(), X, N, ee, rt, Dt = (rt = class extends Qe {
210
210
  constructor() {
211
211
  super();
212
- g(this, ee, !0);
213
- g(this, M);
214
- g(this, te);
215
- d(this, te, (e) => {
216
- if (!V && window.addEventListener) {
212
+ b(this, X, !0);
213
+ b(this, N);
214
+ b(this, ee);
215
+ f(this, ee, (e) => {
216
+ if (!J && window.addEventListener) {
217
217
  const s = () => e(!0), r = () => e(!1);
218
218
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
219
219
  window.removeEventListener("online", s), window.removeEventListener("offline", r);
@@ -222,26 +222,26 @@ var H, L, X, st, Tt = (st = class extends qe {
222
222
  });
223
223
  }
224
224
  onSubscribe() {
225
- n(this, M) || this.setEventListener(n(this, te));
225
+ n(this, N) || this.setEventListener(n(this, ee));
226
226
  }
227
227
  onUnsubscribe() {
228
228
  var e;
229
- this.hasListeners() || ((e = n(this, M)) == null || e.call(this), d(this, M, void 0));
229
+ this.hasListeners() || ((e = n(this, N)) == null || e.call(this), f(this, N, void 0));
230
230
  }
231
231
  setEventListener(e) {
232
232
  var s;
233
- d(this, te, e), (s = n(this, M)) == null || s.call(this), d(this, M, e(this.setOnline.bind(this)));
233
+ f(this, ee, e), (s = n(this, N)) == null || s.call(this), f(this, N, e(this.setOnline.bind(this)));
234
234
  }
235
235
  setOnline(e) {
236
- n(this, ee) !== e && (d(this, ee, e), this.listeners.forEach((r) => {
236
+ n(this, X) !== e && (f(this, X, e), this.listeners.forEach((r) => {
237
237
  r(e);
238
238
  }));
239
239
  }
240
240
  isOnline() {
241
- return n(this, ee);
241
+ return n(this, X);
242
242
  }
243
- }, ee = new WeakMap(), M = new WeakMap(), te = new WeakMap(), rt), ct = new Dt();
244
- function Fe() {
243
+ }, X = new WeakMap(), N = new WeakMap(), ee = new WeakMap(), rt), ct = new Dt();
244
+ function Ie() {
245
245
  let t, e;
246
246
  const s = new Promise((i, a) => {
247
247
  t = i, e = a;
@@ -279,98 +279,99 @@ function ge(t) {
279
279
  }
280
280
  function At(t) {
281
281
  let e = !1, s = 0, r = !1, i;
282
- const a = Fe(), u = (h) => {
282
+ const a = Ie(), o = (h) => {
283
283
  var v;
284
284
  r || (p(new lt(h)), (v = t.abort) == null || v.call(t));
285
- }, o = () => {
285
+ }, u = () => {
286
286
  e = !0;
287
287
  }, l = () => {
288
288
  e = !1;
289
- }, f = () => ut.isFocused() && (t.networkMode === "always" || ct.isOnline()) && t.canRun(), m = () => ht(t.networkMode) && t.canRun(), c = (h) => {
289
+ }, y = () => ut.isFocused() && (t.networkMode === "always" || ct.isOnline()) && t.canRun(), g = () => ht(t.networkMode) && t.canRun(), c = (h) => {
290
290
  var v;
291
291
  r || (r = !0, (v = t.onSuccess) == null || v.call(t, h), i == null || i(), a.resolve(h));
292
292
  }, p = (h) => {
293
293
  var v;
294
294
  r || (r = !0, (v = t.onError) == null || v.call(t, h), i == null || i(), a.reject(h));
295
- }, y = () => new Promise((h) => {
295
+ }, d = () => new Promise((h) => {
296
296
  var v;
297
- i = (E) => {
298
- (r || f()) && h(E);
297
+ i = (C) => {
298
+ (r || y()) && h(C);
299
299
  }, (v = t.onPause) == null || v.call(t);
300
300
  }).then(() => {
301
301
  var h;
302
302
  i = void 0, r || (h = t.onContinue) == null || h.call(t);
303
- }), C = () => {
303
+ }), E = () => {
304
304
  if (r)
305
305
  return;
306
306
  let h;
307
307
  const v = s === 0 ? t.initialPromise : void 0;
308
308
  try {
309
309
  h = v ?? t.fn();
310
- } catch (E) {
311
- h = Promise.reject(E);
310
+ } catch (C) {
311
+ h = Promise.reject(C);
312
312
  }
313
- Promise.resolve(h).then(c).catch((E) => {
314
- var be;
313
+ Promise.resolve(h).then(c).catch((C) => {
314
+ var oe;
315
315
  if (r)
316
316
  return;
317
- const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ?? jt, q = typeof O == "function" ? O(s, E) : O, Z = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, E);
317
+ const R = t.retry ?? (J ? 0 : 3), O = t.retryDelay ?? jt, q = typeof O == "function" ? O(s, C) : O, Z = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, C);
318
318
  if (e || !Z) {
319
- p(E);
319
+ p(C);
320
320
  return;
321
321
  }
322
- s++, (be = t.onFail) == null || be.call(t, s, E), Ft(q).then(() => f() ? void 0 : y()).then(() => {
323
- e ? p(E) : C();
322
+ s++, (oe = t.onFail) == null || oe.call(t, s, C), It(q).then(() => y() ? void 0 : d()).then(() => {
323
+ e ? p(C) : E();
324
324
  });
325
325
  });
326
326
  };
327
327
  return {
328
328
  promise: a,
329
- cancel: u,
329
+ cancel: o,
330
330
  continue: () => (i == null || i(), a),
331
- cancelRetry: o,
331
+ cancelRetry: u,
332
332
  continueRetry: l,
333
- canStart: m,
334
- start: () => (m() ? C() : y().then(C), a)
333
+ canStart: g,
334
+ start: () => (g() ? E() : d().then(E), a)
335
335
  };
336
336
  }
337
+ var kt = (t) => setTimeout(t, 0);
337
338
  function xt() {
338
- let t = [], e = 0, s = (o) => {
339
- o();
340
- }, r = (o) => {
341
- o();
342
- }, i = (o) => setTimeout(o, 0);
343
- const a = (o) => {
344
- e ? t.push(o) : i(() => {
345
- s(o);
339
+ let t = [], e = 0, s = (u) => {
340
+ u();
341
+ }, r = (u) => {
342
+ u();
343
+ }, i = kt;
344
+ const a = (u) => {
345
+ e ? t.push(u) : i(() => {
346
+ s(u);
346
347
  });
347
- }, u = () => {
348
- const o = t;
349
- t = [], o.length && i(() => {
348
+ }, o = () => {
349
+ const u = t;
350
+ t = [], u.length && i(() => {
350
351
  r(() => {
351
- o.forEach((l) => {
352
+ u.forEach((l) => {
352
353
  s(l);
353
354
  });
354
355
  });
355
356
  });
356
357
  };
357
358
  return {
358
- batch: (o) => {
359
+ batch: (u) => {
359
360
  let l;
360
361
  e++;
361
362
  try {
362
- l = o();
363
+ l = u();
363
364
  } finally {
364
- e--, e || u();
365
+ e--, e || o();
365
366
  }
366
367
  return l;
367
368
  },
368
369
  /**
369
370
  * All calls to the wrapped function will be batched.
370
371
  */
371
- batchCalls: (o) => (...l) => {
372
+ batchCalls: (u) => (...l) => {
372
373
  a(() => {
373
- o(...l);
374
+ u(...l);
374
375
  });
375
376
  },
376
377
  schedule: a,
@@ -378,61 +379,61 @@ function xt() {
378
379
  * Use this method to set a custom notify function.
379
380
  * This can be used to for example wrap notifications with `React.act` while running tests.
380
381
  */
381
- setNotifyFunction: (o) => {
382
- s = o;
382
+ setNotifyFunction: (u) => {
383
+ s = u;
383
384
  },
384
385
  /**
385
386
  * Use this method to set a custom function to batch notifications together into a single tick.
386
387
  * By default React Query will use the batch function provided by ReactDOM or React Native.
387
388
  */
388
- setBatchNotifyFunction: (o) => {
389
- r = o;
389
+ setBatchNotifyFunction: (u) => {
390
+ r = u;
390
391
  },
391
- setScheduler: (o) => {
392
- i = o;
392
+ setScheduler: (u) => {
393
+ i = u;
393
394
  }
394
395
  };
395
396
  }
396
- var Me = xt(), K, nt, kt = (nt = class {
397
+ var Le = xt(), K, nt, qt = (nt = class {
397
398
  constructor() {
398
- g(this, K);
399
+ b(this, K);
399
400
  }
400
401
  destroy() {
401
402
  this.clearGcTimeout();
402
403
  }
403
404
  scheduleGc() {
404
- this.clearGcTimeout(), we(this.gcTime) && d(this, K, setTimeout(() => {
405
+ this.clearGcTimeout(), we(this.gcTime) && f(this, K, setTimeout(() => {
405
406
  this.optionalRemove();
406
407
  }, this.gcTime));
407
408
  }
408
409
  updateGcTime(t) {
409
410
  this.gcTime = Math.max(
410
411
  this.gcTime || 0,
411
- t ?? (V ? 1 / 0 : 5 * 60 * 1e3)
412
+ t ?? (J ? 1 / 0 : 5 * 60 * 1e3)
412
413
  );
413
414
  }
414
415
  clearGcTimeout() {
415
- n(this, K) && (clearTimeout(n(this, K)), d(this, K, void 0));
416
+ n(this, K) && (clearTimeout(n(this, K)), f(this, K, void 0));
416
417
  }
417
- }, K = new WeakMap(), nt), se, re, D, B, I, he, $, A, Q, it, Es = (it = class extends kt {
418
+ }, K = new WeakMap(), nt), te, se, D, B, F, he, $, A, U, it, Os = (it = class extends qt {
418
419
  constructor(e) {
419
420
  super();
420
- g(this, A);
421
- g(this, se);
422
- g(this, re);
423
- g(this, D);
424
- g(this, B);
425
- g(this, I);
426
- g(this, he);
427
- g(this, $);
428
- d(this, $, !1), d(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], d(this, B, e.client), d(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, d(this, se, Ut(this.options)), this.state = e.state ?? n(this, se), this.scheduleGc();
421
+ b(this, A);
422
+ b(this, te);
423
+ b(this, se);
424
+ b(this, D);
425
+ b(this, B);
426
+ b(this, F);
427
+ b(this, he);
428
+ b(this, $);
429
+ f(this, $, !1), f(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], f(this, B, e.client), f(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, f(this, te, Ut(this.options)), this.state = e.state ?? n(this, te), this.scheduleGc();
429
430
  }
430
431
  get meta() {
431
432
  return this.options.meta;
432
433
  }
433
434
  get promise() {
434
435
  var e;
435
- return (e = n(this, I)) == null ? void 0 : e.promise;
436
+ return (e = n(this, F)) == null ? void 0 : e.promise;
436
437
  }
437
438
  setOptions(e) {
438
439
  this.options = { ...n(this, he), ...e }, this.updateGcTime(this.options.gcTime);
@@ -441,8 +442,8 @@ var Me = xt(), K, nt, kt = (nt = class {
441
442
  !this.observers.length && this.state.fetchStatus === "idle" && n(this, D).remove(this);
442
443
  }
443
444
  setData(e, s) {
444
- const r = Ie(this.state.data, e, this.options);
445
- return w(this, A, Q).call(this, {
445
+ const r = Fe(this.state.data, e, this.options);
446
+ return w(this, A, U).call(this, {
446
447
  data: r,
447
448
  type: "success",
448
449
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -450,26 +451,26 @@ var Me = xt(), K, nt, kt = (nt = class {
450
451
  }), r;
451
452
  }
452
453
  setState(e, s) {
453
- w(this, A, Q).call(this, { type: "setState", state: e, setStateOptions: s });
454
+ w(this, A, U).call(this, { type: "setState", state: e, setStateOptions: s });
454
455
  }
455
456
  cancel(e) {
456
457
  var r, i;
457
- const s = (r = n(this, I)) == null ? void 0 : r.promise;
458
- return (i = n(this, I)) == null || i.cancel(e), s ? s.then(Se).catch(Se) : Promise.resolve();
458
+ const s = (r = n(this, F)) == null ? void 0 : r.promise;
459
+ return (i = n(this, F)) == null || i.cancel(e), s ? s.then(Se).catch(Se) : Promise.resolve();
459
460
  }
460
461
  destroy() {
461
462
  super.destroy(), this.cancel({ silent: !0 });
462
463
  }
463
464
  reset() {
464
- this.destroy(), this.setState(n(this, se));
465
+ this.destroy(), this.setState(n(this, te));
465
466
  }
466
467
  isActive() {
467
468
  return this.observers.some(
468
- (e) => x(e.options.enabled, this) !== !1
469
+ (e) => k(e.options.enabled, this) !== !1
469
470
  );
470
471
  }
471
472
  isDisabled() {
472
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === pe || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
473
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ve || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
473
474
  }
474
475
  isStale() {
475
476
  return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
@@ -482,32 +483,32 @@ var Me = xt(), K, nt, kt = (nt = class {
482
483
  onFocus() {
483
484
  var s;
484
485
  const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
485
- e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, I)) == null || s.continue();
486
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, F)) == null || s.continue();
486
487
  }
487
488
  onOnline() {
488
489
  var s;
489
490
  const e = this.observers.find((r) => r.shouldFetchOnReconnect());
490
- e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, I)) == null || s.continue();
491
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, F)) == null || s.continue();
491
492
  }
492
493
  addObserver(e) {
493
494
  this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, D).notify({ type: "observerAdded", query: this, observer: e }));
494
495
  }
495
496
  removeObserver(e) {
496
- this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this, $) ? n(this, I).cancel({ revert: !0 }) : n(this, I).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
497
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, F) && (n(this, $) ? n(this, F).cancel({ revert: !0 }) : n(this, F).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
497
498
  }
498
499
  getObserversCount() {
499
500
  return this.observers.length;
500
501
  }
501
502
  invalidate() {
502
- this.state.isInvalidated || w(this, A, Q).call(this, { type: "invalidate" });
503
+ this.state.isInvalidated || w(this, A, U).call(this, { type: "invalidate" });
503
504
  }
504
505
  fetch(e, s) {
505
- var l, f, m;
506
+ var l, y, g;
506
507
  if (this.state.fetchStatus !== "idle") {
507
508
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
508
509
  this.cancel({ silent: !0 });
509
- else if (n(this, I))
510
- return n(this, I).continueRetry(), n(this, I).promise;
510
+ else if (n(this, F))
511
+ return n(this, F).continueRetry(), n(this, F).promise;
511
512
  }
512
513
  if (e && this.setOptions(e), !this.options.queryFn) {
513
514
  const c = this.observers.find((p) => p.options.queryFn);
@@ -519,7 +520,7 @@ var Me = xt(), K, nt, kt = (nt = class {
519
520
  const r = new AbortController(), i = (c) => {
520
521
  Object.defineProperty(c, "signal", {
521
522
  enumerable: !0,
522
- get: () => (d(this, $, !0), r.signal)
523
+ get: () => (f(this, $, !0), r.signal)
523
524
  });
524
525
  }, a = () => {
525
526
  const c = Pt(this.options, s), p = {
@@ -527,12 +528,12 @@ var Me = xt(), K, nt, kt = (nt = class {
527
528
  queryKey: this.queryKey,
528
529
  meta: this.meta
529
530
  };
530
- return i(p), d(this, $, !1), this.options.persister ? this.options.persister(
531
+ return i(p), f(this, $, !1), this.options.persister ? this.options.persister(
531
532
  c,
532
533
  p,
533
534
  this
534
535
  ) : c(p);
535
- }, u = {
536
+ }, o = {
536
537
  fetchOptions: s,
537
538
  options: this.options,
538
539
  queryKey: this.queryKey,
@@ -540,68 +541,68 @@ var Me = xt(), K, nt, kt = (nt = class {
540
541
  state: this.state,
541
542
  fetchFn: a
542
543
  };
543
- i(u), (l = this.options.behavior) == null || l.onFetch(
544
- u,
544
+ i(o), (l = this.options.behavior) == null || l.onFetch(
545
+ o,
545
546
  this
546
- ), d(this, re, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f = u.fetchOptions) == null ? void 0 : f.meta)) && w(this, A, Q).call(this, { type: "fetch", meta: (m = u.fetchOptions) == null ? void 0 : m.meta });
547
- const o = (c) => {
548
- var p, y, C, h;
549
- ge(c) && c.silent || w(this, A, Q).call(this, {
547
+ ), f(this, se, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((y = o.fetchOptions) == null ? void 0 : y.meta)) && w(this, A, U).call(this, { type: "fetch", meta: (g = o.fetchOptions) == null ? void 0 : g.meta });
548
+ const u = (c) => {
549
+ var p, d, E, h;
550
+ ge(c) && c.silent || w(this, A, U).call(this, {
550
551
  type: "error",
551
552
  error: c
552
- }), ge(c) || ((y = (p = n(this, D).config).onError) == null || y.call(
553
+ }), ge(c) || ((d = (p = n(this, D).config).onError) == null || d.call(
553
554
  p,
554
555
  c,
555
556
  this
556
- ), (h = (C = n(this, D).config).onSettled) == null || h.call(
557
- C,
557
+ ), (h = (E = n(this, D).config).onSettled) == null || h.call(
558
+ E,
558
559
  this.state.data,
559
560
  c,
560
561
  this
561
562
  )), this.scheduleGc();
562
563
  };
563
- return d(this, I, At({
564
+ return f(this, F, At({
564
565
  initialPromise: s == null ? void 0 : s.initialPromise,
565
- fn: u.fetchFn,
566
+ fn: o.fetchFn,
566
567
  abort: r.abort.bind(r),
567
568
  onSuccess: (c) => {
568
- var p, y, C, h;
569
+ var p, d, E, h;
569
570
  if (c === void 0) {
570
571
  process.env.NODE_ENV !== "production" && console.error(
571
572
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
572
- ), o(new Error(`${this.queryHash} data is undefined`));
573
+ ), u(new Error(`${this.queryHash} data is undefined`));
573
574
  return;
574
575
  }
575
576
  try {
576
577
  this.setData(c);
577
578
  } catch (v) {
578
- o(v);
579
+ u(v);
579
580
  return;
580
581
  }
581
- (y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (C = n(this, D).config).onSettled) == null || h.call(
582
- C,
582
+ (d = (p = n(this, D).config).onSuccess) == null || d.call(p, c, this), (h = (E = n(this, D).config).onSettled) == null || h.call(
583
+ E,
583
584
  c,
584
585
  this.state.error,
585
586
  this
586
587
  ), this.scheduleGc();
587
588
  },
588
- onError: o,
589
+ onError: u,
589
590
  onFail: (c, p) => {
590
- w(this, A, Q).call(this, { type: "failed", failureCount: c, error: p });
591
+ w(this, A, U).call(this, { type: "failed", failureCount: c, error: p });
591
592
  },
592
593
  onPause: () => {
593
- w(this, A, Q).call(this, { type: "pause" });
594
+ w(this, A, U).call(this, { type: "pause" });
594
595
  },
595
596
  onContinue: () => {
596
- w(this, A, Q).call(this, { type: "continue" });
597
+ w(this, A, U).call(this, { type: "continue" });
597
598
  },
598
- retry: u.options.retry,
599
- retryDelay: u.options.retryDelay,
600
- networkMode: u.options.networkMode,
599
+ retry: o.options.retry,
600
+ retryDelay: o.options.retryDelay,
601
+ networkMode: o.options.networkMode,
601
602
  canRun: () => !0
602
- })), n(this, I).start();
603
+ })), n(this, F).start();
603
604
  }
604
- }, se = new WeakMap(), re = new WeakMap(), D = new WeakMap(), B = new WeakMap(), I = new WeakMap(), he = new WeakMap(), $ = new WeakMap(), A = new WeakSet(), Q = function(e) {
605
+ }, te = new WeakMap(), se = new WeakMap(), D = new WeakMap(), B = new WeakMap(), F = new WeakMap(), he = new WeakMap(), $ = new WeakMap(), A = new WeakSet(), U = function(e) {
605
606
  const s = (r) => {
606
607
  switch (e.type) {
607
608
  case "failed":
@@ -643,7 +644,7 @@ var Me = xt(), K, nt, kt = (nt = class {
643
644
  };
644
645
  case "error":
645
646
  const i = e.error;
646
- return ge(i) && i.revert && n(this, re) ? { ...n(this, re), fetchStatus: "idle" } : {
647
+ return ge(i) && i.revert && n(this, se) ? { ...n(this, se), fetchStatus: "idle" } : {
647
648
  ...r,
648
649
  error: i,
649
650
  errorUpdateCount: r.errorUpdateCount + 1,
@@ -665,7 +666,7 @@ var Me = xt(), K, nt, kt = (nt = class {
665
666
  };
666
667
  }
667
668
  };
668
- this.state = s(this.state), Me.batch(() => {
669
+ this.state = s(this.state), Le.batch(() => {
669
670
  this.observers.forEach((r) => {
670
671
  r.onQueryUpdate();
671
672
  }), n(this, D).notify({ query: this, type: "updated", action: e });
@@ -699,28 +700,28 @@ function Ut(t) {
699
700
  fetchStatus: "idle"
700
701
  };
701
702
  }
702
- var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae, xe, ke, yt, at, ft = (at = class extends qe {
703
+ var P, m, le, I, G, re, L, M, de, ne, ie, z, V, _, ae, S, ue, Pe, Te, De, je, Ae, ke, xe, yt, at, ft = (at = class extends Qe {
703
704
  constructor(e, s) {
704
705
  super();
705
- g(this, S);
706
- g(this, T);
707
- g(this, b);
708
- g(this, le);
709
- g(this, P);
710
- g(this, G);
711
- g(this, ne);
712
- g(this, N);
713
- g(this, U);
714
- g(this, de);
715
- g(this, ie);
706
+ b(this, S);
707
+ b(this, P);
708
+ b(this, m);
709
+ b(this, le);
710
+ b(this, I);
711
+ b(this, G);
712
+ b(this, re);
713
+ b(this, L);
714
+ b(this, M);
715
+ b(this, de);
716
+ b(this, ne);
716
717
  // This property keeps track of the last query with defined data.
717
718
  // It will be used to pass the previous data and query to the placeholder function between renders.
718
- g(this, ae);
719
- g(this, z);
720
- g(this, J);
721
- g(this, _);
722
- g(this, oe, /* @__PURE__ */ new Set());
723
- this.options = s, d(this, T, e), d(this, U, null), d(this, N, Fe()), this.options.experimental_prefetchInRender || n(this, N).reject(
719
+ b(this, ie);
720
+ b(this, z);
721
+ b(this, V);
722
+ b(this, _);
723
+ b(this, ae, /* @__PURE__ */ new Set());
724
+ this.options = s, f(this, P, e), f(this, M, null), f(this, L, Ie()), this.options.experimental_prefetchInRender || n(this, L).reject(
724
725
  new Error("experimental_prefetchInRender feature flag is not enabled")
725
726
  ), this.bindMethods(), this.setOptions(s);
726
727
  }
@@ -728,55 +729,55 @@ var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae
728
729
  this.refetch = this.refetch.bind(this);
729
730
  }
730
731
  onSubscribe() {
731
- this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S, ue).call(this) : this.updateResult(), w(this, S, je).call(this));
732
+ this.listeners.size === 1 && (n(this, m).addObserver(this), Ze(n(this, m), this.options) ? w(this, S, ue).call(this) : this.updateResult(), w(this, S, je).call(this));
732
733
  }
733
734
  onUnsubscribe() {
734
735
  this.hasListeners() || this.destroy();
735
736
  }
736
737
  shouldFetchOnReconnect() {
737
- return Ue(
738
- n(this, b),
738
+ return qe(
739
+ n(this, m),
739
740
  this.options,
740
741
  this.options.refetchOnReconnect
741
742
  );
742
743
  }
743
744
  shouldFetchOnWindowFocus() {
744
- return Ue(
745
- n(this, b),
745
+ return qe(
746
+ n(this, m),
746
747
  this.options,
747
748
  this.options.refetchOnWindowFocus
748
749
  );
749
750
  }
750
751
  destroy() {
751
- this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S, xe).call(this), n(this, b).removeObserver(this);
752
+ this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S, ke).call(this), n(this, m).removeObserver(this);
752
753
  }
753
- setOptions(e, s) {
754
- const r = this.options, i = n(this, b);
755
- if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, b)) != "boolean")
754
+ setOptions(e) {
755
+ const s = this.options, r = n(this, m);
756
+ if (this.options = n(this, P).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof k(this.options.enabled, n(this, m)) != "boolean")
756
757
  throw new Error(
757
758
  "Expected enabled to be a boolean or a callback that returns a boolean"
758
759
  );
759
- w(this, S, ke).call(this), n(this, b).setOptions(this.options), r._defaulted && !Ce(this.options, r) && n(this, T).getQueryCache().notify({
760
+ w(this, S, xe).call(this), n(this, m).setOptions(this.options), s._defaulted && !Ce(this.options, s) && n(this, P).getQueryCache().notify({
760
761
  type: "observerOptionsUpdated",
761
- query: n(this, b),
762
+ query: n(this, m),
762
763
  observer: this
763
764
  });
764
- const a = this.hasListeners();
765
- a && We(
766
- n(this, b),
767
- i,
765
+ const i = this.hasListeners();
766
+ i && We(
767
+ n(this, m),
768
+ r,
768
769
  this.options,
769
- r
770
- ) && w(this, S, ue).call(this), this.updateResult(s), a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || ye(this.options.staleTime, n(this, b)) !== ye(r.staleTime, n(this, b))) && w(this, S, Pe).call(this);
771
- const u = w(this, S, Te).call(this);
772
- a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || u !== n(this, _)) && w(this, S, De).call(this, u);
770
+ s
771
+ ) && w(this, S, ue).call(this), this.updateResult(), i && (n(this, m) !== r || k(this.options.enabled, n(this, m)) !== k(s.enabled, n(this, m)) || pe(this.options.staleTime, n(this, m)) !== pe(s.staleTime, n(this, m))) && w(this, S, Pe).call(this);
772
+ const a = w(this, S, Te).call(this);
773
+ i && (n(this, m) !== r || k(this.options.enabled, n(this, m)) !== k(s.enabled, n(this, m)) || a !== n(this, _)) && w(this, S, De).call(this, a);
773
774
  }
774
775
  getOptimisticResult(e) {
775
- const s = n(this, T).getQueryCache().build(n(this, T), e), r = this.createResult(s, e);
776
- return qt(this, r) && (d(this, P, r), d(this, ne, this.options), d(this, G, n(this, b).state)), r;
776
+ const s = n(this, P).getQueryCache().build(n(this, P), e), r = this.createResult(s, e);
777
+ return Nt(this, r) && (f(this, I, r), f(this, re, this.options), f(this, G, n(this, m).state)), r;
777
778
  }
778
779
  getCurrentResult() {
779
- return n(this, P);
780
+ return n(this, I);
780
781
  }
781
782
  trackResult(e, s) {
782
783
  const r = {};
@@ -789,10 +790,10 @@ var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae
789
790
  }), r;
790
791
  }
791
792
  trackProp(e) {
792
- n(this, oe).add(e);
793
+ n(this, ae).add(e);
793
794
  }
794
795
  getCurrentQuery() {
795
- return n(this, b);
796
+ return n(this, m);
796
797
  }
797
798
  refetch({ ...e } = {}) {
798
799
  return this.fetch({
@@ -800,197 +801,189 @@ var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae
800
801
  });
801
802
  }
802
803
  fetchOptimistic(e) {
803
- const s = n(this, T).defaultQueryOptions(e), r = n(this, T).getQueryCache().build(n(this, T), s);
804
+ const s = n(this, P).defaultQueryOptions(e), r = n(this, P).getQueryCache().build(n(this, P), s);
804
805
  return r.fetch().then(() => this.createResult(r, s));
805
806
  }
806
807
  fetch(e) {
807
808
  return w(this, S, ue).call(this, {
808
809
  ...e,
809
810
  cancelRefetch: e.cancelRefetch ?? !0
810
- }).then(() => (this.updateResult(), n(this, P)));
811
+ }).then(() => (this.updateResult(), n(this, I)));
811
812
  }
812
813
  createResult(e, s) {
813
814
  var Be;
814
- const r = n(this, b), i = this.options, a = n(this, P), u = n(this, G), o = n(this, ne), f = e !== r ? e.state : n(this, le), { state: m } = e;
815
- let c = { ...m }, p = !1, y;
815
+ const r = n(this, m), i = this.options, a = n(this, I), o = n(this, G), u = n(this, re), y = e !== r ? e.state : n(this, le), { state: g } = e;
816
+ let c = { ...g }, p = !1, d;
816
817
  if (s._optimisticResults) {
817
- const F = this.hasListeners(), W = !F && Ze(e, s), Y = F && We(e, r, s, i);
818
- (W || Y) && (c = {
818
+ const T = this.hasListeners(), fe = !T && Ze(e, s), W = T && We(e, r, s, i);
819
+ (fe || W) && (c = {
819
820
  ...c,
820
- ...dt(m.data, e.options)
821
+ ...dt(g.data, e.options)
821
822
  }), s._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
822
823
  }
823
- let { error: C, errorUpdatedAt: h, status: v } = c;
824
- if (s.select && c.data !== void 0)
825
- if (a && c.data === (u == null ? void 0 : u.data) && s.select === n(this, de))
826
- y = n(this, ie);
827
- else
828
- try {
829
- d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this, ie, y), d(this, U, null);
830
- } catch (F) {
831
- d(this, U, F);
832
- }
833
- else
834
- y = c.data;
835
- if (s.placeholderData !== void 0 && y === void 0 && v === "pending") {
836
- let F;
837
- if (a != null && a.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
838
- F = a.data;
839
- else if (F = typeof s.placeholderData == "function" ? s.placeholderData(
840
- (Be = n(this, ae)) == null ? void 0 : Be.state.data,
841
- n(this, ae)
842
- ) : s.placeholderData, s.select && F !== void 0)
843
- try {
844
- F = s.select(F), d(this, U, null);
845
- } catch (W) {
846
- d(this, U, W);
847
- }
848
- F !== void 0 && (v = "success", y = Ie(
824
+ let { error: E, errorUpdatedAt: h, status: v } = c;
825
+ d = c.data;
826
+ let C = !1;
827
+ if (s.placeholderData !== void 0 && d === void 0 && v === "pending") {
828
+ let T;
829
+ a != null && a.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData) ? (T = a.data, C = !0) : T = typeof s.placeholderData == "function" ? s.placeholderData(
830
+ (Be = n(this, ie)) == null ? void 0 : Be.state.data,
831
+ n(this, ie)
832
+ ) : s.placeholderData, T !== void 0 && (v = "success", d = Fe(
849
833
  a == null ? void 0 : a.data,
850
- F,
834
+ T,
851
835
  s
852
836
  ), p = !0);
853
837
  }
854
- n(this, U) && (C = n(this, U), y = n(this, ie), h = Date.now(), v = "error");
855
- const E = c.fetchStatus === "fetching", R = v === "pending", O = v === "error", q = R && E, Z = y !== void 0, k = {
838
+ if (s.select && d !== void 0 && !C)
839
+ if (a && d === (o == null ? void 0 : o.data) && s.select === n(this, de))
840
+ d = n(this, ne);
841
+ else
842
+ try {
843
+ f(this, de, s.select), d = s.select(d), d = Fe(a == null ? void 0 : a.data, d, s), f(this, ne, d), f(this, M, null);
844
+ } catch (T) {
845
+ f(this, M, T);
846
+ }
847
+ n(this, M) && (E = n(this, M), d = n(this, ne), h = Date.now(), v = "error");
848
+ const R = c.fetchStatus === "fetching", O = v === "pending", q = v === "error", Z = O && R, oe = d !== void 0, x = {
856
849
  status: v,
857
850
  fetchStatus: c.fetchStatus,
858
- isPending: R,
851
+ isPending: O,
859
852
  isSuccess: v === "success",
860
- isError: O,
861
- isInitialLoading: q,
862
- isLoading: q,
863
- data: y,
853
+ isError: q,
854
+ isInitialLoading: Z,
855
+ isLoading: Z,
856
+ data: d,
864
857
  dataUpdatedAt: c.dataUpdatedAt,
865
- error: C,
858
+ error: E,
866
859
  errorUpdatedAt: h,
867
860
  failureCount: c.fetchFailureCount,
868
861
  failureReason: c.fetchFailureReason,
869
862
  errorUpdateCount: c.errorUpdateCount,
870
863
  isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
871
- isFetchedAfterMount: c.dataUpdateCount > f.dataUpdateCount || c.errorUpdateCount > f.errorUpdateCount,
872
- isFetching: E,
873
- isRefetching: E && !R,
874
- isLoadingError: O && !Z,
864
+ isFetchedAfterMount: c.dataUpdateCount > y.dataUpdateCount || c.errorUpdateCount > y.errorUpdateCount,
865
+ isFetching: R,
866
+ isRefetching: R && !O,
867
+ isLoadingError: q && !oe,
875
868
  isPaused: c.fetchStatus === "paused",
876
869
  isPlaceholderData: p,
877
- isRefetchError: O && Z,
878
- isStale: Ne(e, s),
870
+ isRefetchError: q && oe,
871
+ isStale: Me(e, s),
879
872
  refetch: this.refetch,
880
- promise: n(this, N)
873
+ promise: n(this, L)
881
874
  };
882
875
  if (this.options.experimental_prefetchInRender) {
883
- const F = (fe) => {
884
- k.status === "error" ? fe.reject(k.error) : k.data !== void 0 && fe.resolve(k.data);
885
- }, W = () => {
886
- const fe = d(this, N, k.promise = Fe());
887
- F(fe);
888
- }, Y = n(this, N);
889
- switch (Y.status) {
876
+ const T = (ye) => {
877
+ x.status === "error" ? ye.reject(x.error) : x.data !== void 0 && ye.resolve(x.data);
878
+ }, fe = () => {
879
+ const ye = f(this, L, x.promise = Ie());
880
+ T(ye);
881
+ }, W = n(this, L);
882
+ switch (W.status) {
890
883
  case "pending":
891
- e.queryHash === r.queryHash && F(Y);
884
+ e.queryHash === r.queryHash && T(W);
892
885
  break;
893
886
  case "fulfilled":
894
- (k.status === "error" || k.data !== Y.value) && W();
887
+ (x.status === "error" || x.data !== W.value) && fe();
895
888
  break;
896
889
  case "rejected":
897
- (k.status !== "error" || k.error !== Y.reason) && W();
890
+ (x.status !== "error" || x.error !== W.reason) && fe();
898
891
  break;
899
892
  }
900
893
  }
901
- return k;
894
+ return x;
902
895
  }
903
- updateResult(e) {
904
- const s = n(this, P), r = this.createResult(n(this, b), this.options);
905
- if (d(this, G, n(this, b).state), d(this, ne, this.options), n(this, G).data !== void 0 && d(this, ae, n(this, b)), Ce(r, s))
896
+ updateResult() {
897
+ const e = n(this, I), s = this.createResult(n(this, m), this.options);
898
+ if (f(this, G, n(this, m).state), f(this, re, this.options), n(this, G).data !== void 0 && f(this, ie, n(this, m)), Ce(s, e))
906
899
  return;
907
- d(this, P, r);
908
- const i = {}, a = () => {
909
- if (!s)
900
+ f(this, I, s);
901
+ const r = () => {
902
+ if (!e)
910
903
  return !0;
911
- const { notifyOnChangeProps: u } = this.options, o = typeof u == "function" ? u() : u;
912
- if (o === "all" || !o && !n(this, oe).size)
904
+ const { notifyOnChangeProps: i } = this.options, a = typeof i == "function" ? i() : i;
905
+ if (a === "all" || !a && !n(this, ae).size)
913
906
  return !0;
914
- const l = new Set(
915
- o ?? n(this, oe)
907
+ const o = new Set(
908
+ a ?? n(this, ae)
916
909
  );
917
- return this.options.throwOnError && l.add("error"), Object.keys(n(this, P)).some((f) => {
918
- const m = f;
919
- return n(this, P)[m] !== s[m] && l.has(m);
910
+ return this.options.throwOnError && o.add("error"), Object.keys(n(this, I)).some((u) => {
911
+ const l = u;
912
+ return n(this, I)[l] !== e[l] && o.has(l);
920
913
  });
921
914
  };
922
- (e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S, yt).call(this, { ...i, ...e });
915
+ w(this, S, yt).call(this, { listeners: r() });
923
916
  }
924
917
  onQueryUpdate() {
925
918
  this.updateResult(), this.hasListeners() && w(this, S, je).call(this);
926
919
  }
927
- }, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(), G = new WeakMap(), ne = new WeakMap(), N = new WeakMap(), U = new WeakMap(), de = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), z = new WeakMap(), J = new WeakMap(), _ = new WeakMap(), oe = new WeakMap(), S = new WeakSet(), ue = function(e) {
928
- w(this, S, ke).call(this);
929
- let s = n(this, b).fetch(
920
+ }, P = new WeakMap(), m = new WeakMap(), le = new WeakMap(), I = new WeakMap(), G = new WeakMap(), re = new WeakMap(), L = new WeakMap(), M = new WeakMap(), de = new WeakMap(), ne = new WeakMap(), ie = new WeakMap(), z = new WeakMap(), V = new WeakMap(), _ = new WeakMap(), ae = new WeakMap(), S = new WeakSet(), ue = function(e) {
921
+ w(this, S, xe).call(this);
922
+ let s = n(this, m).fetch(
930
923
  this.options,
931
924
  e
932
925
  );
933
926
  return e != null && e.throwOnError || (s = s.catch(Se)), s;
934
927
  }, Pe = function() {
935
928
  w(this, S, Ae).call(this);
936
- const e = ye(
929
+ const e = pe(
937
930
  this.options.staleTime,
938
- n(this, b)
931
+ n(this, m)
939
932
  );
940
- if (V || n(this, P).isStale || !we(e))
933
+ if (J || n(this, I).isStale || !we(e))
941
934
  return;
942
- const r = ot(n(this, P).dataUpdatedAt, e) + 1;
943
- d(this, z, setTimeout(() => {
944
- n(this, P).isStale || this.updateResult();
935
+ const r = ot(n(this, I).dataUpdatedAt, e) + 1;
936
+ f(this, z, setTimeout(() => {
937
+ n(this, I).isStale || this.updateResult();
945
938
  }, r));
946
939
  }, Te = function() {
947
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, b)) : this.options.refetchInterval) ?? !1;
940
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, m)) : this.options.refetchInterval) ?? !1;
948
941
  }, De = function(e) {
949
- w(this, S, xe).call(this), d(this, _, e), !(V || x(this.options.enabled, n(this, b)) === !1 || !we(n(this, _)) || n(this, _) === 0) && d(this, J, setInterval(() => {
942
+ w(this, S, ke).call(this), f(this, _, e), !(J || k(this.options.enabled, n(this, m)) === !1 || !we(n(this, _)) || n(this, _) === 0) && f(this, V, setInterval(() => {
950
943
  (this.options.refetchIntervalInBackground || ut.isFocused()) && w(this, S, ue).call(this);
951
944
  }, n(this, _)));
952
945
  }, je = function() {
953
946
  w(this, S, Pe).call(this), w(this, S, De).call(this, w(this, S, Te).call(this));
954
947
  }, Ae = function() {
955
- n(this, z) && (clearTimeout(n(this, z)), d(this, z, void 0));
956
- }, xe = function() {
957
- n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
948
+ n(this, z) && (clearTimeout(n(this, z)), f(this, z, void 0));
958
949
  }, ke = function() {
959
- const e = n(this, T).getQueryCache().build(n(this, T), this.options);
960
- if (e === n(this, b))
950
+ n(this, V) && (clearInterval(n(this, V)), f(this, V, void 0));
951
+ }, xe = function() {
952
+ const e = n(this, P).getQueryCache().build(n(this, P), this.options);
953
+ if (e === n(this, m))
961
954
  return;
962
- const s = n(this, b);
963
- d(this, b, e), d(this, le, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
955
+ const s = n(this, m);
956
+ f(this, m, e), f(this, le, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
964
957
  }, yt = function(e) {
965
- Me.batch(() => {
958
+ Le.batch(() => {
966
959
  e.listeners && this.listeners.forEach((s) => {
967
- s(n(this, P));
968
- }), n(this, T).getQueryCache().notify({
969
- query: n(this, b),
960
+ s(n(this, I));
961
+ }), n(this, P).getQueryCache().notify({
962
+ query: n(this, m),
970
963
  type: "observerResultsUpdated"
971
964
  });
972
965
  });
973
966
  }, at);
974
967
  function Qt(t, e) {
975
- return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
968
+ return k(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
976
969
  }
977
970
  function Ze(t, e) {
978
- return Qt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
971
+ return Qt(t, e) || t.state.data !== void 0 && qe(t, e, e.refetchOnMount);
979
972
  }
980
- function Ue(t, e, s) {
981
- if (x(e.enabled, t) !== !1) {
973
+ function qe(t, e, s) {
974
+ if (k(e.enabled, t) !== !1) {
982
975
  const r = typeof s == "function" ? s(t) : s;
983
- return r === "always" || r !== !1 && Ne(t, e);
976
+ return r === "always" || r !== !1 && Me(t, e);
984
977
  }
985
978
  return !1;
986
979
  }
987
980
  function We(t, e, s, r) {
988
- return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Ne(t, s);
981
+ return (t !== e || k(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Me(t, s);
989
982
  }
990
- function Ne(t, e) {
991
- return x(e.enabled, t) !== !1 && t.isStaleByTime(ye(e.staleTime, t));
983
+ function Me(t, e) {
984
+ return k(e.enabled, t) !== !1 && t.isStaleByTime(pe(e.staleTime, t));
992
985
  }
993
- function qt(t, e) {
986
+ function Nt(t, e) {
994
987
  return !Ce(t.getCurrentResult(), e);
995
988
  }
996
989
  var pt = j.createContext(
@@ -1002,13 +995,13 @@ var pt = j.createContext(
1002
995
  if (!e)
1003
996
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1004
997
  return e;
1005
- }, Cs = ({
998
+ }, Fs = ({
1006
999
  client: t,
1007
1000
  children: e
1008
1001
  }) => (j.useEffect(() => (t.mount(), () => {
1009
1002
  t.unmount();
1010
- }), [t]), /* @__PURE__ */ Ot.jsx(pt.Provider, { value: t, children: e })), bt = j.createContext(!1), Lt = () => j.useContext(bt);
1011
- bt.Provider;
1003
+ }), [t]), /* @__PURE__ */ Ot.jsx(pt.Provider, { value: t, children: e })), mt = j.createContext(!1), Lt = () => j.useContext(mt);
1004
+ mt.Provider;
1012
1005
  function Mt() {
1013
1006
  let t = !1;
1014
1007
  return {
@@ -1021,128 +1014,130 @@ function Mt() {
1021
1014
  isReset: () => t
1022
1015
  };
1023
1016
  }
1024
- var Nt = j.createContext(Mt()), _t = () => j.useContext(Nt);
1025
- function Ht(t, e) {
1017
+ var _t = j.createContext(Mt()), Ht = () => j.useContext(_t);
1018
+ function Kt(t, e) {
1026
1019
  return typeof t == "function" ? t(...e) : !!t;
1027
1020
  }
1028
1021
  function Ye() {
1029
1022
  }
1030
- var Kt = (t, e) => {
1023
+ var Bt = (t, e) => {
1031
1024
  (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
1032
- }, Bt = (t) => {
1025
+ }, $t = (t) => {
1033
1026
  j.useEffect(() => {
1034
1027
  t.clearReset();
1035
1028
  }, [t]);
1036
- }, $t = ({
1029
+ }, Gt = ({
1037
1030
  result: t,
1038
1031
  errorResetBoundary: e,
1039
1032
  throwOnError: s,
1040
1033
  query: r,
1041
1034
  suspense: i
1042
- }) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Ht(s, [t.error, r])), Gt = (t, e) => e.state.data === void 0, zt = (t) => {
1035
+ }) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Kt(s, [t.error, r])), zt = (t, e) => e.state.data === void 0, Vt = (t) => {
1043
1036
  const e = t.staleTime;
1044
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)));
1045
- }, Jt = (t, e) => t.isLoading && t.isFetching && !e, Vt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1038
+ }, Jt = (t, e) => t.isLoading && t.isFetching && !e, Zt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1046
1039
  s.clearReset();
1047
1040
  });
1048
- function mt(t, e, s) {
1049
- var c, p, y, C, h;
1041
+ function bt(t, e, s) {
1042
+ var c, p, d, E, h;
1050
1043
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1051
1044
  throw new Error(
1052
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'
1053
1046
  );
1054
- const r = vt(s), i = Lt(), a = _t(), u = r.defaultQueryOptions(t);
1047
+ const r = vt(s), i = Lt(), a = Ht(), o = r.defaultQueryOptions(t);
1055
1048
  (p = (c = r.getDefaultOptions().queries) == null ? void 0 : c._experimental_beforeQuery) == null || p.call(
1056
1049
  c,
1057
- u
1058
- ), u._optimisticResults = i ? "isRestoring" : "optimistic", zt(u), Kt(u, a), Bt(a);
1059
- const o = !r.getQueryCache().get(u.queryHash), [l] = j.useState(
1050
+ o
1051
+ ), process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
1052
+ `[${o.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`
1053
+ )), o._optimisticResults = i ? "isRestoring" : "optimistic", Vt(o), Bt(o, a), $t(a);
1054
+ const u = !r.getQueryCache().get(o.queryHash), [l] = j.useState(
1060
1055
  () => new e(
1061
1056
  r,
1062
- u
1057
+ o
1063
1058
  )
1064
- ), f = l.getOptimisticResult(u), m = !i && t.subscribed !== !1;
1059
+ ), y = l.getOptimisticResult(o), g = !i && t.subscribed !== !1;
1065
1060
  if (j.useSyncExternalStore(
1066
1061
  j.useCallback(
1067
1062
  (v) => {
1068
- const E = m ? l.subscribe(Me.batchCalls(v)) : Ye;
1069
- return l.updateResult(), E;
1063
+ const C = g ? l.subscribe(Le.batchCalls(v)) : Ye;
1064
+ return l.updateResult(), C;
1070
1065
  },
1071
- [l, m]
1066
+ [l, g]
1072
1067
  ),
1073
1068
  () => l.getCurrentResult(),
1074
1069
  () => l.getCurrentResult()
1075
1070
  ), j.useEffect(() => {
1076
- l.setOptions(u, { listeners: !1 });
1077
- }, [u, l]), Vt(u, f))
1078
- throw Xe(u, l, a);
1079
- if ($t({
1080
- result: f,
1071
+ l.setOptions(o);
1072
+ }, [o, l]), Zt(o, y))
1073
+ throw Xe(o, l, a);
1074
+ if (Gt({
1075
+ result: y,
1081
1076
  errorResetBoundary: a,
1082
- throwOnError: u.throwOnError,
1083
- query: r.getQueryCache().get(u.queryHash),
1084
- suspense: u.suspense
1077
+ throwOnError: o.throwOnError,
1078
+ query: r.getQueryCache().get(o.queryHash),
1079
+ suspense: o.suspense
1085
1080
  }))
1086
- throw f.error;
1087
- if ((C = (y = r.getDefaultOptions().queries) == null ? void 0 : y._experimental_afterQuery) == null || C.call(
1088
- y,
1089
- u,
1090
- f
1091
- ), u.experimental_prefetchInRender && !V && Jt(f, i)) {
1092
- const v = o ? (
1081
+ throw y.error;
1082
+ if ((E = (d = r.getDefaultOptions().queries) == null ? void 0 : d._experimental_afterQuery) == null || E.call(
1083
+ d,
1084
+ o,
1085
+ y
1086
+ ), o.experimental_prefetchInRender && !J && Jt(y, i)) {
1087
+ const v = u ? (
1093
1088
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1094
- Xe(u, l, a)
1089
+ Xe(o, l, a)
1095
1090
  ) : (
1096
1091
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1097
- (h = r.getQueryCache().get(u.queryHash)) == null ? void 0 : h.promise
1092
+ (h = r.getQueryCache().get(o.queryHash)) == null ? void 0 : h.promise
1098
1093
  );
1099
1094
  v == null || v.catch(Ye).finally(() => {
1100
1095
  l.updateResult();
1101
1096
  });
1102
1097
  }
1103
- return u.notifyOnChangeProps ? f : l.trackResult(f);
1104
- }
1105
- function Zt(t, e) {
1106
- return mt(t, ft, e);
1098
+ return o.notifyOnChangeProps ? y : l.trackResult(y);
1107
1099
  }
1108
1100
  function Wt(t, e) {
1109
- return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"), mt(
1101
+ return bt(t, ft, e);
1102
+ }
1103
+ function Yt(t, e) {
1104
+ return process.env.NODE_ENV !== "production" && t.queryFn === ve && console.error("skipToken is not allowed for useSuspenseQuery"), bt(
1110
1105
  {
1111
1106
  ...t,
1112
1107
  enabled: !0,
1113
1108
  suspense: !0,
1114
- throwOnError: Gt,
1109
+ throwOnError: zt,
1115
1110
  placeholderData: void 0
1116
1111
  },
1117
1112
  ft,
1118
1113
  e
1119
1114
  );
1120
1115
  }
1121
- const Yt = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, Xt = (t) => t.filter(
1116
+ const Xt = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, es = (t) => t.filter(
1122
1117
  (e) => e != null && e !== !1 && (typeof e == "string" || typeof e == "number")
1123
- ).map((e) => `${e}`).filter((e) => e), es = (t) => {
1124
- const e = t.join("/"), [, s = "", r = ""] = e.match(Yt) ?? [];
1118
+ ).map((e) => `${e}`).filter((e) => e), ts = (t) => {
1119
+ const e = t.join("/"), [, s = "", r = ""] = e.match(Xt) ?? [];
1125
1120
  return {
1126
1121
  prefix: s,
1127
1122
  pathname: r.split("/").filter((i) => i !== "")
1128
1123
  };
1129
- }, ts = (t) => {
1124
+ }, ss = (t) => {
1130
1125
  const { prefix: e, pathname: s } = t;
1131
1126
  let r = e;
1132
1127
  return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
1133
1128
  }, et = (...t) => {
1134
- const e = Xt(t), s = es(e);
1135
- return ts(s);
1129
+ const e = es(t), s = ts(e);
1130
+ return ss(s);
1136
1131
  }, gt = Object.freeze({
1137
1132
  API_IDENTITIES: ["api-identities"]
1138
- }), Os = () => {
1133
+ }), Is = () => {
1139
1134
  const t = vt();
1140
1135
  return {
1141
1136
  invalidateCache: async (e) => {
1142
1137
  await t.invalidateQueries({ queryKey: gt[e] });
1143
1138
  }
1144
1139
  };
1145
- }, ss = "no-dehydrate", ce = (...t) => {
1140
+ }, rs = "no-dehydrate", ce = (...t) => {
1146
1141
  const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1147
1142
  return e ? `/${e}` : "/";
1148
1143
  }, _e = (t, e) => {
@@ -1161,74 +1156,74 @@ const Yt = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, Xt = (t) => t.filter(
1161
1156
  ]);
1162
1157
  if (a !== void 0) return a;
1163
1158
  }
1164
- }, Is = () => {
1165
- const t = ve(), s = St().sidebar;
1159
+ }, Ps = () => {
1160
+ const t = me(), s = St().sidebar;
1166
1161
  return _e(s, (r) => {
1167
1162
  if (r.type === "doc" && ce(r.id) === t.pathname)
1168
1163
  return r;
1169
1164
  });
1170
- }, Fs = (t) => {
1171
- const e = ve();
1165
+ }, Ts = (t) => {
1166
+ const e = me();
1172
1167
  return He(t, (s) => {
1173
1168
  if (s.type === "category" && s.link && ce(s.link.id) === e.pathname || s.type === "doc" && ce(s.id) === e.pathname)
1174
1169
  return !0;
1175
1170
  });
1176
- }, Ps = () => {
1177
- const t = ve().pathname, s = St().sidebar;
1171
+ }, Ds = () => {
1172
+ const t = me().pathname, s = St().sidebar;
1178
1173
  let r, i, a = !1;
1179
- return _e(s, (u) => {
1180
- const o = u.type === "doc" ? ce(u.id) : u.type === "category" && u.link ? ce(u.link.id) : void 0;
1181
- if (o) {
1174
+ return _e(s, (o) => {
1175
+ const u = o.type === "doc" ? ce(o.id) : o.type === "category" && o.link ? ce(o.link.id) : void 0;
1176
+ if (u) {
1182
1177
  if (a)
1183
- return i = { label: u.label, id: o }, !0;
1184
- t === o ? a = !0 : r = { label: u.label, id: o };
1178
+ return i = { label: o.label, id: u }, !0;
1179
+ t === u ? a = !0 : r = { label: o.label, id: u };
1185
1180
  }
1186
1181
  }), { prev: r, next: i };
1187
- }, rs = Et(
1182
+ }, ns = Et(
1188
1183
  void 0
1189
1184
  ), Ke = () => {
1190
- const t = Ct(rs);
1185
+ const t = Ct(ns);
1191
1186
  if (!t)
1192
1187
  throw new Error("useZudoku must be used within a ZudokuProvider.");
1193
1188
  return t;
1194
- }, Ts = () => {
1189
+ }, js = () => {
1195
1190
  const { getApiIdentities: t } = Ke();
1196
- return Zt({
1191
+ return Wt({
1197
1192
  queryFn: t,
1198
1193
  queryKey: gt.API_IDENTITIES
1199
1194
  });
1200
1195
  }, St = () => {
1201
1196
  var c;
1202
- const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a = ds(), u = (c = r.protectedRoutes) == null ? void 0 : c.some(
1197
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = me(), a = fs(), o = (c = r.protectedRoutes) == null ? void 0 : c.some(
1203
1198
  (p) => ze(p, i.pathname)
1204
1199
  );
1205
- let o = Object.entries(e).find(([, p]) => _e(p, (y) => {
1206
- if ((y.type === "doc" ? et(y.id) : y.type === "category" && y.link ? et(y.link.id) : void 0) === i.pathname)
1207
- return y;
1200
+ let u = Object.entries(e).find(([, p]) => _e(p, (d) => {
1201
+ if ((d.type === "doc" ? et(d.id) : d.type === "category" && d.link ? et(d.link.id) : void 0) === i.pathname)
1202
+ return d;
1208
1203
  }));
1209
- const l = s.find((p) => p.id === (o == null ? void 0 : o[0])) ?? s.find((p) => ze(p.id, i.pathname));
1210
- l && !o && l.id in e && (o = ["", e[l.id]]);
1211
- const { data: f } = Wt({
1204
+ const l = s.find((p) => p.id === (u == null ? void 0 : u[0])) ?? s.find((p) => ze(p.id, i.pathname));
1205
+ l && !u && l.id in e && (u = ["", e[l.id]]);
1206
+ const { data: y } = Yt({
1212
1207
  queryFn: () => t(i.pathname),
1213
1208
  // We just want to suspend here and don't store in SSR dehydrated state
1214
- queryKey: ["plugin-sidebar", ss, i.pathname]
1209
+ queryKey: ["plugin-sidebar", rs, i.pathname]
1215
1210
  });
1216
1211
  return {
1217
- sidebar: a.isAuthEnabled && !a.isAuthenticated && u ? [] : [...o ? o[1] : [], ...f],
1212
+ sidebar: a.isAuthEnabled && !a.isAuthenticated && o ? [] : [...u ? u[1] : [], ...y],
1218
1213
  topNavItem: l
1219
1214
  };
1220
1215
  }, tt = (t) => {
1221
1216
  let e;
1222
- const s = /* @__PURE__ */ new Set(), r = (f, m) => {
1223
- const c = typeof f == "function" ? f(e) : f;
1217
+ const s = /* @__PURE__ */ new Set(), r = (y, g) => {
1218
+ const c = typeof y == "function" ? y(e) : y;
1224
1219
  if (!Object.is(c, e)) {
1225
1220
  const p = e;
1226
- e = m ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), s.forEach((y) => y(e, p));
1221
+ e = g ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), s.forEach((d) => d(e, p));
1227
1222
  }
1228
- }, i = () => e, o = { setState: r, getState: i, getInitialState: () => l, subscribe: (f) => (s.add(f), () => s.delete(f)) }, l = e = t(r, i, o);
1229
- return o;
1230
- }, ns = (t) => t ? tt(t) : tt, is = (t) => t;
1231
- function as(t, e = is) {
1223
+ }, i = () => e, u = { setState: r, getState: i, getInitialState: () => l, subscribe: (y) => (s.add(y), () => s.delete(y)) }, l = e = t(r, i, u);
1224
+ return u;
1225
+ }, is = (t) => t ? tt(t) : tt, as = (t) => t;
1226
+ function os(t, e = as) {
1232
1227
  const s = Ge.useSyncExternalStore(
1233
1228
  t.subscribe,
1234
1229
  () => e(t.getState()),
@@ -1236,10 +1231,10 @@ function as(t, e = is) {
1236
1231
  );
1237
1232
  return Ge.useDebugValue(s), s;
1238
1233
  }
1239
- const os = (t) => {
1240
- const e = ns(t), s = (r) => as(e, r);
1234
+ const us = (t) => {
1235
+ const e = is(t), s = (r) => os(e, r);
1241
1236
  return Object.assign(s, e), s;
1242
- }, us = (t) => os;
1237
+ }, cs = (t) => us;
1243
1238
  function wt(t, e) {
1244
1239
  let s;
1245
1240
  try {
@@ -1250,8 +1245,8 @@ function wt(t, e) {
1250
1245
  return {
1251
1246
  getItem: (i) => {
1252
1247
  var a;
1253
- const u = (l) => l === null ? null : JSON.parse(l, void 0), o = (a = s.getItem(i)) != null ? a : null;
1254
- return o instanceof Promise ? o.then(u) : u(o);
1248
+ const o = (l) => l === null ? null : JSON.parse(l, void 0), u = (a = s.getItem(i)) != null ? a : null;
1249
+ return u instanceof Promise ? u.then(o) : o(u);
1255
1250
  },
1256
1251
  setItem: (i, a) => s.setItem(
1257
1252
  i,
@@ -1260,12 +1255,12 @@ function wt(t, e) {
1260
1255
  removeItem: (i) => s.removeItem(i)
1261
1256
  };
1262
1257
  }
1263
- const Qe = (t) => (e) => {
1258
+ const Ue = (t) => (e) => {
1264
1259
  try {
1265
1260
  const s = t(e);
1266
1261
  return s instanceof Promise ? s : {
1267
1262
  then(r) {
1268
- return Qe(r)(s);
1263
+ return Ue(r)(s);
1269
1264
  },
1270
1265
  catch(r) {
1271
1266
  return this;
@@ -1277,11 +1272,11 @@ const Qe = (t) => (e) => {
1277
1272
  return this;
1278
1273
  },
1279
1274
  catch(r) {
1280
- return Qe(r)(s);
1275
+ return Ue(r)(s);
1281
1276
  }
1282
1277
  };
1283
1278
  }
1284
- }, cs = (t, e) => (s, r, i) => {
1279
+ }, hs = (t, e) => (s, r, i) => {
1285
1280
  let a = {
1286
1281
  storage: wt(() => localStorage),
1287
1282
  partialize: (h) => h,
@@ -1291,10 +1286,10 @@ const Qe = (t) => (e) => {
1291
1286
  ...h
1292
1287
  }),
1293
1288
  ...e
1294
- }, u = !1;
1295
- const o = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
1296
- let f = a.storage;
1297
- if (!f)
1289
+ }, o = !1;
1290
+ const u = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
1291
+ let y = a.storage;
1292
+ if (!y)
1298
1293
  return t(
1299
1294
  (...h) => {
1300
1295
  console.warn(
@@ -1304,34 +1299,34 @@ const Qe = (t) => (e) => {
1304
1299
  r,
1305
1300
  i
1306
1301
  );
1307
- const m = () => {
1302
+ const g = () => {
1308
1303
  const h = a.partialize({ ...r() });
1309
- return f.setItem(a.name, {
1304
+ return y.setItem(a.name, {
1310
1305
  state: h,
1311
1306
  version: a.version
1312
1307
  });
1313
1308
  }, c = i.setState;
1314
1309
  i.setState = (h, v) => {
1315
- c(h, v), m();
1310
+ c(h, v), g();
1316
1311
  };
1317
1312
  const p = t(
1318
1313
  (...h) => {
1319
- s(...h), m();
1314
+ s(...h), g();
1320
1315
  },
1321
1316
  r,
1322
1317
  i
1323
1318
  );
1324
1319
  i.getInitialState = () => p;
1325
- let y;
1326
- const C = () => {
1320
+ let d;
1321
+ const E = () => {
1327
1322
  var h, v;
1328
- if (!f) return;
1329
- u = !1, o.forEach((R) => {
1323
+ if (!y) return;
1324
+ o = !1, u.forEach((R) => {
1330
1325
  var O;
1331
1326
  return R((O = r()) != null ? O : p);
1332
1327
  });
1333
- const E = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
1334
- return Qe(f.getItem.bind(f))(a.name).then((R) => {
1328
+ const C = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
1329
+ return Ue(y.getItem.bind(y))(a.name).then((R) => {
1335
1330
  if (R)
1336
1331
  if (typeof R.version == "number" && R.version !== a.version) {
1337
1332
  if (a.migrate) {
@@ -1350,15 +1345,15 @@ const Qe = (t) => (e) => {
1350
1345
  }).then((R) => {
1351
1346
  var O;
1352
1347
  const [q, Z] = R;
1353
- if (y = a.merge(
1348
+ if (d = a.merge(
1354
1349
  Z,
1355
1350
  (O = r()) != null ? O : p
1356
- ), s(y, !0), q)
1357
- return m();
1351
+ ), s(d, !0), q)
1352
+ return g();
1358
1353
  }).then(() => {
1359
- E == null || E(y, void 0), y = r(), u = !0, l.forEach((R) => R(y));
1354
+ C == null || C(d, void 0), d = r(), o = !0, l.forEach((R) => R(d));
1360
1355
  }).catch((R) => {
1361
- E == null || E(void 0, R);
1356
+ C == null || C(void 0, R);
1362
1357
  });
1363
1358
  };
1364
1359
  return i.persist = {
@@ -1366,30 +1361,30 @@ const Qe = (t) => (e) => {
1366
1361
  a = {
1367
1362
  ...a,
1368
1363
  ...h
1369
- }, h.storage && (f = h.storage);
1364
+ }, h.storage && (y = h.storage);
1370
1365
  },
1371
1366
  clearStorage: () => {
1372
- f == null || f.removeItem(a.name);
1367
+ y == null || y.removeItem(a.name);
1373
1368
  },
1374
1369
  getOptions: () => a,
1375
- rehydrate: () => C(),
1376
- hasHydrated: () => u,
1377
- onHydrate: (h) => (o.add(h), () => {
1378
- o.delete(h);
1370
+ rehydrate: () => E(),
1371
+ hasHydrated: () => o,
1372
+ onHydrate: (h) => (u.add(h), () => {
1373
+ u.delete(h);
1379
1374
  }),
1380
1375
  onFinishHydration: (h) => (l.add(h), () => {
1381
1376
  l.delete(h);
1382
1377
  })
1383
- }, a.skipHydration || C(), y || p;
1384
- }, hs = cs, ls = (t) => {
1378
+ }, a.skipHydration || E(), d || p;
1379
+ }, ls = hs, ds = (t) => {
1385
1380
  const e = (s) => {
1386
1381
  s.key === t.persist.getOptions().name && s.newValue && t.persist.rehydrate();
1387
1382
  };
1388
1383
  return window.addEventListener("storage", e), () => {
1389
1384
  window.removeEventListener("storage", e);
1390
1385
  };
1391
- }, Rt = us()(
1392
- hs(
1386
+ }, Rt = cs()(
1387
+ ls(
1393
1388
  (t) => ({
1394
1389
  isAuthenticated: !1,
1395
1390
  isPending: !0,
@@ -1407,8 +1402,8 @@ const Qe = (t) => (e) => {
1407
1402
  }
1408
1403
  )
1409
1404
  );
1410
- typeof window < "u" && ls(Rt);
1411
- const ds = () => {
1405
+ typeof window < "u" && ds(Rt);
1406
+ const fs = () => {
1412
1407
  const { authentication: t } = Ke(), e = Rt(), s = typeof t < "u";
1413
1408
  return {
1414
1409
  isAuthEnabled: s,
@@ -1435,49 +1430,49 @@ const ds = () => {
1435
1430
  };
1436
1431
  };
1437
1432
  export {
1438
- Rs as A,
1439
- ws as B,
1433
+ Cs as A,
1434
+ Es as B,
1440
1435
  ut as C,
1441
1436
  ct as D,
1442
- ye as E,
1443
- bs as F,
1444
- Le as G,
1445
- pe as H,
1446
- Cs as I,
1437
+ pe as E,
1438
+ gs as F,
1439
+ Ne as G,
1440
+ ve as H,
1441
+ Fs as I,
1447
1442
  St as J,
1448
1443
  _e as K,
1449
- Os as L,
1444
+ Is as L,
1450
1445
  gt as M,
1451
- Fs as N,
1452
- Es as Q,
1453
- kt as R,
1454
- qe as S,
1455
- rs as Z,
1456
- Is as a,
1457
- Ps as b,
1446
+ Ts as N,
1447
+ Os as Q,
1448
+ qt as R,
1449
+ Qe as S,
1450
+ ns as Z,
1451
+ Ps as a,
1452
+ Ds as b,
1458
1453
  At as c,
1459
- Wt as d,
1454
+ Yt as d,
1460
1455
  Ke as e,
1461
1456
  et as f,
1462
1457
  vt as g,
1463
1458
  Re as h,
1464
1459
  Ye as i,
1465
1460
  ce as j,
1466
- Ht as k,
1467
- ds as l,
1468
- Zt as m,
1469
- Me as n,
1470
- Ss as o,
1471
- us as p,
1472
- hs as q,
1461
+ Kt as k,
1462
+ fs as l,
1463
+ Wt as m,
1464
+ Le as n,
1465
+ Rs as o,
1466
+ cs as p,
1467
+ ls as q,
1473
1468
  wt as r,
1474
1469
  Ce as s,
1475
- Ts as t,
1470
+ js as t,
1476
1471
  Rt as u,
1477
- It as v,
1478
- ms as w,
1479
- gs as x,
1472
+ Ft as v,
1473
+ Ss as w,
1474
+ ws as x,
1480
1475
  Se as y,
1481
1476
  Pt as z
1482
1477
  };
1483
- //# sourceMappingURL=hook-CqpVYDqN.js.map
1478
+ //# sourceMappingURL=hook-pPrHCB6G.js.map