zudoku 0.16.3 → 0.18.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 (342) hide show
  1. package/dist/app/demo.js +0 -2
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/entry.client.js +14 -0
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.js +5 -4
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/app/main.d.ts +1 -1
  8. package/dist/app/main.js +2 -2
  9. package/dist/app/main.js.map +1 -1
  10. package/dist/app/standalone.js +0 -2
  11. package/dist/app/standalone.js.map +1 -1
  12. package/dist/codegen.d.ts +3 -0
  13. package/dist/codegen.js +45 -0
  14. package/dist/codegen.js.map +1 -0
  15. package/dist/config/validators/InputSidebarSchema.d.ts +10 -10
  16. package/dist/config/validators/validate.d.ts +114 -114
  17. package/dist/config/validators/validate.js.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/authentication/authentication.d.ts +2 -2
  22. package/dist/lib/authentication/hook.d.ts +5 -4
  23. package/dist/lib/authentication/hook.js +1 -3
  24. package/dist/lib/authentication/hook.js.map +1 -1
  25. package/dist/lib/authentication/providers/auth0.js +11 -11
  26. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  27. package/dist/lib/authentication/providers/openid.d.ts +0 -1
  28. package/dist/lib/authentication/providers/openid.js +11 -26
  29. package/dist/lib/authentication/providers/openid.js.map +1 -1
  30. package/dist/lib/authentication/state.d.ts +25 -4
  31. package/dist/lib/authentication/state.js +28 -3
  32. package/dist/lib/authentication/state.js.map +1 -1
  33. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  34. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  35. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  36. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  37. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  38. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  39. package/dist/lib/components/Bootstrap.d.ts +3 -1
  40. package/dist/lib/components/Bootstrap.js +11 -3
  41. package/dist/lib/components/Bootstrap.js.map +1 -1
  42. package/dist/lib/components/ClientOnly.d.ts +4 -2
  43. package/dist/lib/components/ClientOnly.js +1 -1
  44. package/dist/lib/components/ClientOnly.js.map +1 -1
  45. package/dist/lib/components/DeveloperHint.js +2 -1
  46. package/dist/lib/components/DeveloperHint.js.map +1 -1
  47. package/dist/lib/components/Header.js +5 -7
  48. package/dist/lib/components/Header.js.map +1 -1
  49. package/dist/lib/components/Heading.d.ts +1 -1
  50. package/dist/lib/components/Layout.js +11 -3
  51. package/dist/lib/components/Layout.js.map +1 -1
  52. package/dist/lib/components/MobileTopNavigation.js +6 -7
  53. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  54. package/dist/lib/components/SyntaxHighlight.js +16 -12
  55. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  56. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  57. package/dist/lib/components/ThemeSwitch.js +13 -0
  58. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  59. package/dist/lib/components/TopNavigation.d.ts +2 -0
  60. package/dist/lib/components/TopNavigation.js +13 -7
  61. package/dist/lib/components/TopNavigation.js.map +1 -1
  62. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  63. package/dist/lib/components/{DevPortal.js → Zudoku.js} +13 -14
  64. package/dist/lib/components/Zudoku.js.map +1 -0
  65. package/dist/lib/components/context/ZudokuContext.d.ts +7 -7
  66. package/dist/lib/components/context/ZudokuContext.js +8 -13
  67. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  68. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  69. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  70. package/dist/lib/components/index.d.ts +18 -10
  71. package/dist/lib/components/index.js +2 -3
  72. package/dist/lib/components/index.js.map +1 -1
  73. package/dist/lib/components/navigation/Sidebar.js +1 -1
  74. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  75. package/dist/lib/components/navigation/utils.js +2 -2
  76. package/dist/lib/components/navigation/utils.js.map +1 -1
  77. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +3 -7
  78. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  79. package/dist/lib/core/ZudokuContext.js.map +1 -0
  80. package/dist/lib/core/plugins.d.ts +12 -12
  81. package/dist/lib/core/plugins.js.map +1 -1
  82. package/dist/lib/errors/ErrorAlert.js +1 -1
  83. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  84. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  85. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  86. package/dist/lib/plugins/custom-pages/index.d.ts +2 -2
  87. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  88. package/dist/lib/plugins/markdown/index.d.ts +2 -2
  89. package/dist/lib/plugins/markdown/index.js.map +1 -1
  90. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  91. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  92. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  93. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  94. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  95. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  96. package/dist/lib/plugins/openapi/OperationList.js +7 -22
  97. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  98. package/dist/lib/plugins/openapi/Route.d.ts +4 -4
  99. package/dist/lib/plugins/openapi/Route.js +2 -4
  100. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  101. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  102. package/dist/lib/plugins/openapi/Sidecar.js +34 -33
  103. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  104. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  105. package/dist/lib/plugins/openapi/client/GraphQLClient.js +102 -0
  106. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  107. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  108. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  109. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  110. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  111. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  112. package/dist/lib/plugins/openapi/client/useCreateQuery.js +13 -0
  113. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  114. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  115. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  116. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  117. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  118. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  119. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  120. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -52
  121. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  122. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  123. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +134 -9
  124. package/dist/lib/plugins/openapi/graphql/graphql.js +194 -778
  125. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  126. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  127. package/dist/lib/plugins/openapi/index.js +40 -53
  128. package/dist/lib/plugins/openapi/index.js.map +1 -1
  129. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  130. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  131. package/dist/lib/plugins/openapi-worker.js +7 -1
  132. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  133. package/dist/lib/plugins/redirect/index.d.ts +2 -2
  134. package/dist/lib/plugins/redirect/index.js.map +1 -1
  135. package/dist/lib/plugins/search-inkeep/index.d.ts +2 -2
  136. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  137. package/dist/lib/ui/ActionButton.d.ts +3 -1
  138. package/dist/lib/util/MdxComponents.d.ts +1 -1
  139. package/dist/lib/util/useOnScreen.d.ts +4 -0
  140. package/dist/lib/util/useOnScreen.js +19 -0
  141. package/dist/lib/util/useOnScreen.js.map +1 -0
  142. package/dist/vite/config.js +0 -1
  143. package/dist/vite/config.js.map +1 -1
  144. package/dist/vite/html.js +0 -2
  145. package/dist/vite/html.js.map +1 -1
  146. package/dist/vite/plugin-component.js +1 -1
  147. package/dist/vite/plugin-component.js.map +1 -1
  148. package/dist/vite/plugin-mdx.d.ts +0 -6
  149. package/dist/vite/plugin-mdx.js +3 -2
  150. package/dist/vite/plugin-mdx.js.map +1 -1
  151. package/dist/vite/plugin.js +0 -2
  152. package/dist/vite/plugin.js.map +1 -1
  153. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  154. package/dist/vite/remarkStaticGeneration.js +125 -0
  155. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  156. package/lib/{AnchorLink-BbB2q-jx.js → AnchorLink-CDlhr8gL.js} +11 -10
  157. package/lib/{AnchorLink-BbB2q-jx.js.map → AnchorLink-CDlhr8gL.js.map} +1 -1
  158. package/lib/{AuthenticationPlugin-C9BHGXlE.js → AuthenticationPlugin-DeGDVa1r.js} +6 -5
  159. package/lib/{AuthenticationPlugin-C9BHGXlE.js.map → AuthenticationPlugin-DeGDVa1r.js.map} +1 -1
  160. package/lib/{Spinner-ChOGyPls.js → Button-jK0EsymC.js} +12 -15
  161. package/lib/Button-jK0EsymC.js.map +1 -0
  162. package/lib/{ClientOnly-CVN6leDu.js → ClientOnly-E7hGysn1.js} +4 -4
  163. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  164. package/lib/Markdown-ievDDhFT.js +15192 -0
  165. package/lib/Markdown-ievDDhFT.js.map +1 -0
  166. package/lib/{MdxPage-DKMH_t0f.js → MdxPage-Bwn-VSsH.js} +5 -5
  167. package/lib/{MdxPage-DKMH_t0f.js.map → MdxPage-Bwn-VSsH.js.map} +1 -1
  168. package/lib/OperationList-BwBl1xrD.js +4691 -0
  169. package/lib/OperationList-BwBl1xrD.js.map +1 -0
  170. package/lib/Route-DlG_HTMu.js +11 -0
  171. package/lib/Route-DlG_HTMu.js.map +1 -0
  172. package/lib/{Select-Bagt3Bme.js → Select-O9ZM3ZgX.js} +7 -7
  173. package/lib/Select-O9ZM3ZgX.js.map +1 -0
  174. package/lib/SidebarBadge-DxFJcJ6V.js +51 -0
  175. package/lib/SidebarBadge-DxFJcJ6V.js.map +1 -0
  176. package/lib/SlotletProvider-DyomlzGx.js +252 -0
  177. package/lib/SlotletProvider-DyomlzGx.js.map +1 -0
  178. package/lib/Spinner-3cQDBVGr.js +7 -0
  179. package/lib/Spinner-3cQDBVGr.js.map +1 -0
  180. package/lib/SyntaxHighlight-DkLOsjHS.js +2983 -0
  181. package/lib/SyntaxHighlight-DkLOsjHS.js.map +1 -0
  182. package/lib/assets/{worker-YA-aCP3P.js → worker-CPsGZsve.js} +24 -22
  183. package/lib/assets/{worker-YA-aCP3P.js.map → worker-CPsGZsve.js.map} +1 -1
  184. package/lib/context-D1nXWxm7.js +22 -0
  185. package/lib/context-D1nXWxm7.js.map +1 -0
  186. package/lib/createServer-DK-g7kbB.js +16089 -0
  187. package/lib/createServer-DK-g7kbB.js.map +1 -0
  188. package/lib/{hook-sn0zMTkE.js → hook-hEqe7fPB.js} +12 -14
  189. package/lib/hook-hEqe7fPB.js.map +1 -0
  190. package/lib/index-Czzd9rjU.js +899 -0
  191. package/lib/index-Czzd9rjU.js.map +1 -0
  192. package/lib/index-DNxQ_rCt.js +1273 -0
  193. package/lib/index-DNxQ_rCt.js.map +1 -0
  194. package/lib/index-Yn8c3UWE.js +921 -0
  195. package/lib/index-Yn8c3UWE.js.map +1 -0
  196. package/lib/{router-BsfSoK2j.js → router-lfyopgBI.js} +23 -23
  197. package/lib/{router-BsfSoK2j.js.map → router-lfyopgBI.js.map} +1 -1
  198. package/lib/state-tsXBLONe.js +203 -0
  199. package/lib/{state-CsuHT8ZO.js.map → state-tsXBLONe.js.map} +1 -1
  200. package/lib/ui/ActionButton.js +11 -10
  201. package/lib/ui/ActionButton.js.map +1 -1
  202. package/lib/useExposedProps-CTPtylCV.js +10 -0
  203. package/lib/{useExposedProps-ChOIUaS4.js.map → useExposedProps-CTPtylCV.js.map} +1 -1
  204. package/lib/{ZudokuContext-BKXGJTmu.js → utils-DcpDOncX.js} +242 -246
  205. package/lib/utils-DcpDOncX.js.map +1 -0
  206. package/lib/zudoku.auth-auth0.js +24 -18
  207. package/lib/zudoku.auth-auth0.js.map +1 -1
  208. package/lib/zudoku.auth-clerk.js +2 -2
  209. package/lib/zudoku.auth-openid.js +124 -138
  210. package/lib/zudoku.auth-openid.js.map +1 -1
  211. package/lib/zudoku.components.js +1284 -1121
  212. package/lib/zudoku.components.js.map +1 -1
  213. package/lib/zudoku.openapi-worker.js +10 -16346
  214. package/lib/zudoku.openapi-worker.js.map +1 -1
  215. package/lib/zudoku.plugin-api-keys.js +18 -18
  216. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  217. package/lib/zudoku.plugin-custom-pages.js +2 -2
  218. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  219. package/lib/zudoku.plugin-markdown.js +1 -1
  220. package/lib/zudoku.plugin-markdown.js.map +1 -1
  221. package/lib/zudoku.plugin-openapi.js +5 -9
  222. package/lib/zudoku.plugin-openapi.js.map +1 -1
  223. package/lib/zudoku.plugin-redirect.js +1 -1
  224. package/lib/zudoku.plugin-redirect.js.map +1 -1
  225. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  226. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  227. package/package.json +14 -4
  228. package/src/app/demo.tsx +0 -3
  229. package/src/app/entry.client.tsx +14 -0
  230. package/src/app/entry.server.tsx +59 -57
  231. package/src/app/main.tsx +4 -4
  232. package/src/app/standalone.tsx +0 -3
  233. package/src/lib/authentication/authentication.ts +2 -2
  234. package/src/lib/authentication/hook.ts +1 -3
  235. package/src/lib/authentication/providers/auth0.tsx +16 -11
  236. package/src/lib/authentication/providers/openid.tsx +12 -30
  237. package/src/lib/authentication/state.ts +50 -9
  238. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  239. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  240. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  241. package/src/lib/components/Bootstrap.tsx +36 -9
  242. package/src/lib/components/ClientOnly.tsx +6 -3
  243. package/src/lib/components/DeveloperHint.tsx +6 -1
  244. package/src/lib/components/Header.tsx +32 -37
  245. package/src/lib/components/Layout.tsx +48 -36
  246. package/src/lib/components/MobileTopNavigation.tsx +15 -18
  247. package/src/lib/components/SyntaxHighlight.tsx +81 -46
  248. package/src/lib/components/ThemeSwitch.tsx +26 -0
  249. package/src/lib/components/TopNavigation.tsx +27 -19
  250. package/src/lib/components/Zudoku.tsx +108 -0
  251. package/src/lib/components/context/ZudokuContext.ts +11 -16
  252. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  253. package/src/lib/components/index.ts +2 -3
  254. package/src/lib/components/navigation/Sidebar.tsx +3 -3
  255. package/src/lib/components/navigation/utils.ts +2 -2
  256. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +3 -11
  257. package/src/lib/core/plugins.ts +12 -16
  258. package/src/lib/errors/ErrorAlert.tsx +2 -1
  259. package/src/lib/plugins/api-keys/index.tsx +9 -9
  260. package/src/lib/plugins/custom-pages/index.tsx +2 -2
  261. package/src/lib/plugins/markdown/index.tsx +2 -2
  262. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  263. package/src/lib/plugins/openapi/Endpoint.tsx +5 -10
  264. package/src/lib/plugins/openapi/OperationList.tsx +6 -40
  265. package/src/lib/plugins/openapi/Route.tsx +11 -12
  266. package/src/lib/plugins/openapi/Sidecar.tsx +72 -61
  267. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +140 -0
  268. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  269. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  270. package/src/lib/plugins/openapi/client/useCreateQuery.ts +18 -0
  271. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  272. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  273. package/src/lib/plugins/openapi/graphql/gql.ts +7 -25
  274. package/src/lib/plugins/openapi/graphql/graphql.ts +351 -782
  275. package/src/lib/plugins/openapi/index.tsx +42 -67
  276. package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
  277. package/src/lib/plugins/openapi-worker.ts +11 -1
  278. package/src/lib/plugins/redirect/index.tsx +2 -2
  279. package/src/lib/plugins/search-inkeep/index.tsx +2 -2
  280. package/src/lib/ui/ActionButton.tsx +1 -1
  281. package/src/lib/util/useOnScreen.ts +32 -0
  282. package/dist/lib/components/DevPortal.js.map +0 -1
  283. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  284. package/dist/lib/components/context/ThemeContext.js +0 -7
  285. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  286. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  287. package/dist/lib/components/context/ThemeProvider.js +0 -23
  288. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  289. package/dist/lib/core/DevPortalContext.js.map +0 -1
  290. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -9
  291. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -54
  292. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  293. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  294. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -62
  295. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  296. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  297. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  298. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  299. package/dist/lib/themeToggle.d.ts +0 -1
  300. package/dist/lib/themeToggle.js +0 -7
  301. package/dist/lib/themeToggle.js.map +0 -1
  302. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  303. package/dist/lib/util/createWaitForNotify.js +0 -15
  304. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  305. package/dist/vite/plugin-html-transform.d.ts +0 -2
  306. package/dist/vite/plugin-html-transform.js +0 -15
  307. package/dist/vite/plugin-html-transform.js.map +0 -1
  308. package/lib/ClientOnly-CVN6leDu.js.map +0 -1
  309. package/lib/DeveloperHint-DHdLXGHA.js +0 -16
  310. package/lib/DeveloperHint-DHdLXGHA.js.map +0 -1
  311. package/lib/Markdown-BDcCAWwm.js +0 -18059
  312. package/lib/Markdown-BDcCAWwm.js.map +0 -1
  313. package/lib/OperationList-BjppA5yM.js +0 -621
  314. package/lib/OperationList-BjppA5yM.js.map +0 -1
  315. package/lib/Route-D_djzMv3.js +0 -13
  316. package/lib/Route-D_djzMv3.js.map +0 -1
  317. package/lib/Select-Bagt3Bme.js.map +0 -1
  318. package/lib/SidebarBadge-Bbt92M5K.js +0 -38
  319. package/lib/SidebarBadge-Bbt92M5K.js.map +0 -1
  320. package/lib/SlotletProvider-Da7eFgd2.js +0 -241
  321. package/lib/SlotletProvider-Da7eFgd2.js.map +0 -1
  322. package/lib/Spinner-ChOGyPls.js.map +0 -1
  323. package/lib/StaggeredRender-DDHSzQKE.js +0 -17
  324. package/lib/StaggeredRender-DDHSzQKE.js.map +0 -1
  325. package/lib/ZudokuContext-BKXGJTmu.js.map +0 -1
  326. package/lib/hook-sn0zMTkE.js.map +0 -1
  327. package/lib/index-CRo94sKK.js +0 -1783
  328. package/lib/index-CRo94sKK.js.map +0 -1
  329. package/lib/index-_gtpPhlu.js +0 -5877
  330. package/lib/index-_gtpPhlu.js.map +0 -1
  331. package/lib/state-CsuHT8ZO.js +0 -183
  332. package/lib/urql-core-35Qt_U4i.js +0 -1511
  333. package/lib/urql-core-35Qt_U4i.js.map +0 -1
  334. package/lib/useExposedProps-ChOIUaS4.js +0 -9
  335. package/src/lib/components/DevPortal.tsx +0 -111
  336. package/src/lib/components/context/ThemeContext.tsx +0 -8
  337. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  338. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -65
  339. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -79
  340. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  341. package/src/lib/themeToggle.ts +0 -7
  342. package/src/lib/util/createWaitForNotify.ts +0 -18
@@ -3,12 +3,12 @@ var _e = (t) => {
3
3
  };
4
4
  var be = (t, e, s) => e.has(t) || _e("Cannot " + s);
5
5
  var i = (t, e, s) => (be(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (be(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), b = (t, e, s) => (be(t, e, "access private method"), s);
6
- import * as I from "react";
7
- import { createContext as dt, useContext as ft } from "react";
8
- import { j as yt } from "./jsx-runtime-B6kdoens.js";
9
- import { u as pe } from "./index-CRo94sKK.js";
10
- import { b as pt } from "./router-BsfSoK2j.js";
11
- var ke = class {
6
+ import * as T from "react";
7
+ import { createContext as ft, useContext as yt } from "react";
8
+ import { j as pt } from "./jsx-runtime-B6kdoens.js";
9
+ import { u as pe } from "./index-Czzd9rjU.js";
10
+ import { m as vt } from "./router-lfyopgBI.js";
11
+ var Qe = class {
12
12
  constructor() {
13
13
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
14
14
  }
@@ -27,22 +27,22 @@ var ke = class {
27
27
  }, V = typeof window > "u" || "Deno" in globalThis;
28
28
  function ge() {
29
29
  }
30
- function Jt(t, e) {
30
+ function Wt(t, e) {
31
31
  return typeof t == "function" ? t(e) : t;
32
32
  }
33
- function Ce(t) {
33
+ function Re(t) {
34
34
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
35
35
  }
36
- function Ye(t, e) {
36
+ function et(t, e) {
37
37
  return Math.max(t + (e || 0) - Date.now(), 0);
38
38
  }
39
39
  function fe(t, e) {
40
40
  return typeof t == "function" ? t(e) : t;
41
41
  }
42
- function q(t, e) {
42
+ function x(t, e) {
43
43
  return typeof t == "function" ? t(e) : t;
44
44
  }
45
- function Zt(t, e) {
45
+ function Jt(t, e) {
46
46
  const {
47
47
  type: s = "all",
48
48
  exact: r,
@@ -53,9 +53,9 @@ function Zt(t, e) {
53
53
  } = t;
54
54
  if (a) {
55
55
  if (r) {
56
- if (e.queryHash !== vt(a, e.options))
56
+ if (e.queryHash !== bt(a, e.options))
57
57
  return !1;
58
- } else if (!Qe(e.queryKey, a))
58
+ } else if (!qe(e.queryKey, a))
59
59
  return !1;
60
60
  }
61
61
  if (s !== "all") {
@@ -73,12 +73,12 @@ function Xt(t, e) {
73
73
  if (s) {
74
74
  if (Se(e.options.mutationKey) !== Se(u))
75
75
  return !1;
76
- } else if (!Qe(e.options.mutationKey, u))
76
+ } else if (!qe(e.options.mutationKey, u))
77
77
  return !1;
78
78
  }
79
79
  return !(r && e.state.status !== r || n && !n(e));
80
80
  }
81
- function vt(t, e) {
81
+ function bt(t, e) {
82
82
  return ((e == null ? void 0 : e.queryKeyHashFn) || Se)(t);
83
83
  }
84
84
  function Se(t) {
@@ -87,19 +87,19 @@ function Se(t) {
87
87
  (e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
88
88
  );
89
89
  }
90
- function Qe(t, e) {
91
- return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Qe(t[s], e[s])) : !1;
90
+ function qe(t, e) {
91
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !qe(t[s], e[s])) : !1;
92
92
  }
93
- function Re(t, e) {
93
+ function Ce(t, e) {
94
94
  if (t === e)
95
95
  return t;
96
96
  const s = He(t) && He(e);
97
97
  if (s || Ee(t) && Ee(e)) {
98
98
  const r = s ? t : Object.keys(t), n = r.length, u = s ? e : Object.keys(e), a = u.length, o = s ? [] : {};
99
99
  let l = 0;
100
- for (let C = 0; C < a; C++) {
101
- const v = s ? C : u[C];
102
- (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] = Re(t[v], e[v]), o[v] === t[v] && t[v] !== void 0 && l++);
100
+ for (let R = 0; R < a; R++) {
101
+ const v = s ? R : u[R];
102
+ (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] = Ce(t[v], e[v]), o[v] === t[v] && t[v] !== void 0 && l++);
103
103
  }
104
104
  return n === a && l === n ? t : o;
105
105
  }
@@ -128,7 +128,7 @@ function Ee(t) {
128
128
  function Be(t) {
129
129
  return Object.prototype.toString.call(t) === "[object Object]";
130
130
  }
131
- function bt(t) {
131
+ function mt(t) {
132
132
  return new Promise((e) => {
133
133
  setTimeout(e, t);
134
134
  });
@@ -139,13 +139,13 @@ function Oe(t, e, s) {
139
139
  if (s.structuralSharing !== !1) {
140
140
  if (process.env.NODE_ENV !== "production")
141
141
  try {
142
- return Re(t, e);
142
+ return Ce(t, e);
143
143
  } catch (r) {
144
144
  console.error(
145
145
  `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}`
146
146
  );
147
147
  }
148
- return Re(t, e);
148
+ return Ce(t, e);
149
149
  }
150
150
  return e;
151
151
  }
@@ -158,18 +158,18 @@ function es(t, e, s = 0) {
158
158
  return s && r.length > s ? r.slice(0, -1) : r;
159
159
  }
160
160
  var ye = Symbol();
161
- function mt(t, e) {
161
+ function gt(t, e) {
162
162
  return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error(
163
163
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
164
164
  ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ye ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
165
165
  }
166
- var K, Q, Z, $e, gt = ($e = class extends ke {
166
+ var K, q, J, Ze, Rt = (Ze = class extends Qe {
167
167
  constructor() {
168
168
  super();
169
169
  y(this, K);
170
- y(this, Q);
171
- y(this, Z);
172
- c(this, Z, (e) => {
170
+ y(this, q);
171
+ y(this, J);
172
+ c(this, J, (e) => {
173
173
  if (!V && window.addEventListener) {
174
174
  const s = () => e();
175
175
  return window.addEventListener("visibilitychange", s, !1), () => {
@@ -179,15 +179,15 @@ var K, Q, Z, $e, gt = ($e = class extends ke {
179
179
  });
180
180
  }
181
181
  onSubscribe() {
182
- i(this, Q) || this.setEventListener(i(this, Z));
182
+ i(this, q) || this.setEventListener(i(this, J));
183
183
  }
184
184
  onUnsubscribe() {
185
185
  var e;
186
- this.hasListeners() || ((e = i(this, Q)) == null || e.call(this), c(this, Q, void 0));
186
+ this.hasListeners() || ((e = i(this, q)) == null || e.call(this), c(this, q, void 0));
187
187
  }
188
188
  setEventListener(e) {
189
189
  var s;
190
- c(this, Z, e), (s = i(this, Q)) == null || s.call(this), c(this, Q, e((r) => {
190
+ c(this, J, e), (s = i(this, q)) == null || s.call(this), c(this, q, e((r) => {
191
191
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
192
192
  }));
193
193
  }
@@ -204,7 +204,7 @@ var K, Q, Z, $e, gt = ($e = class extends ke {
204
204
  var e;
205
205
  return typeof i(this, K) == "boolean" ? i(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
206
206
  }
207
- }, K = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), $e), et = new gt(), X, A, Y, We, Ct = (We = class extends ke {
207
+ }, K = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Ze), tt = new Rt(), X, A, Y, We, St = (We = class extends Qe {
208
208
  constructor() {
209
209
  super();
210
210
  y(this, X, !0);
@@ -238,7 +238,7 @@ var K, Q, Z, $e, gt = ($e = class extends ke {
238
238
  isOnline() {
239
239
  return i(this, X);
240
240
  }
241
- }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), tt = new Ct();
241
+ }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), st = new St();
242
242
  function Fe() {
243
243
  let t, e;
244
244
  const s = new Promise((n, u) => {
@@ -261,30 +261,30 @@ function Fe() {
261
261
  }), e(n);
262
262
  }, s;
263
263
  }
264
- function St(t) {
264
+ function Ct(t) {
265
265
  return Math.min(1e3 * 2 ** t, 3e4);
266
266
  }
267
- function st(t) {
268
- return (t ?? "online") === "online" ? tt.isOnline() : !0;
267
+ function rt(t) {
268
+ return (t ?? "online") === "online" ? st.isOnline() : !0;
269
269
  }
270
- var rt = class extends Error {
270
+ var it = class extends Error {
271
271
  constructor(t) {
272
272
  super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
273
273
  }
274
274
  };
275
275
  function me(t) {
276
- return t instanceof rt;
276
+ return t instanceof it;
277
277
  }
278
- function Rt(t) {
278
+ function wt(t) {
279
279
  let e = !1, s = 0, r = !1, n;
280
280
  const u = Fe(), a = (f) => {
281
281
  var g;
282
- r || (m(new rt(f)), (g = t.abort) == null || g.call(t));
282
+ r || (m(new it(f)), (g = t.abort) == null || g.call(t));
283
283
  }, o = () => {
284
284
  e = !0;
285
285
  }, l = () => {
286
286
  e = !1;
287
- }, C = () => et.isFocused() && (t.networkMode === "always" || tt.isOnline()) && t.canRun(), v = () => st(t.networkMode) && t.canRun(), h = (f) => {
287
+ }, R = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), h = (f) => {
288
288
  var g;
289
289
  r || (r = !0, (g = t.onSuccess) == null || g.call(t, f), n == null || n(), u.resolve(f));
290
290
  }, m = (f) => {
@@ -293,7 +293,7 @@ function Rt(t) {
293
293
  }, S = () => new Promise((f) => {
294
294
  var g;
295
295
  n = (P) => {
296
- (r || C()) && f(P);
296
+ (r || R()) && f(P);
297
297
  }, (g = t.onPause) == null || g.call(t);
298
298
  }).then(() => {
299
299
  var f;
@@ -312,12 +312,12 @@ function Rt(t) {
312
312
  var ve;
313
313
  if (r)
314
314
  return;
315
- const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? St, ce = typeof N == "function" ? N(s, P) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, P);
315
+ const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Ct, ce = typeof N == "function" ? N(s, P) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, P);
316
316
  if (e || !le) {
317
317
  m(P);
318
318
  return;
319
319
  }
320
- s++, (ve = t.onFail) == null || ve.call(t, s, P), bt(ce).then(() => C() ? void 0 : S()).then(() => {
320
+ s++, (ve = t.onFail) == null || ve.call(t, s, P), mt(ce).then(() => R() ? void 0 : S()).then(() => {
321
321
  e ? m(P) : w();
322
322
  });
323
323
  });
@@ -332,7 +332,7 @@ function Rt(t) {
332
332
  start: () => (v() ? w() : S().then(w), u)
333
333
  };
334
334
  }
335
- function wt() {
335
+ function Et() {
336
336
  let t = [], e = 0, s = (o) => {
337
337
  o();
338
338
  }, r = (o) => {
@@ -391,7 +391,7 @@ function wt() {
391
391
  }
392
392
  };
393
393
  }
394
- var Ae = wt(), _, Je, Et = (Je = class {
394
+ var Ae = Et(), _, Je, Ot = (Je = class {
395
395
  constructor() {
396
396
  y(this, _);
397
397
  }
@@ -399,7 +399,7 @@ var Ae = wt(), _, Je, Et = (Je = class {
399
399
  this.clearGcTimeout();
400
400
  }
401
401
  scheduleGc() {
402
- this.clearGcTimeout(), Ce(this.gcTime) && c(this, _, setTimeout(() => {
402
+ this.clearGcTimeout(), Re(this.gcTime) && c(this, _, setTimeout(() => {
403
403
  this.optionalRemove();
404
404
  }, this.gcTime));
405
405
  }
@@ -412,34 +412,34 @@ var Ae = wt(), _, Je, Et = (Je = class {
412
412
  clearGcTimeout() {
413
413
  i(this, _) && (clearTimeout(i(this, _)), c(this, _, void 0));
414
414
  }
415
- }, _ = new WeakMap(), Je), ee, te, D, R, oe, H, T, k, Ze, ts = (Ze = class extends Et {
415
+ }, _ = new WeakMap(), Je), ee, te, I, C, oe, H, D, Q, Xe, ts = (Xe = class extends Ot {
416
416
  constructor(e) {
417
417
  super();
418
- y(this, T);
418
+ y(this, D);
419
419
  y(this, ee);
420
420
  y(this, te);
421
- y(this, D);
422
- y(this, R);
421
+ y(this, I);
422
+ y(this, C);
423
423
  y(this, oe);
424
424
  y(this, H);
425
- c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, D, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ot(this.options)), this.state = e.state ?? i(this, ee), this.scheduleGc();
425
+ c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ft(this.options)), this.state = e.state ?? i(this, ee), this.scheduleGc();
426
426
  }
427
427
  get meta() {
428
428
  return this.options.meta;
429
429
  }
430
430
  get promise() {
431
431
  var e;
432
- return (e = i(this, R)) == null ? void 0 : e.promise;
432
+ return (e = i(this, C)) == null ? void 0 : e.promise;
433
433
  }
434
434
  setOptions(e) {
435
435
  this.options = { ...i(this, oe), ...e }, this.updateGcTime(this.options.gcTime);
436
436
  }
437
437
  optionalRemove() {
438
- !this.observers.length && this.state.fetchStatus === "idle" && i(this, D).remove(this);
438
+ !this.observers.length && this.state.fetchStatus === "idle" && i(this, I).remove(this);
439
439
  }
440
440
  setData(e, s) {
441
441
  const r = Oe(this.state.data, e, this.options);
442
- return b(this, T, k).call(this, {
442
+ return b(this, D, Q).call(this, {
443
443
  data: r,
444
444
  type: "success",
445
445
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -447,12 +447,12 @@ var Ae = wt(), _, Je, Et = (Je = class {
447
447
  }), r;
448
448
  }
449
449
  setState(e, s) {
450
- b(this, T, k).call(this, { type: "setState", state: e, setStateOptions: s });
450
+ b(this, D, Q).call(this, { type: "setState", state: e, setStateOptions: s });
451
451
  }
452
452
  cancel(e) {
453
453
  var r, n;
454
- const s = (r = i(this, R)) == null ? void 0 : r.promise;
455
- return (n = i(this, R)) == null || n.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
454
+ const s = (r = i(this, C)) == null ? void 0 : r.promise;
455
+ return (n = i(this, C)) == null || n.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
456
456
  }
457
457
  destroy() {
458
458
  super.destroy(), this.cancel({ silent: !0 });
@@ -462,7 +462,7 @@ var Ae = wt(), _, Je, Et = (Je = class {
462
462
  }
463
463
  isActive() {
464
464
  return this.observers.some(
465
- (e) => q(e.options.enabled, this) !== !1
465
+ (e) => x(e.options.enabled, this) !== !1
466
466
  );
467
467
  }
468
468
  isDisabled() {
@@ -474,37 +474,37 @@ var Ae = wt(), _, Je, Et = (Je = class {
474
474
  ) : this.state.data === void 0;
475
475
  }
476
476
  isStaleByTime(e = 0) {
477
- return this.state.isInvalidated || this.state.data === void 0 || !Ye(this.state.dataUpdatedAt, e);
477
+ return this.state.isInvalidated || this.state.data === void 0 || !et(this.state.dataUpdatedAt, e);
478
478
  }
479
479
  onFocus() {
480
480
  var s;
481
481
  const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
482
- e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, R)) == null || s.continue();
482
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
483
483
  }
484
484
  onOnline() {
485
485
  var s;
486
486
  const e = this.observers.find((r) => r.shouldFetchOnReconnect());
487
- e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, R)) == null || s.continue();
487
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
488
488
  }
489
489
  addObserver(e) {
490
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, D).notify({ type: "observerAdded", query: this, observer: e }));
490
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, I).notify({ type: "observerAdded", query: this, observer: e }));
491
491
  }
492
492
  removeObserver(e) {
493
- this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, R) && (i(this, H) ? i(this, R).cancel({ revert: !0 }) : i(this, R).cancelRetry()), this.scheduleGc()), i(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
493
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, C) && (i(this, H) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, I).notify({ type: "observerRemoved", query: this, observer: e }));
494
494
  }
495
495
  getObserversCount() {
496
496
  return this.observers.length;
497
497
  }
498
498
  invalidate() {
499
- this.state.isInvalidated || b(this, T, k).call(this, { type: "invalidate" });
499
+ this.state.isInvalidated || b(this, D, Q).call(this, { type: "invalidate" });
500
500
  }
501
501
  fetch(e, s) {
502
- var l, C, v;
502
+ var l, R, v;
503
503
  if (this.state.fetchStatus !== "idle") {
504
504
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
505
505
  this.cancel({ silent: !0 });
506
- else if (i(this, R))
507
- return i(this, R).continueRetry(), i(this, R).promise;
506
+ else if (i(this, C))
507
+ return i(this, C).continueRetry(), i(this, C).promise;
508
508
  }
509
509
  if (e && this.setOptions(e), !this.options.queryFn) {
510
510
  const h = this.observers.find((m) => m.options.queryFn);
@@ -519,7 +519,7 @@ var Ae = wt(), _, Je, Et = (Je = class {
519
519
  get: () => (c(this, H, !0), r.signal)
520
520
  });
521
521
  }, u = () => {
522
- const h = mt(this.options, s), m = {
522
+ const h = gt(this.options, s), m = {
523
523
  queryKey: this.queryKey,
524
524
  meta: this.meta
525
525
  };
@@ -538,24 +538,24 @@ var Ae = wt(), _, Je, Et = (Je = class {
538
538
  n(a), (l = this.options.behavior) == null || l.onFetch(
539
539
  a,
540
540
  this
541
- ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((C = a.fetchOptions) == null ? void 0 : C.meta)) && b(this, T, k).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
541
+ ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = a.fetchOptions) == null ? void 0 : R.meta)) && b(this, D, Q).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
542
542
  const o = (h) => {
543
543
  var m, S, w, f;
544
- me(h) && h.silent || b(this, T, k).call(this, {
544
+ me(h) && h.silent || b(this, D, Q).call(this, {
545
545
  type: "error",
546
546
  error: h
547
- }), me(h) || ((S = (m = i(this, D).config).onError) == null || S.call(
547
+ }), me(h) || ((S = (m = i(this, I).config).onError) == null || S.call(
548
548
  m,
549
549
  h,
550
550
  this
551
- ), (f = (w = i(this, D).config).onSettled) == null || f.call(
551
+ ), (f = (w = i(this, I).config).onSettled) == null || f.call(
552
552
  w,
553
553
  this.state.data,
554
554
  h,
555
555
  this
556
556
  )), this.scheduleGc();
557
557
  };
558
- return c(this, R, Rt({
558
+ return c(this, C, wt({
559
559
  initialPromise: s == null ? void 0 : s.initialPromise,
560
560
  fn: a.fetchFn,
561
561
  abort: r.abort.bind(r),
@@ -573,7 +573,7 @@ var Ae = wt(), _, Je, Et = (Je = class {
573
573
  o(g);
574
574
  return;
575
575
  }
576
- (S = (m = i(this, D).config).onSuccess) == null || S.call(m, h, this), (f = (w = i(this, D).config).onSettled) == null || f.call(
576
+ (S = (m = i(this, I).config).onSuccess) == null || S.call(m, h, this), (f = (w = i(this, I).config).onSettled) == null || f.call(
577
577
  w,
578
578
  h,
579
579
  this.state.error,
@@ -582,21 +582,21 @@ var Ae = wt(), _, Je, Et = (Je = class {
582
582
  },
583
583
  onError: o,
584
584
  onFail: (h, m) => {
585
- b(this, T, k).call(this, { type: "failed", failureCount: h, error: m });
585
+ b(this, D, Q).call(this, { type: "failed", failureCount: h, error: m });
586
586
  },
587
587
  onPause: () => {
588
- b(this, T, k).call(this, { type: "pause" });
588
+ b(this, D, Q).call(this, { type: "pause" });
589
589
  },
590
590
  onContinue: () => {
591
- b(this, T, k).call(this, { type: "continue" });
591
+ b(this, D, Q).call(this, { type: "continue" });
592
592
  },
593
593
  retry: a.options.retry,
594
594
  retryDelay: a.options.retryDelay,
595
595
  networkMode: a.options.networkMode,
596
596
  canRun: () => !0
597
- })), i(this, R).start();
597
+ })), i(this, C).start();
598
598
  }
599
- }, ee = new WeakMap(), te = new WeakMap(), D = new WeakMap(), R = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), T = new WeakSet(), k = function(e) {
599
+ }, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(), C = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), D = new WeakSet(), Q = function(e) {
600
600
  const s = (r) => {
601
601
  switch (e.type) {
602
602
  case "failed":
@@ -618,7 +618,7 @@ var Ae = wt(), _, Je, Et = (Je = class {
618
618
  case "fetch":
619
619
  return {
620
620
  ...r,
621
- ...it(r.data, this.options),
621
+ ...nt(r.data, this.options),
622
622
  fetchMeta: e.meta ?? null
623
623
  };
624
624
  case "success":
@@ -663,21 +663,21 @@ var Ae = wt(), _, Je, Et = (Je = class {
663
663
  this.state = s(this.state), Ae.batch(() => {
664
664
  this.observers.forEach((r) => {
665
665
  r.onQueryUpdate();
666
- }), i(this, D).notify({ query: this, type: "updated", action: e });
666
+ }), i(this, I).notify({ query: this, type: "updated", action: e });
667
667
  });
668
- }, Ze);
669
- function it(t, e) {
668
+ }, Xe);
669
+ function nt(t, e) {
670
670
  return {
671
671
  fetchFailureCount: 0,
672
672
  fetchFailureReason: null,
673
- fetchStatus: st(e.networkMode) ? "fetching" : "paused",
673
+ fetchStatus: rt(e.networkMode) ? "fetching" : "paused",
674
674
  ...t === void 0 && {
675
675
  error: null,
676
676
  status: "pending"
677
677
  }
678
678
  };
679
679
  }
680
- function Ot(t) {
680
+ function Ft(t) {
681
681
  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;
682
682
  return {
683
683
  data: e,
@@ -694,7 +694,7 @@ function Ot(t) {
694
694
  fetchStatus: "idle"
695
695
  };
696
696
  }
697
- var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe, je, xe, at, Xe, nt = (Xe = class extends ke {
697
+ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe, je, ke, ot, Ye, at = (Ye = class extends Qe {
698
698
  constructor(e, s) {
699
699
  super();
700
700
  y(this, p);
@@ -705,7 +705,7 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
705
705
  y(this, B);
706
706
  y(this, se);
707
707
  y(this, L);
708
- y(this, x);
708
+ y(this, k);
709
709
  y(this, he);
710
710
  y(this, re);
711
711
  // This property keeps track of the last query with defined data.
@@ -715,7 +715,7 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
715
715
  y(this, z);
716
716
  y(this, M);
717
717
  y(this, ne, /* @__PURE__ */ new Set());
718
- this.options = s, c(this, F, e), c(this, x, null), c(this, L, Fe()), this.options.experimental_prefetchInRender || i(this, L).reject(
718
+ this.options = s, c(this, F, e), c(this, k, null), c(this, L, Fe()), this.options.experimental_prefetchInRender || i(this, L).reject(
719
719
  new Error("experimental_prefetchInRender feature flag is not enabled")
720
720
  ), this.bindMethods(), this.setOptions(s);
721
721
  }
@@ -723,7 +723,7 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
723
723
  this.refetch = this.refetch.bind(this);
724
724
  }
725
725
  onSubscribe() {
726
- this.listeners.size === 1 && (i(this, d).addObserver(this), Ge(i(this, d), this.options) ? b(this, p, ae).call(this) : this.updateResult(), b(this, p, Te).call(this));
726
+ this.listeners.size === 1 && (i(this, d).addObserver(this), Ge(i(this, d), this.options) ? b(this, p, ae).call(this) : this.updateResult(), b(this, p, De).call(this));
727
727
  }
728
728
  onUnsubscribe() {
729
729
  this.hasListeners() || this.destroy();
@@ -743,15 +743,15 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
743
743
  );
744
744
  }
745
745
  destroy() {
746
- this.listeners = /* @__PURE__ */ new Set(), b(this, p, qe).call(this), b(this, p, je).call(this), i(this, d).removeObserver(this);
746
+ this.listeners = /* @__PURE__ */ new Set(), b(this, p, xe).call(this), b(this, p, je).call(this), i(this, d).removeObserver(this);
747
747
  }
748
748
  setOptions(e, s) {
749
749
  const r = this.options, n = i(this, d);
750
- if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof q(this.options.enabled, i(this, d)) != "boolean")
750
+ if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, i(this, d)) != "boolean")
751
751
  throw new Error(
752
752
  "Expected enabled to be a boolean or a callback that returns a boolean"
753
753
  );
754
- b(this, p, xe).call(this), i(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && i(this, F).getQueryCache().notify({
754
+ b(this, p, ke).call(this), i(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && i(this, F).getQueryCache().notify({
755
755
  type: "observerOptionsUpdated",
756
756
  query: i(this, d),
757
757
  observer: this
@@ -762,13 +762,13 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
762
762
  n,
763
763
  this.options,
764
764
  r
765
- ) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || fe(this.options.staleTime, i(this, d)) !== fe(r.staleTime, i(this, d))) && b(this, p, Pe).call(this);
766
- const a = b(this, p, De).call(this);
767
- u && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || a !== i(this, M)) && b(this, p, Ie).call(this, a);
765
+ ) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || fe(this.options.staleTime, i(this, d)) !== fe(r.staleTime, i(this, d))) && b(this, p, Pe).call(this);
766
+ const a = b(this, p, Ie).call(this);
767
+ u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || a !== i(this, M)) && b(this, p, Te).call(this, a);
768
768
  }
769
769
  getOptimisticResult(e) {
770
770
  const s = i(this, F).getQueryCache().build(i(this, F), e), r = this.createResult(s, e);
771
- return Pt(this, r) && (c(this, O, r), c(this, se, this.options), c(this, B, i(this, d).state)), r;
771
+ return It(this, r) && (c(this, O, r), c(this, se, this.options), c(this, B, i(this, d).state)), r;
772
772
  }
773
773
  getCurrentResult() {
774
774
  return i(this, O);
@@ -806,13 +806,13 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
806
806
  }
807
807
  createResult(e, s) {
808
808
  var Ke;
809
- const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se), C = e !== r ? e.state : i(this, ue), { state: v } = e;
809
+ const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se), R = e !== r ? e.state : i(this, ue), { state: v } = e;
810
810
  let h = { ...v }, m = !1, S;
811
811
  if (s._optimisticResults) {
812
- const E = this.hasListeners(), W = !E && Ge(e, s), J = E && ze(e, r, s, n);
813
- (W || J) && (h = {
812
+ const E = this.hasListeners(), Z = !E && Ge(e, s), W = E && ze(e, r, s, n);
813
+ (Z || W) && (h = {
814
814
  ...h,
815
- ...it(v.data, e.options)
815
+ ...nt(v.data, e.options)
816
816
  }), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
817
817
  }
818
818
  let { error: w, errorUpdatedAt: f, status: g } = h;
@@ -821,9 +821,9 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
821
821
  S = i(this, re);
822
822
  else
823
823
  try {
824
- c(this, he, s.select), S = s.select(h.data), S = Oe(u == null ? void 0 : u.data, S, s), c(this, re, S), c(this, x, null);
824
+ c(this, he, s.select), S = s.select(h.data), S = Oe(u == null ? void 0 : u.data, S, s), c(this, re, S), c(this, k, null);
825
825
  } catch (E) {
826
- c(this, x, E);
826
+ c(this, k, E);
827
827
  }
828
828
  else
829
829
  S = h.data;
@@ -836,9 +836,9 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
836
836
  i(this, ie)
837
837
  ) : s.placeholderData, s.select && E !== void 0)
838
838
  try {
839
- E = s.select(E), c(this, x, null);
840
- } catch (W) {
841
- c(this, x, W);
839
+ E = s.select(E), c(this, k, null);
840
+ } catch (Z) {
841
+ c(this, k, Z);
842
842
  }
843
843
  E !== void 0 && (g = "success", S = Oe(
844
844
  u == null ? void 0 : u.data,
@@ -846,7 +846,7 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
846
846
  s
847
847
  ), m = !0);
848
848
  }
849
- i(this, x) && (w = i(this, x), S = i(this, re), f = Date.now(), g = "error");
849
+ i(this, k) && (w = i(this, k), S = i(this, re), f = Date.now(), g = "error");
850
850
  const P = h.fetchStatus === "fetching", U = g === "pending", N = g === "error", ce = U && P, le = S !== void 0, j = {
851
851
  status: g,
852
852
  fetchStatus: h.fetchStatus,
@@ -863,7 +863,7 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
863
863
  failureReason: h.fetchFailureReason,
864
864
  errorUpdateCount: h.errorUpdateCount,
865
865
  isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
866
- isFetchedAfterMount: h.dataUpdateCount > C.dataUpdateCount || h.errorUpdateCount > C.errorUpdateCount,
866
+ isFetchedAfterMount: h.dataUpdateCount > R.dataUpdateCount || h.errorUpdateCount > R.errorUpdateCount,
867
867
  isFetching: P,
868
868
  isRefetching: P && !U,
869
869
  isLoadingError: N && !le,
@@ -877,19 +877,19 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
877
877
  if (this.options.experimental_prefetchInRender) {
878
878
  const E = (de) => {
879
879
  j.status === "error" ? de.reject(j.error) : j.data !== void 0 && de.resolve(j.data);
880
- }, W = () => {
880
+ }, Z = () => {
881
881
  const de = c(this, L, j.promise = Fe());
882
882
  E(de);
883
- }, J = i(this, L);
884
- switch (J.status) {
883
+ }, W = i(this, L);
884
+ switch (W.status) {
885
885
  case "pending":
886
- e.queryHash === r.queryHash && E(J);
886
+ e.queryHash === r.queryHash && E(W);
887
887
  break;
888
888
  case "fulfilled":
889
- (j.status === "error" || j.data !== J.value) && W();
889
+ (j.status === "error" || j.data !== W.value) && Z();
890
890
  break;
891
891
  case "rejected":
892
- (j.status !== "error" || j.error !== J.reason) && W();
892
+ (j.status !== "error" || j.error !== W.reason) && Z();
893
893
  break;
894
894
  }
895
895
  }
@@ -909,54 +909,54 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
909
909
  const l = new Set(
910
910
  o ?? i(this, ne)
911
911
  );
912
- return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((C) => {
913
- const v = C;
912
+ return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((R) => {
913
+ const v = R;
914
914
  return i(this, O)[v] !== s[v] && l.has(v);
915
915
  });
916
916
  };
917
- (e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p, at).call(this, { ...n, ...e });
917
+ (e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p, ot).call(this, { ...n, ...e });
918
918
  }
919
919
  onQueryUpdate() {
920
- this.updateResult(), this.hasListeners() && b(this, p, Te).call(this);
920
+ this.updateResult(), this.hasListeners() && b(this, p, De).call(this);
921
921
  }
922
- }, F = new WeakMap(), d = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), B = new WeakMap(), se = new WeakMap(), L = new WeakMap(), x = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), G = new WeakMap(), z = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), p = new WeakSet(), ae = function(e) {
923
- b(this, p, xe).call(this);
922
+ }, F = new WeakMap(), d = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), B = new WeakMap(), se = new WeakMap(), L = new WeakMap(), k = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), G = new WeakMap(), z = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), p = new WeakSet(), ae = function(e) {
923
+ b(this, p, ke).call(this);
924
924
  let s = i(this, d).fetch(
925
925
  this.options,
926
926
  e
927
927
  );
928
928
  return e != null && e.throwOnError || (s = s.catch(ge)), s;
929
929
  }, Pe = function() {
930
- b(this, p, qe).call(this);
930
+ b(this, p, xe).call(this);
931
931
  const e = fe(
932
932
  this.options.staleTime,
933
933
  i(this, d)
934
934
  );
935
- if (V || i(this, O).isStale || !Ce(e))
935
+ if (V || i(this, O).isStale || !Re(e))
936
936
  return;
937
- const r = Ye(i(this, O).dataUpdatedAt, e) + 1;
937
+ const r = et(i(this, O).dataUpdatedAt, e) + 1;
938
938
  c(this, G, setTimeout(() => {
939
939
  i(this, O).isStale || this.updateResult();
940
940
  }, r));
941
- }, De = function() {
941
+ }, Ie = function() {
942
942
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
943
- }, Ie = function(e) {
944
- b(this, p, je).call(this), c(this, M, e), !(V || q(this.options.enabled, i(this, d)) === !1 || !Ce(i(this, M)) || i(this, M) === 0) && c(this, z, setInterval(() => {
945
- (this.options.refetchIntervalInBackground || et.isFocused()) && b(this, p, ae).call(this);
943
+ }, Te = function(e) {
944
+ b(this, p, je).call(this), c(this, M, e), !(V || x(this.options.enabled, i(this, d)) === !1 || !Re(i(this, M)) || i(this, M) === 0) && c(this, z, setInterval(() => {
945
+ (this.options.refetchIntervalInBackground || tt.isFocused()) && b(this, p, ae).call(this);
946
946
  }, i(this, M)));
947
- }, Te = function() {
948
- b(this, p, Pe).call(this), b(this, p, Ie).call(this, b(this, p, De).call(this));
949
- }, qe = function() {
947
+ }, De = function() {
948
+ b(this, p, Pe).call(this), b(this, p, Te).call(this, b(this, p, Ie).call(this));
949
+ }, xe = function() {
950
950
  i(this, G) && (clearTimeout(i(this, G)), c(this, G, void 0));
951
951
  }, je = function() {
952
952
  i(this, z) && (clearInterval(i(this, z)), c(this, z, void 0));
953
- }, xe = function() {
953
+ }, ke = function() {
954
954
  const e = i(this, F).getQueryCache().build(i(this, F), this.options);
955
955
  if (e === i(this, d))
956
956
  return;
957
957
  const s = i(this, d);
958
958
  c(this, d, e), c(this, ue, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
959
- }, at = function(e) {
959
+ }, ot = function(e) {
960
960
  Ae.batch(() => {
961
961
  e.listeners && this.listeners.forEach((s) => {
962
962
  s(i(this, O));
@@ -965,44 +965,46 @@ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe
965
965
  type: "observerResultsUpdated"
966
966
  });
967
967
  });
968
- }, Xe);
969
- function Ft(t, e) {
970
- return q(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
968
+ }, Ye);
969
+ function Pt(t, e) {
970
+ return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
971
971
  }
972
972
  function Ge(t, e) {
973
- return Ft(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
973
+ return Pt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
974
974
  }
975
975
  function Ue(t, e, s) {
976
- if (q(e.enabled, t) !== !1) {
976
+ if (x(e.enabled, t) !== !1) {
977
977
  const r = typeof s == "function" ? s(t) : s;
978
978
  return r === "always" || r !== !1 && Le(t, e);
979
979
  }
980
980
  return !1;
981
981
  }
982
982
  function ze(t, e, s, r) {
983
- return (t !== e || q(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Le(t, s);
983
+ return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Le(t, s);
984
984
  }
985
985
  function Le(t, e) {
986
- return q(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
986
+ return x(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
987
987
  }
988
- function Pt(t, e) {
988
+ function It(t, e) {
989
989
  return !we(t.getCurrentResult(), e);
990
990
  }
991
- var ot = I.createContext(
991
+ var ut = T.createContext(
992
992
  void 0
993
- ), Dt = (t) => {
994
- const e = I.useContext(ot);
993
+ ), Tt = (t) => {
994
+ const e = T.useContext(ut);
995
+ if (t)
996
+ return t;
995
997
  if (!e)
996
998
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
997
999
  return e;
998
1000
  }, ss = ({
999
1001
  client: t,
1000
1002
  children: e
1001
- }) => (I.useEffect(() => (t.mount(), () => {
1003
+ }) => (T.useEffect(() => (t.mount(), () => {
1002
1004
  t.unmount();
1003
- }), [t]), /* @__PURE__ */ yt.jsx(ot.Provider, { value: t, children: e })), ut = I.createContext(!1), It = () => I.useContext(ut);
1004
- ut.Provider;
1005
- function Tt() {
1005
+ }), [t]), /* @__PURE__ */ pt.jsx(ut.Provider, { value: t, children: e })), ht = T.createContext(!1), Dt = () => T.useContext(ht);
1006
+ ht.Provider;
1007
+ function xt() {
1006
1008
  let t = !1;
1007
1009
  return {
1008
1010
  clearReset: () => {
@@ -1014,16 +1016,16 @@ function Tt() {
1014
1016
  isReset: () => t
1015
1017
  };
1016
1018
  }
1017
- var qt = I.createContext(Tt()), jt = () => I.useContext(qt);
1018
- function xt(t, e) {
1019
+ var jt = T.createContext(xt()), kt = () => T.useContext(jt);
1020
+ function Ut(t, e) {
1019
1021
  return typeof t == "function" ? t(...e) : !!t;
1020
1022
  }
1021
- function Ut() {
1023
+ function Ve() {
1022
1024
  }
1023
- var kt = (t, e) => {
1024
- (t.suspense || t.throwOnError) && (e.isReset() || (t.retryOnMount = !1));
1025
- }, Qt = (t) => {
1026
- I.useEffect(() => {
1025
+ var Qt = (t, e) => {
1026
+ (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
1027
+ }, qt = (t) => {
1028
+ T.useEffect(() => {
1027
1029
  t.clearReset();
1028
1030
  }, [t]);
1029
1031
  }, At = ({
@@ -1031,73 +1033,72 @@ var kt = (t, e) => {
1031
1033
  errorResetBoundary: e,
1032
1034
  throwOnError: s,
1033
1035
  query: r
1034
- }) => t.isError && !e.isReset() && !t.isFetching && r && xt(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Mt = (t) => {
1035
- t.suspense && (typeof t.staleTime != "number" && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1036
- }, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Ve = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1036
+ }) => t.isError && !e.isReset() && !t.isFetching && r && Ut(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Mt = (t) => {
1037
+ t.suspense && (t.staleTime === void 0 && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1038
+ }, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, $e = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1037
1039
  s.clearReset();
1038
1040
  });
1039
- function ht(t, e, s) {
1041
+ function ct(t, e, s) {
1040
1042
  var v, h, m, S, w;
1041
1043
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1042
1044
  throw new Error(
1043
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'
1044
1046
  );
1045
- const r = Dt(), n = It(), u = jt(), a = r.defaultQueryOptions(t);
1047
+ const r = Tt(s), n = Dt(), u = kt(), a = r.defaultQueryOptions(t);
1046
1048
  (h = (v = r.getDefaultOptions().queries) == null ? void 0 : v._experimental_beforeQuery) == null || h.call(
1047
1049
  v,
1048
1050
  a
1049
- ), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a), kt(a, u), Qt(u);
1050
- const o = !r.getQueryCache().get(a.queryHash), [l] = I.useState(
1051
+ ), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a), Qt(a, u), qt(u);
1052
+ const o = !r.getQueryCache().get(a.queryHash), [l] = T.useState(
1051
1053
  () => new e(
1052
1054
  r,
1053
1055
  a
1054
1056
  )
1055
- ), C = l.getOptimisticResult(a);
1056
- if (I.useSyncExternalStore(
1057
- I.useCallback(
1057
+ ), R = l.getOptimisticResult(a);
1058
+ if (T.useSyncExternalStore(
1059
+ T.useCallback(
1058
1060
  (f) => {
1059
- const g = n ? () => {
1060
- } : l.subscribe(Ae.batchCalls(f));
1061
+ const g = n ? Ve : l.subscribe(Ae.batchCalls(f));
1061
1062
  return l.updateResult(), g;
1062
1063
  },
1063
1064
  [l, n]
1064
1065
  ),
1065
1066
  () => l.getCurrentResult(),
1066
1067
  () => l.getCurrentResult()
1067
- ), I.useEffect(() => {
1068
+ ), T.useEffect(() => {
1068
1069
  l.setOptions(a, { listeners: !1 });
1069
- }, [a, l]), Kt(a, C))
1070
- throw Ve(a, l, u);
1070
+ }, [a, l]), Kt(a, R))
1071
+ throw $e(a, l, u);
1071
1072
  if (At({
1072
- result: C,
1073
+ result: R,
1073
1074
  errorResetBoundary: u,
1074
1075
  throwOnError: a.throwOnError,
1075
1076
  query: r.getQueryCache().get(a.queryHash)
1076
1077
  }))
1077
- throw C.error;
1078
+ throw R.error;
1078
1079
  if ((S = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || S.call(
1079
1080
  m,
1080
1081
  a,
1081
- C
1082
- ), a.experimental_prefetchInRender && !V && Nt(C, n)) {
1082
+ R
1083
+ ), a.experimental_prefetchInRender && !V && Nt(R, n)) {
1083
1084
  const f = o ? (
1084
1085
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1085
- Ve(a, l, u)
1086
+ $e(a, l, u)
1086
1087
  ) : (
1087
1088
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1088
1089
  (w = r.getQueryCache().get(a.queryHash)) == null ? void 0 : w.promise
1089
1090
  );
1090
- f == null || f.catch(Ut).finally(() => {
1091
- l.hasListeners() || l.updateResult();
1091
+ f == null || f.catch(Ve).finally(() => {
1092
+ l.updateResult();
1092
1093
  });
1093
1094
  }
1094
- return a.notifyOnChangeProps ? C : l.trackResult(C);
1095
+ return a.notifyOnChangeProps ? R : l.trackResult(R);
1095
1096
  }
1096
1097
  function _t(t, e) {
1097
- return ht(t, nt);
1098
+ return ct(t, at, e);
1098
1099
  }
1099
1100
  function Ht(t, e) {
1100
- return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), ht(
1101
+ return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), ct(
1101
1102
  {
1102
1103
  ...t,
1103
1104
  enabled: !0,
@@ -1105,12 +1106,38 @@ function Ht(t, e) {
1105
1106
  throwOnError: Lt,
1106
1107
  placeholderData: void 0
1107
1108
  },
1108
- nt
1109
+ at,
1110
+ e
1109
1111
  );
1110
1112
  }
1111
1113
  const $ = (...t) => {
1112
1114
  const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1113
1115
  return e ? `/${e}` : "/";
1116
+ }, Bt = ft(
1117
+ void 0
1118
+ ), lt = () => {
1119
+ const t = yt(Bt);
1120
+ if (!t)
1121
+ throw new Error("useZudoku must be used within a ZudokuProvider.");
1122
+ return t;
1123
+ }, rs = () => {
1124
+ const { getApiIdentities: t } = lt();
1125
+ return _t({
1126
+ queryFn: t,
1127
+ queryKey: ["api-identities"]
1128
+ });
1129
+ }, dt = () => {
1130
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s } = lt(), r = pe(), n = Object.entries(e).find(([, o]) => Me(o, (l) => {
1131
+ if ((l.type === "doc" ? $(l.id) : l.type === "category" && l.link ? $(l.link.id) : void 0) === r.pathname)
1132
+ return l;
1133
+ })), u = s.find((o) => o.id === (n == null ? void 0 : n[0])) ?? s.find((o) => vt(o.id, r.pathname)), { data: a } = Ht({
1134
+ queryFn: () => t(r.pathname),
1135
+ queryKey: ["plugin-sidebar", r.pathname]
1136
+ });
1137
+ return {
1138
+ sidebar: [...n ? n[1] : [], ...a],
1139
+ topNavItem: u
1140
+ };
1114
1141
  }, Me = (t, e) => {
1115
1142
  for (const s of t) {
1116
1143
  const r = Ne(s, e);
@@ -1127,20 +1154,20 @@ const $ = (...t) => {
1127
1154
  ]);
1128
1155
  if (u !== void 0) return u;
1129
1156
  }
1130
- }, rs = () => {
1131
- const t = pe(), s = lt().data.sidebar;
1157
+ }, is = () => {
1158
+ const t = pe(), s = dt().sidebar;
1132
1159
  return Me(s, (r) => {
1133
1160
  if (r.type === "doc" && $(r.id) === t.pathname)
1134
1161
  return r;
1135
1162
  });
1136
- }, is = (t) => {
1163
+ }, ns = (t) => {
1137
1164
  const e = pe();
1138
1165
  return Ne(t, (s) => {
1139
1166
  if (s.type === "category" && s.link && $(s.link.id) === e.pathname || s.type === "doc" && $(s.id) === e.pathname)
1140
1167
  return !0;
1141
1168
  });
1142
- }, ns = () => {
1143
- const t = pe().pathname, s = lt().data.sidebar;
1169
+ }, as = () => {
1170
+ const t = pe().pathname, s = dt().sidebar;
1144
1171
  let r, n, u = !1;
1145
1172
  return Me(s, (a) => {
1146
1173
  const o = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
@@ -1150,73 +1177,42 @@ const $ = (...t) => {
1150
1177
  t === o ? u = !0 : r = { label: a.label, id: o };
1151
1178
  }
1152
1179
  }), { prev: r, next: n };
1153
- }, Bt = dt(
1154
- void 0
1155
- ), ct = () => {
1156
- const t = ft(Bt);
1157
- if (!t)
1158
- throw new Error("useDevPortal must be used within a DevPortalProvider.");
1159
- return t;
1160
- }, as = () => {
1161
- const { getApiIdentities: t } = ct();
1162
- return _t({
1163
- queryFn: t,
1164
- queryKey: ["api-identities"]
1165
- });
1166
- }, lt = () => {
1167
- const { getPluginSidebar: t, sidebars: e, topNavigation: s } = ct(), r = pe(), n = Object.entries(e).find(([, a]) => Me(a, (o) => {
1168
- if ((o.type === "doc" ? $(o.id) : o.type === "category" && o.link ? $(o.link.id) : void 0) === r.pathname)
1169
- return o;
1170
- })), u = s.find((a) => a.id === (n == null ? void 0 : n[0])) ?? s.find((a) => pt(a.id, r.pathname));
1171
- return Ht({
1172
- queryFn: async () => {
1173
- const a = await t(r.pathname);
1174
- return {
1175
- sidebar: [
1176
- ...n ? n[1] : [],
1177
- ...a
1178
- ],
1179
- topNavItem: u
1180
- };
1181
- },
1182
- queryKey: ["navigation", r.pathname]
1183
- });
1184
1180
  };
1185
1181
  export {
1186
- Me as A,
1182
+ ye as A,
1187
1183
  ss as B,
1188
- is as C,
1189
- as as D,
1190
- _t as E,
1184
+ ns as C,
1185
+ dt as D,
1186
+ Me as E,
1191
1187
  ts as Q,
1192
- Et as R,
1193
- ke as S,
1188
+ Ot as R,
1189
+ Qe as S,
1194
1190
  Bt as Z,
1195
- rs as a,
1196
- ns as b,
1197
- Rt as c,
1198
- Dt as d,
1199
- Ut as e,
1200
- xt as f,
1191
+ is as a,
1192
+ as as b,
1193
+ wt as c,
1194
+ Tt as d,
1195
+ Ve as e,
1196
+ Ut as f,
1201
1197
  Ht as g,
1202
1198
  Se as h,
1203
- vt as i,
1204
- Xt as j,
1205
- ge as k,
1206
- mt as l,
1207
- Zt as m,
1199
+ rs as i,
1200
+ $ as j,
1201
+ _t as k,
1202
+ bt as l,
1203
+ Jt as m,
1208
1204
  Ae as n,
1209
- es as o,
1210
- Yt as p,
1211
- et as q,
1212
- tt as r,
1205
+ Xt as o,
1206
+ ge as p,
1207
+ gt as q,
1208
+ es as r,
1213
1209
  we as s,
1214
- fe as t,
1215
- ct as u,
1216
- Jt as v,
1217
- Qe as w,
1218
- ye as x,
1219
- $ as y,
1220
- lt as z
1210
+ Yt as t,
1211
+ lt as u,
1212
+ tt as v,
1213
+ st as w,
1214
+ fe as x,
1215
+ Wt as y,
1216
+ qe as z
1221
1217
  };
1222
- //# sourceMappingURL=ZudokuContext-BKXGJTmu.js.map
1218
+ //# sourceMappingURL=utils-DcpDOncX.js.map