zudoku 0.41.5 → 0.42.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 (529) hide show
  1. package/dist/app/main.js +6 -0
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/validators/common.d.ts +420 -288
  4. package/dist/config/validators/common.js +10 -0
  5. package/dist/config/validators/common.js.map +1 -1
  6. package/dist/config/validators/validate.d.ts +161 -108
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +1 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/lib/components/BuildCheck.js +3 -2
  11. package/dist/lib/components/BuildCheck.js.map +1 -1
  12. package/dist/lib/components/Markdown.d.ts +3 -1
  13. package/dist/lib/components/Markdown.js +8 -14
  14. package/dist/lib/components/Markdown.js.map +1 -1
  15. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  16. package/dist/lib/components/index.d.ts +2 -1
  17. package/dist/lib/core/ZudokuContext.d.ts +7 -0
  18. package/dist/lib/core/ZudokuContext.js.map +1 -1
  19. package/dist/lib/errors/ErrorAlert.js +1 -1
  20. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  21. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  22. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  23. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  24. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  25. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  26. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  27. package/dist/lib/shiki.d.ts +35 -0
  28. package/dist/lib/shiki.js +103 -0
  29. package/dist/lib/shiki.js.map +1 -0
  30. package/dist/lib/ui/Callout.js +1 -1
  31. package/dist/lib/ui/Callout.js.map +1 -1
  32. package/dist/lib/ui/CodeBlock.d.ts +16 -0
  33. package/dist/lib/ui/CodeBlock.js +18 -0
  34. package/dist/lib/ui/CodeBlock.js.map +1 -0
  35. package/dist/lib/ui/SyntaxHighlight.d.ts +10 -15
  36. package/dist/lib/ui/SyntaxHighlight.js +10 -60
  37. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  38. package/dist/lib/util/MdxComponents.d.ts +9 -3
  39. package/dist/lib/util/MdxComponents.js +9 -10
  40. package/dist/lib/util/MdxComponents.js.map +1 -1
  41. package/dist/vite/config.js +34 -0
  42. package/dist/vite/config.js.map +1 -1
  43. package/dist/vite/plugin-mdx.js +4 -11
  44. package/dist/vite/plugin-mdx.js.map +1 -1
  45. package/dist/vite/plugin-shiki-register.d.ts +3 -0
  46. package/dist/vite/plugin-shiki-register.js +38 -0
  47. package/dist/vite/plugin-shiki-register.js.map +1 -0
  48. package/dist/vite/plugin.js +2 -0
  49. package/dist/vite/plugin.js.map +1 -1
  50. package/lib/AuthenticationPlugin-EeQpQI3D.js +55 -0
  51. package/lib/{AuthenticationPlugin-DPCuR3xm.js.map → AuthenticationPlugin-EeQpQI3D.js.map} +1 -1
  52. package/lib/{Button-BBNrKpQd.js → Button-Bdk_Ij3U.js} +3 -3
  53. package/lib/{Button-BBNrKpQd.js.map → Button-Bdk_Ij3U.js.map} +1 -1
  54. package/lib/{Callout-D3Ja4OPX.js → Callout-XadUe37J.js} +12 -12
  55. package/lib/{Callout-D3Ja4OPX.js.map → Callout-XadUe37J.js.map} +1 -1
  56. package/lib/{CategoryHeading-D06WK_Wo.js → CategoryHeading-DZi-Szor.js} +2 -2
  57. package/lib/{CategoryHeading-D06WK_Wo.js.map → CategoryHeading-DZi-Szor.js.map} +1 -1
  58. package/lib/{Dialog-ByYz4ABw.js → Dialog-CNf2oWXG.js} +2 -2
  59. package/lib/{Dialog-ByYz4ABw.js.map → Dialog-CNf2oWXG.js.map} +1 -1
  60. package/lib/{Drawer-CEwbkLDb.js → Drawer-BPBxzel2.js} +25 -25
  61. package/lib/{Drawer-CEwbkLDb.js.map → Drawer-BPBxzel2.js.map} +1 -1
  62. package/lib/Markdown-1l-DtDbF.js +7688 -0
  63. package/lib/Markdown-1l-DtDbF.js.map +1 -0
  64. package/lib/MdxPage-Dxbq6lFr.js +84 -0
  65. package/lib/{MdxPage-CH19q_hk.js.map → MdxPage-Dxbq6lFr.js.map} +1 -1
  66. package/lib/{OasProvider-n805wUHH.js → OasProvider-DKpTJMH2.js} +4 -4
  67. package/lib/{OasProvider-n805wUHH.js.map → OasProvider-DKpTJMH2.js.map} +1 -1
  68. package/lib/{OperationList-BAhWsh8C.js → OperationList-DVOyNeno.js} +1385 -1417
  69. package/lib/{OperationList-BAhWsh8C.js.map → OperationList-DVOyNeno.js.map} +1 -1
  70. package/lib/{Pagination-DAjXddnj.js → Pagination-COMmV-g9.js} +4 -4
  71. package/lib/{Pagination-DAjXddnj.js.map → Pagination-COMmV-g9.js.map} +1 -1
  72. package/lib/RouteGuard-CGqivwrh.js +733 -0
  73. package/lib/{RouteGuard-DRtEu9nh.js.map → RouteGuard-CGqivwrh.js.map} +1 -1
  74. package/lib/{SchemaList-BJ0GDIcI.js → SchemaList-BTWzXyYQ.js} +43 -44
  75. package/lib/{SchemaList-BJ0GDIcI.js.map → SchemaList-BTWzXyYQ.js.map} +1 -1
  76. package/lib/{SchemaView-J7Srn-Iy.js → SchemaView-DNKKW3nB.js} +7 -11
  77. package/lib/{SchemaView-J7Srn-Iy.js.map → SchemaView-DNKKW3nB.js.map} +1 -1
  78. package/lib/Select-m-ITdvFa.js +211 -0
  79. package/lib/{Select-CT64Ou40.js.map → Select-m-ITdvFa.js.map} +1 -1
  80. package/lib/SlotletProvider-DhK1Fmm9.js +254 -0
  81. package/lib/SlotletProvider-DhK1Fmm9.js.map +1 -0
  82. package/lib/SyntaxHighlight-CJ6FoYvt.js +9104 -0
  83. package/lib/SyntaxHighlight-CJ6FoYvt.js.map +1 -0
  84. package/lib/{Toc-D_tV8_Ri.js → Toc-CzMOgcPS.js} +3 -3
  85. package/lib/{Toc-D_tV8_Ri.js.map → Toc-CzMOgcPS.js.map} +1 -1
  86. package/lib/{chunk-BAXFHI7N-BVBOl9s0.js → chunk-BAXFHI7N-CFrZQ7Oh.js} +257 -264
  87. package/lib/{chunk-BAXFHI7N-BVBOl9s0.js.map → chunk-BAXFHI7N-CFrZQ7Oh.js.map} +1 -1
  88. package/lib/{circular-ByJI6Mci.js → circular-D__GEK2G.js} +47 -47
  89. package/lib/{circular-ByJI6Mci.js.map → circular-D__GEK2G.js.map} +1 -1
  90. package/lib/{cn-qaFjX9_3.js → cn-CwJPJKOE.js} +28 -29
  91. package/lib/{cn-qaFjX9_3.js.map → cn-CwJPJKOE.js.map} +1 -1
  92. package/lib/{createServer-IW7v5hWm.js → createServer-B4l2NSkt.js} +3724 -3868
  93. package/lib/{createServer-IW7v5hWm.js.map → createServer-B4l2NSkt.js.map} +1 -1
  94. package/lib/hook-CyNmcNr8.js +1443 -0
  95. package/lib/{hook-CldJlP5c.js.map → hook-CyNmcNr8.js.map} +1 -1
  96. package/lib/{index-DwT-v3zK.js → index--oeBayMa.js} +2 -2
  97. package/lib/{index-DwT-v3zK.js.map → index--oeBayMa.js.map} +1 -1
  98. package/lib/index-BcMPFdRU.js +4975 -0
  99. package/lib/index-BcMPFdRU.js.map +1 -0
  100. package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
  101. package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
  102. package/lib/{index-Dbvpddzr.js → index-CCS3ifKs.js} +690 -733
  103. package/lib/{index-Dbvpddzr.js.map → index-CCS3ifKs.js.map} +1 -1
  104. package/lib/{index-CuBIgTKC.js → index-CrcNWbel.js} +9 -9
  105. package/lib/{index-CuBIgTKC.js.map → index-CrcNWbel.js.map} +1 -1
  106. package/lib/{index-CPNSgwSb.js → index-Z13x6tPX.js} +5 -5
  107. package/lib/{index-CPNSgwSb.js.map → index-Z13x6tPX.js.map} +1 -1
  108. package/lib/{index-DcHeSvkE.js → index-zddirpDj.js} +581 -609
  109. package/lib/{index-DcHeSvkE.js.map → index-zddirpDj.js.map} +1 -1
  110. package/lib/invariant-D3QcI9fa.js +22 -0
  111. package/lib/{invariant-Caa8-XvF.js.map → invariant-D3QcI9fa.js.map} +1 -1
  112. package/lib/mutation-narTVsCe.js +196 -0
  113. package/lib/{mutation-DBQh7AOZ.js.map → mutation-narTVsCe.js.map} +1 -1
  114. package/lib/processors/removeParameters.js +27 -28
  115. package/lib/processors/removeParameters.js.map +1 -1
  116. package/lib/processors/removePaths.js +17 -17
  117. package/lib/processors/removePaths.js.map +1 -1
  118. package/lib/ui/Accordion.js +1 -1
  119. package/lib/ui/ActionButton.js +2 -2
  120. package/lib/ui/Alert.js +2 -2
  121. package/lib/ui/AlertDialog.js +1 -1
  122. package/lib/ui/Badge.js +2 -2
  123. package/lib/ui/Breadcrumb.js +1 -1
  124. package/lib/ui/Button.js +2 -2
  125. package/lib/ui/Callout.js +7 -7
  126. package/lib/ui/Callout.js.map +1 -1
  127. package/lib/ui/Card.js +1 -1
  128. package/lib/ui/Carousel.js +175 -175
  129. package/lib/ui/Carousel.js.map +1 -1
  130. package/lib/ui/Checkbox.js +1 -1
  131. package/lib/ui/CodeBlock.js +83 -0
  132. package/lib/ui/CodeBlock.js.map +1 -0
  133. package/lib/ui/Command.js +58 -58
  134. package/lib/ui/Command.js.map +1 -1
  135. package/lib/ui/Dialog.js +1 -1
  136. package/lib/ui/Drawer.js +2 -2
  137. package/lib/ui/DropdownMenu.js +1 -1
  138. package/lib/ui/Form.js +1 -1
  139. package/lib/ui/HoverCard.js +1 -1
  140. package/lib/ui/Input.js +1 -1
  141. package/lib/ui/Label.js +2 -2
  142. package/lib/ui/Pagination.js +1 -1
  143. package/lib/ui/Popover.js +1 -1
  144. package/lib/ui/Progress.js +1 -1
  145. package/lib/ui/RadioGroup.js +1 -1
  146. package/lib/ui/ScrollArea.js +1 -1
  147. package/lib/ui/Select.js +1 -1
  148. package/lib/ui/Skeleton.js +1 -1
  149. package/lib/ui/Slider.js +1 -1
  150. package/lib/ui/Switch.js +1 -1
  151. package/lib/ui/SyntaxHighlight.js +4 -6
  152. package/lib/ui/SyntaxHighlight.js.map +1 -1
  153. package/lib/ui/Tabs.js +1 -1
  154. package/lib/ui/Textarea.js +1 -1
  155. package/lib/ui/Toggle.js +2 -2
  156. package/lib/ui/ToggleGroup.js +1 -1
  157. package/lib/ui/Tooltip.js +1 -1
  158. package/lib/ui/util.js +1 -1
  159. package/lib/{useExposedProps-DbIZXspi.js → useExposedProps-n1u49409.js} +2 -2
  160. package/lib/{useExposedProps-DbIZXspi.js.map → useExposedProps-n1u49409.js.map} +1 -1
  161. package/lib/zudoku.auth-auth0.js +28 -31
  162. package/lib/zudoku.auth-auth0.js.map +1 -1
  163. package/lib/zudoku.auth-clerk.js +62 -68
  164. package/lib/zudoku.auth-clerk.js.map +1 -1
  165. package/lib/zudoku.auth-openid.js +475 -483
  166. package/lib/zudoku.auth-openid.js.map +1 -1
  167. package/lib/zudoku.components.js +7 -7
  168. package/lib/zudoku.hooks.js +2 -2
  169. package/lib/zudoku.plugin-api-catalog.js +45 -45
  170. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  171. package/lib/zudoku.plugin-api-keys.js +6 -6
  172. package/lib/zudoku.plugin-custom-pages.js +3 -3
  173. package/lib/zudoku.plugin-markdown.js +25 -28
  174. package/lib/zudoku.plugin-markdown.js.map +1 -1
  175. package/lib/zudoku.plugin-openapi.js +3 -3
  176. package/lib/zudoku.plugin-redirect.js +1 -1
  177. package/lib/zudoku.plugin-search-inkeep.js +26 -27
  178. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  179. package/lib/zudoku.plugin-search-pagefind.js +107 -110
  180. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  181. package/package.json +16 -6
  182. package/src/app/main.css +53 -3
  183. package/src/app/main.tsx +7 -0
  184. package/src/lib/components/BuildCheck.tsx +4 -2
  185. package/src/lib/components/Markdown.tsx +29 -24
  186. package/src/lib/core/ZudokuContext.ts +4 -0
  187. package/src/lib/errors/ErrorAlert.tsx +1 -1
  188. package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -2
  189. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  190. package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -2
  191. package/src/lib/shiki.ts +129 -0
  192. package/src/lib/ui/Callout.tsx +1 -1
  193. package/src/lib/ui/CodeBlock.tsx +102 -0
  194. package/src/lib/ui/SyntaxHighlight.tsx +18 -182
  195. package/src/lib/util/MdxComponents.tsx +27 -14
  196. package/src/shiki/langs/abap.js +1 -0
  197. package/src/shiki/langs/actionscript-3.js +1 -0
  198. package/src/shiki/langs/ada.js +1 -0
  199. package/src/shiki/langs/angular-expression.js +1 -0
  200. package/src/shiki/langs/angular-html.js +1 -0
  201. package/src/shiki/langs/angular-inline-style.js +1 -0
  202. package/src/shiki/langs/angular-inline-template.js +1 -0
  203. package/src/shiki/langs/angular-let-declaration.js +1 -0
  204. package/src/shiki/langs/angular-template-blocks.js +1 -0
  205. package/src/shiki/langs/angular-template.js +1 -0
  206. package/src/shiki/langs/angular-ts.js +1 -0
  207. package/src/shiki/langs/apache.js +1 -0
  208. package/src/shiki/langs/apex.js +1 -0
  209. package/src/shiki/langs/apl.js +1 -0
  210. package/src/shiki/langs/applescript.js +1 -0
  211. package/src/shiki/langs/ara.js +1 -0
  212. package/src/shiki/langs/asciidoc.js +1 -0
  213. package/src/shiki/langs/asm.js +1 -0
  214. package/src/shiki/langs/astro.js +1 -0
  215. package/src/shiki/langs/awk.js +1 -0
  216. package/src/shiki/langs/ballerina.js +1 -0
  217. package/src/shiki/langs/bat.js +1 -0
  218. package/src/shiki/langs/beancount.js +1 -0
  219. package/src/shiki/langs/berry.js +1 -0
  220. package/src/shiki/langs/bibtex.js +1 -0
  221. package/src/shiki/langs/bicep.js +1 -0
  222. package/src/shiki/langs/blade.js +1 -0
  223. package/src/shiki/langs/bsl.js +1 -0
  224. package/src/shiki/langs/c.js +1 -0
  225. package/src/shiki/langs/cadence.js +1 -0
  226. package/src/shiki/langs/cairo.js +1 -0
  227. package/src/shiki/langs/clarity.js +1 -0
  228. package/src/shiki/langs/clojure.js +1 -0
  229. package/src/shiki/langs/cmake.js +1 -0
  230. package/src/shiki/langs/cobol.js +1 -0
  231. package/src/shiki/langs/codeowners.js +1 -0
  232. package/src/shiki/langs/codeql.js +1 -0
  233. package/src/shiki/langs/coffee.js +1 -0
  234. package/src/shiki/langs/common-lisp.js +1 -0
  235. package/src/shiki/langs/coq.js +1 -0
  236. package/src/shiki/langs/cpp-macro.js +1 -0
  237. package/src/shiki/langs/cpp.js +1 -0
  238. package/src/shiki/langs/crystal.js +1 -0
  239. package/src/shiki/langs/csharp.js +1 -0
  240. package/src/shiki/langs/css.js +1 -0
  241. package/src/shiki/langs/csv.js +1 -0
  242. package/src/shiki/langs/cue.js +1 -0
  243. package/src/shiki/langs/cypher.js +1 -0
  244. package/src/shiki/langs/d.js +1 -0
  245. package/src/shiki/langs/dart.js +1 -0
  246. package/src/shiki/langs/dax.js +1 -0
  247. package/src/shiki/langs/desktop.js +1 -0
  248. package/src/shiki/langs/diff.js +1 -0
  249. package/src/shiki/langs/docker.js +1 -0
  250. package/src/shiki/langs/dotenv.js +1 -0
  251. package/src/shiki/langs/dream-maker.js +1 -0
  252. package/src/shiki/langs/edge.js +1 -0
  253. package/src/shiki/langs/elixir.js +1 -0
  254. package/src/shiki/langs/elm.js +1 -0
  255. package/src/shiki/langs/emacs-lisp.js +1 -0
  256. package/src/shiki/langs/erb.js +1 -0
  257. package/src/shiki/langs/erlang.js +1 -0
  258. package/src/shiki/langs/es-tag-css.js +1 -0
  259. package/src/shiki/langs/es-tag-glsl.js +1 -0
  260. package/src/shiki/langs/es-tag-html.js +1 -0
  261. package/src/shiki/langs/es-tag-sql.js +1 -0
  262. package/src/shiki/langs/es-tag-xml.js +1 -0
  263. package/src/shiki/langs/fennel.js +1 -0
  264. package/src/shiki/langs/fish.js +1 -0
  265. package/src/shiki/langs/fluent.js +1 -0
  266. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  267. package/src/shiki/langs/fortran-free-form.js +1 -0
  268. package/src/shiki/langs/fsharp.js +1 -0
  269. package/src/shiki/langs/gdresource.js +1 -0
  270. package/src/shiki/langs/gdscript.js +1 -0
  271. package/src/shiki/langs/gdshader.js +1 -0
  272. package/src/shiki/langs/genie.js +1 -0
  273. package/src/shiki/langs/gherkin.js +1 -0
  274. package/src/shiki/langs/git-commit.js +1 -0
  275. package/src/shiki/langs/git-rebase.js +1 -0
  276. package/src/shiki/langs/gleam.js +1 -0
  277. package/src/shiki/langs/glimmer-js.js +1 -0
  278. package/src/shiki/langs/glimmer-ts.js +1 -0
  279. package/src/shiki/langs/glsl.js +1 -0
  280. package/src/shiki/langs/gnuplot.js +1 -0
  281. package/src/shiki/langs/go.js +1 -0
  282. package/src/shiki/langs/graphql.js +1 -0
  283. package/src/shiki/langs/groovy.js +1 -0
  284. package/src/shiki/langs/hack.js +1 -0
  285. package/src/shiki/langs/haml.js +1 -0
  286. package/src/shiki/langs/handlebars.js +1 -0
  287. package/src/shiki/langs/haskell.js +1 -0
  288. package/src/shiki/langs/haxe.js +1 -0
  289. package/src/shiki/langs/hcl.js +1 -0
  290. package/src/shiki/langs/hjson.js +1 -0
  291. package/src/shiki/langs/hlsl.js +1 -0
  292. package/src/shiki/langs/html-derivative.js +1 -0
  293. package/src/shiki/langs/html.js +1 -0
  294. package/src/shiki/langs/http.js +1 -0
  295. package/src/shiki/langs/hxml.js +1 -0
  296. package/src/shiki/langs/hy.js +1 -0
  297. package/src/shiki/langs/imba.js +1 -0
  298. package/src/shiki/langs/ini.js +1 -0
  299. package/src/shiki/langs/java.js +1 -0
  300. package/src/shiki/langs/javascript.js +1 -0
  301. package/src/shiki/langs/jinja-html.js +1 -0
  302. package/src/shiki/langs/jinja.js +1 -0
  303. package/src/shiki/langs/jison.js +1 -0
  304. package/src/shiki/langs/json.js +1 -0
  305. package/src/shiki/langs/json5.js +1 -0
  306. package/src/shiki/langs/jsonc.js +1 -0
  307. package/src/shiki/langs/jsonl.js +1 -0
  308. package/src/shiki/langs/jsonnet.js +1 -0
  309. package/src/shiki/langs/jssm.js +1 -0
  310. package/src/shiki/langs/jsx.js +1 -0
  311. package/src/shiki/langs/julia.js +1 -0
  312. package/src/shiki/langs/kotlin.js +1 -0
  313. package/src/shiki/langs/kusto.js +1 -0
  314. package/src/shiki/langs/latex.js +1 -0
  315. package/src/shiki/langs/lean.js +1 -0
  316. package/src/shiki/langs/less.js +1 -0
  317. package/src/shiki/langs/liquid.js +1 -0
  318. package/src/shiki/langs/llvm.js +1 -0
  319. package/src/shiki/langs/log.js +1 -0
  320. package/src/shiki/langs/logo.js +1 -0
  321. package/src/shiki/langs/lua.js +1 -0
  322. package/src/shiki/langs/luau.js +1 -0
  323. package/src/shiki/langs/make.js +1 -0
  324. package/src/shiki/langs/markdown-vue.js +1 -0
  325. package/src/shiki/langs/markdown.js +1 -0
  326. package/src/shiki/langs/marko.js +1 -0
  327. package/src/shiki/langs/matlab.js +1 -0
  328. package/src/shiki/langs/mdc.js +1 -0
  329. package/src/shiki/langs/mdx.js +1 -0
  330. package/src/shiki/langs/mermaid.js +1 -0
  331. package/src/shiki/langs/mipsasm.js +1 -0
  332. package/src/shiki/langs/mojo.js +1 -0
  333. package/src/shiki/langs/move.js +1 -0
  334. package/src/shiki/langs/narrat.js +1 -0
  335. package/src/shiki/langs/nextflow.js +1 -0
  336. package/src/shiki/langs/nginx.js +1 -0
  337. package/src/shiki/langs/nim.js +1 -0
  338. package/src/shiki/langs/nix.js +1 -0
  339. package/src/shiki/langs/nushell.js +1 -0
  340. package/src/shiki/langs/objective-c.js +1 -0
  341. package/src/shiki/langs/objective-cpp.js +1 -0
  342. package/src/shiki/langs/ocaml.js +1 -0
  343. package/src/shiki/langs/pascal.js +1 -0
  344. package/src/shiki/langs/perl.js +1 -0
  345. package/src/shiki/langs/php.js +1 -0
  346. package/src/shiki/langs/plsql.js +1 -0
  347. package/src/shiki/langs/po.js +1 -0
  348. package/src/shiki/langs/polar.js +1 -0
  349. package/src/shiki/langs/postcss.js +1 -0
  350. package/src/shiki/langs/powerquery.js +1 -0
  351. package/src/shiki/langs/powershell.js +1 -0
  352. package/src/shiki/langs/prisma.js +1 -0
  353. package/src/shiki/langs/prolog.js +1 -0
  354. package/src/shiki/langs/proto.js +1 -0
  355. package/src/shiki/langs/pug.js +1 -0
  356. package/src/shiki/langs/puppet.js +1 -0
  357. package/src/shiki/langs/purescript.js +1 -0
  358. package/src/shiki/langs/python.js +1 -0
  359. package/src/shiki/langs/qml.js +1 -0
  360. package/src/shiki/langs/qmldir.js +1 -0
  361. package/src/shiki/langs/qss.js +1 -0
  362. package/src/shiki/langs/r.js +1 -0
  363. package/src/shiki/langs/racket.js +1 -0
  364. package/src/shiki/langs/raku.js +1 -0
  365. package/src/shiki/langs/razor.js +1 -0
  366. package/src/shiki/langs/reg.js +1 -0
  367. package/src/shiki/langs/regexp.js +1 -0
  368. package/src/shiki/langs/rel.js +1 -0
  369. package/src/shiki/langs/riscv.js +1 -0
  370. package/src/shiki/langs/rst.js +1 -0
  371. package/src/shiki/langs/ruby.js +1 -0
  372. package/src/shiki/langs/rust.js +1 -0
  373. package/src/shiki/langs/sas.js +1 -0
  374. package/src/shiki/langs/sass.js +1 -0
  375. package/src/shiki/langs/scala.js +1 -0
  376. package/src/shiki/langs/scheme.js +1 -0
  377. package/src/shiki/langs/scss.js +1 -0
  378. package/src/shiki/langs/sdbl.js +1 -0
  379. package/src/shiki/langs/shaderlab.js +1 -0
  380. package/src/shiki/langs/shellscript.js +1 -0
  381. package/src/shiki/langs/shellsession.js +1 -0
  382. package/src/shiki/langs/smalltalk.js +1 -0
  383. package/src/shiki/langs/solidity.js +1 -0
  384. package/src/shiki/langs/soy.js +1 -0
  385. package/src/shiki/langs/sparql.js +1 -0
  386. package/src/shiki/langs/splunk.js +1 -0
  387. package/src/shiki/langs/sql.js +1 -0
  388. package/src/shiki/langs/ssh-config.js +1 -0
  389. package/src/shiki/langs/stata.js +1 -0
  390. package/src/shiki/langs/stylus.js +1 -0
  391. package/src/shiki/langs/svelte.js +1 -0
  392. package/src/shiki/langs/swift.js +1 -0
  393. package/src/shiki/langs/system-verilog.js +1 -0
  394. package/src/shiki/langs/systemd.js +1 -0
  395. package/src/shiki/langs/talonscript.js +1 -0
  396. package/src/shiki/langs/tasl.js +1 -0
  397. package/src/shiki/langs/tcl.js +1 -0
  398. package/src/shiki/langs/templ.js +1 -0
  399. package/src/shiki/langs/terraform.js +1 -0
  400. package/src/shiki/langs/tex.js +1 -0
  401. package/src/shiki/langs/toml.js +1 -0
  402. package/src/shiki/langs/ts-tags.js +1 -0
  403. package/src/shiki/langs/tsv.js +1 -0
  404. package/src/shiki/langs/tsx.js +1 -0
  405. package/src/shiki/langs/turtle.js +1 -0
  406. package/src/shiki/langs/twig.js +1 -0
  407. package/src/shiki/langs/typescript.js +1 -0
  408. package/src/shiki/langs/typespec.js +1 -0
  409. package/src/shiki/langs/typst.js +1 -0
  410. package/src/shiki/langs/v.js +1 -0
  411. package/src/shiki/langs/vala.js +1 -0
  412. package/src/shiki/langs/vb.js +1 -0
  413. package/src/shiki/langs/verilog.js +1 -0
  414. package/src/shiki/langs/vhdl.js +1 -0
  415. package/src/shiki/langs/viml.js +1 -0
  416. package/src/shiki/langs/vue-directives.js +1 -0
  417. package/src/shiki/langs/vue-html.js +1 -0
  418. package/src/shiki/langs/vue-interpolations.js +1 -0
  419. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  420. package/src/shiki/langs/vue.js +1 -0
  421. package/src/shiki/langs/vyper.js +1 -0
  422. package/src/shiki/langs/wasm.js +1 -0
  423. package/src/shiki/langs/wenyan.js +1 -0
  424. package/src/shiki/langs/wgsl.js +1 -0
  425. package/src/shiki/langs/wikitext.js +1 -0
  426. package/src/shiki/langs/wit.js +1 -0
  427. package/src/shiki/langs/wolfram.js +1 -0
  428. package/src/shiki/langs/xml.js +1 -0
  429. package/src/shiki/langs/xsl.js +1 -0
  430. package/src/shiki/langs/yaml.js +1 -0
  431. package/src/shiki/langs/zenscript.js +1 -0
  432. package/src/shiki/langs/zig.js +1 -0
  433. package/src/shiki/themes/andromeeda.js +1 -0
  434. package/src/shiki/themes/aurora-x.js +1 -0
  435. package/src/shiki/themes/ayu-dark.js +1 -0
  436. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  437. package/src/shiki/themes/catppuccin-latte.js +1 -0
  438. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  439. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  440. package/src/shiki/themes/dark-plus.js +1 -0
  441. package/src/shiki/themes/dracula-soft.js +1 -0
  442. package/src/shiki/themes/dracula.js +1 -0
  443. package/src/shiki/themes/everforest-dark.js +1 -0
  444. package/src/shiki/themes/everforest-light.js +1 -0
  445. package/src/shiki/themes/github-dark-default.js +1 -0
  446. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  447. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  448. package/src/shiki/themes/github-dark.js +1 -0
  449. package/src/shiki/themes/github-light-default.js +1 -0
  450. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  451. package/src/shiki/themes/github-light.js +1 -0
  452. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  453. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  454. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  455. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  456. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  457. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  458. package/src/shiki/themes/houston.js +1 -0
  459. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  460. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  461. package/src/shiki/themes/kanagawa-wave.js +1 -0
  462. package/src/shiki/themes/laserwave.js +1 -0
  463. package/src/shiki/themes/light-plus.js +1 -0
  464. package/src/shiki/themes/material-theme-darker.js +1 -0
  465. package/src/shiki/themes/material-theme-lighter.js +1 -0
  466. package/src/shiki/themes/material-theme-ocean.js +1 -0
  467. package/src/shiki/themes/material-theme-palenight.js +1 -0
  468. package/src/shiki/themes/material-theme.js +1 -0
  469. package/src/shiki/themes/min-dark.js +1 -0
  470. package/src/shiki/themes/min-light.js +1 -0
  471. package/src/shiki/themes/monokai.js +1 -0
  472. package/src/shiki/themes/night-owl.js +1 -0
  473. package/src/shiki/themes/nord.js +1 -0
  474. package/src/shiki/themes/one-dark-pro.js +1 -0
  475. package/src/shiki/themes/one-light.js +1 -0
  476. package/src/shiki/themes/plastic.js +1 -0
  477. package/src/shiki/themes/poimandres.js +1 -0
  478. package/src/shiki/themes/red.js +1 -0
  479. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  480. package/src/shiki/themes/rose-pine-moon.js +1 -0
  481. package/src/shiki/themes/rose-pine.js +1 -0
  482. package/src/shiki/themes/slack-dark.js +1 -0
  483. package/src/shiki/themes/slack-ochin.js +1 -0
  484. package/src/shiki/themes/snazzy-light.js +1 -0
  485. package/src/shiki/themes/solarized-dark.js +1 -0
  486. package/src/shiki/themes/solarized-light.js +1 -0
  487. package/src/shiki/themes/synthwave-84.js +1 -0
  488. package/src/shiki/themes/tokyo-night.js +1 -0
  489. package/src/shiki/themes/vesper.js +1 -0
  490. package/src/shiki/themes/vitesse-black.js +1 -0
  491. package/src/shiki/themes/vitesse-dark.js +1 -0
  492. package/src/shiki/themes/vitesse-light.js +1 -0
  493. package/lib/AuthenticationPlugin-DPCuR3xm.js +0 -58
  494. package/lib/Markdown-mFpg_n9p.js +0 -17125
  495. package/lib/Markdown-mFpg_n9p.js.map +0 -1
  496. package/lib/MdxPage-CH19q_hk.js +0 -85
  497. package/lib/RouteGuard-DRtEu9nh.js +0 -744
  498. package/lib/Select-CT64Ou40.js +0 -223
  499. package/lib/SlotletProvider-CS_nO-XT.js +0 -340
  500. package/lib/SlotletProvider-CS_nO-XT.js.map +0 -1
  501. package/lib/SyntaxHighlight-CxhyyMkF.js +0 -2890
  502. package/lib/SyntaxHighlight-CxhyyMkF.js.map +0 -1
  503. package/lib/hook-CldJlP5c.js +0 -1478
  504. package/lib/index-BeYI7Btu.js +0 -5031
  505. package/lib/index-BeYI7Btu.js.map +0 -1
  506. package/lib/invariant-Caa8-XvF.js +0 -26
  507. package/lib/mutation-DBQh7AOZ.js +0 -211
  508. package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
  509. package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
  510. package/lib/prism-csharp.min-C43x1RY2.js +0 -63
  511. package/lib/prism-csharp.min-C43x1RY2.js.map +0 -1
  512. package/lib/prism-java.min-CQzr40NQ.js +0 -35
  513. package/lib/prism-java.min-CQzr40NQ.js.map +0 -1
  514. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  515. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  516. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  517. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  518. package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
  519. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
  520. package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
  521. package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
  522. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  523. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  524. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  525. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  526. package/lib/prism-ruby.min-L9OdQ6tU.js +0 -38
  527. package/lib/prism-ruby.min-L9OdQ6tU.js.map +0 -1
  528. package/lib/prism-typescript.min-qTySPvCh.js +0 -34
  529. package/lib/prism-typescript.min-qTySPvCh.js.map +0 -1
@@ -1,5031 +0,0 @@
1
- var Os = Object.defineProperty;
2
- var Ht = (r) => {
3
- throw TypeError(r);
4
- };
5
- var As = (r, e, t) => e in r ? Os(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var B = (r, e, t) => As(r, typeof e != "symbol" ? e + "" : e, t), Wt = (r, e, t) => e.has(r) || Ht("Cannot " + t);
7
- var y = (r, e, t) => (Wt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), V = (r, e, t) => e.has(r) ? Ht("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), z = (r, e, t, s) => (Wt(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
- var it = (r, e, t, s) => ({
9
- set _(n) {
10
- z(r, e, n, t);
11
- },
12
- get _() {
13
- return y(r, e, s);
14
- }
15
- });
16
- import { B as wr, a as kr, H as zt, R as Ps } from "./RouteGuard-DRtEu9nh.js";
17
- import { z as jr, J as Rs } from "./index-DwT-v3zK.js";
18
- import { R as Ms, S as Is, u as bt, f as wt, g as Zs, L as Ft, O as Tr } from "./chunk-BAXFHI7N-BVBOl9s0.js";
19
- import { S as Sr, v as Cr, Q as $s, n as U, w as Yt, x as Kt, y as ce, z as Ds, A as zs, B as Fs, C as qs, D as Gt, E as Jt, F as Ls, h as Xt, G as er, H as Bs, g as Nr, I as Er, m as Vs, e as ne, l as Be, J as Or, K as Us, f as Pe, u as Qs, j as Hs, d as Ws, Z as Ys, L as Ks, M as Gs } from "./hook-CldJlP5c.js";
20
- import { E as Ar, S as Q, a as Js, R as Xs } from "./SlotletProvider-CS_nO-XT.js";
21
- import { j as o } from "./jsx-runtime-C5mzlN2N.js";
22
- import { Button as Pr } from "./ui/Button.js";
23
- import { Callout as en } from "./ui/Callout.js";
24
- import { M as tn } from "./mutation-DBQh7AOZ.js";
25
- import * as fe from "react";
26
- import ft, { createContext as qt, StrictMode as Rr, useRef as xe, useEffect as ae, useState as Ee, useCallback as ye, Suspense as Lt, memo as Mr, Component as rn, createElement as tr, useMemo as Ct, useContext as sn } from "react";
27
- import * as nn from "react-dom";
28
- import { CircleFadingArrowUpIcon as an, LoaderCircleIcon as on, ExternalLink as cn, CircleXIcon as dn, ChevronRightIcon as un, SearchIcon as ln, SunIcon as fn, MoonIcon as hn, MenuIcon as mn, PanelLeftIcon as pn } from "lucide-react";
29
- import { C as kt } from "./ClientOnly-E7hGysn1.js";
30
- import { c as q } from "./cn-qaFjX9_3.js";
31
- import { A as gn, s as vn, a as rr, b as yn, H as xn, P as _n, c as bn, V as wn, M as kn } from "./Markdown-mFpg_n9p.js";
32
- import { S as Ir } from "./Spinner-mNLZ6awP.js";
33
- import { C as jn } from "./CategoryHeading-D06WK_Wo.js";
34
- import { isSearchPlugin as Tn, isProfileMenuPlugin as Sn, isNavigationPlugin as Cn, isEventConsumerPlugin as Nn, needsInitialization as En, isApiIdentityPlugin as On, isMdxProviderPlugin as An, hasHead as Pn } from "./zudoku.plugins.js";
35
- import { o as Rn } from "./objectEntries-yMIkr2mI.js";
36
- import { B as Pt } from "./Button-BBNrKpQd.js";
37
- import { DropdownMenu as Mn, DropdownMenuTrigger as In, DropdownMenuContent as Zn, DropdownMenuLabel as $n, DropdownMenuSeparator as Nt, DropdownMenuSub as Dn, DropdownMenuSubTrigger as zn, DropdownMenuPortal as Fn, DropdownMenuSubContent as qn, DropdownMenuItem as Ln } from "./ui/DropdownMenu.js";
38
- import { VisuallyHidden as Zr } from "@radix-ui/react-visually-hidden";
39
- import { D as Bn, a as Vn, b as $r, c as Dr, d as ie } from "./Drawer-CEwbkLDb.js";
40
- import { a as Un } from "./index-CPNSgwSb.js";
41
- const Rt = {}, zr = ft.createContext(Rt);
42
- function Fr(r) {
43
- const e = ft.useContext(zr);
44
- return ft.useMemo(
45
- function() {
46
- return typeof r == "function" ? r(e) : { ...e, ...r };
47
- },
48
- [e, r]
49
- );
50
- }
51
- function Qn(r) {
52
- let e;
53
- return r.disableParentContext ? e = typeof r.components == "function" ? r.components(Rt) : r.components || Rt : e = Fr(r.components), ft.createElement(
54
- zr.Provider,
55
- { value: e },
56
- r.children
57
- );
58
- }
59
- var ee, xr, Hn = (xr = class extends Sr {
60
- constructor(e = {}) {
61
- super();
62
- V(this, ee);
63
- this.config = e, z(this, ee, /* @__PURE__ */ new Map());
64
- }
65
- build(e, t, s) {
66
- const n = t.queryKey, a = t.queryHash ?? Cr(n, t);
67
- let i = this.get(a);
68
- return i || (i = new $s({
69
- client: e,
70
- queryKey: n,
71
- queryHash: a,
72
- options: e.defaultQueryOptions(t),
73
- state: s,
74
- defaultOptions: e.getQueryDefaults(n)
75
- }), this.add(i)), i;
76
- }
77
- add(e) {
78
- y(this, ee).has(e.queryHash) || (y(this, ee).set(e.queryHash, e), this.notify({
79
- type: "added",
80
- query: e
81
- }));
82
- }
83
- remove(e) {
84
- const t = y(this, ee).get(e.queryHash);
85
- t && (e.destroy(), t === e && y(this, ee).delete(e.queryHash), this.notify({ type: "removed", query: e }));
86
- }
87
- clear() {
88
- U.batch(() => {
89
- this.getAll().forEach((e) => {
90
- this.remove(e);
91
- });
92
- });
93
- }
94
- get(e) {
95
- return y(this, ee).get(e);
96
- }
97
- getAll() {
98
- return [...y(this, ee).values()];
99
- }
100
- find(e) {
101
- const t = { exact: !0, ...e };
102
- return this.getAll().find(
103
- (s) => Yt(t, s)
104
- );
105
- }
106
- findAll(e = {}) {
107
- const t = this.getAll();
108
- return Object.keys(e).length > 0 ? t.filter((s) => Yt(e, s)) : t;
109
- }
110
- notify(e) {
111
- U.batch(() => {
112
- this.listeners.forEach((t) => {
113
- t(e);
114
- });
115
- });
116
- }
117
- onFocus() {
118
- U.batch(() => {
119
- this.getAll().forEach((e) => {
120
- e.onFocus();
121
- });
122
- });
123
- }
124
- onOnline() {
125
- U.batch(() => {
126
- this.getAll().forEach((e) => {
127
- e.onOnline();
128
- });
129
- });
130
- }
131
- }, ee = new WeakMap(), xr), le, K, st, _r, Wn = (_r = class extends Sr {
132
- constructor(e = {}) {
133
- super();
134
- V(this, le);
135
- V(this, K);
136
- V(this, st);
137
- this.config = e, z(this, le, /* @__PURE__ */ new Set()), z(this, K, /* @__PURE__ */ new Map()), z(this, st, 0);
138
- }
139
- build(e, t, s) {
140
- const n = new tn({
141
- mutationCache: this,
142
- mutationId: ++it(this, st)._,
143
- options: e.defaultMutationOptions(t),
144
- state: s
145
- });
146
- return this.add(n), n;
147
- }
148
- add(e) {
149
- y(this, le).add(e);
150
- const t = ot(e);
151
- if (typeof t == "string") {
152
- const s = y(this, K).get(t);
153
- s ? s.push(e) : y(this, K).set(t, [e]);
154
- }
155
- this.notify({ type: "added", mutation: e });
156
- }
157
- remove(e) {
158
- if (y(this, le).delete(e)) {
159
- const t = ot(e);
160
- if (typeof t == "string") {
161
- const s = y(this, K).get(t);
162
- if (s)
163
- if (s.length > 1) {
164
- const n = s.indexOf(e);
165
- n !== -1 && s.splice(n, 1);
166
- } else s[0] === e && y(this, K).delete(t);
167
- }
168
- }
169
- this.notify({ type: "removed", mutation: e });
170
- }
171
- canRun(e) {
172
- const t = ot(e);
173
- if (typeof t == "string") {
174
- const s = y(this, K).get(t), n = s == null ? void 0 : s.find(
175
- (a) => a.state.status === "pending"
176
- );
177
- return !n || n === e;
178
- } else
179
- return !0;
180
- }
181
- runNext(e) {
182
- var s;
183
- const t = ot(e);
184
- if (typeof t == "string") {
185
- const n = (s = y(this, K).get(t)) == null ? void 0 : s.find((a) => a !== e && a.state.isPaused);
186
- return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
187
- } else
188
- return Promise.resolve();
189
- }
190
- clear() {
191
- U.batch(() => {
192
- y(this, le).forEach((e) => {
193
- this.notify({ type: "removed", mutation: e });
194
- }), y(this, le).clear(), y(this, K).clear();
195
- });
196
- }
197
- getAll() {
198
- return Array.from(y(this, le));
199
- }
200
- find(e) {
201
- const t = { exact: !0, ...e };
202
- return this.getAll().find(
203
- (s) => Kt(t, s)
204
- );
205
- }
206
- findAll(e = {}) {
207
- return this.getAll().filter((t) => Kt(e, t));
208
- }
209
- notify(e) {
210
- U.batch(() => {
211
- this.listeners.forEach((t) => {
212
- t(e);
213
- });
214
- });
215
- }
216
- resumePausedMutations() {
217
- const e = this.getAll().filter((t) => t.state.isPaused);
218
- return U.batch(
219
- () => Promise.all(
220
- e.map((t) => t.continue().catch(ce))
221
- )
222
- );
223
- }
224
- }, le = new WeakMap(), K = new WeakMap(), st = new WeakMap(), _r);
225
- function ot(r) {
226
- var e;
227
- return (e = r.options.scope) == null ? void 0 : e.id;
228
- }
229
- function sr(r) {
230
- return {
231
- onFetch: (e, t) => {
232
- var f, x, w, C, k;
233
- const s = e.options, n = (w = (x = (f = e.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : x.fetchMore) == null ? void 0 : w.direction, a = ((C = e.state.data) == null ? void 0 : C.pages) || [], i = ((k = e.state.data) == null ? void 0 : k.pageParams) || [];
234
- let c = { pages: [], pageParams: [] }, u = 0;
235
- const d = async () => {
236
- let j = !1;
237
- const M = (N) => {
238
- Object.defineProperty(N, "signal", {
239
- enumerable: !0,
240
- get: () => (e.signal.aborted ? j = !0 : e.signal.addEventListener("abort", () => {
241
- j = !0;
242
- }), e.signal)
243
- });
244
- }, $ = Ds(e.options, e.fetchOptions), D = async (N, O, h) => {
245
- if (j)
246
- return Promise.reject();
247
- if (O == null && N.pages.length)
248
- return Promise.resolve(N);
249
- const R = {
250
- client: e.client,
251
- queryKey: e.queryKey,
252
- pageParam: O,
253
- direction: h ? "backward" : "forward",
254
- meta: e.options.meta
255
- };
256
- M(R);
257
- const W = await $(
258
- R
259
- ), { maxPages: Y } = e.options, oe = h ? zs : Fs;
260
- return {
261
- pages: oe(N.pages, W, Y),
262
- pageParams: oe(N.pageParams, O, Y)
263
- };
264
- };
265
- if (n && a.length) {
266
- const N = n === "backward", O = N ? Yn : nr, h = {
267
- pages: a,
268
- pageParams: i
269
- }, R = O(s, h);
270
- c = await D(h, R, N);
271
- } else {
272
- const N = r ?? a.length;
273
- do {
274
- const O = u === 0 ? i[0] ?? s.initialPageParam : nr(s, c);
275
- if (u > 0 && O == null)
276
- break;
277
- c = await D(c, O), u++;
278
- } while (u < N);
279
- }
280
- return c;
281
- };
282
- e.options.persister ? e.fetchFn = () => {
283
- var j, M;
284
- return (M = (j = e.options).persister) == null ? void 0 : M.call(
285
- j,
286
- d,
287
- {
288
- client: e.client,
289
- queryKey: e.queryKey,
290
- meta: e.options.meta,
291
- signal: e.signal
292
- },
293
- t
294
- );
295
- } : e.fetchFn = d;
296
- }
297
- };
298
- }
299
- function nr(r, { pages: e, pageParams: t }) {
300
- const s = e.length - 1;
301
- return e.length > 0 ? r.getNextPageParam(
302
- e[s],
303
- e,
304
- t[s],
305
- t
306
- ) : void 0;
307
- }
308
- function Yn(r, { pages: e, pageParams: t }) {
309
- var s;
310
- return e.length > 0 ? (s = r.getPreviousPageParam) == null ? void 0 : s.call(r, e[0], e, t[0], t) : void 0;
311
- }
312
- var Z, pe, ge, Me, Ie, ve, Ze, $e, br, Kn = (br = class {
313
- constructor(r = {}) {
314
- V(this, Z);
315
- V(this, pe);
316
- V(this, ge);
317
- V(this, Me);
318
- V(this, Ie);
319
- V(this, ve);
320
- V(this, Ze);
321
- V(this, $e);
322
- z(this, Z, r.queryCache || new Hn()), z(this, pe, r.mutationCache || new Wn()), z(this, ge, r.defaultOptions || {}), z(this, Me, /* @__PURE__ */ new Map()), z(this, Ie, /* @__PURE__ */ new Map()), z(this, ve, 0);
323
- }
324
- mount() {
325
- it(this, ve)._++, y(this, ve) === 1 && (z(this, Ze, qs.subscribe(async (r) => {
326
- r && (await this.resumePausedMutations(), y(this, Z).onFocus());
327
- })), z(this, $e, Gt.subscribe(async (r) => {
328
- r && (await this.resumePausedMutations(), y(this, Z).onOnline());
329
- })));
330
- }
331
- unmount() {
332
- var r, e;
333
- it(this, ve)._--, y(this, ve) === 0 && ((r = y(this, Ze)) == null || r.call(this), z(this, Ze, void 0), (e = y(this, $e)) == null || e.call(this), z(this, $e, void 0));
334
- }
335
- isFetching(r) {
336
- return y(this, Z).findAll({ ...r, fetchStatus: "fetching" }).length;
337
- }
338
- isMutating(r) {
339
- return y(this, pe).findAll({ ...r, status: "pending" }).length;
340
- }
341
- /**
342
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
343
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
344
- *
345
- * Hint: Do not use this function inside a component, because it won't receive updates.
346
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
347
- */
348
- getQueryData(r) {
349
- var t;
350
- const e = this.defaultQueryOptions({ queryKey: r });
351
- return (t = y(this, Z).get(e.queryHash)) == null ? void 0 : t.state.data;
352
- }
353
- ensureQueryData(r) {
354
- const e = this.defaultQueryOptions(r), t = y(this, Z).build(this, e), s = t.state.data;
355
- return s === void 0 ? this.fetchQuery(r) : (r.revalidateIfStale && t.isStaleByTime(Jt(e.staleTime, t)) && this.prefetchQuery(e), Promise.resolve(s));
356
- }
357
- getQueriesData(r) {
358
- return y(this, Z).findAll(r).map(({ queryKey: e, state: t }) => {
359
- const s = t.data;
360
- return [e, s];
361
- });
362
- }
363
- setQueryData(r, e, t) {
364
- const s = this.defaultQueryOptions({ queryKey: r }), n = y(this, Z).get(
365
- s.queryHash
366
- ), a = n == null ? void 0 : n.state.data, i = Ls(e, a);
367
- if (i !== void 0)
368
- return y(this, Z).build(this, s).setData(i, { ...t, manual: !0 });
369
- }
370
- setQueriesData(r, e, t) {
371
- return U.batch(
372
- () => y(this, Z).findAll(r).map(({ queryKey: s }) => [
373
- s,
374
- this.setQueryData(s, e, t)
375
- ])
376
- );
377
- }
378
- getQueryState(r) {
379
- var t;
380
- const e = this.defaultQueryOptions({ queryKey: r });
381
- return (t = y(this, Z).get(
382
- e.queryHash
383
- )) == null ? void 0 : t.state;
384
- }
385
- removeQueries(r) {
386
- const e = y(this, Z);
387
- U.batch(() => {
388
- e.findAll(r).forEach((t) => {
389
- e.remove(t);
390
- });
391
- });
392
- }
393
- resetQueries(r, e) {
394
- const t = y(this, Z);
395
- return U.batch(() => (t.findAll(r).forEach((s) => {
396
- s.reset();
397
- }), this.refetchQueries(
398
- {
399
- type: "active",
400
- ...r
401
- },
402
- e
403
- )));
404
- }
405
- cancelQueries(r, e = {}) {
406
- const t = { revert: !0, ...e }, s = U.batch(
407
- () => y(this, Z).findAll(r).map((n) => n.cancel(t))
408
- );
409
- return Promise.all(s).then(ce).catch(ce);
410
- }
411
- invalidateQueries(r, e = {}) {
412
- return U.batch(() => (y(this, Z).findAll(r).forEach((t) => {
413
- t.invalidate();
414
- }), (r == null ? void 0 : r.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
415
- {
416
- ...r,
417
- type: (r == null ? void 0 : r.refetchType) ?? (r == null ? void 0 : r.type) ?? "active"
418
- },
419
- e
420
- )));
421
- }
422
- refetchQueries(r, e = {}) {
423
- const t = {
424
- ...e,
425
- cancelRefetch: e.cancelRefetch ?? !0
426
- }, s = U.batch(
427
- () => y(this, Z).findAll(r).filter((n) => !n.isDisabled()).map((n) => {
428
- let a = n.fetch(void 0, t);
429
- return t.throwOnError || (a = a.catch(ce)), n.state.fetchStatus === "paused" ? Promise.resolve() : a;
430
- })
431
- );
432
- return Promise.all(s).then(ce);
433
- }
434
- fetchQuery(r) {
435
- const e = this.defaultQueryOptions(r);
436
- e.retry === void 0 && (e.retry = !1);
437
- const t = y(this, Z).build(this, e);
438
- return t.isStaleByTime(
439
- Jt(e.staleTime, t)
440
- ) ? t.fetch(e) : Promise.resolve(t.state.data);
441
- }
442
- prefetchQuery(r) {
443
- return this.fetchQuery(r).then(ce).catch(ce);
444
- }
445
- fetchInfiniteQuery(r) {
446
- return r.behavior = sr(r.pages), this.fetchQuery(r);
447
- }
448
- prefetchInfiniteQuery(r) {
449
- return this.fetchInfiniteQuery(r).then(ce).catch(ce);
450
- }
451
- ensureInfiniteQueryData(r) {
452
- return r.behavior = sr(r.pages), this.ensureQueryData(r);
453
- }
454
- resumePausedMutations() {
455
- return Gt.isOnline() ? y(this, pe).resumePausedMutations() : Promise.resolve();
456
- }
457
- getQueryCache() {
458
- return y(this, Z);
459
- }
460
- getMutationCache() {
461
- return y(this, pe);
462
- }
463
- getDefaultOptions() {
464
- return y(this, ge);
465
- }
466
- setDefaultOptions(r) {
467
- z(this, ge, r);
468
- }
469
- setQueryDefaults(r, e) {
470
- y(this, Me).set(Xt(r), {
471
- queryKey: r,
472
- defaultOptions: e
473
- });
474
- }
475
- getQueryDefaults(r) {
476
- const e = [...y(this, Me).values()], t = {};
477
- return e.forEach((s) => {
478
- er(r, s.queryKey) && Object.assign(t, s.defaultOptions);
479
- }), t;
480
- }
481
- setMutationDefaults(r, e) {
482
- y(this, Ie).set(Xt(r), {
483
- mutationKey: r,
484
- defaultOptions: e
485
- });
486
- }
487
- getMutationDefaults(r) {
488
- const e = [...y(this, Ie).values()], t = {};
489
- return e.forEach((s) => {
490
- er(r, s.mutationKey) && Object.assign(t, s.defaultOptions);
491
- }), t;
492
- }
493
- defaultQueryOptions(r) {
494
- if (r._defaulted)
495
- return r;
496
- const e = {
497
- ...y(this, ge).queries,
498
- ...this.getQueryDefaults(r.queryKey),
499
- ...r,
500
- _defaulted: !0
501
- };
502
- return e.queryHash || (e.queryHash = Cr(
503
- e.queryKey,
504
- e
505
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Bs && (e.enabled = !1), e;
506
- }
507
- defaultMutationOptions(r) {
508
- return r != null && r._defaulted ? r : {
509
- ...y(this, ge).mutations,
510
- ...(r == null ? void 0 : r.mutationKey) && this.getMutationDefaults(r.mutationKey),
511
- ...r,
512
- _defaulted: !0
513
- };
514
- }
515
- clear() {
516
- y(this, Z).clear(), y(this, pe).clear();
517
- }
518
- }, Z = new WeakMap(), pe = new WeakMap(), ge = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), ve = new WeakMap(), Ze = new WeakMap(), $e = new WeakMap(), br);
519
- function Gn(r) {
520
- return r;
521
- }
522
- function ar(r, e, t) {
523
- var u, d;
524
- if (typeof e != "object" || e === null)
525
- return;
526
- const s = r.getMutationCache(), n = r.getQueryCache(), a = ((u = t == null ? void 0 : t.defaultOptions) == null ? void 0 : u.deserializeData) ?? ((d = r.getDefaultOptions().hydrate) == null ? void 0 : d.deserializeData) ?? Gn, i = e.mutations || [], c = e.queries || [];
527
- i.forEach(({ state: f, ...x }) => {
528
- var w, C;
529
- s.build(
530
- r,
531
- {
532
- ...(w = r.getDefaultOptions().hydrate) == null ? void 0 : w.mutations,
533
- ...(C = t == null ? void 0 : t.defaultOptions) == null ? void 0 : C.mutations,
534
- ...x
535
- },
536
- f
537
- );
538
- }), c.forEach(({ queryKey: f, state: x, queryHash: w, meta: C, promise: k }) => {
539
- var $, D;
540
- let j = n.get(w);
541
- const M = x.data === void 0 ? x.data : a(x.data);
542
- if (j) {
543
- if (j.state.dataUpdatedAt < x.dataUpdatedAt) {
544
- const { fetchStatus: N, ...O } = x;
545
- j.setState({
546
- ...O,
547
- data: M
548
- });
549
- }
550
- } else
551
- j = n.build(
552
- r,
553
- {
554
- ...($ = r.getDefaultOptions().hydrate) == null ? void 0 : $.queries,
555
- ...(D = t == null ? void 0 : t.defaultOptions) == null ? void 0 : D.queries,
556
- queryKey: f,
557
- queryHash: w,
558
- meta: C
559
- },
560
- // Reset fetch status to idle to avoid
561
- // query being stuck in fetching state upon hydration
562
- {
563
- ...x,
564
- data: M,
565
- fetchStatus: "idle"
566
- }
567
- );
568
- if (k) {
569
- const N = Promise.resolve(k).then(a);
570
- j.fetch(void 0, { initialPromise: N });
571
- }
572
- });
573
- }
574
- var ir = (r, e) => typeof r == "object" && r !== null && e in r, Jn = ({
575
- children: r,
576
- options: e = {},
577
- state: t,
578
- queryClient: s
579
- }) => {
580
- const n = Nr(s), [a, i] = fe.useState(), c = fe.useRef(e);
581
- return c.current = e, fe.useMemo(() => {
582
- if (t) {
583
- if (typeof t != "object")
584
- return;
585
- const u = n.getQueryCache(), d = t.queries || [], f = [], x = [];
586
- for (const w of d) {
587
- const C = u.get(w.queryHash);
588
- if (!C)
589
- f.push(w);
590
- else {
591
- const k = w.state.dataUpdatedAt > C.state.dataUpdatedAt || // RSC special serialized then-able chunks
592
- ir(w.promise, "status") && ir(C.promise, "status") && w.promise.status !== C.promise.status, j = a == null ? void 0 : a.find(
593
- (M) => M.queryHash === w.queryHash
594
- );
595
- k && (!j || w.state.dataUpdatedAt > j.state.dataUpdatedAt) && x.push(w);
596
- }
597
- }
598
- f.length > 0 && ar(n, { queries: f }, c.current), x.length > 0 && i(
599
- (w) => w ? [...w, ...x] : x
600
- );
601
- }
602
- }, [n, a, t]), fe.useEffect(() => {
603
- a && (ar(n, { queries: a }, c.current), i(void 0));
604
- }, [n, a]), r;
605
- };
606
- function Xn({ error: r }) {
607
- return /* @__PURE__ */ o.jsx(Ar, { error: r });
608
- }
609
- /**
610
- * react-router v7.5.2
611
- *
612
- * Copyright (c) Remix Software Inc.
613
- *
614
- * This source code is licensed under the MIT license found in the
615
- * LICENSE.md file in the root directory of this source tree.
616
- *
617
- * @license MIT
618
- */
619
- function ea(r) {
620
- return /* @__PURE__ */ fe.createElement(Ms, { flushSync: nn.flushSync, ...r });
621
- }
622
- const Mt = qt({ stagger: !1 }), ta = new Kn({
623
- defaultOptions: {
624
- queries: {
625
- staleTime: 1e3 * 60 * 5
626
- }
627
- }
628
- }), ra = ({
629
- router: r,
630
- hydrate: e = !1
631
- }) => /* @__PURE__ */ o.jsx(Rr, { children: /* @__PURE__ */ o.jsx(Er, { client: ta, children: /* @__PURE__ */ o.jsx(Jn, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ o.jsx(wr, { value: !1, children: /* @__PURE__ */ o.jsx(kr, { children: /* @__PURE__ */ o.jsx(Mt.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ o.jsx(ea, { router: r }) }) }) }) }) }) }), sa = ({
632
- router: r,
633
- context: e,
634
- queryClient: t,
635
- helmetContext: s,
636
- bypassProtection: n = !1
637
- }) => /* @__PURE__ */ o.jsx(Rr, { children: /* @__PURE__ */ o.jsx(Er, { client: t, children: /* @__PURE__ */ o.jsx(kr, { context: s, children: /* @__PURE__ */ o.jsx(wr, { value: n, children: /* @__PURE__ */ o.jsx(Is, { router: r, context: e }) }) }) }) });
638
- var E;
639
- (function(r) {
640
- r.assertEqual = (n) => n;
641
- function e(n) {
642
- }
643
- r.assertIs = e;
644
- function t(n) {
645
- throw new Error();
646
- }
647
- r.assertNever = t, r.arrayToEnum = (n) => {
648
- const a = {};
649
- for (const i of n)
650
- a[i] = i;
651
- return a;
652
- }, r.getValidEnumValues = (n) => {
653
- const a = r.objectKeys(n).filter((c) => typeof n[n[c]] != "number"), i = {};
654
- for (const c of a)
655
- i[c] = n[c];
656
- return r.objectValues(i);
657
- }, r.objectValues = (n) => r.objectKeys(n).map(function(a) {
658
- return n[a];
659
- }), r.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
660
- const a = [];
661
- for (const i in n)
662
- Object.prototype.hasOwnProperty.call(n, i) && a.push(i);
663
- return a;
664
- }, r.find = (n, a) => {
665
- for (const i of n)
666
- if (a(i))
667
- return i;
668
- }, r.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && isFinite(n) && Math.floor(n) === n;
669
- function s(n, a = " | ") {
670
- return n.map((i) => typeof i == "string" ? `'${i}'` : i).join(a);
671
- }
672
- r.joinValues = s, r.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
673
- })(E || (E = {}));
674
- var It;
675
- (function(r) {
676
- r.mergeShapes = (e, t) => ({
677
- ...e,
678
- ...t
679
- // second overwrites first
680
- });
681
- })(It || (It = {}));
682
- const p = E.arrayToEnum([
683
- "string",
684
- "nan",
685
- "number",
686
- "integer",
687
- "float",
688
- "boolean",
689
- "date",
690
- "bigint",
691
- "symbol",
692
- "function",
693
- "undefined",
694
- "null",
695
- "array",
696
- "object",
697
- "unknown",
698
- "promise",
699
- "void",
700
- "never",
701
- "map",
702
- "set"
703
- ]), ue = (r) => {
704
- switch (typeof r) {
705
- case "undefined":
706
- return p.undefined;
707
- case "string":
708
- return p.string;
709
- case "number":
710
- return isNaN(r) ? p.nan : p.number;
711
- case "boolean":
712
- return p.boolean;
713
- case "function":
714
- return p.function;
715
- case "bigint":
716
- return p.bigint;
717
- case "symbol":
718
- return p.symbol;
719
- case "object":
720
- return Array.isArray(r) ? p.array : r === null ? p.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? p.promise : typeof Map < "u" && r instanceof Map ? p.map : typeof Set < "u" && r instanceof Set ? p.set : typeof Date < "u" && r instanceof Date ? p.date : p.object;
721
- default:
722
- return p.unknown;
723
- }
724
- }, l = E.arrayToEnum([
725
- "invalid_type",
726
- "invalid_literal",
727
- "custom",
728
- "invalid_union",
729
- "invalid_union_discriminator",
730
- "invalid_enum_value",
731
- "unrecognized_keys",
732
- "invalid_arguments",
733
- "invalid_return_type",
734
- "invalid_date",
735
- "invalid_string",
736
- "too_small",
737
- "too_big",
738
- "invalid_intersection_types",
739
- "not_multiple_of",
740
- "not_finite"
741
- ]), na = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
742
- class H extends Error {
743
- get errors() {
744
- return this.issues;
745
- }
746
- constructor(e) {
747
- super(), this.issues = [], this.addIssue = (s) => {
748
- this.issues = [...this.issues, s];
749
- }, this.addIssues = (s = []) => {
750
- this.issues = [...this.issues, ...s];
751
- };
752
- const t = new.target.prototype;
753
- Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
754
- }
755
- format(e) {
756
- const t = e || function(a) {
757
- return a.message;
758
- }, s = { _errors: [] }, n = (a) => {
759
- for (const i of a.issues)
760
- if (i.code === "invalid_union")
761
- i.unionErrors.map(n);
762
- else if (i.code === "invalid_return_type")
763
- n(i.returnTypeError);
764
- else if (i.code === "invalid_arguments")
765
- n(i.argumentsError);
766
- else if (i.path.length === 0)
767
- s._errors.push(t(i));
768
- else {
769
- let c = s, u = 0;
770
- for (; u < i.path.length; ) {
771
- const d = i.path[u];
772
- u === i.path.length - 1 ? (c[d] = c[d] || { _errors: [] }, c[d]._errors.push(t(i))) : c[d] = c[d] || { _errors: [] }, c = c[d], u++;
773
- }
774
- }
775
- };
776
- return n(this), s;
777
- }
778
- static assert(e) {
779
- if (!(e instanceof H))
780
- throw new Error(`Not a ZodError: ${e}`);
781
- }
782
- toString() {
783
- return this.message;
784
- }
785
- get message() {
786
- return JSON.stringify(this.issues, E.jsonStringifyReplacer, 2);
787
- }
788
- get isEmpty() {
789
- return this.issues.length === 0;
790
- }
791
- flatten(e = (t) => t.message) {
792
- const t = {}, s = [];
793
- for (const n of this.issues)
794
- n.path.length > 0 ? (t[n.path[0]] = t[n.path[0]] || [], t[n.path[0]].push(e(n))) : s.push(e(n));
795
- return { formErrors: s, fieldErrors: t };
796
- }
797
- get formErrors() {
798
- return this.flatten();
799
- }
800
- }
801
- H.create = (r) => new H(r);
802
- const De = (r, e) => {
803
- let t;
804
- switch (r.code) {
805
- case l.invalid_type:
806
- r.received === p.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
807
- break;
808
- case l.invalid_literal:
809
- t = `Invalid literal value, expected ${JSON.stringify(r.expected, E.jsonStringifyReplacer)}`;
810
- break;
811
- case l.unrecognized_keys:
812
- t = `Unrecognized key(s) in object: ${E.joinValues(r.keys, ", ")}`;
813
- break;
814
- case l.invalid_union:
815
- t = "Invalid input";
816
- break;
817
- case l.invalid_union_discriminator:
818
- t = `Invalid discriminator value. Expected ${E.joinValues(r.options)}`;
819
- break;
820
- case l.invalid_enum_value:
821
- t = `Invalid enum value. Expected ${E.joinValues(r.options)}, received '${r.received}'`;
822
- break;
823
- case l.invalid_arguments:
824
- t = "Invalid function arguments";
825
- break;
826
- case l.invalid_return_type:
827
- t = "Invalid function return type";
828
- break;
829
- case l.invalid_date:
830
- t = "Invalid date";
831
- break;
832
- case l.invalid_string:
833
- typeof r.validation == "object" ? "includes" in r.validation ? (t = `Invalid input: must include "${r.validation.includes}"`, typeof r.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${r.validation.position}`)) : "startsWith" in r.validation ? t = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? t = `Invalid input: must end with "${r.validation.endsWith}"` : E.assertNever(r.validation) : r.validation !== "regex" ? t = `Invalid ${r.validation}` : t = "Invalid";
834
- break;
835
- case l.too_small:
836
- r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "more than"} ${r.minimum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "over"} ${r.minimum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${r.minimum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(r.minimum))}` : t = "Invalid input";
837
- break;
838
- case l.too_big:
839
- r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "less than"} ${r.maximum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "under"} ${r.maximum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "bigint" ? t = `BigInt must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly" : r.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(r.maximum))}` : t = "Invalid input";
840
- break;
841
- case l.custom:
842
- t = "Invalid input";
843
- break;
844
- case l.invalid_intersection_types:
845
- t = "Intersection results could not be merged";
846
- break;
847
- case l.not_multiple_of:
848
- t = `Number must be a multiple of ${r.multipleOf}`;
849
- break;
850
- case l.not_finite:
851
- t = "Number must be finite";
852
- break;
853
- default:
854
- t = e.defaultError, E.assertNever(r);
855
- }
856
- return { message: t };
857
- };
858
- let qr = De;
859
- function aa(r) {
860
- qr = r;
861
- }
862
- function ht() {
863
- return qr;
864
- }
865
- const mt = (r) => {
866
- const { data: e, path: t, errorMaps: s, issueData: n } = r, a = [...t, ...n.path || []], i = {
867
- ...n,
868
- path: a
869
- };
870
- if (n.message !== void 0)
871
- return {
872
- ...n,
873
- path: a,
874
- message: n.message
875
- };
876
- let c = "";
877
- const u = s.filter((d) => !!d).slice().reverse();
878
- for (const d of u)
879
- c = d(i, { data: e, defaultError: c }).message;
880
- return {
881
- ...n,
882
- path: a,
883
- message: c
884
- };
885
- }, ia = [];
886
- function m(r, e) {
887
- const t = ht(), s = mt({
888
- issueData: e,
889
- data: r.data,
890
- path: r.path,
891
- errorMaps: [
892
- r.common.contextualErrorMap,
893
- // contextual error map is first priority
894
- r.schemaErrorMap,
895
- // then schema-bound map if available
896
- t,
897
- // then global override map
898
- t === De ? void 0 : De
899
- // then global default map
900
- ].filter((n) => !!n)
901
- });
902
- r.common.issues.push(s);
903
- }
904
- class F {
905
- constructor() {
906
- this.value = "valid";
907
- }
908
- dirty() {
909
- this.value === "valid" && (this.value = "dirty");
910
- }
911
- abort() {
912
- this.value !== "aborted" && (this.value = "aborted");
913
- }
914
- static mergeArray(e, t) {
915
- const s = [];
916
- for (const n of t) {
917
- if (n.status === "aborted")
918
- return b;
919
- n.status === "dirty" && e.dirty(), s.push(n.value);
920
- }
921
- return { status: e.value, value: s };
922
- }
923
- static async mergeObjectAsync(e, t) {
924
- const s = [];
925
- for (const n of t) {
926
- const a = await n.key, i = await n.value;
927
- s.push({
928
- key: a,
929
- value: i
930
- });
931
- }
932
- return F.mergeObjectSync(e, s);
933
- }
934
- static mergeObjectSync(e, t) {
935
- const s = {};
936
- for (const n of t) {
937
- const { key: a, value: i } = n;
938
- if (a.status === "aborted" || i.status === "aborted")
939
- return b;
940
- a.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), a.value !== "__proto__" && (typeof i.value < "u" || n.alwaysSet) && (s[a.value] = i.value);
941
- }
942
- return { status: e.value, value: s };
943
- }
944
- }
945
- const b = Object.freeze({
946
- status: "aborted"
947
- }), Ae = (r) => ({ status: "dirty", value: r }), L = (r) => ({ status: "valid", value: r }), Zt = (r) => r.status === "aborted", $t = (r) => r.status === "dirty", Se = (r) => r.status === "valid", Ve = (r) => typeof Promise < "u" && r instanceof Promise;
948
- function pt(r, e, t, s) {
949
- if (typeof e == "function" ? r !== e || !0 : !e.has(r)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
950
- return e.get(r);
951
- }
952
- function Lr(r, e, t, s, n) {
953
- if (typeof e == "function" ? r !== e || !0 : !e.has(r)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
954
- return e.set(r, t), t;
955
- }
956
- var g;
957
- (function(r) {
958
- r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
959
- })(g || (g = {}));
960
- var qe, Le;
961
- class re {
962
- constructor(e, t, s, n) {
963
- this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = n;
964
- }
965
- get path() {
966
- return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
967
- }
968
- }
969
- const or = (r, e) => {
970
- if (Se(e))
971
- return { success: !0, data: e.value };
972
- if (!r.common.issues.length)
973
- throw new Error("Validation failed but no issues detected.");
974
- return {
975
- success: !1,
976
- get error() {
977
- if (this._error)
978
- return this._error;
979
- const t = new H(r.common.issues);
980
- return this._error = t, this._error;
981
- }
982
- };
983
- };
984
- function T(r) {
985
- if (!r)
986
- return {};
987
- const { errorMap: e, invalid_type_error: t, required_error: s, description: n } = r;
988
- if (e && (t || s))
989
- throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
990
- return e ? { errorMap: e, description: n } : { errorMap: (i, c) => {
991
- var u, d;
992
- const { message: f } = r;
993
- return i.code === "invalid_enum_value" ? { message: f ?? c.defaultError } : typeof c.data > "u" ? { message: (u = f ?? s) !== null && u !== void 0 ? u : c.defaultError } : i.code !== "invalid_type" ? { message: c.defaultError } : { message: (d = f ?? t) !== null && d !== void 0 ? d : c.defaultError };
994
- }, description: n };
995
- }
996
- class S {
997
- get description() {
998
- return this._def.description;
999
- }
1000
- _getType(e) {
1001
- return ue(e.data);
1002
- }
1003
- _getOrReturnCtx(e, t) {
1004
- return t || {
1005
- common: e.parent.common,
1006
- data: e.data,
1007
- parsedType: ue(e.data),
1008
- schemaErrorMap: this._def.errorMap,
1009
- path: e.path,
1010
- parent: e.parent
1011
- };
1012
- }
1013
- _processInputParams(e) {
1014
- return {
1015
- status: new F(),
1016
- ctx: {
1017
- common: e.parent.common,
1018
- data: e.data,
1019
- parsedType: ue(e.data),
1020
- schemaErrorMap: this._def.errorMap,
1021
- path: e.path,
1022
- parent: e.parent
1023
- }
1024
- };
1025
- }
1026
- _parseSync(e) {
1027
- const t = this._parse(e);
1028
- if (Ve(t))
1029
- throw new Error("Synchronous parse encountered promise.");
1030
- return t;
1031
- }
1032
- _parseAsync(e) {
1033
- const t = this._parse(e);
1034
- return Promise.resolve(t);
1035
- }
1036
- parse(e, t) {
1037
- const s = this.safeParse(e, t);
1038
- if (s.success)
1039
- return s.data;
1040
- throw s.error;
1041
- }
1042
- safeParse(e, t) {
1043
- var s;
1044
- const n = {
1045
- common: {
1046
- issues: [],
1047
- async: (s = t == null ? void 0 : t.async) !== null && s !== void 0 ? s : !1,
1048
- contextualErrorMap: t == null ? void 0 : t.errorMap
1049
- },
1050
- path: (t == null ? void 0 : t.path) || [],
1051
- schemaErrorMap: this._def.errorMap,
1052
- parent: null,
1053
- data: e,
1054
- parsedType: ue(e)
1055
- }, a = this._parseSync({ data: e, path: n.path, parent: n });
1056
- return or(n, a);
1057
- }
1058
- "~validate"(e) {
1059
- var t, s;
1060
- const n = {
1061
- common: {
1062
- issues: [],
1063
- async: !!this["~standard"].async
1064
- },
1065
- path: [],
1066
- schemaErrorMap: this._def.errorMap,
1067
- parent: null,
1068
- data: e,
1069
- parsedType: ue(e)
1070
- };
1071
- if (!this["~standard"].async)
1072
- try {
1073
- const a = this._parseSync({ data: e, path: [], parent: n });
1074
- return Se(a) ? {
1075
- value: a.value
1076
- } : {
1077
- issues: n.common.issues
1078
- };
1079
- } catch (a) {
1080
- !((s = (t = a == null ? void 0 : a.message) === null || t === void 0 ? void 0 : t.toLowerCase()) === null || s === void 0) && s.includes("encountered") && (this["~standard"].async = !0), n.common = {
1081
- issues: [],
1082
- async: !0
1083
- };
1084
- }
1085
- return this._parseAsync({ data: e, path: [], parent: n }).then((a) => Se(a) ? {
1086
- value: a.value
1087
- } : {
1088
- issues: n.common.issues
1089
- });
1090
- }
1091
- async parseAsync(e, t) {
1092
- const s = await this.safeParseAsync(e, t);
1093
- if (s.success)
1094
- return s.data;
1095
- throw s.error;
1096
- }
1097
- async safeParseAsync(e, t) {
1098
- const s = {
1099
- common: {
1100
- issues: [],
1101
- contextualErrorMap: t == null ? void 0 : t.errorMap,
1102
- async: !0
1103
- },
1104
- path: (t == null ? void 0 : t.path) || [],
1105
- schemaErrorMap: this._def.errorMap,
1106
- parent: null,
1107
- data: e,
1108
- parsedType: ue(e)
1109
- }, n = this._parse({ data: e, path: s.path, parent: s }), a = await (Ve(n) ? n : Promise.resolve(n));
1110
- return or(s, a);
1111
- }
1112
- refine(e, t) {
1113
- const s = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
1114
- return this._refinement((n, a) => {
1115
- const i = e(n), c = () => a.addIssue({
1116
- code: l.custom,
1117
- ...s(n)
1118
- });
1119
- return typeof Promise < "u" && i instanceof Promise ? i.then((u) => u ? !0 : (c(), !1)) : i ? !0 : (c(), !1);
1120
- });
1121
- }
1122
- refinement(e, t) {
1123
- return this._refinement((s, n) => e(s) ? !0 : (n.addIssue(typeof t == "function" ? t(s, n) : t), !1));
1124
- }
1125
- _refinement(e) {
1126
- return new X({
1127
- schema: this,
1128
- typeName: _.ZodEffects,
1129
- effect: { type: "refinement", refinement: e }
1130
- });
1131
- }
1132
- superRefine(e) {
1133
- return this._refinement(e);
1134
- }
1135
- constructor(e) {
1136
- this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = {
1137
- version: 1,
1138
- vendor: "zod",
1139
- validate: (t) => this["~validate"](t)
1140
- };
1141
- }
1142
- optional() {
1143
- return te.create(this, this._def);
1144
- }
1145
- nullable() {
1146
- return ke.create(this, this._def);
1147
- }
1148
- nullish() {
1149
- return this.nullable().optional();
1150
- }
1151
- array() {
1152
- return J.create(this);
1153
- }
1154
- promise() {
1155
- return Fe.create(this, this._def);
1156
- }
1157
- or(e) {
1158
- return We.create([this, e], this._def);
1159
- }
1160
- and(e) {
1161
- return Ye.create(this, e, this._def);
1162
- }
1163
- transform(e) {
1164
- return new X({
1165
- ...T(this._def),
1166
- schema: this,
1167
- typeName: _.ZodEffects,
1168
- effect: { type: "transform", transform: e }
1169
- });
1170
- }
1171
- default(e) {
1172
- const t = typeof e == "function" ? e : () => e;
1173
- return new et({
1174
- ...T(this._def),
1175
- innerType: this,
1176
- defaultValue: t,
1177
- typeName: _.ZodDefault
1178
- });
1179
- }
1180
- brand() {
1181
- return new Bt({
1182
- typeName: _.ZodBranded,
1183
- type: this,
1184
- ...T(this._def)
1185
- });
1186
- }
1187
- catch(e) {
1188
- const t = typeof e == "function" ? e : () => e;
1189
- return new tt({
1190
- ...T(this._def),
1191
- innerType: this,
1192
- catchValue: t,
1193
- typeName: _.ZodCatch
1194
- });
1195
- }
1196
- describe(e) {
1197
- const t = this.constructor;
1198
- return new t({
1199
- ...this._def,
1200
- description: e
1201
- });
1202
- }
1203
- pipe(e) {
1204
- return nt.create(this, e);
1205
- }
1206
- readonly() {
1207
- return rt.create(this);
1208
- }
1209
- isOptional() {
1210
- return this.safeParse(void 0).success;
1211
- }
1212
- isNullable() {
1213
- return this.safeParse(null).success;
1214
- }
1215
- }
1216
- const oa = /^c[^\s-]{8,}$/i, ca = /^[0-9a-z]+$/, da = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ua = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, la = /^[a-z0-9_-]{21}$/i, fa = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ha = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ma = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, pa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1217
- let Et;
1218
- const ga = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, va = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, ya = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, xa = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, _a = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ba = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Br = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", wa = new RegExp(`^${Br}$`);
1219
- function Vr(r) {
1220
- let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
1221
- return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
1222
- }
1223
- function ka(r) {
1224
- return new RegExp(`^${Vr(r)}$`);
1225
- }
1226
- function Ur(r) {
1227
- let e = `${Br}T${Vr(r)}`;
1228
- const t = [];
1229
- return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
1230
- }
1231
- function ja(r, e) {
1232
- return !!((e === "v4" || !e) && ga.test(r) || (e === "v6" || !e) && ya.test(r));
1233
- }
1234
- function Ta(r, e) {
1235
- if (!fa.test(r))
1236
- return !1;
1237
- try {
1238
- const [t] = r.split("."), s = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), n = JSON.parse(atob(s));
1239
- return !(typeof n != "object" || n === null || !n.typ || !n.alg || e && n.alg !== e);
1240
- } catch {
1241
- return !1;
1242
- }
1243
- }
1244
- function Sa(r, e) {
1245
- return !!((e === "v4" || !e) && va.test(r) || (e === "v6" || !e) && xa.test(r));
1246
- }
1247
- class G extends S {
1248
- _parse(e) {
1249
- if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== p.string) {
1250
- const a = this._getOrReturnCtx(e);
1251
- return m(a, {
1252
- code: l.invalid_type,
1253
- expected: p.string,
1254
- received: a.parsedType
1255
- }), b;
1256
- }
1257
- const s = new F();
1258
- let n;
1259
- for (const a of this._def.checks)
1260
- if (a.kind === "min")
1261
- e.data.length < a.value && (n = this._getOrReturnCtx(e, n), m(n, {
1262
- code: l.too_small,
1263
- minimum: a.value,
1264
- type: "string",
1265
- inclusive: !0,
1266
- exact: !1,
1267
- message: a.message
1268
- }), s.dirty());
1269
- else if (a.kind === "max")
1270
- e.data.length > a.value && (n = this._getOrReturnCtx(e, n), m(n, {
1271
- code: l.too_big,
1272
- maximum: a.value,
1273
- type: "string",
1274
- inclusive: !0,
1275
- exact: !1,
1276
- message: a.message
1277
- }), s.dirty());
1278
- else if (a.kind === "length") {
1279
- const i = e.data.length > a.value, c = e.data.length < a.value;
1280
- (i || c) && (n = this._getOrReturnCtx(e, n), i ? m(n, {
1281
- code: l.too_big,
1282
- maximum: a.value,
1283
- type: "string",
1284
- inclusive: !0,
1285
- exact: !0,
1286
- message: a.message
1287
- }) : c && m(n, {
1288
- code: l.too_small,
1289
- minimum: a.value,
1290
- type: "string",
1291
- inclusive: !0,
1292
- exact: !0,
1293
- message: a.message
1294
- }), s.dirty());
1295
- } else if (a.kind === "email")
1296
- ma.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1297
- validation: "email",
1298
- code: l.invalid_string,
1299
- message: a.message
1300
- }), s.dirty());
1301
- else if (a.kind === "emoji")
1302
- Et || (Et = new RegExp(pa, "u")), Et.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1303
- validation: "emoji",
1304
- code: l.invalid_string,
1305
- message: a.message
1306
- }), s.dirty());
1307
- else if (a.kind === "uuid")
1308
- ua.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1309
- validation: "uuid",
1310
- code: l.invalid_string,
1311
- message: a.message
1312
- }), s.dirty());
1313
- else if (a.kind === "nanoid")
1314
- la.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1315
- validation: "nanoid",
1316
- code: l.invalid_string,
1317
- message: a.message
1318
- }), s.dirty());
1319
- else if (a.kind === "cuid")
1320
- oa.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1321
- validation: "cuid",
1322
- code: l.invalid_string,
1323
- message: a.message
1324
- }), s.dirty());
1325
- else if (a.kind === "cuid2")
1326
- ca.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1327
- validation: "cuid2",
1328
- code: l.invalid_string,
1329
- message: a.message
1330
- }), s.dirty());
1331
- else if (a.kind === "ulid")
1332
- da.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1333
- validation: "ulid",
1334
- code: l.invalid_string,
1335
- message: a.message
1336
- }), s.dirty());
1337
- else if (a.kind === "url")
1338
- try {
1339
- new URL(e.data);
1340
- } catch {
1341
- n = this._getOrReturnCtx(e, n), m(n, {
1342
- validation: "url",
1343
- code: l.invalid_string,
1344
- message: a.message
1345
- }), s.dirty();
1346
- }
1347
- else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1348
- validation: "regex",
1349
- code: l.invalid_string,
1350
- message: a.message
1351
- }), s.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(e, n), m(n, {
1352
- code: l.invalid_string,
1353
- validation: { includes: a.value, position: a.position },
1354
- message: a.message
1355
- }), s.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (n = this._getOrReturnCtx(e, n), m(n, {
1356
- code: l.invalid_string,
1357
- validation: { startsWith: a.value },
1358
- message: a.message
1359
- }), s.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (n = this._getOrReturnCtx(e, n), m(n, {
1360
- code: l.invalid_string,
1361
- validation: { endsWith: a.value },
1362
- message: a.message
1363
- }), s.dirty()) : a.kind === "datetime" ? Ur(a).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1364
- code: l.invalid_string,
1365
- validation: "datetime",
1366
- message: a.message
1367
- }), s.dirty()) : a.kind === "date" ? wa.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1368
- code: l.invalid_string,
1369
- validation: "date",
1370
- message: a.message
1371
- }), s.dirty()) : a.kind === "time" ? ka(a).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1372
- code: l.invalid_string,
1373
- validation: "time",
1374
- message: a.message
1375
- }), s.dirty()) : a.kind === "duration" ? ha.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1376
- validation: "duration",
1377
- code: l.invalid_string,
1378
- message: a.message
1379
- }), s.dirty()) : a.kind === "ip" ? ja(e.data, a.version) || (n = this._getOrReturnCtx(e, n), m(n, {
1380
- validation: "ip",
1381
- code: l.invalid_string,
1382
- message: a.message
1383
- }), s.dirty()) : a.kind === "jwt" ? Ta(e.data, a.alg) || (n = this._getOrReturnCtx(e, n), m(n, {
1384
- validation: "jwt",
1385
- code: l.invalid_string,
1386
- message: a.message
1387
- }), s.dirty()) : a.kind === "cidr" ? Sa(e.data, a.version) || (n = this._getOrReturnCtx(e, n), m(n, {
1388
- validation: "cidr",
1389
- code: l.invalid_string,
1390
- message: a.message
1391
- }), s.dirty()) : a.kind === "base64" ? _a.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1392
- validation: "base64",
1393
- code: l.invalid_string,
1394
- message: a.message
1395
- }), s.dirty()) : a.kind === "base64url" ? ba.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1396
- validation: "base64url",
1397
- code: l.invalid_string,
1398
- message: a.message
1399
- }), s.dirty()) : E.assertNever(a);
1400
- return { status: s.value, value: e.data };
1401
- }
1402
- _regex(e, t, s) {
1403
- return this.refinement((n) => e.test(n), {
1404
- validation: t,
1405
- code: l.invalid_string,
1406
- ...g.errToObj(s)
1407
- });
1408
- }
1409
- _addCheck(e) {
1410
- return new G({
1411
- ...this._def,
1412
- checks: [...this._def.checks, e]
1413
- });
1414
- }
1415
- email(e) {
1416
- return this._addCheck({ kind: "email", ...g.errToObj(e) });
1417
- }
1418
- url(e) {
1419
- return this._addCheck({ kind: "url", ...g.errToObj(e) });
1420
- }
1421
- emoji(e) {
1422
- return this._addCheck({ kind: "emoji", ...g.errToObj(e) });
1423
- }
1424
- uuid(e) {
1425
- return this._addCheck({ kind: "uuid", ...g.errToObj(e) });
1426
- }
1427
- nanoid(e) {
1428
- return this._addCheck({ kind: "nanoid", ...g.errToObj(e) });
1429
- }
1430
- cuid(e) {
1431
- return this._addCheck({ kind: "cuid", ...g.errToObj(e) });
1432
- }
1433
- cuid2(e) {
1434
- return this._addCheck({ kind: "cuid2", ...g.errToObj(e) });
1435
- }
1436
- ulid(e) {
1437
- return this._addCheck({ kind: "ulid", ...g.errToObj(e) });
1438
- }
1439
- base64(e) {
1440
- return this._addCheck({ kind: "base64", ...g.errToObj(e) });
1441
- }
1442
- base64url(e) {
1443
- return this._addCheck({
1444
- kind: "base64url",
1445
- ...g.errToObj(e)
1446
- });
1447
- }
1448
- jwt(e) {
1449
- return this._addCheck({ kind: "jwt", ...g.errToObj(e) });
1450
- }
1451
- ip(e) {
1452
- return this._addCheck({ kind: "ip", ...g.errToObj(e) });
1453
- }
1454
- cidr(e) {
1455
- return this._addCheck({ kind: "cidr", ...g.errToObj(e) });
1456
- }
1457
- datetime(e) {
1458
- var t, s;
1459
- return typeof e == "string" ? this._addCheck({
1460
- kind: "datetime",
1461
- precision: null,
1462
- offset: !1,
1463
- local: !1,
1464
- message: e
1465
- }) : this._addCheck({
1466
- kind: "datetime",
1467
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
1468
- offset: (t = e == null ? void 0 : e.offset) !== null && t !== void 0 ? t : !1,
1469
- local: (s = e == null ? void 0 : e.local) !== null && s !== void 0 ? s : !1,
1470
- ...g.errToObj(e == null ? void 0 : e.message)
1471
- });
1472
- }
1473
- date(e) {
1474
- return this._addCheck({ kind: "date", message: e });
1475
- }
1476
- time(e) {
1477
- return typeof e == "string" ? this._addCheck({
1478
- kind: "time",
1479
- precision: null,
1480
- message: e
1481
- }) : this._addCheck({
1482
- kind: "time",
1483
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
1484
- ...g.errToObj(e == null ? void 0 : e.message)
1485
- });
1486
- }
1487
- duration(e) {
1488
- return this._addCheck({ kind: "duration", ...g.errToObj(e) });
1489
- }
1490
- regex(e, t) {
1491
- return this._addCheck({
1492
- kind: "regex",
1493
- regex: e,
1494
- ...g.errToObj(t)
1495
- });
1496
- }
1497
- includes(e, t) {
1498
- return this._addCheck({
1499
- kind: "includes",
1500
- value: e,
1501
- position: t == null ? void 0 : t.position,
1502
- ...g.errToObj(t == null ? void 0 : t.message)
1503
- });
1504
- }
1505
- startsWith(e, t) {
1506
- return this._addCheck({
1507
- kind: "startsWith",
1508
- value: e,
1509
- ...g.errToObj(t)
1510
- });
1511
- }
1512
- endsWith(e, t) {
1513
- return this._addCheck({
1514
- kind: "endsWith",
1515
- value: e,
1516
- ...g.errToObj(t)
1517
- });
1518
- }
1519
- min(e, t) {
1520
- return this._addCheck({
1521
- kind: "min",
1522
- value: e,
1523
- ...g.errToObj(t)
1524
- });
1525
- }
1526
- max(e, t) {
1527
- return this._addCheck({
1528
- kind: "max",
1529
- value: e,
1530
- ...g.errToObj(t)
1531
- });
1532
- }
1533
- length(e, t) {
1534
- return this._addCheck({
1535
- kind: "length",
1536
- value: e,
1537
- ...g.errToObj(t)
1538
- });
1539
- }
1540
- /**
1541
- * Equivalent to `.min(1)`
1542
- */
1543
- nonempty(e) {
1544
- return this.min(1, g.errToObj(e));
1545
- }
1546
- trim() {
1547
- return new G({
1548
- ...this._def,
1549
- checks: [...this._def.checks, { kind: "trim" }]
1550
- });
1551
- }
1552
- toLowerCase() {
1553
- return new G({
1554
- ...this._def,
1555
- checks: [...this._def.checks, { kind: "toLowerCase" }]
1556
- });
1557
- }
1558
- toUpperCase() {
1559
- return new G({
1560
- ...this._def,
1561
- checks: [...this._def.checks, { kind: "toUpperCase" }]
1562
- });
1563
- }
1564
- get isDatetime() {
1565
- return !!this._def.checks.find((e) => e.kind === "datetime");
1566
- }
1567
- get isDate() {
1568
- return !!this._def.checks.find((e) => e.kind === "date");
1569
- }
1570
- get isTime() {
1571
- return !!this._def.checks.find((e) => e.kind === "time");
1572
- }
1573
- get isDuration() {
1574
- return !!this._def.checks.find((e) => e.kind === "duration");
1575
- }
1576
- get isEmail() {
1577
- return !!this._def.checks.find((e) => e.kind === "email");
1578
- }
1579
- get isURL() {
1580
- return !!this._def.checks.find((e) => e.kind === "url");
1581
- }
1582
- get isEmoji() {
1583
- return !!this._def.checks.find((e) => e.kind === "emoji");
1584
- }
1585
- get isUUID() {
1586
- return !!this._def.checks.find((e) => e.kind === "uuid");
1587
- }
1588
- get isNANOID() {
1589
- return !!this._def.checks.find((e) => e.kind === "nanoid");
1590
- }
1591
- get isCUID() {
1592
- return !!this._def.checks.find((e) => e.kind === "cuid");
1593
- }
1594
- get isCUID2() {
1595
- return !!this._def.checks.find((e) => e.kind === "cuid2");
1596
- }
1597
- get isULID() {
1598
- return !!this._def.checks.find((e) => e.kind === "ulid");
1599
- }
1600
- get isIP() {
1601
- return !!this._def.checks.find((e) => e.kind === "ip");
1602
- }
1603
- get isCIDR() {
1604
- return !!this._def.checks.find((e) => e.kind === "cidr");
1605
- }
1606
- get isBase64() {
1607
- return !!this._def.checks.find((e) => e.kind === "base64");
1608
- }
1609
- get isBase64url() {
1610
- return !!this._def.checks.find((e) => e.kind === "base64url");
1611
- }
1612
- get minLength() {
1613
- let e = null;
1614
- for (const t of this._def.checks)
1615
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
1616
- return e;
1617
- }
1618
- get maxLength() {
1619
- let e = null;
1620
- for (const t of this._def.checks)
1621
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1622
- return e;
1623
- }
1624
- }
1625
- G.create = (r) => {
1626
- var e;
1627
- return new G({
1628
- checks: [],
1629
- typeName: _.ZodString,
1630
- coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
1631
- ...T(r)
1632
- });
1633
- };
1634
- function Ca(r, e) {
1635
- const t = (r.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, a = parseInt(r.toFixed(n).replace(".", "")), i = parseInt(e.toFixed(n).replace(".", ""));
1636
- return a % i / Math.pow(10, n);
1637
- }
1638
- class _e extends S {
1639
- constructor() {
1640
- super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1641
- }
1642
- _parse(e) {
1643
- if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== p.number) {
1644
- const a = this._getOrReturnCtx(e);
1645
- return m(a, {
1646
- code: l.invalid_type,
1647
- expected: p.number,
1648
- received: a.parsedType
1649
- }), b;
1650
- }
1651
- let s;
1652
- const n = new F();
1653
- for (const a of this._def.checks)
1654
- a.kind === "int" ? E.isInteger(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
1655
- code: l.invalid_type,
1656
- expected: "integer",
1657
- received: "float",
1658
- message: a.message
1659
- }), n.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), m(s, {
1660
- code: l.too_small,
1661
- minimum: a.value,
1662
- type: "number",
1663
- inclusive: a.inclusive,
1664
- exact: !1,
1665
- message: a.message
1666
- }), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), m(s, {
1667
- code: l.too_big,
1668
- maximum: a.value,
1669
- type: "number",
1670
- inclusive: a.inclusive,
1671
- exact: !1,
1672
- message: a.message
1673
- }), n.dirty()) : a.kind === "multipleOf" ? Ca(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), m(s, {
1674
- code: l.not_multiple_of,
1675
- multipleOf: a.value,
1676
- message: a.message
1677
- }), n.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
1678
- code: l.not_finite,
1679
- message: a.message
1680
- }), n.dirty()) : E.assertNever(a);
1681
- return { status: n.value, value: e.data };
1682
- }
1683
- gte(e, t) {
1684
- return this.setLimit("min", e, !0, g.toString(t));
1685
- }
1686
- gt(e, t) {
1687
- return this.setLimit("min", e, !1, g.toString(t));
1688
- }
1689
- lte(e, t) {
1690
- return this.setLimit("max", e, !0, g.toString(t));
1691
- }
1692
- lt(e, t) {
1693
- return this.setLimit("max", e, !1, g.toString(t));
1694
- }
1695
- setLimit(e, t, s, n) {
1696
- return new _e({
1697
- ...this._def,
1698
- checks: [
1699
- ...this._def.checks,
1700
- {
1701
- kind: e,
1702
- value: t,
1703
- inclusive: s,
1704
- message: g.toString(n)
1705
- }
1706
- ]
1707
- });
1708
- }
1709
- _addCheck(e) {
1710
- return new _e({
1711
- ...this._def,
1712
- checks: [...this._def.checks, e]
1713
- });
1714
- }
1715
- int(e) {
1716
- return this._addCheck({
1717
- kind: "int",
1718
- message: g.toString(e)
1719
- });
1720
- }
1721
- positive(e) {
1722
- return this._addCheck({
1723
- kind: "min",
1724
- value: 0,
1725
- inclusive: !1,
1726
- message: g.toString(e)
1727
- });
1728
- }
1729
- negative(e) {
1730
- return this._addCheck({
1731
- kind: "max",
1732
- value: 0,
1733
- inclusive: !1,
1734
- message: g.toString(e)
1735
- });
1736
- }
1737
- nonpositive(e) {
1738
- return this._addCheck({
1739
- kind: "max",
1740
- value: 0,
1741
- inclusive: !0,
1742
- message: g.toString(e)
1743
- });
1744
- }
1745
- nonnegative(e) {
1746
- return this._addCheck({
1747
- kind: "min",
1748
- value: 0,
1749
- inclusive: !0,
1750
- message: g.toString(e)
1751
- });
1752
- }
1753
- multipleOf(e, t) {
1754
- return this._addCheck({
1755
- kind: "multipleOf",
1756
- value: e,
1757
- message: g.toString(t)
1758
- });
1759
- }
1760
- finite(e) {
1761
- return this._addCheck({
1762
- kind: "finite",
1763
- message: g.toString(e)
1764
- });
1765
- }
1766
- safe(e) {
1767
- return this._addCheck({
1768
- kind: "min",
1769
- inclusive: !0,
1770
- value: Number.MIN_SAFE_INTEGER,
1771
- message: g.toString(e)
1772
- })._addCheck({
1773
- kind: "max",
1774
- inclusive: !0,
1775
- value: Number.MAX_SAFE_INTEGER,
1776
- message: g.toString(e)
1777
- });
1778
- }
1779
- get minValue() {
1780
- let e = null;
1781
- for (const t of this._def.checks)
1782
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
1783
- return e;
1784
- }
1785
- get maxValue() {
1786
- let e = null;
1787
- for (const t of this._def.checks)
1788
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1789
- return e;
1790
- }
1791
- get isInt() {
1792
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && E.isInteger(e.value));
1793
- }
1794
- get isFinite() {
1795
- let e = null, t = null;
1796
- for (const s of this._def.checks) {
1797
- if (s.kind === "finite" || s.kind === "int" || s.kind === "multipleOf")
1798
- return !0;
1799
- s.kind === "min" ? (t === null || s.value > t) && (t = s.value) : s.kind === "max" && (e === null || s.value < e) && (e = s.value);
1800
- }
1801
- return Number.isFinite(t) && Number.isFinite(e);
1802
- }
1803
- }
1804
- _e.create = (r) => new _e({
1805
- checks: [],
1806
- typeName: _.ZodNumber,
1807
- coerce: (r == null ? void 0 : r.coerce) || !1,
1808
- ...T(r)
1809
- });
1810
- class be extends S {
1811
- constructor() {
1812
- super(...arguments), this.min = this.gte, this.max = this.lte;
1813
- }
1814
- _parse(e) {
1815
- if (this._def.coerce)
1816
- try {
1817
- e.data = BigInt(e.data);
1818
- } catch {
1819
- return this._getInvalidInput(e);
1820
- }
1821
- if (this._getType(e) !== p.bigint)
1822
- return this._getInvalidInput(e);
1823
- let s;
1824
- const n = new F();
1825
- for (const a of this._def.checks)
1826
- a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), m(s, {
1827
- code: l.too_small,
1828
- type: "bigint",
1829
- minimum: a.value,
1830
- inclusive: a.inclusive,
1831
- message: a.message
1832
- }), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), m(s, {
1833
- code: l.too_big,
1834
- type: "bigint",
1835
- maximum: a.value,
1836
- inclusive: a.inclusive,
1837
- message: a.message
1838
- }), n.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (s = this._getOrReturnCtx(e, s), m(s, {
1839
- code: l.not_multiple_of,
1840
- multipleOf: a.value,
1841
- message: a.message
1842
- }), n.dirty()) : E.assertNever(a);
1843
- return { status: n.value, value: e.data };
1844
- }
1845
- _getInvalidInput(e) {
1846
- const t = this._getOrReturnCtx(e);
1847
- return m(t, {
1848
- code: l.invalid_type,
1849
- expected: p.bigint,
1850
- received: t.parsedType
1851
- }), b;
1852
- }
1853
- gte(e, t) {
1854
- return this.setLimit("min", e, !0, g.toString(t));
1855
- }
1856
- gt(e, t) {
1857
- return this.setLimit("min", e, !1, g.toString(t));
1858
- }
1859
- lte(e, t) {
1860
- return this.setLimit("max", e, !0, g.toString(t));
1861
- }
1862
- lt(e, t) {
1863
- return this.setLimit("max", e, !1, g.toString(t));
1864
- }
1865
- setLimit(e, t, s, n) {
1866
- return new be({
1867
- ...this._def,
1868
- checks: [
1869
- ...this._def.checks,
1870
- {
1871
- kind: e,
1872
- value: t,
1873
- inclusive: s,
1874
- message: g.toString(n)
1875
- }
1876
- ]
1877
- });
1878
- }
1879
- _addCheck(e) {
1880
- return new be({
1881
- ...this._def,
1882
- checks: [...this._def.checks, e]
1883
- });
1884
- }
1885
- positive(e) {
1886
- return this._addCheck({
1887
- kind: "min",
1888
- value: BigInt(0),
1889
- inclusive: !1,
1890
- message: g.toString(e)
1891
- });
1892
- }
1893
- negative(e) {
1894
- return this._addCheck({
1895
- kind: "max",
1896
- value: BigInt(0),
1897
- inclusive: !1,
1898
- message: g.toString(e)
1899
- });
1900
- }
1901
- nonpositive(e) {
1902
- return this._addCheck({
1903
- kind: "max",
1904
- value: BigInt(0),
1905
- inclusive: !0,
1906
- message: g.toString(e)
1907
- });
1908
- }
1909
- nonnegative(e) {
1910
- return this._addCheck({
1911
- kind: "min",
1912
- value: BigInt(0),
1913
- inclusive: !0,
1914
- message: g.toString(e)
1915
- });
1916
- }
1917
- multipleOf(e, t) {
1918
- return this._addCheck({
1919
- kind: "multipleOf",
1920
- value: e,
1921
- message: g.toString(t)
1922
- });
1923
- }
1924
- get minValue() {
1925
- let e = null;
1926
- for (const t of this._def.checks)
1927
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
1928
- return e;
1929
- }
1930
- get maxValue() {
1931
- let e = null;
1932
- for (const t of this._def.checks)
1933
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1934
- return e;
1935
- }
1936
- }
1937
- be.create = (r) => {
1938
- var e;
1939
- return new be({
1940
- checks: [],
1941
- typeName: _.ZodBigInt,
1942
- coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
1943
- ...T(r)
1944
- });
1945
- };
1946
- class Ue extends S {
1947
- _parse(e) {
1948
- if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
1949
- const s = this._getOrReturnCtx(e);
1950
- return m(s, {
1951
- code: l.invalid_type,
1952
- expected: p.boolean,
1953
- received: s.parsedType
1954
- }), b;
1955
- }
1956
- return L(e.data);
1957
- }
1958
- }
1959
- Ue.create = (r) => new Ue({
1960
- typeName: _.ZodBoolean,
1961
- coerce: (r == null ? void 0 : r.coerce) || !1,
1962
- ...T(r)
1963
- });
1964
- class Ce extends S {
1965
- _parse(e) {
1966
- if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== p.date) {
1967
- const a = this._getOrReturnCtx(e);
1968
- return m(a, {
1969
- code: l.invalid_type,
1970
- expected: p.date,
1971
- received: a.parsedType
1972
- }), b;
1973
- }
1974
- if (isNaN(e.data.getTime())) {
1975
- const a = this._getOrReturnCtx(e);
1976
- return m(a, {
1977
- code: l.invalid_date
1978
- }), b;
1979
- }
1980
- const s = new F();
1981
- let n;
1982
- for (const a of this._def.checks)
1983
- a.kind === "min" ? e.data.getTime() < a.value && (n = this._getOrReturnCtx(e, n), m(n, {
1984
- code: l.too_small,
1985
- message: a.message,
1986
- inclusive: !0,
1987
- exact: !1,
1988
- minimum: a.value,
1989
- type: "date"
1990
- }), s.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (n = this._getOrReturnCtx(e, n), m(n, {
1991
- code: l.too_big,
1992
- message: a.message,
1993
- inclusive: !0,
1994
- exact: !1,
1995
- maximum: a.value,
1996
- type: "date"
1997
- }), s.dirty()) : E.assertNever(a);
1998
- return {
1999
- status: s.value,
2000
- value: new Date(e.data.getTime())
2001
- };
2002
- }
2003
- _addCheck(e) {
2004
- return new Ce({
2005
- ...this._def,
2006
- checks: [...this._def.checks, e]
2007
- });
2008
- }
2009
- min(e, t) {
2010
- return this._addCheck({
2011
- kind: "min",
2012
- value: e.getTime(),
2013
- message: g.toString(t)
2014
- });
2015
- }
2016
- max(e, t) {
2017
- return this._addCheck({
2018
- kind: "max",
2019
- value: e.getTime(),
2020
- message: g.toString(t)
2021
- });
2022
- }
2023
- get minDate() {
2024
- let e = null;
2025
- for (const t of this._def.checks)
2026
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
2027
- return e != null ? new Date(e) : null;
2028
- }
2029
- get maxDate() {
2030
- let e = null;
2031
- for (const t of this._def.checks)
2032
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
2033
- return e != null ? new Date(e) : null;
2034
- }
2035
- }
2036
- Ce.create = (r) => new Ce({
2037
- checks: [],
2038
- coerce: (r == null ? void 0 : r.coerce) || !1,
2039
- typeName: _.ZodDate,
2040
- ...T(r)
2041
- });
2042
- class gt extends S {
2043
- _parse(e) {
2044
- if (this._getType(e) !== p.symbol) {
2045
- const s = this._getOrReturnCtx(e);
2046
- return m(s, {
2047
- code: l.invalid_type,
2048
- expected: p.symbol,
2049
- received: s.parsedType
2050
- }), b;
2051
- }
2052
- return L(e.data);
2053
- }
2054
- }
2055
- gt.create = (r) => new gt({
2056
- typeName: _.ZodSymbol,
2057
- ...T(r)
2058
- });
2059
- class Qe extends S {
2060
- _parse(e) {
2061
- if (this._getType(e) !== p.undefined) {
2062
- const s = this._getOrReturnCtx(e);
2063
- return m(s, {
2064
- code: l.invalid_type,
2065
- expected: p.undefined,
2066
- received: s.parsedType
2067
- }), b;
2068
- }
2069
- return L(e.data);
2070
- }
2071
- }
2072
- Qe.create = (r) => new Qe({
2073
- typeName: _.ZodUndefined,
2074
- ...T(r)
2075
- });
2076
- class He extends S {
2077
- _parse(e) {
2078
- if (this._getType(e) !== p.null) {
2079
- const s = this._getOrReturnCtx(e);
2080
- return m(s, {
2081
- code: l.invalid_type,
2082
- expected: p.null,
2083
- received: s.parsedType
2084
- }), b;
2085
- }
2086
- return L(e.data);
2087
- }
2088
- }
2089
- He.create = (r) => new He({
2090
- typeName: _.ZodNull,
2091
- ...T(r)
2092
- });
2093
- class ze extends S {
2094
- constructor() {
2095
- super(...arguments), this._any = !0;
2096
- }
2097
- _parse(e) {
2098
- return L(e.data);
2099
- }
2100
- }
2101
- ze.create = (r) => new ze({
2102
- typeName: _.ZodAny,
2103
- ...T(r)
2104
- });
2105
- class Te extends S {
2106
- constructor() {
2107
- super(...arguments), this._unknown = !0;
2108
- }
2109
- _parse(e) {
2110
- return L(e.data);
2111
- }
2112
- }
2113
- Te.create = (r) => new Te({
2114
- typeName: _.ZodUnknown,
2115
- ...T(r)
2116
- });
2117
- class he extends S {
2118
- _parse(e) {
2119
- const t = this._getOrReturnCtx(e);
2120
- return m(t, {
2121
- code: l.invalid_type,
2122
- expected: p.never,
2123
- received: t.parsedType
2124
- }), b;
2125
- }
2126
- }
2127
- he.create = (r) => new he({
2128
- typeName: _.ZodNever,
2129
- ...T(r)
2130
- });
2131
- class vt extends S {
2132
- _parse(e) {
2133
- if (this._getType(e) !== p.undefined) {
2134
- const s = this._getOrReturnCtx(e);
2135
- return m(s, {
2136
- code: l.invalid_type,
2137
- expected: p.void,
2138
- received: s.parsedType
2139
- }), b;
2140
- }
2141
- return L(e.data);
2142
- }
2143
- }
2144
- vt.create = (r) => new vt({
2145
- typeName: _.ZodVoid,
2146
- ...T(r)
2147
- });
2148
- class J extends S {
2149
- _parse(e) {
2150
- const { ctx: t, status: s } = this._processInputParams(e), n = this._def;
2151
- if (t.parsedType !== p.array)
2152
- return m(t, {
2153
- code: l.invalid_type,
2154
- expected: p.array,
2155
- received: t.parsedType
2156
- }), b;
2157
- if (n.exactLength !== null) {
2158
- const i = t.data.length > n.exactLength.value, c = t.data.length < n.exactLength.value;
2159
- (i || c) && (m(t, {
2160
- code: i ? l.too_big : l.too_small,
2161
- minimum: c ? n.exactLength.value : void 0,
2162
- maximum: i ? n.exactLength.value : void 0,
2163
- type: "array",
2164
- inclusive: !0,
2165
- exact: !0,
2166
- message: n.exactLength.message
2167
- }), s.dirty());
2168
- }
2169
- if (n.minLength !== null && t.data.length < n.minLength.value && (m(t, {
2170
- code: l.too_small,
2171
- minimum: n.minLength.value,
2172
- type: "array",
2173
- inclusive: !0,
2174
- exact: !1,
2175
- message: n.minLength.message
2176
- }), s.dirty()), n.maxLength !== null && t.data.length > n.maxLength.value && (m(t, {
2177
- code: l.too_big,
2178
- maximum: n.maxLength.value,
2179
- type: "array",
2180
- inclusive: !0,
2181
- exact: !1,
2182
- message: n.maxLength.message
2183
- }), s.dirty()), t.common.async)
2184
- return Promise.all([...t.data].map((i, c) => n.type._parseAsync(new re(t, i, t.path, c)))).then((i) => F.mergeArray(s, i));
2185
- const a = [...t.data].map((i, c) => n.type._parseSync(new re(t, i, t.path, c)));
2186
- return F.mergeArray(s, a);
2187
- }
2188
- get element() {
2189
- return this._def.type;
2190
- }
2191
- min(e, t) {
2192
- return new J({
2193
- ...this._def,
2194
- minLength: { value: e, message: g.toString(t) }
2195
- });
2196
- }
2197
- max(e, t) {
2198
- return new J({
2199
- ...this._def,
2200
- maxLength: { value: e, message: g.toString(t) }
2201
- });
2202
- }
2203
- length(e, t) {
2204
- return new J({
2205
- ...this._def,
2206
- exactLength: { value: e, message: g.toString(t) }
2207
- });
2208
- }
2209
- nonempty(e) {
2210
- return this.min(1, e);
2211
- }
2212
- }
2213
- J.create = (r, e) => new J({
2214
- type: r,
2215
- minLength: null,
2216
- maxLength: null,
2217
- exactLength: null,
2218
- typeName: _.ZodArray,
2219
- ...T(e)
2220
- });
2221
- function Oe(r) {
2222
- if (r instanceof I) {
2223
- const e = {};
2224
- for (const t in r.shape) {
2225
- const s = r.shape[t];
2226
- e[t] = te.create(Oe(s));
2227
- }
2228
- return new I({
2229
- ...r._def,
2230
- shape: () => e
2231
- });
2232
- } else return r instanceof J ? new J({
2233
- ...r._def,
2234
- type: Oe(r.element)
2235
- }) : r instanceof te ? te.create(Oe(r.unwrap())) : r instanceof ke ? ke.create(Oe(r.unwrap())) : r instanceof se ? se.create(r.items.map((e) => Oe(e))) : r;
2236
- }
2237
- class I extends S {
2238
- constructor() {
2239
- super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
2240
- }
2241
- _getCached() {
2242
- if (this._cached !== null)
2243
- return this._cached;
2244
- const e = this._def.shape(), t = E.objectKeys(e);
2245
- return this._cached = { shape: e, keys: t };
2246
- }
2247
- _parse(e) {
2248
- if (this._getType(e) !== p.object) {
2249
- const d = this._getOrReturnCtx(e);
2250
- return m(d, {
2251
- code: l.invalid_type,
2252
- expected: p.object,
2253
- received: d.parsedType
2254
- }), b;
2255
- }
2256
- const { status: s, ctx: n } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), c = [];
2257
- if (!(this._def.catchall instanceof he && this._def.unknownKeys === "strip"))
2258
- for (const d in n.data)
2259
- i.includes(d) || c.push(d);
2260
- const u = [];
2261
- for (const d of i) {
2262
- const f = a[d], x = n.data[d];
2263
- u.push({
2264
- key: { status: "valid", value: d },
2265
- value: f._parse(new re(n, x, n.path, d)),
2266
- alwaysSet: d in n.data
2267
- });
2268
- }
2269
- if (this._def.catchall instanceof he) {
2270
- const d = this._def.unknownKeys;
2271
- if (d === "passthrough")
2272
- for (const f of c)
2273
- u.push({
2274
- key: { status: "valid", value: f },
2275
- value: { status: "valid", value: n.data[f] }
2276
- });
2277
- else if (d === "strict")
2278
- c.length > 0 && (m(n, {
2279
- code: l.unrecognized_keys,
2280
- keys: c
2281
- }), s.dirty());
2282
- else if (d !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
2283
- } else {
2284
- const d = this._def.catchall;
2285
- for (const f of c) {
2286
- const x = n.data[f];
2287
- u.push({
2288
- key: { status: "valid", value: f },
2289
- value: d._parse(
2290
- new re(n, x, n.path, f)
2291
- //, ctx.child(key), value, getParsedType(value)
2292
- ),
2293
- alwaysSet: f in n.data
2294
- });
2295
- }
2296
- }
2297
- return n.common.async ? Promise.resolve().then(async () => {
2298
- const d = [];
2299
- for (const f of u) {
2300
- const x = await f.key, w = await f.value;
2301
- d.push({
2302
- key: x,
2303
- value: w,
2304
- alwaysSet: f.alwaysSet
2305
- });
2306
- }
2307
- return d;
2308
- }).then((d) => F.mergeObjectSync(s, d)) : F.mergeObjectSync(s, u);
2309
- }
2310
- get shape() {
2311
- return this._def.shape();
2312
- }
2313
- strict(e) {
2314
- return g.errToObj, new I({
2315
- ...this._def,
2316
- unknownKeys: "strict",
2317
- ...e !== void 0 ? {
2318
- errorMap: (t, s) => {
2319
- var n, a, i, c;
2320
- const u = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
2321
- return t.code === "unrecognized_keys" ? {
2322
- message: (c = g.errToObj(e).message) !== null && c !== void 0 ? c : u
2323
- } : {
2324
- message: u
2325
- };
2326
- }
2327
- } : {}
2328
- });
2329
- }
2330
- strip() {
2331
- return new I({
2332
- ...this._def,
2333
- unknownKeys: "strip"
2334
- });
2335
- }
2336
- passthrough() {
2337
- return new I({
2338
- ...this._def,
2339
- unknownKeys: "passthrough"
2340
- });
2341
- }
2342
- // const AugmentFactory =
2343
- // <Def extends ZodObjectDef>(def: Def) =>
2344
- // <Augmentation extends ZodRawShape>(
2345
- // augmentation: Augmentation
2346
- // ): ZodObject<
2347
- // extendShape<ReturnType<Def["shape"]>, Augmentation>,
2348
- // Def["unknownKeys"],
2349
- // Def["catchall"]
2350
- // > => {
2351
- // return new ZodObject({
2352
- // ...def,
2353
- // shape: () => ({
2354
- // ...def.shape(),
2355
- // ...augmentation,
2356
- // }),
2357
- // }) as any;
2358
- // };
2359
- extend(e) {
2360
- return new I({
2361
- ...this._def,
2362
- shape: () => ({
2363
- ...this._def.shape(),
2364
- ...e
2365
- })
2366
- });
2367
- }
2368
- /**
2369
- * Prior to zod@1.0.12 there was a bug in the
2370
- * inferred type of merged objects. Please
2371
- * upgrade if you are experiencing issues.
2372
- */
2373
- merge(e) {
2374
- return new I({
2375
- unknownKeys: e._def.unknownKeys,
2376
- catchall: e._def.catchall,
2377
- shape: () => ({
2378
- ...this._def.shape(),
2379
- ...e._def.shape()
2380
- }),
2381
- typeName: _.ZodObject
2382
- });
2383
- }
2384
- // merge<
2385
- // Incoming extends AnyZodObject,
2386
- // Augmentation extends Incoming["shape"],
2387
- // NewOutput extends {
2388
- // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
2389
- // ? Augmentation[k]["_output"]
2390
- // : k extends keyof Output
2391
- // ? Output[k]
2392
- // : never;
2393
- // },
2394
- // NewInput extends {
2395
- // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
2396
- // ? Augmentation[k]["_input"]
2397
- // : k extends keyof Input
2398
- // ? Input[k]
2399
- // : never;
2400
- // }
2401
- // >(
2402
- // merging: Incoming
2403
- // ): ZodObject<
2404
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
2405
- // Incoming["_def"]["unknownKeys"],
2406
- // Incoming["_def"]["catchall"],
2407
- // NewOutput,
2408
- // NewInput
2409
- // > {
2410
- // const merged: any = new ZodObject({
2411
- // unknownKeys: merging._def.unknownKeys,
2412
- // catchall: merging._def.catchall,
2413
- // shape: () =>
2414
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
2415
- // typeName: ZodFirstPartyTypeKind.ZodObject,
2416
- // }) as any;
2417
- // return merged;
2418
- // }
2419
- setKey(e, t) {
2420
- return this.augment({ [e]: t });
2421
- }
2422
- // merge<Incoming extends AnyZodObject>(
2423
- // merging: Incoming
2424
- // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
2425
- // ZodObject<
2426
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
2427
- // Incoming["_def"]["unknownKeys"],
2428
- // Incoming["_def"]["catchall"]
2429
- // > {
2430
- // // const mergedShape = objectUtil.mergeShapes(
2431
- // // this._def.shape(),
2432
- // // merging._def.shape()
2433
- // // );
2434
- // const merged: any = new ZodObject({
2435
- // unknownKeys: merging._def.unknownKeys,
2436
- // catchall: merging._def.catchall,
2437
- // shape: () =>
2438
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
2439
- // typeName: ZodFirstPartyTypeKind.ZodObject,
2440
- // }) as any;
2441
- // return merged;
2442
- // }
2443
- catchall(e) {
2444
- return new I({
2445
- ...this._def,
2446
- catchall: e
2447
- });
2448
- }
2449
- pick(e) {
2450
- const t = {};
2451
- return E.objectKeys(e).forEach((s) => {
2452
- e[s] && this.shape[s] && (t[s] = this.shape[s]);
2453
- }), new I({
2454
- ...this._def,
2455
- shape: () => t
2456
- });
2457
- }
2458
- omit(e) {
2459
- const t = {};
2460
- return E.objectKeys(this.shape).forEach((s) => {
2461
- e[s] || (t[s] = this.shape[s]);
2462
- }), new I({
2463
- ...this._def,
2464
- shape: () => t
2465
- });
2466
- }
2467
- /**
2468
- * @deprecated
2469
- */
2470
- deepPartial() {
2471
- return Oe(this);
2472
- }
2473
- partial(e) {
2474
- const t = {};
2475
- return E.objectKeys(this.shape).forEach((s) => {
2476
- const n = this.shape[s];
2477
- e && !e[s] ? t[s] = n : t[s] = n.optional();
2478
- }), new I({
2479
- ...this._def,
2480
- shape: () => t
2481
- });
2482
- }
2483
- required(e) {
2484
- const t = {};
2485
- return E.objectKeys(this.shape).forEach((s) => {
2486
- if (e && !e[s])
2487
- t[s] = this.shape[s];
2488
- else {
2489
- let a = this.shape[s];
2490
- for (; a instanceof te; )
2491
- a = a._def.innerType;
2492
- t[s] = a;
2493
- }
2494
- }), new I({
2495
- ...this._def,
2496
- shape: () => t
2497
- });
2498
- }
2499
- keyof() {
2500
- return Qr(E.objectKeys(this.shape));
2501
- }
2502
- }
2503
- I.create = (r, e) => new I({
2504
- shape: () => r,
2505
- unknownKeys: "strip",
2506
- catchall: he.create(),
2507
- typeName: _.ZodObject,
2508
- ...T(e)
2509
- });
2510
- I.strictCreate = (r, e) => new I({
2511
- shape: () => r,
2512
- unknownKeys: "strict",
2513
- catchall: he.create(),
2514
- typeName: _.ZodObject,
2515
- ...T(e)
2516
- });
2517
- I.lazycreate = (r, e) => new I({
2518
- shape: r,
2519
- unknownKeys: "strip",
2520
- catchall: he.create(),
2521
- typeName: _.ZodObject,
2522
- ...T(e)
2523
- });
2524
- class We extends S {
2525
- _parse(e) {
2526
- const { ctx: t } = this._processInputParams(e), s = this._def.options;
2527
- function n(a) {
2528
- for (const c of a)
2529
- if (c.result.status === "valid")
2530
- return c.result;
2531
- for (const c of a)
2532
- if (c.result.status === "dirty")
2533
- return t.common.issues.push(...c.ctx.common.issues), c.result;
2534
- const i = a.map((c) => new H(c.ctx.common.issues));
2535
- return m(t, {
2536
- code: l.invalid_union,
2537
- unionErrors: i
2538
- }), b;
2539
- }
2540
- if (t.common.async)
2541
- return Promise.all(s.map(async (a) => {
2542
- const i = {
2543
- ...t,
2544
- common: {
2545
- ...t.common,
2546
- issues: []
2547
- },
2548
- parent: null
2549
- };
2550
- return {
2551
- result: await a._parseAsync({
2552
- data: t.data,
2553
- path: t.path,
2554
- parent: i
2555
- }),
2556
- ctx: i
2557
- };
2558
- })).then(n);
2559
- {
2560
- let a;
2561
- const i = [];
2562
- for (const u of s) {
2563
- const d = {
2564
- ...t,
2565
- common: {
2566
- ...t.common,
2567
- issues: []
2568
- },
2569
- parent: null
2570
- }, f = u._parseSync({
2571
- data: t.data,
2572
- path: t.path,
2573
- parent: d
2574
- });
2575
- if (f.status === "valid")
2576
- return f;
2577
- f.status === "dirty" && !a && (a = { result: f, ctx: d }), d.common.issues.length && i.push(d.common.issues);
2578
- }
2579
- if (a)
2580
- return t.common.issues.push(...a.ctx.common.issues), a.result;
2581
- const c = i.map((u) => new H(u));
2582
- return m(t, {
2583
- code: l.invalid_union,
2584
- unionErrors: c
2585
- }), b;
2586
- }
2587
- }
2588
- get options() {
2589
- return this._def.options;
2590
- }
2591
- }
2592
- We.create = (r, e) => new We({
2593
- options: r,
2594
- typeName: _.ZodUnion,
2595
- ...T(e)
2596
- });
2597
- const de = (r) => r instanceof Ge ? de(r.schema) : r instanceof X ? de(r.innerType()) : r instanceof Je ? [r.value] : r instanceof we ? r.options : r instanceof Xe ? E.objectValues(r.enum) : r instanceof et ? de(r._def.innerType) : r instanceof Qe ? [void 0] : r instanceof He ? [null] : r instanceof te ? [void 0, ...de(r.unwrap())] : r instanceof ke ? [null, ...de(r.unwrap())] : r instanceof Bt || r instanceof rt ? de(r.unwrap()) : r instanceof tt ? de(r._def.innerType) : [];
2598
- class jt extends S {
2599
- _parse(e) {
2600
- const { ctx: t } = this._processInputParams(e);
2601
- if (t.parsedType !== p.object)
2602
- return m(t, {
2603
- code: l.invalid_type,
2604
- expected: p.object,
2605
- received: t.parsedType
2606
- }), b;
2607
- const s = this.discriminator, n = t.data[s], a = this.optionsMap.get(n);
2608
- return a ? t.common.async ? a._parseAsync({
2609
- data: t.data,
2610
- path: t.path,
2611
- parent: t
2612
- }) : a._parseSync({
2613
- data: t.data,
2614
- path: t.path,
2615
- parent: t
2616
- }) : (m(t, {
2617
- code: l.invalid_union_discriminator,
2618
- options: Array.from(this.optionsMap.keys()),
2619
- path: [s]
2620
- }), b);
2621
- }
2622
- get discriminator() {
2623
- return this._def.discriminator;
2624
- }
2625
- get options() {
2626
- return this._def.options;
2627
- }
2628
- get optionsMap() {
2629
- return this._def.optionsMap;
2630
- }
2631
- /**
2632
- * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
2633
- * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
2634
- * have a different value for each object in the union.
2635
- * @param discriminator the name of the discriminator property
2636
- * @param types an array of object schemas
2637
- * @param params
2638
- */
2639
- static create(e, t, s) {
2640
- const n = /* @__PURE__ */ new Map();
2641
- for (const a of t) {
2642
- const i = de(a.shape[e]);
2643
- if (!i.length)
2644
- throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
2645
- for (const c of i) {
2646
- if (n.has(c))
2647
- throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);
2648
- n.set(c, a);
2649
- }
2650
- }
2651
- return new jt({
2652
- typeName: _.ZodDiscriminatedUnion,
2653
- discriminator: e,
2654
- options: t,
2655
- optionsMap: n,
2656
- ...T(s)
2657
- });
2658
- }
2659
- }
2660
- function Dt(r, e) {
2661
- const t = ue(r), s = ue(e);
2662
- if (r === e)
2663
- return { valid: !0, data: r };
2664
- if (t === p.object && s === p.object) {
2665
- const n = E.objectKeys(e), a = E.objectKeys(r).filter((c) => n.indexOf(c) !== -1), i = { ...r, ...e };
2666
- for (const c of a) {
2667
- const u = Dt(r[c], e[c]);
2668
- if (!u.valid)
2669
- return { valid: !1 };
2670
- i[c] = u.data;
2671
- }
2672
- return { valid: !0, data: i };
2673
- } else if (t === p.array && s === p.array) {
2674
- if (r.length !== e.length)
2675
- return { valid: !1 };
2676
- const n = [];
2677
- for (let a = 0; a < r.length; a++) {
2678
- const i = r[a], c = e[a], u = Dt(i, c);
2679
- if (!u.valid)
2680
- return { valid: !1 };
2681
- n.push(u.data);
2682
- }
2683
- return { valid: !0, data: n };
2684
- } else return t === p.date && s === p.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
2685
- }
2686
- class Ye extends S {
2687
- _parse(e) {
2688
- const { status: t, ctx: s } = this._processInputParams(e), n = (a, i) => {
2689
- if (Zt(a) || Zt(i))
2690
- return b;
2691
- const c = Dt(a.value, i.value);
2692
- return c.valid ? (($t(a) || $t(i)) && t.dirty(), { status: t.value, value: c.data }) : (m(s, {
2693
- code: l.invalid_intersection_types
2694
- }), b);
2695
- };
2696
- return s.common.async ? Promise.all([
2697
- this._def.left._parseAsync({
2698
- data: s.data,
2699
- path: s.path,
2700
- parent: s
2701
- }),
2702
- this._def.right._parseAsync({
2703
- data: s.data,
2704
- path: s.path,
2705
- parent: s
2706
- })
2707
- ]).then(([a, i]) => n(a, i)) : n(this._def.left._parseSync({
2708
- data: s.data,
2709
- path: s.path,
2710
- parent: s
2711
- }), this._def.right._parseSync({
2712
- data: s.data,
2713
- path: s.path,
2714
- parent: s
2715
- }));
2716
- }
2717
- }
2718
- Ye.create = (r, e, t) => new Ye({
2719
- left: r,
2720
- right: e,
2721
- typeName: _.ZodIntersection,
2722
- ...T(t)
2723
- });
2724
- class se extends S {
2725
- _parse(e) {
2726
- const { status: t, ctx: s } = this._processInputParams(e);
2727
- if (s.parsedType !== p.array)
2728
- return m(s, {
2729
- code: l.invalid_type,
2730
- expected: p.array,
2731
- received: s.parsedType
2732
- }), b;
2733
- if (s.data.length < this._def.items.length)
2734
- return m(s, {
2735
- code: l.too_small,
2736
- minimum: this._def.items.length,
2737
- inclusive: !0,
2738
- exact: !1,
2739
- type: "array"
2740
- }), b;
2741
- !this._def.rest && s.data.length > this._def.items.length && (m(s, {
2742
- code: l.too_big,
2743
- maximum: this._def.items.length,
2744
- inclusive: !0,
2745
- exact: !1,
2746
- type: "array"
2747
- }), t.dirty());
2748
- const a = [...s.data].map((i, c) => {
2749
- const u = this._def.items[c] || this._def.rest;
2750
- return u ? u._parse(new re(s, i, s.path, c)) : null;
2751
- }).filter((i) => !!i);
2752
- return s.common.async ? Promise.all(a).then((i) => F.mergeArray(t, i)) : F.mergeArray(t, a);
2753
- }
2754
- get items() {
2755
- return this._def.items;
2756
- }
2757
- rest(e) {
2758
- return new se({
2759
- ...this._def,
2760
- rest: e
2761
- });
2762
- }
2763
- }
2764
- se.create = (r, e) => {
2765
- if (!Array.isArray(r))
2766
- throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2767
- return new se({
2768
- items: r,
2769
- typeName: _.ZodTuple,
2770
- rest: null,
2771
- ...T(e)
2772
- });
2773
- };
2774
- class Ke extends S {
2775
- get keySchema() {
2776
- return this._def.keyType;
2777
- }
2778
- get valueSchema() {
2779
- return this._def.valueType;
2780
- }
2781
- _parse(e) {
2782
- const { status: t, ctx: s } = this._processInputParams(e);
2783
- if (s.parsedType !== p.object)
2784
- return m(s, {
2785
- code: l.invalid_type,
2786
- expected: p.object,
2787
- received: s.parsedType
2788
- }), b;
2789
- const n = [], a = this._def.keyType, i = this._def.valueType;
2790
- for (const c in s.data)
2791
- n.push({
2792
- key: a._parse(new re(s, c, s.path, c)),
2793
- value: i._parse(new re(s, s.data[c], s.path, c)),
2794
- alwaysSet: c in s.data
2795
- });
2796
- return s.common.async ? F.mergeObjectAsync(t, n) : F.mergeObjectSync(t, n);
2797
- }
2798
- get element() {
2799
- return this._def.valueType;
2800
- }
2801
- static create(e, t, s) {
2802
- return t instanceof S ? new Ke({
2803
- keyType: e,
2804
- valueType: t,
2805
- typeName: _.ZodRecord,
2806
- ...T(s)
2807
- }) : new Ke({
2808
- keyType: G.create(),
2809
- valueType: e,
2810
- typeName: _.ZodRecord,
2811
- ...T(t)
2812
- });
2813
- }
2814
- }
2815
- class yt extends S {
2816
- get keySchema() {
2817
- return this._def.keyType;
2818
- }
2819
- get valueSchema() {
2820
- return this._def.valueType;
2821
- }
2822
- _parse(e) {
2823
- const { status: t, ctx: s } = this._processInputParams(e);
2824
- if (s.parsedType !== p.map)
2825
- return m(s, {
2826
- code: l.invalid_type,
2827
- expected: p.map,
2828
- received: s.parsedType
2829
- }), b;
2830
- const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([c, u], d) => ({
2831
- key: n._parse(new re(s, c, s.path, [d, "key"])),
2832
- value: a._parse(new re(s, u, s.path, [d, "value"]))
2833
- }));
2834
- if (s.common.async) {
2835
- const c = /* @__PURE__ */ new Map();
2836
- return Promise.resolve().then(async () => {
2837
- for (const u of i) {
2838
- const d = await u.key, f = await u.value;
2839
- if (d.status === "aborted" || f.status === "aborted")
2840
- return b;
2841
- (d.status === "dirty" || f.status === "dirty") && t.dirty(), c.set(d.value, f.value);
2842
- }
2843
- return { status: t.value, value: c };
2844
- });
2845
- } else {
2846
- const c = /* @__PURE__ */ new Map();
2847
- for (const u of i) {
2848
- const d = u.key, f = u.value;
2849
- if (d.status === "aborted" || f.status === "aborted")
2850
- return b;
2851
- (d.status === "dirty" || f.status === "dirty") && t.dirty(), c.set(d.value, f.value);
2852
- }
2853
- return { status: t.value, value: c };
2854
- }
2855
- }
2856
- }
2857
- yt.create = (r, e, t) => new yt({
2858
- valueType: e,
2859
- keyType: r,
2860
- typeName: _.ZodMap,
2861
- ...T(t)
2862
- });
2863
- class Ne extends S {
2864
- _parse(e) {
2865
- const { status: t, ctx: s } = this._processInputParams(e);
2866
- if (s.parsedType !== p.set)
2867
- return m(s, {
2868
- code: l.invalid_type,
2869
- expected: p.set,
2870
- received: s.parsedType
2871
- }), b;
2872
- const n = this._def;
2873
- n.minSize !== null && s.data.size < n.minSize.value && (m(s, {
2874
- code: l.too_small,
2875
- minimum: n.minSize.value,
2876
- type: "set",
2877
- inclusive: !0,
2878
- exact: !1,
2879
- message: n.minSize.message
2880
- }), t.dirty()), n.maxSize !== null && s.data.size > n.maxSize.value && (m(s, {
2881
- code: l.too_big,
2882
- maximum: n.maxSize.value,
2883
- type: "set",
2884
- inclusive: !0,
2885
- exact: !1,
2886
- message: n.maxSize.message
2887
- }), t.dirty());
2888
- const a = this._def.valueType;
2889
- function i(u) {
2890
- const d = /* @__PURE__ */ new Set();
2891
- for (const f of u) {
2892
- if (f.status === "aborted")
2893
- return b;
2894
- f.status === "dirty" && t.dirty(), d.add(f.value);
2895
- }
2896
- return { status: t.value, value: d };
2897
- }
2898
- const c = [...s.data.values()].map((u, d) => a._parse(new re(s, u, s.path, d)));
2899
- return s.common.async ? Promise.all(c).then((u) => i(u)) : i(c);
2900
- }
2901
- min(e, t) {
2902
- return new Ne({
2903
- ...this._def,
2904
- minSize: { value: e, message: g.toString(t) }
2905
- });
2906
- }
2907
- max(e, t) {
2908
- return new Ne({
2909
- ...this._def,
2910
- maxSize: { value: e, message: g.toString(t) }
2911
- });
2912
- }
2913
- size(e, t) {
2914
- return this.min(e, t).max(e, t);
2915
- }
2916
- nonempty(e) {
2917
- return this.min(1, e);
2918
- }
2919
- }
2920
- Ne.create = (r, e) => new Ne({
2921
- valueType: r,
2922
- minSize: null,
2923
- maxSize: null,
2924
- typeName: _.ZodSet,
2925
- ...T(e)
2926
- });
2927
- class Re extends S {
2928
- constructor() {
2929
- super(...arguments), this.validate = this.implement;
2930
- }
2931
- _parse(e) {
2932
- const { ctx: t } = this._processInputParams(e);
2933
- if (t.parsedType !== p.function)
2934
- return m(t, {
2935
- code: l.invalid_type,
2936
- expected: p.function,
2937
- received: t.parsedType
2938
- }), b;
2939
- function s(c, u) {
2940
- return mt({
2941
- data: c,
2942
- path: t.path,
2943
- errorMaps: [
2944
- t.common.contextualErrorMap,
2945
- t.schemaErrorMap,
2946
- ht(),
2947
- De
2948
- ].filter((d) => !!d),
2949
- issueData: {
2950
- code: l.invalid_arguments,
2951
- argumentsError: u
2952
- }
2953
- });
2954
- }
2955
- function n(c, u) {
2956
- return mt({
2957
- data: c,
2958
- path: t.path,
2959
- errorMaps: [
2960
- t.common.contextualErrorMap,
2961
- t.schemaErrorMap,
2962
- ht(),
2963
- De
2964
- ].filter((d) => !!d),
2965
- issueData: {
2966
- code: l.invalid_return_type,
2967
- returnTypeError: u
2968
- }
2969
- });
2970
- }
2971
- const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
2972
- if (this._def.returns instanceof Fe) {
2973
- const c = this;
2974
- return L(async function(...u) {
2975
- const d = new H([]), f = await c._def.args.parseAsync(u, a).catch((C) => {
2976
- throw d.addIssue(s(u, C)), d;
2977
- }), x = await Reflect.apply(i, this, f);
2978
- return await c._def.returns._def.type.parseAsync(x, a).catch((C) => {
2979
- throw d.addIssue(n(x, C)), d;
2980
- });
2981
- });
2982
- } else {
2983
- const c = this;
2984
- return L(function(...u) {
2985
- const d = c._def.args.safeParse(u, a);
2986
- if (!d.success)
2987
- throw new H([s(u, d.error)]);
2988
- const f = Reflect.apply(i, this, d.data), x = c._def.returns.safeParse(f, a);
2989
- if (!x.success)
2990
- throw new H([n(f, x.error)]);
2991
- return x.data;
2992
- });
2993
- }
2994
- }
2995
- parameters() {
2996
- return this._def.args;
2997
- }
2998
- returnType() {
2999
- return this._def.returns;
3000
- }
3001
- args(...e) {
3002
- return new Re({
3003
- ...this._def,
3004
- args: se.create(e).rest(Te.create())
3005
- });
3006
- }
3007
- returns(e) {
3008
- return new Re({
3009
- ...this._def,
3010
- returns: e
3011
- });
3012
- }
3013
- implement(e) {
3014
- return this.parse(e);
3015
- }
3016
- strictImplement(e) {
3017
- return this.parse(e);
3018
- }
3019
- static create(e, t, s) {
3020
- return new Re({
3021
- args: e || se.create([]).rest(Te.create()),
3022
- returns: t || Te.create(),
3023
- typeName: _.ZodFunction,
3024
- ...T(s)
3025
- });
3026
- }
3027
- }
3028
- class Ge extends S {
3029
- get schema() {
3030
- return this._def.getter();
3031
- }
3032
- _parse(e) {
3033
- const { ctx: t } = this._processInputParams(e);
3034
- return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
3035
- }
3036
- }
3037
- Ge.create = (r, e) => new Ge({
3038
- getter: r,
3039
- typeName: _.ZodLazy,
3040
- ...T(e)
3041
- });
3042
- class Je extends S {
3043
- _parse(e) {
3044
- if (e.data !== this._def.value) {
3045
- const t = this._getOrReturnCtx(e);
3046
- return m(t, {
3047
- received: t.data,
3048
- code: l.invalid_literal,
3049
- expected: this._def.value
3050
- }), b;
3051
- }
3052
- return { status: "valid", value: e.data };
3053
- }
3054
- get value() {
3055
- return this._def.value;
3056
- }
3057
- }
3058
- Je.create = (r, e) => new Je({
3059
- value: r,
3060
- typeName: _.ZodLiteral,
3061
- ...T(e)
3062
- });
3063
- function Qr(r, e) {
3064
- return new we({
3065
- values: r,
3066
- typeName: _.ZodEnum,
3067
- ...T(e)
3068
- });
3069
- }
3070
- class we extends S {
3071
- constructor() {
3072
- super(...arguments), qe.set(this, void 0);
3073
- }
3074
- _parse(e) {
3075
- if (typeof e.data != "string") {
3076
- const t = this._getOrReturnCtx(e), s = this._def.values;
3077
- return m(t, {
3078
- expected: E.joinValues(s),
3079
- received: t.parsedType,
3080
- code: l.invalid_type
3081
- }), b;
3082
- }
3083
- if (pt(this, qe) || Lr(this, qe, new Set(this._def.values)), !pt(this, qe).has(e.data)) {
3084
- const t = this._getOrReturnCtx(e), s = this._def.values;
3085
- return m(t, {
3086
- received: t.data,
3087
- code: l.invalid_enum_value,
3088
- options: s
3089
- }), b;
3090
- }
3091
- return L(e.data);
3092
- }
3093
- get options() {
3094
- return this._def.values;
3095
- }
3096
- get enum() {
3097
- const e = {};
3098
- for (const t of this._def.values)
3099
- e[t] = t;
3100
- return e;
3101
- }
3102
- get Values() {
3103
- const e = {};
3104
- for (const t of this._def.values)
3105
- e[t] = t;
3106
- return e;
3107
- }
3108
- get Enum() {
3109
- const e = {};
3110
- for (const t of this._def.values)
3111
- e[t] = t;
3112
- return e;
3113
- }
3114
- extract(e, t = this._def) {
3115
- return we.create(e, {
3116
- ...this._def,
3117
- ...t
3118
- });
3119
- }
3120
- exclude(e, t = this._def) {
3121
- return we.create(this.options.filter((s) => !e.includes(s)), {
3122
- ...this._def,
3123
- ...t
3124
- });
3125
- }
3126
- }
3127
- qe = /* @__PURE__ */ new WeakMap();
3128
- we.create = Qr;
3129
- class Xe extends S {
3130
- constructor() {
3131
- super(...arguments), Le.set(this, void 0);
3132
- }
3133
- _parse(e) {
3134
- const t = E.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
3135
- if (s.parsedType !== p.string && s.parsedType !== p.number) {
3136
- const n = E.objectValues(t);
3137
- return m(s, {
3138
- expected: E.joinValues(n),
3139
- received: s.parsedType,
3140
- code: l.invalid_type
3141
- }), b;
3142
- }
3143
- if (pt(this, Le) || Lr(this, Le, new Set(E.getValidEnumValues(this._def.values))), !pt(this, Le).has(e.data)) {
3144
- const n = E.objectValues(t);
3145
- return m(s, {
3146
- received: s.data,
3147
- code: l.invalid_enum_value,
3148
- options: n
3149
- }), b;
3150
- }
3151
- return L(e.data);
3152
- }
3153
- get enum() {
3154
- return this._def.values;
3155
- }
3156
- }
3157
- Le = /* @__PURE__ */ new WeakMap();
3158
- Xe.create = (r, e) => new Xe({
3159
- values: r,
3160
- typeName: _.ZodNativeEnum,
3161
- ...T(e)
3162
- });
3163
- class Fe extends S {
3164
- unwrap() {
3165
- return this._def.type;
3166
- }
3167
- _parse(e) {
3168
- const { ctx: t } = this._processInputParams(e);
3169
- if (t.parsedType !== p.promise && t.common.async === !1)
3170
- return m(t, {
3171
- code: l.invalid_type,
3172
- expected: p.promise,
3173
- received: t.parsedType
3174
- }), b;
3175
- const s = t.parsedType === p.promise ? t.data : Promise.resolve(t.data);
3176
- return L(s.then((n) => this._def.type.parseAsync(n, {
3177
- path: t.path,
3178
- errorMap: t.common.contextualErrorMap
3179
- })));
3180
- }
3181
- }
3182
- Fe.create = (r, e) => new Fe({
3183
- type: r,
3184
- typeName: _.ZodPromise,
3185
- ...T(e)
3186
- });
3187
- class X extends S {
3188
- innerType() {
3189
- return this._def.schema;
3190
- }
3191
- sourceType() {
3192
- return this._def.schema._def.typeName === _.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3193
- }
3194
- _parse(e) {
3195
- const { status: t, ctx: s } = this._processInputParams(e), n = this._def.effect || null, a = {
3196
- addIssue: (i) => {
3197
- m(s, i), i.fatal ? t.abort() : t.dirty();
3198
- },
3199
- get path() {
3200
- return s.path;
3201
- }
3202
- };
3203
- if (a.addIssue = a.addIssue.bind(a), n.type === "preprocess") {
3204
- const i = n.transform(s.data, a);
3205
- if (s.common.async)
3206
- return Promise.resolve(i).then(async (c) => {
3207
- if (t.value === "aborted")
3208
- return b;
3209
- const u = await this._def.schema._parseAsync({
3210
- data: c,
3211
- path: s.path,
3212
- parent: s
3213
- });
3214
- return u.status === "aborted" ? b : u.status === "dirty" || t.value === "dirty" ? Ae(u.value) : u;
3215
- });
3216
- {
3217
- if (t.value === "aborted")
3218
- return b;
3219
- const c = this._def.schema._parseSync({
3220
- data: i,
3221
- path: s.path,
3222
- parent: s
3223
- });
3224
- return c.status === "aborted" ? b : c.status === "dirty" || t.value === "dirty" ? Ae(c.value) : c;
3225
- }
3226
- }
3227
- if (n.type === "refinement") {
3228
- const i = (c) => {
3229
- const u = n.refinement(c, a);
3230
- if (s.common.async)
3231
- return Promise.resolve(u);
3232
- if (u instanceof Promise)
3233
- throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
3234
- return c;
3235
- };
3236
- if (s.common.async === !1) {
3237
- const c = this._def.schema._parseSync({
3238
- data: s.data,
3239
- path: s.path,
3240
- parent: s
3241
- });
3242
- return c.status === "aborted" ? b : (c.status === "dirty" && t.dirty(), i(c.value), { status: t.value, value: c.value });
3243
- } else
3244
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((c) => c.status === "aborted" ? b : (c.status === "dirty" && t.dirty(), i(c.value).then(() => ({ status: t.value, value: c.value }))));
3245
- }
3246
- if (n.type === "transform")
3247
- if (s.common.async === !1) {
3248
- const i = this._def.schema._parseSync({
3249
- data: s.data,
3250
- path: s.path,
3251
- parent: s
3252
- });
3253
- if (!Se(i))
3254
- return i;
3255
- const c = n.transform(i.value, a);
3256
- if (c instanceof Promise)
3257
- throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
3258
- return { status: t.value, value: c };
3259
- } else
3260
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((i) => Se(i) ? Promise.resolve(n.transform(i.value, a)).then((c) => ({ status: t.value, value: c })) : i);
3261
- E.assertNever(n);
3262
- }
3263
- }
3264
- X.create = (r, e, t) => new X({
3265
- schema: r,
3266
- typeName: _.ZodEffects,
3267
- effect: e,
3268
- ...T(t)
3269
- });
3270
- X.createWithPreprocess = (r, e, t) => new X({
3271
- schema: e,
3272
- effect: { type: "preprocess", transform: r },
3273
- typeName: _.ZodEffects,
3274
- ...T(t)
3275
- });
3276
- class te extends S {
3277
- _parse(e) {
3278
- return this._getType(e) === p.undefined ? L(void 0) : this._def.innerType._parse(e);
3279
- }
3280
- unwrap() {
3281
- return this._def.innerType;
3282
- }
3283
- }
3284
- te.create = (r, e) => new te({
3285
- innerType: r,
3286
- typeName: _.ZodOptional,
3287
- ...T(e)
3288
- });
3289
- class ke extends S {
3290
- _parse(e) {
3291
- return this._getType(e) === p.null ? L(null) : this._def.innerType._parse(e);
3292
- }
3293
- unwrap() {
3294
- return this._def.innerType;
3295
- }
3296
- }
3297
- ke.create = (r, e) => new ke({
3298
- innerType: r,
3299
- typeName: _.ZodNullable,
3300
- ...T(e)
3301
- });
3302
- class et extends S {
3303
- _parse(e) {
3304
- const { ctx: t } = this._processInputParams(e);
3305
- let s = t.data;
3306
- return t.parsedType === p.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({
3307
- data: s,
3308
- path: t.path,
3309
- parent: t
3310
- });
3311
- }
3312
- removeDefault() {
3313
- return this._def.innerType;
3314
- }
3315
- }
3316
- et.create = (r, e) => new et({
3317
- innerType: r,
3318
- typeName: _.ZodDefault,
3319
- defaultValue: typeof e.default == "function" ? e.default : () => e.default,
3320
- ...T(e)
3321
- });
3322
- class tt extends S {
3323
- _parse(e) {
3324
- const { ctx: t } = this._processInputParams(e), s = {
3325
- ...t,
3326
- common: {
3327
- ...t.common,
3328
- issues: []
3329
- }
3330
- }, n = this._def.innerType._parse({
3331
- data: s.data,
3332
- path: s.path,
3333
- parent: {
3334
- ...s
3335
- }
3336
- });
3337
- return Ve(n) ? n.then((a) => ({
3338
- status: "valid",
3339
- value: a.status === "valid" ? a.value : this._def.catchValue({
3340
- get error() {
3341
- return new H(s.common.issues);
3342
- },
3343
- input: s.data
3344
- })
3345
- })) : {
3346
- status: "valid",
3347
- value: n.status === "valid" ? n.value : this._def.catchValue({
3348
- get error() {
3349
- return new H(s.common.issues);
3350
- },
3351
- input: s.data
3352
- })
3353
- };
3354
- }
3355
- removeCatch() {
3356
- return this._def.innerType;
3357
- }
3358
- }
3359
- tt.create = (r, e) => new tt({
3360
- innerType: r,
3361
- typeName: _.ZodCatch,
3362
- catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
3363
- ...T(e)
3364
- });
3365
- class xt extends S {
3366
- _parse(e) {
3367
- if (this._getType(e) !== p.nan) {
3368
- const s = this._getOrReturnCtx(e);
3369
- return m(s, {
3370
- code: l.invalid_type,
3371
- expected: p.nan,
3372
- received: s.parsedType
3373
- }), b;
3374
- }
3375
- return { status: "valid", value: e.data };
3376
- }
3377
- }
3378
- xt.create = (r) => new xt({
3379
- typeName: _.ZodNaN,
3380
- ...T(r)
3381
- });
3382
- const Na = Symbol("zod_brand");
3383
- class Bt extends S {
3384
- _parse(e) {
3385
- const { ctx: t } = this._processInputParams(e), s = t.data;
3386
- return this._def.type._parse({
3387
- data: s,
3388
- path: t.path,
3389
- parent: t
3390
- });
3391
- }
3392
- unwrap() {
3393
- return this._def.type;
3394
- }
3395
- }
3396
- class nt extends S {
3397
- _parse(e) {
3398
- const { status: t, ctx: s } = this._processInputParams(e);
3399
- if (s.common.async)
3400
- return (async () => {
3401
- const a = await this._def.in._parseAsync({
3402
- data: s.data,
3403
- path: s.path,
3404
- parent: s
3405
- });
3406
- return a.status === "aborted" ? b : a.status === "dirty" ? (t.dirty(), Ae(a.value)) : this._def.out._parseAsync({
3407
- data: a.value,
3408
- path: s.path,
3409
- parent: s
3410
- });
3411
- })();
3412
- {
3413
- const n = this._def.in._parseSync({
3414
- data: s.data,
3415
- path: s.path,
3416
- parent: s
3417
- });
3418
- return n.status === "aborted" ? b : n.status === "dirty" ? (t.dirty(), {
3419
- status: "dirty",
3420
- value: n.value
3421
- }) : this._def.out._parseSync({
3422
- data: n.value,
3423
- path: s.path,
3424
- parent: s
3425
- });
3426
- }
3427
- }
3428
- static create(e, t) {
3429
- return new nt({
3430
- in: e,
3431
- out: t,
3432
- typeName: _.ZodPipeline
3433
- });
3434
- }
3435
- }
3436
- class rt extends S {
3437
- _parse(e) {
3438
- const t = this._def.innerType._parse(e), s = (n) => (Se(n) && (n.value = Object.freeze(n.value)), n);
3439
- return Ve(t) ? t.then((n) => s(n)) : s(t);
3440
- }
3441
- unwrap() {
3442
- return this._def.innerType;
3443
- }
3444
- }
3445
- rt.create = (r, e) => new rt({
3446
- innerType: r,
3447
- typeName: _.ZodReadonly,
3448
- ...T(e)
3449
- });
3450
- function cr(r, e) {
3451
- const t = typeof r == "function" ? r(e) : typeof r == "string" ? { message: r } : r;
3452
- return typeof t == "string" ? { message: t } : t;
3453
- }
3454
- function Hr(r, e = {}, t) {
3455
- return r ? ze.create().superRefine((s, n) => {
3456
- var a, i;
3457
- const c = r(s);
3458
- if (c instanceof Promise)
3459
- return c.then((u) => {
3460
- var d, f;
3461
- if (!u) {
3462
- const x = cr(e, s), w = (f = (d = x.fatal) !== null && d !== void 0 ? d : t) !== null && f !== void 0 ? f : !0;
3463
- n.addIssue({ code: "custom", ...x, fatal: w });
3464
- }
3465
- });
3466
- if (!c) {
3467
- const u = cr(e, s), d = (i = (a = u.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0;
3468
- n.addIssue({ code: "custom", ...u, fatal: d });
3469
- }
3470
- }) : ze.create();
3471
- }
3472
- const Ea = {
3473
- object: I.lazycreate
3474
- };
3475
- var _;
3476
- (function(r) {
3477
- r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
3478
- })(_ || (_ = {}));
3479
- const Oa = (r, e = {
3480
- message: `Input not instance of ${r.name}`
3481
- }) => Hr((t) => t instanceof r, e), Wr = G.create, Yr = _e.create, Aa = xt.create, Pa = be.create, Kr = Ue.create, Ra = Ce.create, Ma = gt.create, Ia = Qe.create, Za = He.create, $a = ze.create, Da = Te.create, za = he.create, Fa = vt.create, qa = J.create, La = I.create, Ba = I.strictCreate, Va = We.create, Ua = jt.create, Qa = Ye.create, Ha = se.create, Wa = Ke.create, Ya = yt.create, Ka = Ne.create, Ga = Re.create, Ja = Ge.create, Xa = Je.create, ei = we.create, ti = Xe.create, ri = Fe.create, dr = X.create, si = te.create, ni = ke.create, ai = X.createWithPreprocess, ii = nt.create, oi = () => Wr().optional(), ci = () => Yr().optional(), di = () => Kr().optional(), ui = {
3482
- string: (r) => G.create({ ...r, coerce: !0 }),
3483
- number: (r) => _e.create({ ...r, coerce: !0 }),
3484
- boolean: (r) => Ue.create({
3485
- ...r,
3486
- coerce: !0
3487
- }),
3488
- bigint: (r) => be.create({ ...r, coerce: !0 }),
3489
- date: (r) => Ce.create({ ...r, coerce: !0 })
3490
- }, li = b;
3491
- var ct = /* @__PURE__ */ Object.freeze({
3492
- __proto__: null,
3493
- defaultErrorMap: De,
3494
- setErrorMap: aa,
3495
- getErrorMap: ht,
3496
- makeIssue: mt,
3497
- EMPTY_PATH: ia,
3498
- addIssueToContext: m,
3499
- ParseStatus: F,
3500
- INVALID: b,
3501
- DIRTY: Ae,
3502
- OK: L,
3503
- isAborted: Zt,
3504
- isDirty: $t,
3505
- isValid: Se,
3506
- isAsync: Ve,
3507
- get util() {
3508
- return E;
3509
- },
3510
- get objectUtil() {
3511
- return It;
3512
- },
3513
- ZodParsedType: p,
3514
- getParsedType: ue,
3515
- ZodType: S,
3516
- datetimeRegex: Ur,
3517
- ZodString: G,
3518
- ZodNumber: _e,
3519
- ZodBigInt: be,
3520
- ZodBoolean: Ue,
3521
- ZodDate: Ce,
3522
- ZodSymbol: gt,
3523
- ZodUndefined: Qe,
3524
- ZodNull: He,
3525
- ZodAny: ze,
3526
- ZodUnknown: Te,
3527
- ZodNever: he,
3528
- ZodVoid: vt,
3529
- ZodArray: J,
3530
- ZodObject: I,
3531
- ZodUnion: We,
3532
- ZodDiscriminatedUnion: jt,
3533
- ZodIntersection: Ye,
3534
- ZodTuple: se,
3535
- ZodRecord: Ke,
3536
- ZodMap: yt,
3537
- ZodSet: Ne,
3538
- ZodFunction: Re,
3539
- ZodLazy: Ge,
3540
- ZodLiteral: Je,
3541
- ZodEnum: we,
3542
- ZodNativeEnum: Xe,
3543
- ZodPromise: Fe,
3544
- ZodEffects: X,
3545
- ZodTransformer: X,
3546
- ZodOptional: te,
3547
- ZodNullable: ke,
3548
- ZodDefault: et,
3549
- ZodCatch: tt,
3550
- ZodNaN: xt,
3551
- BRAND: Na,
3552
- ZodBranded: Bt,
3553
- ZodPipeline: nt,
3554
- ZodReadonly: rt,
3555
- custom: Hr,
3556
- Schema: S,
3557
- ZodSchema: S,
3558
- late: Ea,
3559
- get ZodFirstPartyTypeKind() {
3560
- return _;
3561
- },
3562
- coerce: ui,
3563
- any: $a,
3564
- array: qa,
3565
- bigint: Pa,
3566
- boolean: Kr,
3567
- date: Ra,
3568
- discriminatedUnion: Ua,
3569
- effect: dr,
3570
- enum: ei,
3571
- function: Ga,
3572
- instanceof: Oa,
3573
- intersection: Qa,
3574
- lazy: Ja,
3575
- literal: Xa,
3576
- map: Ya,
3577
- nan: Aa,
3578
- nativeEnum: ti,
3579
- never: za,
3580
- null: Za,
3581
- nullable: ni,
3582
- number: Yr,
3583
- object: La,
3584
- oboolean: di,
3585
- onumber: ci,
3586
- optional: si,
3587
- ostring: oi,
3588
- pipeline: ii,
3589
- preprocess: ai,
3590
- promise: ri,
3591
- record: Wa,
3592
- set: Ka,
3593
- strictObject: Ba,
3594
- string: Wr,
3595
- symbol: Ma,
3596
- transformer: dr,
3597
- tuple: Ha,
3598
- undefined: Ia,
3599
- union: Va,
3600
- unknown: Da,
3601
- void: Fa,
3602
- NEVER: li,
3603
- ZodIssueCode: l,
3604
- quotelessJson: na,
3605
- ZodError: H
3606
- });
3607
- const fi = ct.object({
3608
- buildId: ct.string(),
3609
- timestamp: ct.string(),
3610
- status: ct.enum(["in-progress", "success", "failed"])
3611
- }), hi = ({
3612
- buildId: r,
3613
- endpoint: e = "/__zuplo/docs"
3614
- }) => {
3615
- const t = Vs({
3616
- queryKey: ["zuplo-build-check", r, e],
3617
- refetchInterval: 2e3,
3618
- enabled: !!r,
3619
- retry: !1,
3620
- queryFn: () => fetch(e, { signal: AbortSignal.timeout(2e3) }).then((n) => {
3621
- if (!n.ok) throw new Error("Failed to fetch build status");
3622
- return n.json();
3623
- }).then((n) => fi.parse(n))
3624
- });
3625
- if (t.isError || !t.data || t.data.buildId === r)
3626
- return null;
3627
- const s = t.data.status === "success";
3628
- return /* @__PURE__ */ o.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
3629
- s ? /* @__PURE__ */ o.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
3630
- /* @__PURE__ */ o.jsx(an, { size: 16 }),
3631
- /* @__PURE__ */ o.jsx("span", { className: "text-sm", children: "New version available" })
3632
- ] }) : /* @__PURE__ */ o.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
3633
- /* @__PURE__ */ o.jsx(on, { size: 16, className: "animate-spin" }),
3634
- /* @__PURE__ */ o.jsx("span", { className: "text-sm", children: "Building new version..." })
3635
- ] }),
3636
- /* @__PURE__ */ o.jsx("span", { className: "text-xs", children: s ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
3637
- /* @__PURE__ */ o.jsx(
3638
- Pr,
3639
- {
3640
- variant: "outline",
3641
- size: "sm",
3642
- className: "w-full",
3643
- onClick: () => {
3644
- window.location.reload();
3645
- },
3646
- children: "Reload"
3647
- }
3648
- )
3649
- ] });
3650
- }, mi = () => {
3651
- const r = bt(), e = xe(r.pathname);
3652
- ae(() => {
3653
- const t = e.current !== r.pathname, s = r.hash !== "";
3654
- t && !s && window.scrollTo(0, 0), e.current = r.pathname;
3655
- }, [r.pathname, r.hash]);
3656
- }, pi = ({
3657
- icon: r
3658
- }) => typeof r == "string" ? /* @__PURE__ */ o.jsx(
3659
- "img",
3660
- {
3661
- src: `https://cdn.simpleicons.org/${r}/000000/ffffff`,
3662
- className: "size-5",
3663
- alt: r
3664
- }
3665
- ) : r, gi = (r) => /^https?:/.test(r), vi = () => {
3666
- var t;
3667
- const { page: r } = no(), e = r == null ? void 0 : r.footer;
3668
- return e ? /* @__PURE__ */ o.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ o.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
3669
- /* @__PURE__ */ o.jsxs(
3670
- "div",
3671
- {
3672
- className: q("flex flex-row gap-8", {
3673
- "justify-center": !e.position || e.position === "center",
3674
- "justify-start": e.position === "start",
3675
- "justify-end": e.position === "end"
3676
- }),
3677
- children: [
3678
- /* @__PURE__ */ o.jsx(Q, { name: "footer-before" }),
3679
- e.columns && /* @__PURE__ */ o.jsx(
3680
- "div",
3681
- {
3682
- className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
3683
- style: { "--columns": e.columns.length },
3684
- children: e.columns.map((s) => /* @__PURE__ */ o.jsxs(
3685
- "div",
3686
- {
3687
- className: q({
3688
- "justify-self-center": !s.position || s.position === "center",
3689
- "justify-self-start": s.position === "start",
3690
- "justify-self-end": s.position === "end"
3691
- }),
3692
- children: [
3693
- /* @__PURE__ */ o.jsx("span", { className: "text-sm font-semibold", children: s.title }),
3694
- /* @__PURE__ */ o.jsx("ul", { className: "mt-4 space-y-2", children: s.links.map((n, a) => {
3695
- const i = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
3696
- return /* @__PURE__ */ o.jsx("li", { children: gi(n.href) ? /* @__PURE__ */ o.jsxs(
3697
- "a",
3698
- {
3699
- href: n.href,
3700
- target: "_blank",
3701
- rel: "noopener noreferrer",
3702
- className: i,
3703
- children: [
3704
- /* @__PURE__ */ o.jsx("span", { children: n.label }),
3705
- /* @__PURE__ */ o.jsx(cn, { size: 12 })
3706
- ]
3707
- }
3708
- ) : /* @__PURE__ */ o.jsx(
3709
- gn,
3710
- {
3711
- to: n.href + a,
3712
- className: i,
3713
- children: /* @__PURE__ */ o.jsx("span", { children: n.label })
3714
- }
3715
- ) }, n.href + a);
3716
- }) })
3717
- ]
3718
- },
3719
- s.title
3720
- ))
3721
- }
3722
- ),
3723
- /* @__PURE__ */ o.jsx(Q, { name: "footer-after" })
3724
- ]
3725
- }
3726
- ),
3727
- /* @__PURE__ */ o.jsxs(
3728
- "div",
3729
- {
3730
- className: q(
3731
- "flex items-center justify-between",
3732
- e.columns && "border-t mt-8 pt-8"
3733
- ),
3734
- children: [
3735
- e.logo && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3736
- /* @__PURE__ */ o.jsx(
3737
- "img",
3738
- {
3739
- src: e.logo.src.light,
3740
- alt: e.logo.alt,
3741
- className: "w-8 dark:hidden",
3742
- style: { width: e.logo.width }
3743
- }
3744
- ),
3745
- /* @__PURE__ */ o.jsx(
3746
- "img",
3747
- {
3748
- src: e.logo.src.dark,
3749
- alt: e.logo.alt,
3750
- className: "w-8 hidden dark:block",
3751
- style: { width: e.logo.width }
3752
- }
3753
- )
3754
- ] }),
3755
- e.copyright && /* @__PURE__ */ o.jsx("p", { className: "text-sm text-muted-foreground", children: e.copyright }),
3756
- /* @__PURE__ */ o.jsx("div", { className: "flex items-center gap-2", children: (t = e.social) == null ? void 0 : t.map((s) => /* @__PURE__ */ o.jsxs(
3757
- "a",
3758
- {
3759
- href: s.href,
3760
- target: "_blank",
3761
- rel: "noopener noreferrer",
3762
- className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
3763
- children: [
3764
- /* @__PURE__ */ o.jsx(pi, { icon: s.icon }),
3765
- s.label
3766
- ]
3767
- },
3768
- s.href
3769
- )) })
3770
- ]
3771
- }
3772
- )
3773
- ] }) }) : null;
3774
- };
3775
- function yi({
3776
- className: r,
3777
- ...e
3778
- }) {
3779
- return /* @__PURE__ */ o.jsx(
3780
- "div",
3781
- {
3782
- className: q("animate-pulse rounded-md bg-muted", r),
3783
- ...e
3784
- }
3785
- );
3786
- }
3787
- const ur = {
3788
- info: "bg-blue-500",
3789
- note: "bg-gray-500",
3790
- tip: "bg-green-600",
3791
- caution: "bg-orange-500",
3792
- danger: "bg-rose-500"
3793
- }, xi = () => {
3794
- const { page: r } = ne(), [e, t] = Ee(!0);
3795
- if (!(r != null && r.banner) || !e)
3796
- return /* @__PURE__ */ o.jsx("style", { children: ":root { --banner-height: 0px; }" });
3797
- const s = r.banner.color && r.banner.color in ur ? ur[r.banner.color] : r.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: r.banner.color };
3798
- return /* @__PURE__ */ o.jsxs(
3799
- "div",
3800
- {
3801
- className: q(
3802
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
3803
- s
3804
- ),
3805
- "data-pagefind-ignore": "all",
3806
- style: n,
3807
- children: [
3808
- /* @__PURE__ */ o.jsx("div", { className: "w-full", children: r.banner.message }),
3809
- r.banner.dismissible && /* @__PURE__ */ o.jsx(
3810
- "button",
3811
- {
3812
- type: "button",
3813
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
3814
- onClick: () => t(!1),
3815
- children: /* @__PURE__ */ o.jsx(dn, { size: 16 })
3816
- }
3817
- )
3818
- ]
3819
- }
3820
- );
3821
- }, Gr = (r) => /* @__PURE__ */ o.jsxs(
3822
- "svg",
3823
- {
3824
- xmlns: "http://www.w3.org/2000/svg",
3825
- viewBox: "0 0 132 100",
3826
- fill: "none",
3827
- ...r,
3828
- children: [
3829
- /* @__PURE__ */ o.jsx(
3830
- "path",
3831
- {
3832
- fill: "currentColor",
3833
- fillRule: "evenodd",
3834
- d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
3835
- clipRule: "evenodd"
3836
- }
3837
- ),
3838
- /* @__PURE__ */ o.jsx(
3839
- "path",
3840
- {
3841
- fill: "currentColor",
3842
- d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
3843
- }
3844
- )
3845
- ]
3846
- }
3847
- );
3848
- Gr.displayName = "ZudokuLogo";
3849
- const Jr = ({ className: r }) => /* @__PURE__ */ o.jsxs(
3850
- "a",
3851
- {
3852
- href: "https://zudoku.dev",
3853
- target: "_blank",
3854
- rel: "noopener noreferrer",
3855
- className: q(
3856
- "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-sm h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
3857
- r
3858
- ),
3859
- children: [
3860
- /* @__PURE__ */ o.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
3861
- /* @__PURE__ */ o.jsx(Gr, { className: "w-3.5 h-3.5 dark:fill-white" }),
3862
- "powered by ",
3863
- "Zudoku"
3864
- ] }),
3865
- /* @__PURE__ */ o.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ o.jsx(un, { size: 12, absoluteStrokeWidth: !0, strokeWidth: 1.5 }) })
3866
- ]
3867
- }
3868
- );
3869
- function _i() {
3870
- const r = navigator.userAgent.toLowerCase();
3871
- if (r.includes("win")) return "Windows";
3872
- if (r.includes("mac")) return "macOS";
3873
- if (r.includes("linux")) return "Linux";
3874
- }
3875
- const Xr = ({ className: r }) => {
3876
- const e = ne(), [t, s] = Ee(!1), n = ye(() => s(!1), []);
3877
- ae(() => {
3878
- if (t)
3879
- return;
3880
- function i(c) {
3881
- c.key === "k" && (c.metaKey || c.ctrlKey) && (c.preventDefault(), s(!0));
3882
- }
3883
- return window.addEventListener("keydown", i), () => {
3884
- window.removeEventListener("keydown", i);
3885
- };
3886
- }, [t, s]);
3887
- const a = e.plugins.find(Tn);
3888
- return a ? /* @__PURE__ */ o.jsxs("div", { className: r, children: [
3889
- /* @__PURE__ */ o.jsxs(
3890
- "button",
3891
- {
3892
- type: "button",
3893
- onClick: () => s(!0),
3894
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
3895
- children: [
3896
- /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
3897
- /* @__PURE__ */ o.jsx(ln, { size: 14 }),
3898
- "Search"
3899
- ] }),
3900
- /* @__PURE__ */ o.jsx(kt, { children: /* @__PURE__ */ o.jsx(bi, {}) })
3901
- ]
3902
- }
3903
- ),
3904
- /* @__PURE__ */ o.jsx(Lt, { fallback: null, children: a.renderSearch({
3905
- isOpen: t,
3906
- onClose: n
3907
- }) })
3908
- ] }) : null;
3909
- }, bi = () => {
3910
- const r = _i();
3911
- return /* @__PURE__ */ o.jsxs("kbd", { className: "absolute right-1.5 hidden h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: [
3912
- r === "macOS" ? "⌘" : "Ctrl",
3913
- "+K"
3914
- ] });
3915
- }, es = () => {
3916
- const { resolvedTheme: r, setTheme: e } = jr();
3917
- return /* @__PURE__ */ o.jsx(kt, { fallback: /* @__PURE__ */ o.jsx(Pt, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ o.jsxs(
3918
- "button",
3919
- {
3920
- type: "button",
3921
- className: "flex rounded-full border p-0.5 gap-0.5 group",
3922
- onClick: () => e(r === "dark" ? "light" : "dark"),
3923
- "aria-label": r === "dark" ? "Switch to light mode" : "Switch to dark mode",
3924
- children: [
3925
- /* @__PURE__ */ o.jsx(
3926
- "div",
3927
- {
3928
- className: q(
3929
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
3930
- r === "light" && "border-border bg-muted",
3931
- r === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
3932
- ),
3933
- children: /* @__PURE__ */ o.jsx(fn, { size: 16 })
3934
- }
3935
- ),
3936
- /* @__PURE__ */ o.jsx(
3937
- "div",
3938
- {
3939
- className: q(
3940
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
3941
- r === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
3942
- r === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
3943
- ),
3944
- children: /* @__PURE__ */ o.jsx(hn, { size: 16 })
3945
- }
3946
- )
3947
- ]
3948
- }
3949
- ) });
3950
- };
3951
- function _t() {
3952
- return _t = Object.assign ? Object.assign.bind() : function(r) {
3953
- for (var e = 1; e < arguments.length; e++) {
3954
- var t = arguments[e];
3955
- for (var s in t) ({}).hasOwnProperty.call(t, s) && (r[s] = t[s]);
3956
- }
3957
- return r;
3958
- }, _t.apply(null, arguments);
3959
- }
3960
- var dt = { exports: {} }, A = {};
3961
- /** @license React v16.13.1
3962
- * react-is.production.min.js
3963
- *
3964
- * Copyright (c) Facebook, Inc. and its affiliates.
3965
- *
3966
- * This source code is licensed under the MIT license found in the
3967
- * LICENSE file in the root directory of this source tree.
3968
- */
3969
- var lr;
3970
- function wi() {
3971
- if (lr) return A;
3972
- lr = 1;
3973
- var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, n = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, d = r ? Symbol.for("react.concurrent_mode") : 60111, f = r ? Symbol.for("react.forward_ref") : 60112, x = r ? Symbol.for("react.suspense") : 60113, w = r ? Symbol.for("react.suspense_list") : 60120, C = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, j = r ? Symbol.for("react.block") : 60121, M = r ? Symbol.for("react.fundamental") : 60117, $ = r ? Symbol.for("react.responder") : 60118, D = r ? Symbol.for("react.scope") : 60119;
3974
- function N(h) {
3975
- if (typeof h == "object" && h !== null) {
3976
- var R = h.$$typeof;
3977
- switch (R) {
3978
- case e:
3979
- switch (h = h.type, h) {
3980
- case u:
3981
- case d:
3982
- case s:
3983
- case a:
3984
- case n:
3985
- case x:
3986
- return h;
3987
- default:
3988
- switch (h = h && h.$$typeof, h) {
3989
- case c:
3990
- case f:
3991
- case k:
3992
- case C:
3993
- case i:
3994
- return h;
3995
- default:
3996
- return R;
3997
- }
3998
- }
3999
- case t:
4000
- return R;
4001
- }
4002
- }
4003
- }
4004
- function O(h) {
4005
- return N(h) === d;
4006
- }
4007
- return A.AsyncMode = u, A.ConcurrentMode = d, A.ContextConsumer = c, A.ContextProvider = i, A.Element = e, A.ForwardRef = f, A.Fragment = s, A.Lazy = k, A.Memo = C, A.Portal = t, A.Profiler = a, A.StrictMode = n, A.Suspense = x, A.isAsyncMode = function(h) {
4008
- return O(h) || N(h) === u;
4009
- }, A.isConcurrentMode = O, A.isContextConsumer = function(h) {
4010
- return N(h) === c;
4011
- }, A.isContextProvider = function(h) {
4012
- return N(h) === i;
4013
- }, A.isElement = function(h) {
4014
- return typeof h == "object" && h !== null && h.$$typeof === e;
4015
- }, A.isForwardRef = function(h) {
4016
- return N(h) === f;
4017
- }, A.isFragment = function(h) {
4018
- return N(h) === s;
4019
- }, A.isLazy = function(h) {
4020
- return N(h) === k;
4021
- }, A.isMemo = function(h) {
4022
- return N(h) === C;
4023
- }, A.isPortal = function(h) {
4024
- return N(h) === t;
4025
- }, A.isProfiler = function(h) {
4026
- return N(h) === a;
4027
- }, A.isStrictMode = function(h) {
4028
- return N(h) === n;
4029
- }, A.isSuspense = function(h) {
4030
- return N(h) === x;
4031
- }, A.isValidElementType = function(h) {
4032
- return typeof h == "string" || typeof h == "function" || h === s || h === d || h === a || h === n || h === x || h === w || typeof h == "object" && h !== null && (h.$$typeof === k || h.$$typeof === C || h.$$typeof === i || h.$$typeof === c || h.$$typeof === f || h.$$typeof === M || h.$$typeof === $ || h.$$typeof === D || h.$$typeof === j);
4033
- }, A.typeOf = N, A;
4034
- }
4035
- var P = {};
4036
- /** @license React v16.13.1
4037
- * react-is.development.js
4038
- *
4039
- * Copyright (c) Facebook, Inc. and its affiliates.
4040
- *
4041
- * This source code is licensed under the MIT license found in the
4042
- * LICENSE file in the root directory of this source tree.
4043
- */
4044
- var fr;
4045
- function ki() {
4046
- return fr || (fr = 1, process.env.NODE_ENV !== "production" && function() {
4047
- var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, n = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, d = r ? Symbol.for("react.concurrent_mode") : 60111, f = r ? Symbol.for("react.forward_ref") : 60112, x = r ? Symbol.for("react.suspense") : 60113, w = r ? Symbol.for("react.suspense_list") : 60120, C = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, j = r ? Symbol.for("react.block") : 60121, M = r ? Symbol.for("react.fundamental") : 60117, $ = r ? Symbol.for("react.responder") : 60118, D = r ? Symbol.for("react.scope") : 60119;
4048
- function N(v) {
4049
- return typeof v == "string" || typeof v == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
4050
- v === s || v === d || v === a || v === n || v === x || v === w || typeof v == "object" && v !== null && (v.$$typeof === k || v.$$typeof === C || v.$$typeof === i || v.$$typeof === c || v.$$typeof === f || v.$$typeof === M || v.$$typeof === $ || v.$$typeof === D || v.$$typeof === j);
4051
- }
4052
- function O(v) {
4053
- if (typeof v == "object" && v !== null) {
4054
- var St = v.$$typeof;
4055
- switch (St) {
4056
- case e:
4057
- var at = v.type;
4058
- switch (at) {
4059
- case u:
4060
- case d:
4061
- case s:
4062
- case a:
4063
- case n:
4064
- case x:
4065
- return at;
4066
- default:
4067
- var Qt = at && at.$$typeof;
4068
- switch (Qt) {
4069
- case c:
4070
- case f:
4071
- case k:
4072
- case C:
4073
- case i:
4074
- return Qt;
4075
- default:
4076
- return St;
4077
- }
4078
- }
4079
- case t:
4080
- return St;
4081
- }
4082
- }
4083
- }
4084
- var h = u, R = d, W = c, Y = i, oe = e, me = f, Tt = s, je = k, hs = C, ms = t, ps = a, gs = n, vs = x, Vt = !1;
4085
- function ys(v) {
4086
- return Vt || (Vt = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Ut(v) || O(v) === u;
4087
- }
4088
- function Ut(v) {
4089
- return O(v) === d;
4090
- }
4091
- function xs(v) {
4092
- return O(v) === c;
4093
- }
4094
- function _s(v) {
4095
- return O(v) === i;
4096
- }
4097
- function bs(v) {
4098
- return typeof v == "object" && v !== null && v.$$typeof === e;
4099
- }
4100
- function ws(v) {
4101
- return O(v) === f;
4102
- }
4103
- function ks(v) {
4104
- return O(v) === s;
4105
- }
4106
- function js(v) {
4107
- return O(v) === k;
4108
- }
4109
- function Ts(v) {
4110
- return O(v) === C;
4111
- }
4112
- function Ss(v) {
4113
- return O(v) === t;
4114
- }
4115
- function Cs(v) {
4116
- return O(v) === a;
4117
- }
4118
- function Ns(v) {
4119
- return O(v) === n;
4120
- }
4121
- function Es(v) {
4122
- return O(v) === x;
4123
- }
4124
- P.AsyncMode = h, P.ConcurrentMode = R, P.ContextConsumer = W, P.ContextProvider = Y, P.Element = oe, P.ForwardRef = me, P.Fragment = Tt, P.Lazy = je, P.Memo = hs, P.Portal = ms, P.Profiler = ps, P.StrictMode = gs, P.Suspense = vs, P.isAsyncMode = ys, P.isConcurrentMode = Ut, P.isContextConsumer = xs, P.isContextProvider = _s, P.isElement = bs, P.isForwardRef = ws, P.isFragment = ks, P.isLazy = js, P.isMemo = Ts, P.isPortal = Ss, P.isProfiler = Cs, P.isStrictMode = Ns, P.isSuspense = Es, P.isValidElementType = N, P.typeOf = O;
4125
- }()), P;
4126
- }
4127
- var hr;
4128
- function ji() {
4129
- return hr || (hr = 1, process.env.NODE_ENV === "production" ? dt.exports = wi() : dt.exports = ki()), dt.exports;
4130
- }
4131
- var Ot, mr;
4132
- function Ti() {
4133
- if (mr) return Ot;
4134
- mr = 1;
4135
- var r = ji(), e = {
4136
- childContextTypes: !0,
4137
- contextType: !0,
4138
- contextTypes: !0,
4139
- defaultProps: !0,
4140
- displayName: !0,
4141
- getDefaultProps: !0,
4142
- getDerivedStateFromError: !0,
4143
- getDerivedStateFromProps: !0,
4144
- mixins: !0,
4145
- propTypes: !0,
4146
- type: !0
4147
- }, t = {
4148
- name: !0,
4149
- length: !0,
4150
- prototype: !0,
4151
- caller: !0,
4152
- callee: !0,
4153
- arguments: !0,
4154
- arity: !0
4155
- }, s = {
4156
- $$typeof: !0,
4157
- render: !0,
4158
- defaultProps: !0,
4159
- displayName: !0,
4160
- propTypes: !0
4161
- }, n = {
4162
- $$typeof: !0,
4163
- compare: !0,
4164
- defaultProps: !0,
4165
- displayName: !0,
4166
- propTypes: !0,
4167
- type: !0
4168
- }, a = {};
4169
- a[r.ForwardRef] = s, a[r.Memo] = n;
4170
- function i(k) {
4171
- return r.isMemo(k) ? n : a[k.$$typeof] || e;
4172
- }
4173
- var c = Object.defineProperty, u = Object.getOwnPropertyNames, d = Object.getOwnPropertySymbols, f = Object.getOwnPropertyDescriptor, x = Object.getPrototypeOf, w = Object.prototype;
4174
- function C(k, j, M) {
4175
- if (typeof j != "string") {
4176
- if (w) {
4177
- var $ = x(j);
4178
- $ && $ !== w && C(k, $, M);
4179
- }
4180
- var D = u(j);
4181
- d && (D = D.concat(d(j)));
4182
- for (var N = i(k), O = i(j), h = 0; h < D.length; ++h) {
4183
- var R = D[h];
4184
- if (!t[R] && !(M && M[R]) && !(O && O[R]) && !(N && N[R])) {
4185
- var W = f(j, R);
4186
- try {
4187
- c(k, R, W);
4188
- } catch {
4189
- }
4190
- }
4191
- }
4192
- }
4193
- return k;
4194
- }
4195
- return Ot = C, Ot;
4196
- }
4197
- Ti();
4198
- var ts = function(e, t, s) {
4199
- return e = e <= s ? e : s, e = e >= t ? e : t, e;
4200
- }, Si = function() {
4201
- var e = !1, t = [], s = function() {
4202
- e = !0;
4203
- var c = t.shift();
4204
- if (c)
4205
- return c(s);
4206
- e = !1;
4207
- }, n = function() {
4208
- e = !1, t = [];
4209
- }, a = function(c) {
4210
- t.push(c), !e && t.length === 1 && s();
4211
- };
4212
- return {
4213
- clear: n,
4214
- enqueue: a
4215
- };
4216
- }, Ci = function() {
4217
- var e, t = function() {
4218
- e && window.cancelAnimationFrame(e);
4219
- }, s = function(a, i) {
4220
- var c, u, d = function(x) {
4221
- if (u = u || x, c = x - u, c > i) {
4222
- a();
4223
- return;
4224
- }
4225
- e = window.requestAnimationFrame(d);
4226
- };
4227
- e = window.requestAnimationFrame(d);
4228
- };
4229
- return {
4230
- cancel: t,
4231
- schedule: s
4232
- };
4233
- }, Ni = function(e) {
4234
- var t = 0;
4235
- return e >= 0 && e < 0.2 ? t = 0.1 : e >= 0.2 && e < 0.5 ? t = 0.04 : e >= 0.5 && e < 0.8 ? t = 0.02 : e >= 0.8 && e < 0.99 && (t = 5e-3), ts(e + t, 0, 0.994);
4236
- }, pr = function(e) {
4237
- ae(e, []);
4238
- }, Ei = function(e) {
4239
- return ++e % 1e6;
4240
- }, Oi = function() {
4241
- var e = Ee(0), t = e[1];
4242
- return ye(function() {
4243
- return t(Ei);
4244
- }, []);
4245
- }, Ai = function(e) {
4246
- e === void 0 && (e = {});
4247
- var t = Oi(), s = xe(_t({}, e)), n = ye(function() {
4248
- return s.current;
4249
- }, []), a = ye(function(i) {
4250
- i && (Object.assign(s.current, i), t());
4251
- }, []);
4252
- return [n, a];
4253
- }, Pi = function() {
4254
- var e = xe(!0);
4255
- return e.current ? (e.current = !1, !0) : e.current;
4256
- }, gr = function(e, t) {
4257
- var s = Pi();
4258
- ae(function() {
4259
- if (!s)
4260
- return e();
4261
- }, t);
4262
- }, rs = function() {
4263
- }, vr = {
4264
- isFinished: !0,
4265
- progress: 0,
4266
- sideEffect: rs
4267
- }, Ri = function(e) {
4268
- var t = e === void 0 ? {} : e, s = t.animationDuration, n = s === void 0 ? 200 : s, a = t.incrementDuration, i = a === void 0 ? 800 : a, c = t.isAnimating, u = c === void 0 ? !1 : c, d = t.minimum, f = d === void 0 ? 0.08 : d, x = Ai(vr), w = x[0], C = x[1], k = xe(null), j = xe(null);
4269
- pr(function() {
4270
- k.current = Si(), j.current = Ci();
4271
- });
4272
- var M = ye(function() {
4273
- var R, W;
4274
- (R = j.current) == null || R.cancel(), (W = k.current) == null || W.clear();
4275
- }, []), $ = ye(function(R) {
4276
- var W;
4277
- if (R = ts(R, f, 1), R === 1) {
4278
- var Y, oe;
4279
- M(), (Y = k.current) == null || Y.enqueue(function(me) {
4280
- C({
4281
- progress: R,
4282
- sideEffect: function() {
4283
- var je;
4284
- return (je = j.current) == null ? void 0 : je.schedule(me, n);
4285
- }
4286
- });
4287
- }), (oe = k.current) == null || oe.enqueue(function() {
4288
- C({
4289
- isFinished: !0,
4290
- sideEffect: M
4291
- });
4292
- });
4293
- return;
4294
- }
4295
- (W = k.current) == null || W.enqueue(function(me) {
4296
- C({
4297
- isFinished: !1,
4298
- progress: R,
4299
- sideEffect: function() {
4300
- var je;
4301
- return (je = j.current) == null ? void 0 : je.schedule(me, n);
4302
- }
4303
- });
4304
- });
4305
- }, [n, M, f, k, C, j]), D = ye(function() {
4306
- $(Ni(w().progress));
4307
- }, [w, $]), N = ye(function() {
4308
- var R = function() {
4309
- var Y;
4310
- D(), (Y = k.current) == null || Y.enqueue(function(oe) {
4311
- var me;
4312
- (me = j.current) == null || me.schedule(function() {
4313
- R(), oe();
4314
- }, i);
4315
- });
4316
- };
4317
- R();
4318
- }, [i, k, j, D]), O = xe(rs), h = w().sideEffect;
4319
- return ae(function() {
4320
- O.current = D;
4321
- }), pr(function() {
4322
- return u && N(), M;
4323
- }), gr(function() {
4324
- w().sideEffect();
4325
- }, [w, h]), gr(function() {
4326
- u ? C(_t({}, vr, {
4327
- sideEffect: N
4328
- })) : $(1);
4329
- }, [u, $, C, N]), {
4330
- animationDuration: n,
4331
- isFinished: w().isFinished,
4332
- progress: w().progress
4333
- };
4334
- };
4335
- const ss = (r) => (e) => e.display === "hide" ? !1 : e.display === "auth" && r || e.display === "anon" && !r || !e.display || e.display === "always", ns = () => {
4336
- const e = wt().state === "loading", [t, s] = Ee(!1);
4337
- ae(() => {
4338
- const i = setTimeout(() => s(e), 100);
4339
- return () => clearTimeout(i);
4340
- }, [e]);
4341
- const { isFinished: n, progress: a } = Ri({ isAnimating: t });
4342
- return /* @__PURE__ */ o.jsx(
4343
- "div",
4344
- {
4345
- className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
4346
- style: {
4347
- opacity: n ? 0 : 1,
4348
- width: n ? 0 : `${a * 100}%`
4349
- }
4350
- }
4351
- );
4352
- }, Mi = () => {
4353
- const { topNavigation: r } = ne(), { isAuthenticated: e } = Be(), t = r.filter(ss(e));
4354
- return t.length === 0 ? /* @__PURE__ */ o.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ o.jsxs(Lt, { children: [
4355
- /* @__PURE__ */ o.jsxs("div", { className: "items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm relative", children: [
4356
- /* @__PURE__ */ o.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((s) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(as, { ...s }) }, s.id)) }) }),
4357
- /* @__PURE__ */ o.jsx(Q, { name: "top-navigation-side" })
4358
- ] }),
4359
- /* @__PURE__ */ o.jsx(ns, {})
4360
- ] });
4361
- }, as = ({
4362
- id: r,
4363
- label: e,
4364
- default: t
4365
- }) => {
4366
- var d;
4367
- const { sidebars: s } = ne(), n = s[r], a = Or(), i = !!wt().location, c = ((d = a.topNavItem) == null ? void 0 : d.id) === r && !i, u = t ?? (n ? Us(n, (f) => {
4368
- if (f.type === "doc") return Pe(f.id);
4369
- }) : Pe(r)) ?? Pe(r);
4370
- return (
4371
- // We don't use isActive here because it has to be inside the sidebar,
4372
- // the top nav id doesn't necessarily start with the sidebar id
4373
- /* @__PURE__ */ o.jsx(
4374
- Zs,
4375
- {
4376
- className: ({ isPending: f }) => Un(
4377
- "block lg:py-3.5 font-medium -mb-px",
4378
- c || f ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
4379
- ),
4380
- to: u,
4381
- children: e
4382
- }
4383
- )
4384
- );
4385
- }, Ii = () => {
4386
- var a;
4387
- const { topNavigation: r, options: e } = ne(), { isAuthenticated: t } = Be(), [s, n] = Ee(!1);
4388
- return /* @__PURE__ */ o.jsxs(
4389
- Bn,
4390
- {
4391
- direction: "right",
4392
- open: s,
4393
- onOpenChange: (i) => n(i),
4394
- children: [
4395
- /* @__PURE__ */ o.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
4396
- /* @__PURE__ */ o.jsx(Vn, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx(mn, { size: 22 }) }),
4397
- /* @__PURE__ */ o.jsx(ns, {})
4398
- ] }),
4399
- /* @__PURE__ */ o.jsx(
4400
- $r,
4401
- {
4402
- className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
4403
- "aria-describedby": void 0,
4404
- children: /* @__PURE__ */ o.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
4405
- /* @__PURE__ */ o.jsxs("div", { children: [
4406
- /* @__PURE__ */ o.jsx(Zr, { children: /* @__PURE__ */ o.jsx(Dr, { children: "Navigation" }) }),
4407
- /* @__PURE__ */ o.jsx(Xr, { className: "flex p-4" }),
4408
- /* @__PURE__ */ o.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
4409
- /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(es, {}) }),
4410
- r.filter(ss(t)).map((i) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx("button", { type: "button", onClick: () => n(!1), children: /* @__PURE__ */ o.jsx(as, { ...i }) }) }, i.label))
4411
- ] })
4412
- ] }),
4413
- ((a = e.page) == null ? void 0 : a.showPoweredBy) !== !1 && /* @__PURE__ */ o.jsx(Jr, { className: "flex-grow-0 justify-center gap-1" })
4414
- ] })
4415
- }
4416
- )
4417
- ]
4418
- }
4419
- );
4420
- }, lt = ({ item: r }) => r.children ? /* @__PURE__ */ o.jsxs(Dn, { children: [
4421
- /* @__PURE__ */ o.jsx(zn, { children: r.label }),
4422
- /* @__PURE__ */ o.jsx(Fn, { children: /* @__PURE__ */ o.jsx(qn, { children: r.children.map((e, t) => (
4423
- // eslint-disable-next-line react/no-array-index-key
4424
- /* @__PURE__ */ o.jsx(lt, { item: e }, t)
4425
- )) }) })
4426
- ] }, r.label) : /* @__PURE__ */ o.jsx(Ft, { to: r.path ?? "", children: /* @__PURE__ */ o.jsxs(Ln, { className: "flex gap-2", children: [
4427
- r.icon && /* @__PURE__ */ o.jsx(r.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
4428
- r.label
4429
- ] }, r.label) }), is = Mr(function() {
4430
- const e = Be(), { isAuthenticated: t, profile: s, isAuthEnabled: n } = Be(), a = ne(), { page: i, plugins: c } = a, u = c.filter((d) => Sn(d)).flatMap((d) => d.getProfileMenuItems(a)).sort((d) => d.weight ?? 0);
4431
- return /* @__PURE__ */ o.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
4432
- /* @__PURE__ */ o.jsx(xi, {}),
4433
- /* @__PURE__ */ o.jsx("div", { className: "border-b", children: /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto flex relative items-center justify-between px-4 lg:px-8 h-[--top-header-height] border-transparent", children: [
4434
- /* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(Ft, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
4435
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
4436
- /* @__PURE__ */ o.jsx(
4437
- "img",
4438
- {
4439
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Pe(
4440
- "/",
4441
- i.logo.src.light
4442
- ),
4443
- alt: i.logo.alt ?? i.pageTitle,
4444
- style: { width: i.logo.width },
4445
- className: "h-10 dark:hidden",
4446
- loading: "lazy"
4447
- }
4448
- ),
4449
- /* @__PURE__ */ o.jsx(
4450
- "img",
4451
- {
4452
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Pe(
4453
- "/",
4454
- i.logo.src.dark
4455
- ),
4456
- alt: i.logo.alt ?? i.pageTitle,
4457
- style: { width: i.logo.width },
4458
- className: "h-10 hidden dark:block",
4459
- loading: "lazy"
4460
- }
4461
- )
4462
- ] }),
4463
- /* @__PURE__ */ o.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
4464
- ] }) }) }),
4465
- /* @__PURE__ */ o.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ o.jsx(Xr, { className: "pointer-events-auto" }) }),
4466
- /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-8", children: [
4467
- /* @__PURE__ */ o.jsx(Ii, {}),
4468
- /* @__PURE__ */ o.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
4469
- /* @__PURE__ */ o.jsx(Q, { name: "head-navigation-start" }),
4470
- n && /* @__PURE__ */ o.jsx(
4471
- kt,
4472
- {
4473
- fallback: /* @__PURE__ */ o.jsx(yi, { className: "rounded h-5 w-24 mr-4" }),
4474
- children: t ? Object.values(u).length > 0 && /* @__PURE__ */ o.jsxs(Mn, { modal: !1, children: [
4475
- /* @__PURE__ */ o.jsx(In, { asChild: !0, children: /* @__PURE__ */ o.jsx(Pt, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
4476
- /* @__PURE__ */ o.jsxs(Zn, { className: "w-56", children: [
4477
- /* @__PURE__ */ o.jsxs($n, { children: [
4478
- s != null && s.name ? `${s.name}` : "My Account",
4479
- (s == null ? void 0 : s.email) && /* @__PURE__ */ o.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
4480
- ] }),
4481
- u.filter((d) => d.category === "top").length > 0 && /* @__PURE__ */ o.jsx(Nt, {}),
4482
- u.filter((d) => d.category === "top").map((d) => /* @__PURE__ */ o.jsx(lt, { item: d }, d.label)),
4483
- u.filter(
4484
- (d) => !d.category || d.category === "middle"
4485
- ).length > 0 && /* @__PURE__ */ o.jsx(Nt, {}),
4486
- u.filter(
4487
- (d) => !d.category || d.category === "middle"
4488
- ).map((d) => /* @__PURE__ */ o.jsx(lt, { item: d }, d.label)),
4489
- u.filter((d) => d.category === "bottom").length > 0 && /* @__PURE__ */ o.jsx(Nt, {}),
4490
- u.filter((d) => d.category === "bottom").map((d) => /* @__PURE__ */ o.jsx(lt, { item: d }, d.label))
4491
- ] })
4492
- ] }) : /* @__PURE__ */ o.jsx(Pt, { variant: "ghost", onClick: () => e.login(), children: "Login" })
4493
- }
4494
- ),
4495
- /* @__PURE__ */ o.jsx(Q, { name: "head-navigation-end" }),
4496
- /* @__PURE__ */ o.jsx(es, {})
4497
- ] })
4498
- ] })
4499
- ] }) }),
4500
- /* @__PURE__ */ o.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent", children: [
4501
- /* @__PURE__ */ o.jsx(Q, { name: "top-navigation-before" }),
4502
- /* @__PURE__ */ o.jsx(Mi, {}),
4503
- /* @__PURE__ */ o.jsx(Q, { name: "top-navigation-after" })
4504
- ] }) })
4505
- ] });
4506
- }), os = ({
4507
- shouldScaleBackground: r = !0,
4508
- ...e
4509
- }) => /* @__PURE__ */ o.jsx(
4510
- ie.Root,
4511
- {
4512
- shouldScaleBackground: r,
4513
- ...e
4514
- }
4515
- );
4516
- os.displayName = "Drawer";
4517
- const Zi = ie.Trigger, $i = ie.Portal, cs = fe.forwardRef(({ className: r, ...e }, t) => /* @__PURE__ */ o.jsx(
4518
- ie.Overlay,
4519
- {
4520
- ref: t,
4521
- className: q("fixed inset-0 z-50 bg-black/80", r),
4522
- ...e
4523
- }
4524
- ));
4525
- cs.displayName = ie.Overlay.displayName;
4526
- const Di = fe.forwardRef(
4527
- ({ className: r, children: e, hideBar: t = !0, ...s }, n) => /* @__PURE__ */ o.jsxs($i, { children: [
4528
- /* @__PURE__ */ o.jsx(cs, {}),
4529
- /* @__PURE__ */ o.jsxs(
4530
- ie.Content,
4531
- {
4532
- ref: n,
4533
- className: q(
4534
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
4535
- r
4536
- ),
4537
- ...s,
4538
- children: [
4539
- !t && /* @__PURE__ */ o.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
4540
- e
4541
- ]
4542
- }
4543
- )
4544
- ] })
4545
- );
4546
- Di.displayName = "DrawerContent";
4547
- const zi = fe.forwardRef(({ className: r, ...e }, t) => /* @__PURE__ */ o.jsx(
4548
- ie.Title,
4549
- {
4550
- ref: t,
4551
- className: q(
4552
- "text-lg font-semibold leading-none tracking-tight",
4553
- r
4554
- ),
4555
- ...e
4556
- }
4557
- ));
4558
- zi.displayName = ie.Title.displayName;
4559
- const Fi = fe.forwardRef(({ className: r, ...e }, t) => /* @__PURE__ */ o.jsx(
4560
- ie.Description,
4561
- {
4562
- ref: t,
4563
- className: q("text-sm text-muted-foreground", r),
4564
- ...e
4565
- }
4566
- ));
4567
- Fi.displayName = ie.Description.displayName;
4568
- const ds = ({
4569
- children: r,
4570
- className: e
4571
- }) => {
4572
- var n;
4573
- const { options: t } = ne(), s = xe(null);
4574
- return ae(() => {
4575
- var i;
4576
- const a = (i = s.current) == null ? void 0 : i.querySelector('[aria-current="page"]');
4577
- vn(a ?? null);
4578
- }, []), /* @__PURE__ */ o.jsxs("div", { className: "grid sticky top-[--header-height] lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r", children: [
4579
- /* @__PURE__ */ o.jsx(
4580
- "nav",
4581
- {
4582
- ref: s,
4583
- className: q(
4584
- "hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
4585
- "-mx-[--padding-nav-item] pb-[8vh] pt-[--padding-content-top] scroll-pt-2 gap-1",
4586
- // Revert the padding/margin on the first child
4587
- "-mt-2.5",
4588
- e
4589
- ),
4590
- style: {
4591
- maskImage: "linear-gradient(180deg, transparent 1%, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 90%, transparent 99%)"
4592
- },
4593
- children: r
4594
- }
4595
- ),
4596
- /* @__PURE__ */ o.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: ((n = t.page) == null ? void 0 : n.showPoweredBy) !== !1 && /* @__PURE__ */ o.jsx(Jr, {}) })
4597
- ] });
4598
- };
4599
- ds.displayName = "SidebarWrapper";
4600
- const qi = ({
4601
- onRequestClose: r,
4602
- sidebar: e
4603
- }) => /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
4604
- /* @__PURE__ */ o.jsxs(ds, { children: [
4605
- /* @__PURE__ */ o.jsx(Q, { name: "zudoku-before-navigation" }),
4606
- e.map((t) => /* @__PURE__ */ o.jsx(
4607
- rr,
4608
- {
4609
- item: t
4610
- },
4611
- ("id" in t ? t.id : "") + ("href" in t ? t.href : "") + t.label
4612
- )),
4613
- /* @__PURE__ */ o.jsx(Q, { name: "zudoku-after-navigation" })
4614
- ] }),
4615
- /* @__PURE__ */ o.jsx(
4616
- $r,
4617
- {
4618
- className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
4619
- "aria-describedby": void 0,
4620
- children: /* @__PURE__ */ o.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
4621
- /* @__PURE__ */ o.jsx(Zr, { children: /* @__PURE__ */ o.jsx(Dr, { children: "Sidebar" }) }),
4622
- e.map((t) => /* @__PURE__ */ o.jsx(
4623
- rr,
4624
- {
4625
- item: t,
4626
- onRequestClose: r
4627
- },
4628
- t.label
4629
- ))
4630
- ] })
4631
- }
4632
- )
4633
- ] }), Li = ({ children: r }) => {
4634
- const [e, t] = Ee(!1), { sidebar: s } = Or(), n = s.length > 0, a = wt().state === "loading";
4635
- return /* @__PURE__ */ o.jsxs(
4636
- os,
4637
- {
4638
- direction: "left",
4639
- open: e,
4640
- onOpenChange: (i) => t(i),
4641
- children: [
4642
- n && /* @__PURE__ */ o.jsx(
4643
- qi,
4644
- {
4645
- onRequestClose: () => t(!1),
4646
- sidebar: s
4647
- }
4648
- ),
4649
- n && /* @__PURE__ */ o.jsx("div", { className: "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b", children: /* @__PURE__ */ o.jsxs(Zi, { className: "flex items-center gap-2 px-4", children: [
4650
- /* @__PURE__ */ o.jsx(pn, { size: 16, strokeWidth: 1.5 }),
4651
- /* @__PURE__ */ o.jsx("span", { className: "text-sm", children: "Menu" })
4652
- ] }) }),
4653
- /* @__PURE__ */ o.jsxs(
4654
- "main",
4655
- {
4656
- "data-pagefind-body": !0,
4657
- className: q(
4658
- "px-4 lg:pe-8 lg:px-8",
4659
- !n && "col-span-full",
4660
- a && "animate-pulse"
4661
- ),
4662
- children: [
4663
- /* @__PURE__ */ o.jsx(Q, { name: "zudoku-before-content" }),
4664
- r,
4665
- /* @__PURE__ */ o.jsx(Q, { name: "zudoku-after-content" })
4666
- ]
4667
- }
4668
- )
4669
- ]
4670
- }
4671
- );
4672
- }, Bi = () => /* @__PURE__ */ o.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ o.jsx(Ir, {}) }), Vi = ({ children: r }) => {
4673
- const { meta: e, authentication: t, options: s } = ne(), n = bt();
4674
- return yn(), mi(), ae(() => {
4675
- var a;
4676
- (a = t == null ? void 0 : t.onPageLoad) == null || a.call(t);
4677
- }, [t]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
4678
- !1,
4679
- /* @__PURE__ */ o.jsxs(zt, { titleTemplate: e == null ? void 0 : e.title, children: [
4680
- s.canonicalUrlOrigin && /* @__PURE__ */ o.jsx(
4681
- "link",
4682
- {
4683
- rel: "canonical",
4684
- href: Pe(
4685
- s.canonicalUrlOrigin,
4686
- s.basePath,
4687
- n.pathname
4688
- )
4689
- }
4690
- ),
4691
- (e == null ? void 0 : e.description) && /* @__PURE__ */ o.jsx("meta", { name: "description", content: e.description }),
4692
- (e == null ? void 0 : e.favicon) && /* @__PURE__ */ o.jsx("link", { rel: "icon", href: e.favicon })
4693
- ] }),
4694
- /* @__PURE__ */ o.jsx(Q, { name: "layout-before-head" }),
4695
- /* @__PURE__ */ o.jsx(is, {}),
4696
- /* @__PURE__ */ o.jsx(Q, { name: "layout-after-head" }),
4697
- /* @__PURE__ */ o.jsx(
4698
- "div",
4699
- {
4700
- className: q(
4701
- "grid max-w-screen-2xl w-full lg:mx-auto",
4702
- "has-[:only-child]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
4703
- "grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
4704
- ),
4705
- children: /* @__PURE__ */ o.jsx(Lt, { fallback: /* @__PURE__ */ o.jsx(Bi, {}), children: /* @__PURE__ */ o.jsx(Li, { children: r ?? /* @__PURE__ */ o.jsx(Tr, {}) }) })
4706
- }
4707
- ),
4708
- /* @__PURE__ */ o.jsx(vi, {})
4709
- ] });
4710
- }, Ui = ({
4711
- title: r = "An error occurred",
4712
- message: e,
4713
- category: t
4714
- }) => /* @__PURE__ */ o.jsxs("div", { className: _n + " h-full pt-[--padding-content-top]", children: [
4715
- t && /* @__PURE__ */ o.jsx(jn, { children: t }),
4716
- r && /* @__PURE__ */ o.jsx(xn, { level: 1, className: "flex gap-3.5 items-center", children: r }),
4717
- /* @__PURE__ */ o.jsx("p", { children: e })
4718
- ] }), Qi = (r) => {
4719
- switch (r) {
4720
- case 400:
4721
- return {
4722
- title: "Bad Request",
4723
- message: "The request could not be understood by the server due to malformed syntax."
4724
- };
4725
- case 403:
4726
- return {
4727
- title: "Forbidden",
4728
- message: "You don't have permission to access this resource."
4729
- };
4730
- case 404:
4731
- return {
4732
- title: "Not Found",
4733
- message: "The requested resource could not be found."
4734
- };
4735
- case 405:
4736
- return {
4737
- title: "Method Not Allowed",
4738
- message: "The request method is not supported for the requested resource."
4739
- };
4740
- case 414:
4741
- return {
4742
- title: "Request URI Too Large",
4743
- message: "The request URI is too large."
4744
- };
4745
- case 416:
4746
- return {
4747
- title: "Range Not Satisfiable",
4748
- message: "The server cannot satisfy the request range."
4749
- };
4750
- case 500:
4751
- return {
4752
- title: "Internal Server Error",
4753
- message: "An unexpected error occurred while processing your request."
4754
- };
4755
- case 501:
4756
- return {
4757
- title: "Not Implemented",
4758
- message: "The server does not support the functionality required to fulfill the request."
4759
- };
4760
- case 502:
4761
- return {
4762
- title: "Bad Gateway",
4763
- message: "The server received an invalid response from the upstream server."
4764
- };
4765
- case 503:
4766
- return {
4767
- title: "Service Unavailable",
4768
- message: "The server is temporarily unable to handle the request."
4769
- };
4770
- case 504:
4771
- return {
4772
- title: "Gateway Timeout",
4773
- message: "The server did not receive a timely response from the upstream server."
4774
- };
4775
- default:
4776
- return {
4777
- title: "An error occurred",
4778
- message: "Something went wrong while processing your request."
4779
- };
4780
- }
4781
- }, Hi = ({ statusCode: r, message: e }) => {
4782
- const t = Qi(r);
4783
- return /* @__PURE__ */ o.jsx(
4784
- Ui,
4785
- {
4786
- title: t.title,
4787
- message: e ?? t.message,
4788
- category: r
4789
- }
4790
- );
4791
- }, Wi = qt(null), At = {
4792
- didCatch: !1,
4793
- error: null
4794
- };
4795
- class Yi extends rn {
4796
- constructor(e) {
4797
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = At;
4798
- }
4799
- static getDerivedStateFromError(e) {
4800
- return {
4801
- didCatch: !0,
4802
- error: e
4803
- };
4804
- }
4805
- resetErrorBoundary() {
4806
- const {
4807
- error: e
4808
- } = this.state;
4809
- if (e !== null) {
4810
- for (var t, s, n = arguments.length, a = new Array(n), i = 0; i < n; i++)
4811
- a[i] = arguments[i];
4812
- (t = (s = this.props).onReset) === null || t === void 0 || t.call(s, {
4813
- args: a,
4814
- reason: "imperative-api"
4815
- }), this.setState(At);
4816
- }
4817
- }
4818
- componentDidCatch(e, t) {
4819
- var s, n;
4820
- (s = (n = this.props).onError) === null || s === void 0 || s.call(n, e, t);
4821
- }
4822
- componentDidUpdate(e, t) {
4823
- const {
4824
- didCatch: s
4825
- } = this.state, {
4826
- resetKeys: n
4827
- } = this.props;
4828
- if (s && t.error !== null && Ki(e.resetKeys, n)) {
4829
- var a, i;
4830
- (a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
4831
- next: n,
4832
- prev: e.resetKeys,
4833
- reason: "keys"
4834
- }), this.setState(At);
4835
- }
4836
- }
4837
- render() {
4838
- const {
4839
- children: e,
4840
- fallbackRender: t,
4841
- FallbackComponent: s,
4842
- fallback: n
4843
- } = this.props, {
4844
- didCatch: a,
4845
- error: i
4846
- } = this.state;
4847
- let c = e;
4848
- if (a) {
4849
- const u = {
4850
- error: i,
4851
- resetErrorBoundary: this.resetErrorBoundary
4852
- };
4853
- if (typeof t == "function")
4854
- c = t(u);
4855
- else if (s)
4856
- c = tr(s, u);
4857
- else if (n !== void 0)
4858
- c = n;
4859
- else
4860
- throw i;
4861
- }
4862
- return tr(Wi.Provider, {
4863
- value: {
4864
- didCatch: a,
4865
- error: i,
4866
- resetErrorBoundary: this.resetErrorBoundary
4867
- }
4868
- }, c);
4869
- }
4870
- }
4871
- function Ki() {
4872
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
4873
- return r.length !== e.length || r.some((t, s) => !Object.is(t, e[s]));
4874
- }
4875
- let Gi = () => ({
4876
- emit(r, ...e) {
4877
- for (let t = this.events[r] || [], s = 0, n = t.length; s < n; s++)
4878
- t[s](...e);
4879
- },
4880
- events: {},
4881
- on(r, e) {
4882
- var t;
4883
- return ((t = this.events)[r] || (t[r] = [])).push(e), () => {
4884
- var s;
4885
- this.events[r] = (s = this.events[r]) == null ? void 0 : s.filter((n) => e !== n);
4886
- };
4887
- }
4888
- });
4889
- class Ji {
4890
- constructor(e, t) {
4891
- B(this, "plugins");
4892
- B(this, "sidebars");
4893
- B(this, "topNavigation");
4894
- B(this, "meta");
4895
- B(this, "page");
4896
- B(this, "authentication");
4897
- B(this, "navigationPlugins");
4898
- B(this, "emitter", Gi());
4899
- B(this, "initialize", async () => {
4900
- await Promise.all(
4901
- this.plugins.filter(En).map((e) => {
4902
- var t;
4903
- return (t = e.initialize) == null ? void 0 : t.call(e, this);
4904
- })
4905
- );
4906
- });
4907
- B(this, "getApiIdentities", async () => (await Promise.all(
4908
- this.plugins.filter(On).map((t) => t.getIdentities(this))
4909
- )).flat());
4910
- B(this, "emitEvent", (e, ...t) => this.emitter.emit(e, ...t));
4911
- B(this, "getPluginSidebar", async (e) => (await Promise.all(
4912
- this.navigationPlugins.map(
4913
- (s) => {
4914
- var n;
4915
- return (n = s.getSidebar) == null ? void 0 : n.call(s, Hs(e), this);
4916
- }
4917
- )
4918
- )).flatMap((s) => s ?? []));
4919
- B(this, "signRequest", async (e) => {
4920
- if (!this.authentication)
4921
- throw new Error("No authentication provider configured");
4922
- return await this.authentication.signRequest(e);
4923
- });
4924
- this.options = e, this.queryClient = t, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Cn), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((s) => {
4925
- Nn(s) && Rn(s.events).forEach(([n, a]) => {
4926
- this.emitter.on(n, a);
4927
- });
4928
- }), Qs.subscribe((s, n) => {
4929
- this.emitEvent("auth", {
4930
- prev: n,
4931
- next: s
4932
- });
4933
- });
4934
- }
4935
- addEventListener(e, t) {
4936
- return this.emitter.on(e, t);
4937
- }
4938
- }
4939
- function Xi({ error: r, resetErrorBoundary: e }) {
4940
- return /* @__PURE__ */ o.jsx(Ar, { error: r });
4941
- }
4942
- const ut = globalThis;
4943
- (!ut.requestIdleCallback || !ut.cancelIdleCallback) && (ut.requestIdleCallback = (r) => setTimeout(r, 1), ut.cancelIdleCallback = clearTimeout);
4944
- const us = {
4945
- Header: is
4946
- }, eo = qt(us), to = eo.Provider, ro = () => {
4947
- const r = bt(), e = ne(), t = xe(void 0);
4948
- return ae(() => {
4949
- e.emitEvent("location", {
4950
- from: t.current,
4951
- to: r
4952
- }), t.current = r;
4953
- }, [e, r]), null;
4954
- }, so = ({
4955
- children: r,
4956
- context: e
4957
- }) => (Ws({
4958
- queryFn: async () => (await e.initialize(), !0),
4959
- queryKey: ["zudoku-initialize"]
4960
- }), /* @__PURE__ */ o.jsx(Ys.Provider, { value: e, children: r }));
4961
- let yr;
4962
- const ls = Mr(
4963
- ({ children: r, ...e }) => {
4964
- var w, C;
4965
- const t = Ct(
4966
- () => ({ ...us, ...e.overrides }),
4967
- [e.overrides]
4968
- ), s = bt(), n = Ct(() => {
4969
- var j;
4970
- return {
4971
- ...(e.plugins ?? []).filter(An).flatMap(
4972
- (M) => M.getMdxComponents ? [M.getMdxComponents()] : []
4973
- ).reduce(
4974
- (M, $) => ({ ...M, ...$ }),
4975
- {}
4976
- ),
4977
- ...bn,
4978
- ...(j = e.mdx) == null ? void 0 : j.components
4979
- };
4980
- }, [(w = e.mdx) == null ? void 0 : w.components, e.plugins]), { stagger: a } = sn(Mt), [i, c] = Ee(!1), u = Ct(
4981
- () => i ? { stagger: !0 } : { stagger: a },
4982
- [a, i]
4983
- ), d = wt(), f = Nr();
4984
- ae(() => {
4985
- i || c(!0);
4986
- }, [i, d.location]), yr ?? (yr = new Ji(e, f));
4987
- const x = (C = e.plugins) == null ? void 0 : C.flatMap(
4988
- (k) => {
4989
- var j;
4990
- return Pn(k) ? ((j = k.getHead) == null ? void 0 : j.call(k, { location: s })) ?? [] : [];
4991
- }
4992
- ).map((k, j) => /* @__PURE__ */ o.jsx(zt, { children: k }, j));
4993
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
4994
- x,
4995
- /* @__PURE__ */ o.jsx(Mt.Provider, { value: u, children: /* @__PURE__ */ o.jsxs(so, { context: yr, children: [
4996
- /* @__PURE__ */ o.jsx(ro, {}),
4997
- /* @__PURE__ */ o.jsx(Qn, { components: n, children: /* @__PURE__ */ o.jsx(Rs, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ o.jsx(to, { value: t, children: /* @__PURE__ */ o.jsx(Js, { slotlets: e.slotlets, children: /* @__PURE__ */ o.jsx(wn, { children: r ?? /* @__PURE__ */ o.jsx(Tr, {}) }) }) }) }) })
4998
- ] }) })
4999
- ] });
5000
- }
5001
- );
5002
- ls.displayName = "ZudokoInner";
5003
- const fs = (r) => /* @__PURE__ */ o.jsx(Yi, { FallbackComponent: Xi, children: /* @__PURE__ */ o.jsx(ls, { ...r }) });
5004
- fs.displayName = "Zudoku";
5005
- const Oo = Fr, Ao = Vi, Po = Xs, Ro = Xn, Mo = ra, Io = sa, Zo = Ps, $o = zt, no = ne, Do = Be, zo = Ks, Fo = Gs, qo = fs, Lo = Hi, Bo = en, Vo = kn, Uo = Ir, Qo = kt, Ho = Pr, Wo = Ft, Yo = jr, Ko = hi;
5006
- export {
5007
- Ho as B,
5008
- Fo as C,
5009
- $o as H,
5010
- Wo as L,
5011
- Vo as M,
5012
- Po as R,
5013
- Ro as S,
5014
- qo as Z,
5015
- Do as a,
5016
- no as b,
5017
- Oo as c,
5018
- Ao as d,
5019
- Mo as e,
5020
- Io as f,
5021
- Zo as g,
5022
- zo as h,
5023
- Lo as i,
5024
- Bo as j,
5025
- Uo as k,
5026
- Qo as l,
5027
- Yo as m,
5028
- Ko as n,
5029
- Fr as u
5030
- };
5031
- //# sourceMappingURL=index-BeYI7Btu.js.map