@marimo-team/frontend 0.13.7-dev7 → 0.13.7-dev9

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 (283) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-aTL16d4W.js +19 -0
  2. package/dist/assets/VegaLite-B8hQHAh-.js +189 -0
  3. package/dist/assets/_baseEach-fsZbP1N8.js +1 -0
  4. package/dist/assets/_baseMap-B8cT6cMO.js +1 -0
  5. package/dist/assets/_baseUniq-BNwwWocp.js +1 -0
  6. package/dist/assets/_createAggregator-uK9tvoQl.js +1 -0
  7. package/dist/assets/{any-language-editor-CzgTNb1K.js → any-language-editor-D3c0CEB2.js} +3 -1
  8. package/dist/assets/apl-CXdQSnD-.js +1 -1
  9. package/dist/assets/arc-Cuwikxov.js +1 -1
  10. package/dist/assets/architectureDiagram-IEHRJDOE-BCA-d6pH.js +36 -0
  11. package/dist/assets/asciiarmor-D5V0T9Cu.js +1 -1
  12. package/dist/assets/asn1-DWPaVWf6.js +1 -1
  13. package/dist/assets/asterisk-B46aRdXb.js +1 -1
  14. package/dist/assets/blockDiagram-JOT3LUYC-Bl5OSgtT.js +121 -0
  15. package/dist/assets/brainfuck-CtZaYBKt.js +1 -1
  16. package/dist/assets/c4Diagram-VJAJSXHY-DHd9cbeI.js +10 -0
  17. package/dist/assets/channel-Cah-fknW.js +1 -0
  18. package/dist/assets/chunk-4BMEZGHF-B2bF-jyl.js +1 -0
  19. package/dist/assets/chunk-A2AXSNBT-CRhdQp4F.js +164 -0
  20. package/dist/assets/chunk-AEK57VVT-CRjefC9t.js +220 -0
  21. package/dist/assets/chunk-D6G4REZN-BeAK2ttI.js +1 -0
  22. package/dist/assets/chunk-RZ5BOZE2-ZaJw1JwS.js +1 -0
  23. package/dist/assets/chunk-XZIHB7SX-uSPpUSf_.js +1 -0
  24. package/dist/assets/{circle-play-DJJzVByn.js → circle-play-DNRu-ReT.js} +1 -2
  25. package/dist/assets/classDiagram-GIVACNV2-C-oJMCYG.js +1 -0
  26. package/dist/assets/classDiagram-v2-COTLJTTW-C-oJMCYG.js +1 -0
  27. package/dist/assets/clike-BgBwzOhw.js +1 -1
  28. package/dist/assets/clojure-DR_hEDJv.js +1 -1
  29. package/dist/assets/clone-DXAqsvWp.js +1 -0
  30. package/dist/assets/cmake-DXn5xaP-.js +1 -1
  31. package/dist/assets/cobol-stawOqaz.js +1 -1
  32. package/dist/assets/coffeescript-BTDxI-eT.js +1 -1
  33. package/dist/assets/colors-bszWmPJw.js +1 -1
  34. package/dist/assets/commonlisp-vq6DHwts.js +1 -1
  35. package/dist/assets/compile-h-VmVS3n.js +10 -0
  36. package/dist/assets/crystal-CRzZ78HM.js +1 -1
  37. package/dist/assets/css-ZjFoif2m.js +1 -1
  38. package/dist/assets/cypher-gJDei3ni.js +1 -1
  39. package/dist/assets/cytoscape.esm-C5gjFiAL.js +10 -0
  40. package/dist/assets/d-BShv7fp-.js +1 -1
  41. package/dist/assets/dagre-OKDRZEBW-CzO1o7j7.js +4 -0
  42. package/dist/assets/data-editor-BPCz-RRC.js +142 -0
  43. package/dist/assets/diagram-SSKATNLV-Bu9tmr_l.js +43 -0
  44. package/dist/assets/diagram-VNBRO52H-B8zB54d2.js +24 -0
  45. package/dist/assets/diff-UJJ5BM9S.js +1 -1
  46. package/dist/assets/dockerfile-knGOOxt4.js +1 -1
  47. package/dist/assets/dtd-DI9Herc-.js +1 -1
  48. package/dist/assets/dylan-CHJ5qNM_.js +1 -1
  49. package/dist/assets/ebnf-B-Df8AvO.js +1 -1
  50. package/dist/assets/ecl-DPFc0Uaf.js +1 -1
  51. package/dist/assets/edit-page-l7M3mmCs.js +134 -0
  52. package/dist/assets/eiffel-DR5c0IrL.js +1 -1
  53. package/dist/assets/elm-D7xaZ7Da.js +1 -1
  54. package/dist/assets/erDiagram-Q7BY3M3F-GiSZ4Niy.js +60 -0
  55. package/dist/assets/erlang-BuqgqA5h.js +1 -1
  56. package/dist/assets/fcl-CVaBTCzQ.js +1 -1
  57. package/dist/assets/flowDiagram-4HSFHLVR-DBSiHd0m.js +161 -0
  58. package/dist/assets/forth-Dri_5nFc.js +1 -1
  59. package/dist/assets/fortran-DL7KluxX.js +1 -1
  60. package/dist/assets/ganttDiagram-APWFNJXF-bMNX-uB5.js +257 -0
  61. package/dist/assets/gas-5kEe4nk0.js +1 -1
  62. package/dist/assets/gherkin-B6X1vGSW.js +1 -1
  63. package/dist/assets/gitGraphDiagram-7IBYFJ6S-BvuyR0TB.js +65 -0
  64. package/dist/assets/graph-B8G81lu0.js +1 -0
  65. package/dist/assets/groovy-DnIzCrpZ.js +1 -1
  66. package/dist/assets/haskell-CmdsSjFB.js +1 -1
  67. package/dist/assets/haxe-D25e-2l-.js +1 -1
  68. package/dist/assets/home-page-CAqsUULE.js +9 -0
  69. package/dist/assets/http-BKJkqRj4.js +1 -1
  70. package/dist/assets/idl-pcmmZuaN.js +1 -1
  71. package/dist/assets/index-2TL38hPv.js +1 -0
  72. package/dist/assets/index-B14EVG6L.js +1 -0
  73. package/dist/assets/index-B9Btdii4.js +1 -0
  74. package/dist/assets/index-B9k4MYlq.js +1 -0
  75. package/dist/assets/index-BDHXY3UE.js +1 -0
  76. package/dist/assets/index-BJsnjxpc.js +476 -0
  77. package/dist/assets/index-BXbzCGbn.js +1 -0
  78. package/dist/assets/index-BxkbDbzB.js +1 -0
  79. package/dist/assets/index-CP8gLM9c.js +7 -0
  80. package/dist/assets/index-CSziElQw.css +1 -0
  81. package/dist/assets/index-D1IdseC1.js +19 -0
  82. package/dist/assets/index-DFpzd1EA.js +1 -0
  83. package/dist/assets/index-DX1YAcio.js +1 -0
  84. package/dist/assets/index-FkBJMqtJ.js +1 -0
  85. package/dist/assets/index-REXxtYrd.js +1 -0
  86. package/dist/assets/index-Wzoc-_uT.js +1 -0
  87. package/dist/assets/index-_KobMnTy.js +1 -0
  88. package/dist/assets/index-j5SusyE5.js +1 -0
  89. package/dist/assets/index-pmR7FK6S.js +1 -0
  90. package/dist/assets/index-wqkTZ9mS.js +1 -0
  91. package/dist/assets/infoDiagram-PH2N3AL5-Dr_g5e_R.js +2 -0
  92. package/dist/assets/init-DLRA0X12.js +1 -1
  93. package/dist/assets/javascript-D48wDJXV.js +1 -1
  94. package/dist/assets/jinja2-DhgKlfW7.js +1 -1
  95. package/dist/assets/journeyDiagram-U35MCT3I-BKBrLjyX.js +138 -0
  96. package/dist/assets/julia-DjdwvFuI.js +1 -1
  97. package/dist/assets/kanban-definition-NDS4AKOZ-B6zYcWR2.js +88 -0
  98. package/dist/assets/katex-BsnJiHtx.js +261 -0
  99. package/dist/assets/layout-DOrZNmX_.js +1 -0
  100. package/dist/assets/linear-CCD4VqSh.js +1 -0
  101. package/dist/assets/livescript-HO6ttBFx.js +1 -1
  102. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  103. package/dist/assets/lua-8DXOpKDz.js +1 -1
  104. package/dist/assets/mathematica-IIbmv7SK.js +1 -1
  105. package/dist/assets/mbox-z_N2Mo3d.js +1 -0
  106. package/dist/assets/mermaid-CMGFQ7sl.js +152 -0
  107. package/dist/assets/mhchem-C_nT2J_7.js +1 -0
  108. package/dist/assets/min-C21FYuz2.js +1 -0
  109. package/dist/assets/mindmap-definition-ALO5MXBD-CR7IM-_J.js +95 -0
  110. package/dist/assets/mirc-DkvFAiy5.js +1 -1
  111. package/dist/assets/mllike-3c2dg9RT.js +1 -1
  112. package/dist/assets/modelica-DSrSSXCg.js +1 -1
  113. package/dist/assets/mscgen-B2igx18G.js +1 -1
  114. package/dist/assets/mumps-zvxmGV4l.js +1 -1
  115. package/dist/assets/nginx-B4hAVlXN.js +1 -1
  116. package/dist/assets/ntriples-FFvkTduk.js +1 -1
  117. package/dist/assets/octave-C4hdQ5Hf.js +1 -1
  118. package/dist/assets/ordinal-DDUp3AbE.js +1 -1
  119. package/dist/assets/oz-qQq7irPq.js +1 -1
  120. package/dist/assets/pascal-CafrKXZF.js +1 -1
  121. package/dist/assets/perl-tdMlh9QA.js +1 -1
  122. package/dist/assets/pieDiagram-IB7DONF6-C9jxnyRb.js +30 -0
  123. package/dist/assets/pig-CwGJVRC4.js +1 -1
  124. package/dist/assets/powershell-D1ly3AHC.js +1 -1
  125. package/dist/assets/properties-_nPj978X.js +1 -1
  126. package/dist/assets/protobuf-B4y9do6W.js +1 -1
  127. package/dist/assets/pug-_kJOm_E2.js +1 -1
  128. package/dist/assets/puppet-Bc-yJKzi.js +1 -1
  129. package/dist/assets/python-DD-Q2bae.js +1 -1
  130. package/dist/assets/q-B0kTJ4cI.js +1 -1
  131. package/dist/assets/quadrantDiagram-7GDLP6J5-eEYJI1dE.js +7 -0
  132. package/dist/assets/r-BA4EbLKE.js +1 -1
  133. package/dist/assets/radar-MK3ICKWK-8ZFTaZOH.js +126 -0
  134. package/dist/assets/range-CtcPcB_L.js +1 -1
  135. package/dist/assets/react-plotly-Dp2qjlur.js +4074 -0
  136. package/dist/assets/requirementDiagram-KVF5MWMF-CHvk2MiF.js +64 -0
  137. package/dist/assets/rpm-DI_rRufH.js +1 -1
  138. package/dist/assets/ruby-CR-u2WLS.js +1 -1
  139. package/dist/assets/run-page-Cm3oi86f.js +1 -0
  140. package/dist/assets/sankeyDiagram-QLVOVGJD-B1tF5GpG.js +10 -0
  141. package/dist/assets/sas-Bqaci40L.js +1 -1
  142. package/dist/assets/save-worker-Metbq5yy.js +1 -0
  143. package/dist/assets/scheme-qjP0V5Ag.js +1 -1
  144. package/dist/assets/sequenceDiagram-X6HHIX6F-BOpD8Emj.js +122 -0
  145. package/dist/assets/shell-BLav31RL.js +1 -1
  146. package/dist/assets/sieve-r025o_jW.js +1 -1
  147. package/dist/assets/simple-mode-C3vEBAcb.js +1 -1
  148. package/dist/assets/slides-component-BuPI2hHm.js +1 -0
  149. package/dist/assets/smalltalk-C7J3IyEP.js +1 -1
  150. package/dist/assets/solr-78MBEUkU.js +1 -1
  151. package/dist/assets/sortBy-CI3mVihg.js +1 -0
  152. package/dist/assets/sparql-BRLJFz69.js +1 -1
  153. package/dist/assets/spreadsheet-CGlWr0eM.js +1 -1
  154. package/dist/assets/sql-B3SPsWL6.js +1 -1
  155. package/dist/assets/stateDiagram-DGXRK772-IAT7mN_h.js +1 -0
  156. package/dist/assets/stateDiagram-v2-YXO3MK2T-BlMW5hXj.js +1 -0
  157. package/dist/assets/step-BwsUM5iJ.js +1 -1
  158. package/dist/assets/stylus-OdhglgkO.js +1 -1
  159. package/dist/assets/swift-B_XXVlXX.js +1 -1
  160. package/dist/assets/tcl-B2fODqDH.js +1 -1
  161. package/dist/assets/terminal-BvL9BCIG.js +9 -0
  162. package/dist/assets/terminal-WqMRJt5Z.css +1 -0
  163. package/dist/assets/textile-BuVhTOzU.js +1 -1
  164. package/dist/assets/tiddlywiki-BgR6AEZu.js +1 -1
  165. package/dist/assets/tiki-CI-ztowC.js +1 -1
  166. package/dist/assets/time-DDarjbSW.js +1 -0
  167. package/dist/assets/timeline-definition-BDJGKUSR-DNkQnSfP.js +61 -0
  168. package/dist/assets/timer-DFzT7np-.js +1 -1
  169. package/dist/assets/toml-BQXy8elZ.js +1 -1
  170. package/dist/assets/tracing-CgYwDdwx.js +2 -0
  171. package/dist/assets/transform-Cyp0GDF-.js +1 -0
  172. package/dist/assets/tree-D1EDUAby.js +17 -0
  173. package/dist/assets/troff-Ce85hlLp.js +1 -1
  174. package/dist/assets/ttcn-BxnYHtq8.js +1 -1
  175. package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -1
  176. package/dist/assets/turtle-BkSuIpt-.js +1 -1
  177. package/dist/assets/useMarimoWebSocket-ChrB5-Uc.js +27 -0
  178. package/dist/assets/vb-BHgjm0DN.js +1 -1
  179. package/dist/assets/vbscript-Dawdd5GZ.js +1 -1
  180. package/dist/assets/vega-component-ejPpu3Yp.js +1 -0
  181. package/dist/assets/velocity-BdD_26Jv.js +1 -1
  182. package/dist/assets/verilog-B4LBqg_1.js +1 -1
  183. package/dist/assets/vhdl-CWWH2SUo.js +1 -1
  184. package/dist/assets/web-vitals-Buym0gfC.js +1 -0
  185. package/dist/assets/webidl-CGwyPRYs.js +1 -1
  186. package/dist/assets/worker--c-Qm4dm.js +1 -0
  187. package/dist/assets/worker-kTJmA5be.js +1 -0
  188. package/dist/assets/xquery-CVDBqZPY.js +1 -1
  189. package/dist/assets/xychartDiagram-VJFVF3MP-8Wbh5ytf.js +7 -0
  190. package/dist/assets/yacas-I8QjZlxf.js +1 -1
  191. package/dist/assets/z80-D8p3gKXp.js +1 -1
  192. package/dist/assets/zoom-COrs4lFh.js +1 -1
  193. package/dist/index.html +2 -2
  194. package/package.json +5 -4
  195. package/dist/assets/ConnectedDataExplorerComponent-CsepDyah.js +0 -22
  196. package/dist/assets/VegaLite-C1HXtrMV.js +0 -11
  197. package/dist/assets/_baseEach-DD_63bhv.js +0 -1
  198. package/dist/assets/_baseMap-B4VCibcY.js +0 -1
  199. package/dist/assets/_baseUniq-CYFxhDYw.js +0 -1
  200. package/dist/assets/_createAggregator-BzziiCHf.js +0 -1
  201. package/dist/assets/architectureDiagram-IEHRJDOE-C-U-iPbK.js +0 -1
  202. package/dist/assets/blockDiagram-JOT3LUYC-wp_uDvyw.js +0 -1
  203. package/dist/assets/c4Diagram-VJAJSXHY-DVvpvjIh.js +0 -1
  204. package/dist/assets/channel-nBjz4H-G.js +0 -1
  205. package/dist/assets/chunk-4BMEZGHF-DTOzlx-M.js +0 -1
  206. package/dist/assets/chunk-A2AXSNBT-D0aB6LMu.js +0 -1
  207. package/dist/assets/chunk-AEK57VVT-BXKRbqgm.js +0 -1
  208. package/dist/assets/chunk-D6G4REZN-DJIklw-B.js +0 -1
  209. package/dist/assets/chunk-RZ5BOZE2-DbLPmled.js +0 -1
  210. package/dist/assets/chunk-XZIHB7SX-BPf8SbRg.js +0 -1
  211. package/dist/assets/classDiagram-GIVACNV2-D62d1n5s.js +0 -1
  212. package/dist/assets/classDiagram-v2-COTLJTTW-D62d1n5s.js +0 -1
  213. package/dist/assets/clone-BpRHUGO-.js +0 -1
  214. package/dist/assets/compile-BrbPA1FV.js +0 -1
  215. package/dist/assets/cytoscape.esm-bH-fs5wT.js +0 -9
  216. package/dist/assets/dagre-OKDRZEBW-DMUTu875.js +0 -1
  217. package/dist/assets/data-editor-BAugqar1.js +0 -1
  218. package/dist/assets/diagram-SSKATNLV-CgktwEzE.js +0 -1
  219. package/dist/assets/diagram-VNBRO52H-DM157GSt.js +0 -1
  220. package/dist/assets/edit-page-D5MazIt2.js +0 -8
  221. package/dist/assets/erDiagram-Q7BY3M3F-CfYnS787.js +0 -1
  222. package/dist/assets/flowDiagram-4HSFHLVR-BE2xZTx5.js +0 -1
  223. package/dist/assets/ganttDiagram-APWFNJXF-LN8qz0YV.js +0 -1
  224. package/dist/assets/gitGraphDiagram-7IBYFJ6S-BRJVT_zn.js +0 -1
  225. package/dist/assets/graph-UIDUJmse.js +0 -1
  226. package/dist/assets/home-page-CRQcruYX.js +0 -7
  227. package/dist/assets/index-2SONYAJm.js +0 -1
  228. package/dist/assets/index-5ldyqPzW.js +0 -1
  229. package/dist/assets/index-BJDDQR-b.js +0 -1
  230. package/dist/assets/index-BbEv2iVN.css +0 -1
  231. package/dist/assets/index-BcRkZK42.js +0 -1
  232. package/dist/assets/index-BeUu3ch_.js +0 -1
  233. package/dist/assets/index-Bsc9SEYH.js +0 -87
  234. package/dist/assets/index-Bul_n0Oy.js +0 -1
  235. package/dist/assets/index-BxZz8_b9.js +0 -1
  236. package/dist/assets/index-C4iGahsq.js +0 -1
  237. package/dist/assets/index-C8U61zo_.js +0 -1
  238. package/dist/assets/index-CE_UMLrN.js +0 -1
  239. package/dist/assets/index-CF6xeTk8.js +0 -1
  240. package/dist/assets/index-CPXRGKlr.js +0 -1
  241. package/dist/assets/index-Ce6UaJ0J.js +0 -1
  242. package/dist/assets/index-DYy6_SSS.js +0 -1
  243. package/dist/assets/index-DdDVFm9B.js +0 -1
  244. package/dist/assets/index-b_tRbrpS.js +0 -1
  245. package/dist/assets/index-bkSNWDvj.js +0 -1
  246. package/dist/assets/index-i7xW5_nS.js +0 -1
  247. package/dist/assets/infoDiagram-PH2N3AL5-HPC1FDCJ.js +0 -1
  248. package/dist/assets/journeyDiagram-U35MCT3I-C2DEy4EI.js +0 -1
  249. package/dist/assets/kanban-definition-NDS4AKOZ-B_EEiPWw.js +0 -1
  250. package/dist/assets/katex-Blph-pX_.js +0 -1
  251. package/dist/assets/layout-D_LRJAfC.js +0 -1
  252. package/dist/assets/linear-D5vU7l3E.js +0 -1
  253. package/dist/assets/mbox-DoeuZPxA.js +0 -1
  254. package/dist/assets/mermaid-R60l6R69.js +0 -7
  255. package/dist/assets/mhchem-9pkdwevO.js +0 -1
  256. package/dist/assets/min-C-OQ4NGo.js +0 -1
  257. package/dist/assets/mindmap-definition-ALO5MXBD-D4QoDDy8.js +0 -1
  258. package/dist/assets/pieDiagram-IB7DONF6-SF9agpbB.js +0 -1
  259. package/dist/assets/quadrantDiagram-7GDLP6J5-BLMHLPC_.js +0 -1
  260. package/dist/assets/radar-MK3ICKWK-BHuNvtv1.js +0 -1
  261. package/dist/assets/react-plotly-BL5FdwhT.js +0 -71
  262. package/dist/assets/requirementDiagram-KVF5MWMF-DxjKoyr_.js +0 -1
  263. package/dist/assets/run-page-CmD3K-_E.js +0 -1
  264. package/dist/assets/sankeyDiagram-QLVOVGJD-CstUhZQp.js +0 -1
  265. package/dist/assets/save-worker-CQvBUha3.js +0 -1
  266. package/dist/assets/sequenceDiagram-X6HHIX6F-C0DUaj1h.js +0 -1
  267. package/dist/assets/slides-component-ciQA86ZI.js +0 -1
  268. package/dist/assets/sortBy-DtnQOB1o.js +0 -1
  269. package/dist/assets/stateDiagram-DGXRK772-DLwZeaFq.js +0 -1
  270. package/dist/assets/stateDiagram-v2-YXO3MK2T-B0FkKF8G.js +0 -1
  271. package/dist/assets/terminal-DVzybcfs.css +0 -1
  272. package/dist/assets/terminal-th4WQMuZ.js +0 -1
  273. package/dist/assets/time-xufRr6_w.js +0 -1
  274. package/dist/assets/timeline-definition-BDJGKUSR-bfHyV-7E.js +0 -1
  275. package/dist/assets/tracing-DVLROVSe.js +0 -8
  276. package/dist/assets/transform-DjHZbYKP.js +0 -1
  277. package/dist/assets/tree-Bc56h0bS.js +0 -8
  278. package/dist/assets/useMarimoWebSocket-C5cupBS4.js +0 -15
  279. package/dist/assets/vega-component-BCCNIpr4.js +0 -1
  280. package/dist/assets/web-vitals-rCWRSGQR.js +0 -1
  281. package/dist/assets/worker-DMKWnagd.js +0 -1
  282. package/dist/assets/worker-DXe6aoib.js +0 -1
  283. package/dist/assets/xychartDiagram-VJFVF3MP-DxMG0q6v.js +0 -1
@@ -0,0 +1 @@
1
+ function e(e){return e.FS}const t={debug:(...e)=>{},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)}};const n="undefined"!=typeof window&&window.Logger||t,r=e=>(new TextDecoder).decode(e),a="notebook.py",s="/marimo",i=a,o=t=>{const n=e(t);try{n.mkdirTree(s)}catch{}n.chdir(s)},d=t=>{e(t).mount(t.FS.filesystems.IDBFS,{root:"."},s)},c=async e=>{await p(e,!0)},u=async e=>{await p(e,!1)},l=t=>{const{pyodide:n,filename:s,code:i}=t,o=e(n);if(s&&s!==a){const e=(e=>{try{return r(o.readFile(e))}catch{return null}})(s);if(e)return{code:e,filename:s}}return o.writeFile(a,i),{code:i,filename:a}};function p(t,n){return new Promise(((r,a)=>{e(t).syncfs(n,(e=>{e instanceof Error?a(e):r()}))}))}var h,m;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(h||(h={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(m||(m={}));const f=h.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),y=e=>{switch(typeof e){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(e)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(e)?f.array:null===e?f.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?f.promise:"undefined"!=typeof Map&&e instanceof Map?f.map:"undefined"!=typeof Set&&e instanceof Set?f.set:"undefined"!=typeof Date&&e instanceof Date?f.date:f.object;default:return f.unknown}},g=h.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class v extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof v))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,h.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}v.create=e=>new v(e);const _=(e,t)=>{let n;switch(e.code){case g.invalid_type:n=e.received===f.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case g.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,h.jsonStringifyReplacer)}`;break;case g.unrecognized_keys:n=`Unrecognized key(s) in object: ${h.joinValues(e.keys,", ")}`;break;case g.invalid_union:n="Invalid input";break;case g.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${h.joinValues(e.options)}`;break;case g.invalid_enum_value:n=`Invalid enum value. Expected ${h.joinValues(e.options)}, received '${e.received}'`;break;case g.invalid_arguments:n="Invalid function arguments";break;case g.invalid_return_type:n="Invalid function return type";break;case g.invalid_date:n="Invalid date";break;case g.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:h.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case g.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case g.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case g.custom:n="Invalid input";break;case g.invalid_intersection_types:n="Intersection results could not be merged";break;case g.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case g.not_finite:n="Number must be finite";break;default:n=t.defaultError,h.assertNever(e)}return{message:n}};let w=_;function b(){return w}const k=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function x(e,t){const n=b(),r=k({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===_?void 0:_].filter((e=>!!e))});e.common.issues.push(r)}class S{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return T;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return S.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return T;if("aborted"===a.status)return T;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const T=Object.freeze({status:"aborted"}),E=e=>({status:"dirty",value:e}),O=e=>({status:"valid",value:e}),Z=e=>"aborted"===e.status,N=e=>"dirty"===e.status,j=e=>"valid"===e.status,P=e=>"undefined"!=typeof Promise&&e instanceof Promise;function A(e,t,n,r){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function C(e,t,n,r,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var I,R,F;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(I||(I={}));class ${constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const M=(e,t)=>{if(j(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new v(e.common.issues);return this._error=t,this._error}}};function L(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class D{get description(){return this._def.description}_getType(e){return y(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new S,ctx:{common:e.parent.common,data:e.data,parsedType:y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(P(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:y(e)},a=this._parseSync({data:e,path:r.path,parent:r});return M(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:y(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return j(t)?{value:t.value}:{issues:r.common.issues}}catch(a){(null===(n=null===(t=null==a?void 0:a.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>j(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:y(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(P(r)?r:Promise.resolve(r));return M(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:g.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new De({schema:this,typeName:Qe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){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"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ze.create(this,this._def)}nullable(){return Ue.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return be.create(this)}promise(){return Le.create(this,this._def)}or(e){return Se.create([this,e],this._def)}and(e){return Ze.create(this,e,this._def)}transform(e){return new De({...L(this._def),schema:this,typeName:Qe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new qe({...L(this._def),innerType:this,defaultValue:t,typeName:Qe.ZodDefault})}brand(){return new We({typeName:Qe.ZodBranded,type:this,...L(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ve({...L(this._def),innerType:this,catchValue:t,typeName:Qe.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ke.create(this,e)}readonly(){return Je.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const z=/^c[^\s-]{8,}$/i,U=/^[0-9a-z]+$/,q=/^[0-9A-HJKMNP-TV-Z]{26}$/i,V=/^[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,H=/^[a-z0-9_-]{21}$/i,B=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,W=/^[-+]?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)?)??$/,K=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let J;const Y=/^(?:(?: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])$/,G=/^(?:(?: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])$/,X=/^(([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]))$/,Q=/^(([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])$/,ee=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,te=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ne="((\\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])))",re=new RegExp(`^${ne}$`);function ae(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function se(e){let t=`${ne}T${ae(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function ie(e,t){if(!B.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return"object"==typeof a&&null!==a&&(!(!a.typ||!a.alg)&&(!t||a.alg===t))}catch(n){return!1}}function oe(e,t){return!("v4"!==t&&t||!G.test(e))||!("v6"!==t&&t||!Q.test(e))}class de extends D{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==f.string){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.string,received:t.parsedType}),T}const t=new S;let n;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:g.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:g.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const r=e.data.length>i.value,a=e.data.length<i.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?x(n,{code:g.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&x(n,{code:g.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)K.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"email",code:g.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)J||(J=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),J.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"emoji",code:g.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)V.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"uuid",code:g.invalid_string,message:i.message}),t.dirty());else if("nanoid"===i.kind)H.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"nanoid",code:g.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)z.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"cuid",code:g.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)U.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"cuid2",code:g.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)q.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"ulid",code:g.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(s){n=this._getOrReturnCtx(e,n),x(n,{validation:"url",code:g.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"regex",code:g.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),x(n,{code:g.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),x(n,{code:g.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),x(n,{code:g.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){se(i).test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:g.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else if("date"===i.kind){re.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:g.invalid_string,validation:"date",message:i.message}),t.dirty())}else if("time"===i.kind){new RegExp(`^${ae(i)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:g.invalid_string,validation:"time",message:i.message}),t.dirty())}else"duration"===i.kind?W.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"duration",code:g.invalid_string,message:i.message}),t.dirty()):"ip"===i.kind?(r=e.data,("v4"!==(a=i.version)&&a||!Y.test(r))&&("v6"!==a&&a||!X.test(r))&&(n=this._getOrReturnCtx(e,n),x(n,{validation:"ip",code:g.invalid_string,message:i.message}),t.dirty())):"jwt"===i.kind?ie(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"jwt",code:g.invalid_string,message:i.message}),t.dirty()):"cidr"===i.kind?oe(e.data,i.version)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"cidr",code:g.invalid_string,message:i.message}),t.dirty()):"base64"===i.kind?ee.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"base64",code:g.invalid_string,message:i.message}),t.dirty()):"base64url"===i.kind?te.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"base64url",code:g.invalid_string,message:i.message}),t.dirty()):h.assertNever(i);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:g.invalid_string,...I.errToObj(n)})}_addCheck(e){return new de({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...I.errToObj(e)})}url(e){return this._addCheck({kind:"url",...I.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...I.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...I.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...I.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...I.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...I.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...I.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...I.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...I.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...I.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...I.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...I.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...I.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...I.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...I.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...I.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...I.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...I.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...I.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...I.errToObj(t)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new de({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new de({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new de({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ce(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}de.create=e=>{var t;return new de({checks:[],typeName:Qe.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...L(e)})};class ue extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==f.number){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.number,received:t.parsedType}),T}let t;const n=new S;for(const r of this._def.checks)if("int"===r.kind)h.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),x(t,{code:g.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),x(t,{code:g.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),x(t,{code:g.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==ce(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),x(t,{code:g.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),x(t,{code:g.not_finite,message:r.message}),n.dirty()):h.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,I.toString(t))}gt(e,t){return this.setLimit("min",e,!1,I.toString(t))}lte(e,t){return this.setLimit("max",e,!0,I.toString(t))}lt(e,t){return this.setLimit("max",e,!1,I.toString(t))}setLimit(e,t,n,r){return new ue({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:I.toString(r)}]})}_addCheck(e){return new ue({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:I.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:I.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&h.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ue.create=e=>new ue({checks:[],typeName:Qe.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...L(e)});class le extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(r){return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let t;const n=new S;for(const a of this._def.checks)if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),x(t,{code:g.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),x(t,{code:g.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),x(t,{code:g.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):h.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.bigint,received:t.parsedType}),T}gte(e,t){return this.setLimit("min",e,!0,I.toString(t))}gt(e,t){return this.setLimit("min",e,!1,I.toString(t))}lte(e,t){return this.setLimit("max",e,!0,I.toString(t))}lt(e,t){return this.setLimit("max",e,!1,I.toString(t))}setLimit(e,t,n,r){return new le({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:I.toString(r)}]})}_addCheck(e){return new le({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}le.create=e=>{var t;return new le({checks:[],typeName:Qe.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...L(e)})};class pe extends D{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==f.boolean){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.boolean,received:t.parsedType}),T}return O(e.data)}}pe.create=e=>new pe({typeName:Qe.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...L(e)});class he extends D{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==f.date){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.date,received:t.parsedType}),T}if(isNaN(e.data.getTime())){return x(this._getOrReturnCtx(e),{code:g.invalid_date}),T}const t=new S;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:g.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:g.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):h.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new he({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:I.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:I.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}he.create=e=>new he({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Qe.ZodDate,...L(e)});class me extends D{_parse(e){if(this._getType(e)!==f.symbol){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.symbol,received:t.parsedType}),T}return O(e.data)}}me.create=e=>new me({typeName:Qe.ZodSymbol,...L(e)});class fe extends D{_parse(e){if(this._getType(e)!==f.undefined){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.undefined,received:t.parsedType}),T}return O(e.data)}}fe.create=e=>new fe({typeName:Qe.ZodUndefined,...L(e)});class ye extends D{_parse(e){if(this._getType(e)!==f.null){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.null,received:t.parsedType}),T}return O(e.data)}}ye.create=e=>new ye({typeName:Qe.ZodNull,...L(e)});class ge extends D{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}ge.create=e=>new ge({typeName:Qe.ZodAny,...L(e)});class ve extends D{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}ve.create=e=>new ve({typeName:Qe.ZodUnknown,...L(e)});class _e extends D{_parse(e){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.never,received:t.parsedType}),T}}_e.create=e=>new _e({typeName:Qe.ZodNever,...L(e)});class we extends D{_parse(e){if(this._getType(e)!==f.undefined){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.void,received:t.parsedType}),T}return O(e.data)}}we.create=e=>new we({typeName:Qe.ZodVoid,...L(e)});class be extends D{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==f.array)return x(t,{code:g.invalid_type,expected:f.array,received:t.parsedType}),T;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(x(t,{code:e?g.too_big:g.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(x(t,{code:g.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(x(t,{code:g.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new $(t,e,t.path,n))))).then((e=>S.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new $(t,e,t.path,n))));return S.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new be({...this._def,minLength:{value:e,message:I.toString(t)}})}max(e,t){return new be({...this._def,maxLength:{value:e,message:I.toString(t)}})}length(e,t){return new be({...this._def,exactLength:{value:e,message:I.toString(t)}})}nonempty(e){return this.min(1,e)}}function ke(e){if(e instanceof xe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ze.create(ke(r))}return new xe({...e._def,shape:()=>t})}return e instanceof be?new be({...e._def,type:ke(e.element)}):e instanceof ze?ze.create(ke(e.unwrap())):e instanceof Ue?Ue.create(ke(e.unwrap())):e instanceof Ne?Ne.create(e.items.map((e=>ke(e)))):e}be.create=(e,t)=>new be({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Qe.ZodArray,...L(t)});class xe extends D{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=h.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.object,received:t.parsedType}),T}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _e&&"strip"===this._def.unknownKeys))for(const o in n.data)a.includes(o)||s.push(o);const i=[];for(const o of a){const e=r[o],t=n.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new $(n,t,n.path,o)),alwaysSet:o in n.data})}if(this._def.catchall instanceof _e){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of s)i.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)s.length>0&&(x(n,{code:g.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new $(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>S.mergeObjectSync(t,e))):S.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return I.errToObj,new xe({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=I.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new xe({...this._def,unknownKeys:"strip"})}passthrough(){return new xe({...this._def,unknownKeys:"passthrough"})}extend(e){return new xe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new xe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Qe.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new xe({...this._def,catchall:e})}pick(e){const t={};return h.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new xe({...this._def,shape:()=>t})}omit(e){const t={};return h.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new xe({...this._def,shape:()=>t})}deepPartial(){return ke(this)}partial(e){const t={};return h.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new xe({...this._def,shape:()=>t})}required(e){const t={};return h.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ze;)e=e._def.innerType;t[n]=e}})),new xe({...this._def,shape:()=>t})}keyof(){return Fe(h.objectKeys(this.shape))}}xe.create=(e,t)=>new xe({shape:()=>e,unknownKeys:"strip",catchall:_e.create(),typeName:Qe.ZodObject,...L(t)}),xe.strictCreate=(e,t)=>new xe({shape:()=>e,unknownKeys:"strict",catchall:_e.create(),typeName:Qe.ZodObject,...L(t)}),xe.lazycreate=(e,t)=>new xe({shape:e,unknownKeys:"strip",catchall:_e.create(),typeName:Qe.ZodObject,...L(t)});class Se extends D{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new v(e.ctx.common.issues)));return x(t,{code:g.invalid_union,unionErrors:n}),T}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new v(e)));return x(t,{code:g.invalid_union,unionErrors:a}),T}}get options(){return this._def.options}}Se.create=(e,t)=>new Se({options:e,typeName:Qe.ZodUnion,...L(t)});const Te=e=>e instanceof Ie?Te(e.schema):e instanceof De?Te(e.innerType()):e instanceof Re?[e.value]:e instanceof $e?e.options:e instanceof Me?h.objectValues(e.enum):e instanceof qe?Te(e._def.innerType):e instanceof fe?[void 0]:e instanceof ye?[null]:e instanceof ze?[void 0,...Te(e.unwrap())]:e instanceof Ue?[null,...Te(e.unwrap())]:e instanceof We||e instanceof Je?Te(e.unwrap()):e instanceof Ve?Te(e._def.innerType):[];class Ee extends D{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return x(t,{code:g.invalid_type,expected:f.object,received:t.parsedType}),T;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(x(t,{code:g.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),T)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const a of t){const t=Te(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,a)}}return new Ee({typeName:Qe.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...L(n)})}}function Oe(e,t){const n=y(e),r=y(t);if(e===t)return{valid:!0,data:e};if(n===f.object&&r===f.object){const n=h.objectKeys(t),r=h.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const s of r){const n=Oe(e[s],t[s]);if(!n.valid)return{valid:!1};a[s]=n.data}return{valid:!0,data:a}}if(n===f.array&&r===f.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=Oe(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===f.date&&r===f.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ze extends D{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Z(e)||Z(r))return T;const a=Oe(e.value,r.value);return a.valid?((N(e)||N(r))&&t.dirty(),{status:t.value,value:a.data}):(x(n,{code:g.invalid_intersection_types}),T)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ze.create=(e,t,n)=>new Ze({left:e,right:t,typeName:Qe.ZodIntersection,...L(n)});class Ne extends D{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return x(n,{code:g.invalid_type,expected:f.array,received:n.parsedType}),T;if(n.data.length<this._def.items.length)return x(n,{code:g.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T;!this._def.rest&&n.data.length>this._def.items.length&&(x(n,{code:g.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new $(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>S.mergeArray(t,e))):S.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Ne({...this._def,rest:e})}}Ne.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ne({items:e,typeName:Qe.ZodTuple,rest:null,...L(t)})};class je extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return x(n,{code:g.invalid_type,expected:f.object,received:n.parsedType}),T;const r=[],a=this._def.keyType,s=this._def.valueType;for(const i in n.data)r.push({key:a._parse(new $(n,i,n.path,i)),value:s._parse(new $(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?S.mergeObjectAsync(t,r):S.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new je(t instanceof D?{keyType:e,valueType:t,typeName:Qe.ZodRecord,...L(n)}:{keyType:de.create(),valueType:e,typeName:Qe.ZodRecord,...L(t)})}}class Pe extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return x(n,{code:g.invalid_type,expected:f.map,received:n.parsedType}),T;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new $(n,e,n.path,[s,"key"])),value:a._parse(new $(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of s){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return T;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of s){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return T;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}Pe.create=(e,t,n)=>new Pe({valueType:t,keyType:e,typeName:Qe.ZodMap,...L(n)});class Ae extends D{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return x(n,{code:g.invalid_type,expected:f.set,received:n.parsedType}),T;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(x(n,{code:g.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(x(n,{code:g.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function s(e){const n=new Set;for(const r of e){if("aborted"===r.status)return T;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new $(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new Ae({...this._def,minSize:{value:e,message:I.toString(t)}})}max(e,t){return new Ae({...this._def,maxSize:{value:e,message:I.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ae.create=(e,t)=>new Ae({valueType:e,minSize:null,maxSize:null,typeName:Qe.ZodSet,...L(t)});class Ce extends D{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return x(t,{code:g.invalid_type,expected:f.function,received:t.parsedType}),T;function n(e,n){return k({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,b(),_].filter((e=>!!e)),issueData:{code:g.invalid_arguments,argumentsError:n}})}function r(e,n){return k({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,b(),_].filter((e=>!!e)),issueData:{code:g.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Le){const e=this;return O((async function(...t){const i=new v([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),d=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(d,a).catch((e=>{throw i.addIssue(r(d,e)),i}))}))}{const e=this;return O((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new v([n(t,i.error)]);const o=Reflect.apply(s,this,i.data),d=e._def.returns.safeParse(o,a);if(!d.success)throw new v([r(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ce({...this._def,args:Ne.create(e).rest(ve.create())})}returns(e){return new Ce({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ce({args:e||Ne.create([]).rest(ve.create()),returns:t||ve.create(),typeName:Qe.ZodFunction,...L(n)})}}class Ie extends D{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ie.create=(e,t)=>new Ie({getter:e,typeName:Qe.ZodLazy,...L(t)});class Re extends D{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return x(t,{received:t.data,code:g.invalid_literal,expected:this._def.value}),T}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Fe(e,t){return new $e({values:e,typeName:Qe.ZodEnum,...L(t)})}Re.create=(e,t)=>new Re({value:e,typeName:Qe.ZodLiteral,...L(t)});class $e extends D{constructor(){super(...arguments),R.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return x(t,{expected:h.joinValues(n),received:t.parsedType,code:g.invalid_type}),T}if(A(this,R)||C(this,R,new Set(this._def.values)),!A(this,R).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return x(t,{received:t.data,code:g.invalid_enum_value,options:n}),T}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $e.create(e,{...this._def,...t})}exclude(e,t=this._def){return $e.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}R=new WeakMap,$e.create=Fe;class Me extends D{constructor(){super(...arguments),F.set(this,void 0)}_parse(e){const t=h.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const e=h.objectValues(t);return x(n,{expected:h.joinValues(e),received:n.parsedType,code:g.invalid_type}),T}if(A(this,F)||C(this,F,new Set(h.getValidEnumValues(this._def.values))),!A(this,F).has(e.data)){const e=h.objectValues(t);return x(n,{received:n.data,code:g.invalid_enum_value,options:e}),T}return O(e.data)}get enum(){return this._def.values}}F=new WeakMap,Me.create=(e,t)=>new Me({values:e,typeName:Qe.ZodNativeEnum,...L(t)});class Le extends D{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&!1===t.common.async)return x(t,{code:g.invalid_type,expected:f.promise,received:t.parsedType}),T;const n=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return O(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Le.create=(e,t)=>new Le({type:e,typeName:Qe.ZodPromise,...L(t)});class De extends D{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{x(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return T;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?T:"dirty"===r.status||"dirty"===t.value?E(r.value):r}));{if("aborted"===t.value)return T;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?T:"dirty"===r.status||"dirty"===t.value?E(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?T:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?T:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!j(e))return e;const s=r.transform(e.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>j(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}h.assertNever(r)}}De.create=(e,t,n)=>new De({schema:e,typeName:Qe.ZodEffects,effect:t,...L(n)}),De.createWithPreprocess=(e,t,n)=>new De({schema:t,effect:{type:"preprocess",transform:e},typeName:Qe.ZodEffects,...L(n)});class ze extends D{_parse(e){return this._getType(e)===f.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ze.create=(e,t)=>new ze({innerType:e,typeName:Qe.ZodOptional,...L(t)});class Ue extends D{_parse(e){return this._getType(e)===f.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ue.create=(e,t)=>new Ue({innerType:e,typeName:Qe.ZodNullable,...L(t)});class qe extends D{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}qe.create=(e,t)=>new qe({innerType:e,typeName:Qe.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...L(t)});class Ve extends D{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return P(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new v(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new v(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ve.create=(e,t)=>new Ve({innerType:e,typeName:Qe.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...L(t)});class He extends D{_parse(e){if(this._getType(e)!==f.nan){const t=this._getOrReturnCtx(e);return x(t,{code:g.invalid_type,expected:f.nan,received:t.parsedType}),T}return{status:"valid",value:e.data}}}He.create=e=>new He({typeName:Qe.ZodNaN,...L(e)});const Be=Symbol("zod_brand");class We extends D{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ke extends D{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?T:"dirty"===e.status?(t.dirty(),E(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?T:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Ke({in:e,out:t,typeName:Qe.ZodPipeline})}}class Je extends D{_parse(e){const t=this._def.innerType._parse(e),n=e=>(j(e)&&(e.value=Object.freeze(e.value)),e);return P(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Ye(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function Ge(e,t={},n){return e?ge.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=Ye(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=Ye(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):ge.create()}Je.create=(e,t)=>new Je({innerType:e,typeName:Qe.ZodReadonly,...L(t)});const Xe={object:xe.lazycreate};var Qe;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Qe||(Qe={}));const et=de.create,tt=ue.create,nt=He.create,rt=le.create,at=pe.create,st=he.create,it=me.create,ot=fe.create,dt=ye.create,ct=ge.create,ut=ve.create,lt=_e.create,pt=we.create,ht=be.create,mt=xe.create,ft=xe.strictCreate,yt=Se.create,gt=Ee.create,vt=Ze.create,_t=Ne.create,wt=je.create,bt=Pe.create,kt=Ae.create,xt=Ce.create,St=Ie.create,Tt=Re.create,Et=$e.create,Ot=Me.create,Zt=Le.create,Nt=De.create,jt=ze.create,Pt=Ue.create,At=De.createWithPreprocess,Ct=Ke.create,It={string:e=>de.create({...e,coerce:!0}),number:e=>ue.create({...e,coerce:!0}),boolean:e=>pe.create({...e,coerce:!0}),bigint:e=>le.create({...e,coerce:!0}),date:e=>he.create({...e,coerce:!0})},Rt=T;var Ft=Object.freeze({__proto__:null,defaultErrorMap:_,setErrorMap:function(e){w=e},getErrorMap:b,makeIssue:k,EMPTY_PATH:[],addIssueToContext:x,ParseStatus:S,INVALID:T,DIRTY:E,OK:O,isAborted:Z,isDirty:N,isValid:j,isAsync:P,get util(){return h},get objectUtil(){return m},ZodParsedType:f,getParsedType:y,ZodType:D,datetimeRegex:se,ZodString:de,ZodNumber:ue,ZodBigInt:le,ZodBoolean:pe,ZodDate:he,ZodSymbol:me,ZodUndefined:fe,ZodNull:ye,ZodAny:ge,ZodUnknown:ve,ZodNever:_e,ZodVoid:we,ZodArray:be,ZodObject:xe,ZodUnion:Se,ZodDiscriminatedUnion:Ee,ZodIntersection:Ze,ZodTuple:Ne,ZodRecord:je,ZodMap:Pe,ZodSet:Ae,ZodFunction:Ce,ZodLazy:Ie,ZodLiteral:Re,ZodEnum:$e,ZodNativeEnum:Me,ZodPromise:Le,ZodEffects:De,ZodTransformer:De,ZodOptional:ze,ZodNullable:Ue,ZodDefault:qe,ZodCatch:Ve,ZodNaN:He,BRAND:Be,ZodBranded:We,ZodPipeline:Ke,ZodReadonly:Je,custom:Ge,Schema:D,ZodSchema:D,late:Xe,get ZodFirstPartyTypeKind(){return Qe},coerce:It,any:ct,array:ht,bigint:rt,boolean:at,date:st,discriminatedUnion:gt,effect:Nt,enum:Et,function:xt,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Ge((t=>t instanceof e),t),intersection:vt,lazy:St,literal:Tt,map:bt,nan:nt,nativeEnum:Ot,never:lt,null:dt,nullable:Pt,number:tt,object:mt,oboolean:()=>at().optional(),onumber:()=>tt().optional(),optional:jt,ostring:()=>et().optional(),pipeline:Ct,preprocess:At,promise:Zt,record:wt,set:kt,strictObject:ft,string:et,symbol:it,transformer:Nt,tuple:_t,undefined:ot,union:yt,unknown:ut,void:pt,NEVER:Rt,ZodIssueCode:g,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:v});const $t=Ft.object({detail:Ft.string()});function Mt(e){if(!e)return"Unknown error";if(e instanceof Error){const t=$t.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const n=$t.safeParse(t);if(n.success)return n.data.detail;return e}(e.message)}if("object"==typeof e){const t=$t.safeParse(e);if(t.success)return t.data.detail}try{return JSON.stringify(e)}catch{return String(e)}}const Lt=1e3;function Dt(e,t){const n=e.map((e=>`"${e}"`)).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function zt(e={}){let t={};function n(e){t=e}let r,a={};function s(e){a.unregisterHandler&&a.unregisterHandler(),a=e,a.registerHandler?.(_)}function i(e){r="function"!=typeof e?(t,n)=>{const r=e[t];if(r)return r(n);const a=e._;if(!a)throw new Error(`The requested method has no handler: ${t}`);return a(t,n)}:e}const{maxRequestTime:o=Lt}=e;e.transport&&s(e.transport),e.requestHandler&&i(e.requestHandler),e._debugHooks&&n(e._debugHooks);let d=0;const c=new Map,u=new Map;function l(e,...n){const r=n[0];return new Promise(((n,s)=>{if(!a.send)throw Dt(["send"],"make requests");const i=d<=1e10?++d:d=0,l={type:"request",id:i,method:e,params:r};c.set(i,{resolve:n,reject:s}),o!==1/0&&u.set(i,setTimeout((()=>{u.delete(i),s(new Error("RPC request timed out."))}),o)),t.onSend?.(l),a.send(l)}))}const p=new Proxy(l,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>l(t,e)}),h=p;function m(e,...n){const r=n[0];if(!a.send)throw Dt(["send"],"send messages");const s={type:"message",id:e,payload:r};t.onSend?.(s),a.send(s)}const f=new Proxy(m,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>m(t,e)}),y=f,g=new Map,v=new Set;async function _(e){if(t.onReceive?.(e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!a.send||!r)throw Dt(["send","requestHandler"],"handle requests");const{id:s,method:i,params:o}=e;let d;try{d={type:"response",id:s,success:!0,payload:await r(i,o)}}catch(n){if(!(n instanceof Error))throw n;d={type:"response",id:s,success:!1,error:n.message}}return t.onSend?.(d),void a.send(d)}if("response"!==e.type){if("message"!==e.type)throw new Error(`Unexpected RPC message type: ${e.type}`);{for(const n of v)n(e.id,e.payload);const t=g.get(e.id);if(!t)return;for(const n of t)n(e.payload)}}else{const t=u.get(e.id);null!=t&&clearTimeout(t);const{resolve:n,reject:r}=c.get(e.id)??{};e.success?n?.(e.payload):r?.(new Error(e.error))}}return{setTransport:s,setRequestHandler:i,request:p,requestProxy:h,send:f,sendProxy:y,addMessageListener:function(e,t){if(!a.registerHandler)throw Dt(["registerHandler"],"register message listeners");"*"!==e?(g.has(e)||g.set(e,new Set),g.get(e)?.add(t)):v.add(t)},removeMessageListener:function(e,t){"*"!==e?(g.get(e)?.delete(t),0===g.get(e)?.size&&g.delete(e)):v.delete(t)},proxy:{send:y,request:h},_setDebugHooks:n}}const Ut="[transport-id]";function qt(e,t={}){const{transportId:n,filter:r,remotePort:a}=t,s=e,i=a??e;let o;return{send(e){i.postMessage(function(e,t){const{transportId:n}=t;return null!=n?{[Ut]:n,data:e}:e}(e,{transportId:n}))},registerHandler(e){o=t=>{const a=t.data,[s,i]=function(e,t){const{transportId:n,filter:r}=t,a=r?.();if(null!=n&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let s=e;if(n){if(e[Ut]!==n)return[!0];s=e.data}return!1===a?[!0]:[!1,s]}(a,{transportId:n,filter:()=>r?.(t)});s||e(i)},s.addEventListener("message",o)},unregisterHandler(){o&&s.removeEventListener("message",o)}}}function Vt(e,t){if(!e)throw new Error(t)}var Ht,Bt=Object.defineProperty,Wt=(e,t)=>Bt(e,"name",{value:t,configurable:!0}),Kt=(Ht=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Ht,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):Ht);function Jt(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Yt(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Gt(e){return function(){return this[e]}}Wt(Jt,"_isNumber"),Wt(Yt,"_capitalize"),Wt(Gt,"_getter");var Xt,Qt,en=["isConstructor","isEval","isNative","isToplevel"],tn=["columnNumber","lineNumber"],nn=["fileName","functionName","source"],rn=en.concat(tn,nn,["args"],["evalOrigin"]);function an(e){if(e)for(var t=0;t<rn.length;t++)void 0!==e[rn[t]]&&this["set"+Yt(rn[t])](e[rn[t]])}for(Wt(an,"StackFrame"),an.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof an)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new an(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},an.fromString=Wt((function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),a=e.substring(t+1,n).split(","),s=e.substring(n+1);if(0===s.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s,""),o=i[1],d=i[2],c=i[3];return new an({functionName:r,args:a||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})}),"StackFrame$$fromString"),Xt=0;Xt<en.length;Xt++)an.prototype["get"+Yt(en[Xt])]=Gt(en[Xt]),an.prototype["set"+Yt(en[Xt])]=function(e){return function(t){this[e]=!!t}}(en[Xt]);for(Qt=0;Qt<tn.length;Qt++)an.prototype["get"+Yt(tn[Qt])]=Gt(tn[Qt]),an.prototype["set"+Yt(tn[Qt])]=function(e){return function(t){if(!Jt(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(tn[Qt]);for(sn=0;sn<nn.length;sn++)an.prototype["get"+Yt(nn[sn])]=Gt(nn[sn]),an.prototype["set"+Yt(nn[sn])]=function(e){return function(t){this[e]=String(t)}}(nn[sn]);var sn,on=an;function dn(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Wt((function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")}),"ErrorStackParser$$parse"),extractLocation:Wt((function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]}),"ErrorStackParser$$extractLocation"),parseV8OrIE:Wt((function(t){return t.stack.split("\n").filter((function(t){return!!t.match(e)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;var r=this.extractLocation(n?n[1]:t),a=n&&t||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new on({functionName:a,fileName:s,lineNumber:r[1],columnNumber:r[2],source:e})}),this)}),"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:Wt((function(e){return e.stack.split("\n").filter((function(e){return!e.match(t)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new on({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,a=this.extractLocation(e.replace(t,""));return new on({functionName:r,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})}),this)}),"ErrorStackParser$$parseFFOrSafari")}}Wt(dn,"ErrorStackParser");var cn,un,ln,pn,hn,mn,fn,yn,gn,vn=new dn,_n="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,wn=_n&&typeof module<"u"&&typeof module.exports<"u"&&typeof Kt<"u"&&typeof __dirname<"u",bn=_n&&!wn,kn=typeof Deno<"u",xn=!_n&&!kn,Sn=xn&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,Tn=xn&&"function"==typeof importScripts&&"object"==typeof self;async function En(){if(!_n||(cn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,pn=await import("./__vite-browser-external-CIEyP2s7.js"),hn=await import("./__vite-browser-external-CIEyP2s7.js"),ln=(await import("./__vite-browser-external-CIEyP2s7.js")).default,un=await import("./__vite-browser-external-CIEyP2s7.js"),fn=un.sep,typeof Kt<"u"))return;let e={fs:pn,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function On(e,t){return un.resolve(t||".",e)}function Zn(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function Nn(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:hn.readFile(e).then((e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}}function jn(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}async function Pn(e,t){let{response:n,binary:r}=yn(e,t);if(r)return r;let a=await n;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),Wt(En,"initNodeModules"),Wt(On,"node_resolvePath"),Wt(Zn,"browser_resolvePath"),mn=_n?On:Zn,_n||(fn="/"),Wt(Nn,"node_getBinaryResponse"),Wt(jn,"browser_getBinaryResponse"),yn=_n?Nn:jn,Wt(Pn,"loadBinaryFile"),Sn)gn=Wt((async e=>await import(e)),"loadScript");else if(Tn)gn=Wt((async e=>{try{globalThis.importScripts(e)}catch(Bn){if(!(Bn instanceof TypeError))throw Bn;await import(e)}}),"loadScript");else{if(!_n)throw new Error("Cannot determine runtime environment");gn=An}async function An(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?ln.runInThisContext(await(await fetch(e)).text()):await import(cn.pathToFileURL(e).href)}async function Cn(e){if(_n){await En();let t=await hn.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function In(){if(wn)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=vn.parse(e)[0].fileName;if(_n&&!t.startsWith("file://")&&(t=`file://${t}`),bn){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(fn);if(-1===n)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,n)}function Rn(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=a.getLocalSet(e),s=await a.getRemoteSet(e),i=t?s:r,o=t?r:s;await a.reconcile(e,i,o),n(null)}catch(r){n(r)}},getLocalSet:e=>{let n=Object.create(null);function a(e){return"."!==e&&".."!==e}function s(e){return t=>r.join2(e,t)}Wt(a,"isRealDir"),Wt(s,"toAbsolute");let i=t.readdir(e.mountpoint).filter(a).map(s(e.mountpoint));for(;i.length;){let e=i.pop(),r=t.stat(e);t.isDir(r.mode)&&i.push.apply(i,t.readdir(e).filter(a).map(s(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:"local",entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Fn(e.opts.fileSystemHandle);for(let[s,i]of n)"."!==s&&(t[r.join2(e.mountpoint,s)]={timestamp:"file"===i.kind?new Date((await i.getFile()).lastModified):new Date,mode:"file"===i.kind?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,a=t.stat(e);if(t.isDir(a.mode))return{timestamp:a.mtime,mode:a.mode};if(t.isFile(a.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:a.mtime,mode:a.mode,contents:r.contents};throw new Error("node type not supported")},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else{if(!t.isFile(n.mode))throw new Error("node type not supported");t.writeFile(e,n.contents,{canOwn:!0})}t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(t.lastModified)}}if("directory"===e.kind)return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,n,a)=>{let s=e.get(r.dirname(n)),i=t.isFile(a.mode)?await s.getFileHandle(r.basename(n),{create:!0}):await s.getDirectoryHandle(r.basename(n),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(a.contents),await e.close()}e.set(n,i)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,s)=>{let i=0,o=[];Object.keys(n.entries).forEach((function(e){let r=n.entries[e],a=s.entries[e];(!a||t.isFile(r.mode)&&r.timestamp.getTime()>a.timestamp.getTime())&&(o.push(e),i++)})),o.sort();let d=[];if(Object.keys(s.entries).forEach((function(e){n.entries[e]||(d.push(e),i++)})),d.sort().reverse(),!i)return;let c="remote"===n.type?n.handles:s.handles;for(let t of o){let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===s.type){let e=c.get(n),r=await a.loadRemoteEntry(e);a.storeLocalEntry(t,r)}else{let e=a.loadLocalEntry(t);await a.storeRemoteEntry(c,n,e)}}for(let t of d)if("local"===s.type)a.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);await a.removeRemoteEntry(c,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}Wt(An,"nodeLoadScript"),Wt(Cn,"loadLockFile"),Wt(In,"calculateDirname"),Wt(Rn,"initializeNativeFS");var Fn=Wt((async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),"directory"===r.kind&&await n(r)}Wt(n,"collect"),await n(e);let r=new Map;r.set(".",e);for(let a of t){let t=(await e.resolve(a)).join("/");r.set(t,a)}return r}),"getFsHandles");function $n(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Un(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:qn(e.indexURL)};return t}function Mn(e){return function(t){try{t.FS.mkdirTree(e)}catch(n){console.error(`Error occurred while making a home directory '${e}':`),console.error(n),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function Ln(e){return function(t){Object.assign(t.ENV,e)}}function Dn(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}function zn(e){let t=Pn(e);return async e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree("/lib"),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency("install-stdlib");try{let a=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,a)}catch(a){console.error("Error occurred while installing the standard library:"),console.error(a)}finally{e.removeRunDependency("install-stdlib")}}}function Un(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[...Dn(e.fsInit),zn(t),Mn(e.env.HOME),Ln(e.env),Rn]}function qn(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:n}=yn(e+"pyodide.asm.wasm");return function(e,r){return async function(){try{let a;a=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:s,module:i}=a;r(s,i)}catch(a){console.warn("wasm instantiation failed!"),console.warn(a)}}(),{}}}Wt($n,"createSettings"),Wt(Mn,"createHomeDirectory"),Wt(Ln,"setEnvironment"),Wt(Dn,"callFsInitHook"),Wt(zn,"installStdlib"),Wt(Un,"getFileSystemInitializationFuncs"),Wt(qn,"getInstantiateWasmFunc");var Vn="0.27.5";async function Hn(e={}){var t,n;await En();let r=e.indexURL||await In();r=mn(r),r.endsWith("/")||(r+="/"),e.indexURL=r;let a={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+"pyodide-lock.json",args:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},s=Object.assign(a,e);(t=s.env).HOME??(t.HOME="/home/pyodide"),(n=s.env).PYTHONINSPECT??(n.PYTHONINSPECT="1");let i,o=$n(s),d=o.API;if(d.lockFilePromise=Cn(s.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${s.indexURL}pyodide.asm.js`;await gn(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==Vn&&s.checkAPIVersion)throw new Error(`Pyodide version does not match: '${Vn}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,d.config.env.HOME),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(s.stdin,s.stdout,s.stderr),l}Wt(Hn,"loadPyodide");const Bn=new class{constructor(){this.spans=[]}startSpan(e,t={}){const n={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){const r=this.startSpan(t||e.name,n);try{const t=e();return this.endSpan(r),t}catch(a){throw this.endSpan(r,"error"),a}}wrapAsync(e,t,n={}){return async(...r)=>{const a=this.startSpan(t||e.name,n);try{const t=await e(...r);return this.endSpan(a),t}catch(s){throw this.endSpan(a,"error"),s}}}logSpans(){}};globalThis.t=Bn;class Wn{constructor(){this.pyodide=null}get requirePyodide(){return Vt(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Hn)throw new Error("loadPyodide is not defined");const t=Bn.startSpan("loadPyodide");try{const n=await Hn({packages:["micropip","marimo-base","Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:false,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end("ok"),n}catch(r){throw n.error("Failed to load Pyodide",r),r}}async mountFilesystem(e){const t=Bn.startSpan("mountFilesystem");return o(this.requirePyodide),d(this.requirePyodide),await c(this.requirePyodide),t.end("ok"),l({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:n,onMessage:r,queryParameters:a,userConfig:s}=e;self.messenger={callback:r},self.query_params=a,self.user_config=s;const o=Bn.startSpan("startSession.runPython"),d=n||i,[c,u,l]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${d}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${d}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);o.end();const p=new Set(l.toJs());return this.loadNotebookDeps(t,p).then((()=>u(s.runtime.auto_instantiate))),c}async loadNotebookDeps(e,t){const r=this.requirePyodide;e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),e=`import pyodide_http\n${e=`import jedi\n${e=`import pygments\n${e=`import docutils\n${e}`}`}`}`;const a=[...t];let s=Bn.startSpan("pyodide.loadPackage");await r.loadPackagesFromImports(e,{errorCallback:n.error,messageCallback:n.log}),s.end(),s=Bn.startSpan("micropip.install");const i=a.filter((e=>!r.loadedPackages[e]));i.length>0&&await r.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(i)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch((e=>{n.error("Failed to load packages from micropip",e)})),s.end()}}async function Kn(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new Wn}}const Jn=Bn.startSpan("worker:init");const Yn=new class{constructor(e){this.onMessage=e,this.started=!1,this.push=e=>{this.started?this.onMessage(e):this.buffer.push(e)},this.start=()=>{this.started=!0,this.buffer.forEach((e=>this.onMessage(e))),this.buffer=[]},this.buffer=[]}}((e=>{er.send.kernelMessage({message:e})})),Gn=new class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.reject=e=>{this.status="rejected",t(e)},this.resolve=t=>{this.status="resolved",e(t)}}))}};let Xn=!1;const Qn={startSession:async e=>{if(await rr,Xn)n.warn("Session already started");else{Xn=!0;try{Vt(self.controller,"Controller not loaded"),await(self.controller.mountFilesystem?.({code:e.code,filename:e.filename}));const t=Bn.wrapAsync(self.controller.startSession.bind(self.controller)),n=function(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}((()=>{er.send.initializingMessage({message:"Initializing notebook..."}),er.send.initialized({})}));er.send.initializingMessage({message:"Loading notebook and dependencies..."});const r=await t({code:e.code,filename:e.filename,queryParameters:e.queryParameters,userConfig:e.userConfig,onMessage:e=>{n(),Yn.push(e)}});Gn.resolve(r),Jn.end("ok")}catch(t){er.send.initializedError({error:Mt(t)}),Jn.end("error")}}},loadPackages:async e=>{const t=Bn.startSpan("loadPackages");await rr,e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),await self.pyodide.loadPackagesFromImports(e,{messageCallback:n.log,errorCallback:n.error}),t.end()},readFile:async e=>{const t=Bn.startSpan("readFile");await rr;const n=r(self.pyodide.FS.readFile(e));return t.end(),n},setInterruptBuffer:async e=>{await rr,self.pyodide.setInterruptBuffer(e)},addPackage:async e=>{await rr;const{package:t}=e,n=t.split(" ").map((e=>e.trim())),r=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n await micropip.install(${JSON.stringify(n)})\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(r)},removePackage:async e=>{await rr;const{package:t}=e,n=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n micropip.uninstall("${t}")\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(n)},listPackages:async()=>{const e=Bn.startSpan("listPackages");await rr;const t=await self.pyodide.runPythonAsync('\n import json\n import micropip\n\n packages = micropip.list()\n packages = [\n {"name": p.name, "version": p.version}\n for p in packages.values()\n ]\n json.dumps(sorted(packages, key=lambda pkg: pkg["name"]))\n ');return e.end(),{packages:JSON.parse(t)}},saveNotebook:async e=>{await rr;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n save_file\n ");await t(JSON.stringify(e),i)},bridge:async e=>{const t=Bn.startSpan("bridge",{functionName:e.functionName});await rr;const{functionName:n,payload:r}=e;"format"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import black\n except ModuleNotFoundError:\n await micropip.install("black")\n '),"export_markdown"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import yaml\n except ModuleNotFoundError:\n await micropip.install("pyyaml")\n ');const a=await Gn.promise,s=null==r?null:"string"==typeof r?r:JSON.stringify(r),i=null==s?await a[n]():await a[n](s);return nr.has(n)&&u(self.pyodide),t.end(),"string"==typeof i?JSON.parse(i):i}},er=function(e){return zt(e)}({transport:(tr={transportId:"marimo-transport"},qt(self,tr)),requestHandler:Qn});var tr;er.send("ready",{}),er.addMessageListener("consumerReady",(async()=>{await rr,Yn.start()}));const nr=new Set(["save","save_app_config","rename_file","create_file_or_directory","delete_file_or_directory","move_file_or_directory","update_file"]);const rr=Bn.wrapAsync((async function(){try{const e=self.name,t=function(e){return e.includes("dev"),`v${Vn}`}(e),n=await Bn.wrapAsync(Kn)(e);self.controller=n,er.send.initializingMessage({message:"Loading marimo..."}),self.pyodide=await Bn.wrapAsync(n.bootstrap.bind(n))({version:e,pyodideVersion:t})}catch(e){n.error("Error bootstrapping",e),er.send.initializedError({error:Mt(e)})}}))();
@@ -1 +1 @@
1
- var e=function(){function e(e){return{type:e,style:"keyword"}}for(var t=e("operator"),n={type:"atom",style:"atom"},r={type:"axis_specifier",style:"qualifier"},a={",":{type:"punctuation",style:null}},i=["after","all","allowing","ancestor","ancestor-or-self","any","array","as","ascending","at","attribute","base-uri","before","boundary-space","by","case","cast","castable","catch","child","collation","comment","construction","contains","content","context","copy","copy-namespaces","count","decimal-format","declare","default","delete","descendant","descendant-or-self","descending","diacritics","different","distance","document","document-node","element","else","empty","empty-sequence","encoding","end","entire","every","exactly","except","external","first","following","following-sibling","for","from","ftand","ftnot","ft-option","ftor","function","fuzzy","greatest","group","if","import","in","inherit","insensitive","insert","instance","intersect","into","invoke","is","item","language","last","lax","least","let","levels","lowercase","map","modify","module","most","namespace","next","no","node","nodes","no-inherit","no-preserve","not","occurs","of","only","option","order","ordered","ordering","paragraph","paragraphs","parent","phrase","preceding","preceding-sibling","preserve","previous","processing-instruction","relationship","rename","replace","return","revalidation","same","satisfies","schema","schema-attribute","schema-element","score","self","sensitive","sentence","sentences","sequence","skip","sliding","some","stable","start","stemming","stop","strict","strip","switch","text","then","thesaurus","times","to","transform","treat","try","tumbling","type","typeswitch","union","unordered","update","updating","uppercase","using","validate","value","variable","version","weight","when","where","wildcards","window","with","without","word","words","xquery"],o=0,s=i.length;o<s;o++)a[i[o]]=e(i[o]);var c=["xs:anyAtomicType","xs:anySimpleType","xs:anyType","xs:anyURI","xs:base64Binary","xs:boolean","xs:byte","xs:date","xs:dateTime","xs:dateTimeStamp","xs:dayTimeDuration","xs:decimal","xs:double","xs:duration","xs:ENTITIES","xs:ENTITY","xs:float","xs:gDay","xs:gMonth","xs:gMonthDay","xs:gYear","xs:gYearMonth","xs:hexBinary","xs:ID","xs:IDREF","xs:IDREFS","xs:int","xs:integer","xs:item","xs:java","xs:language","xs:long","xs:Name","xs:NCName","xs:negativeInteger","xs:NMTOKEN","xs:NMTOKENS","xs:nonNegativeInteger","xs:nonPositiveInteger","xs:normalizedString","xs:NOTATION","xs:numeric","xs:positiveInteger","xs:precisionDecimal","xs:QName","xs:short","xs:string","xs:time","xs:token","xs:unsignedByte","xs:unsignedInt","xs:unsignedLong","xs:unsignedShort","xs:untyped","xs:untypedAtomic","xs:yearMonthDuration"];for(o=0,s=c.length;o<s;o++)a[c[o]]=n;var u=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(o=0,s=u.length;o<s;o++)a[u[o]]=t;var l=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"];for(o=0,s=l.length;o<s;o++)a[l[o]]=r;return a}();function t(e,t,n){return t.tokenize=n,n(e,t)}function n(f,d){var g=f.next(),y=!1,h=function(e){return'"'===e.current()?e.match(/^[^\"]+\"\:/,!1):"'"===e.current()&&e.match(/^[^\"]+\'\:/,!1)}(f);if("<"==g){if(f.match("!--",!0))return t(f,d,s);if(f.match("![CDATA",!1))return d.tokenize=c,"tag";if(f.match("?",!1))return t(f,d,u);var v=f.eat("/");f.eatSpace();for(var k,b="";k=f.eat(/[^\s\u00a0=<>\"\'\/?]/);)b+=k;return t(f,d,function(e,t){return function(r,a){return r.eatSpace(),t&&r.eat(">")?(x(a),a.tokenize=n,"tag"):(r.eat("/")||m(a,{type:"tag",name:e,tokenize:n}),r.eat(">")?(a.tokenize=n,"tag"):(a.tokenize=o,"tag"))}}(b,v))}if("{"==g)return m(d,{type:"codeblock"}),null;if("}"==g)return x(d),null;if(l(d))return">"==g?"tag":"/"==g&&f.eat(">")?(x(d),"tag"):"variable";if(/\d/.test(g))return f.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if("("===g&&f.eat(":"))return m(d,{type:"comment"}),t(f,d,r);if(h||'"'!==g&&"'"!==g){if("$"===g)return t(f,d,i);if(":"===g&&f.eat("="))return"keyword";if("("===g)return m(d,{type:"paren"}),null;if(")"===g)return x(d),null;if("["===g)return m(d,{type:"bracket"}),null;if("]"===g)return x(d),null;var z=e.propertyIsEnumerable(g)&&e[g];if(h&&'"'===g)for(;'"'!==f.next(););if(h&&"'"===g)for(;"'"!==f.next(););z||f.eatWhile(/[\w\$_-]/);var w=f.eat(":");!f.eat(":")&&w&&f.eatWhile(/[\w\$_-]/),f.match(/^[ \t]*\(/,!1)&&(y=!0);var I=f.current();return z=e.propertyIsEnumerable(I)&&e[I],y&&!z&&(z={type:"function_call",style:"def"}),function(e){return p(e,"xmlconstructor")}(d)?(x(d),"variable"):("element"!=I&&"attribute"!=I&&"axis_specifier"!=z.type||m(d,{type:"xmlconstructor"}),z?z.style:"variable")}return a(f,d,g)}function r(e,t){for(var n,r=!1,a=!1,i=0;n=e.next();){if(")"==n&&r){if(!(i>0)){x(t);break}i--}else":"==n&&a&&i++;r=":"==n,a="("==n}return"comment"}function a(e,r,a,i){let o=function(e,t){return function(r,a){for(var i;i=r.next();){if(i==e){x(a),t&&(a.tokenize=t);break}if(r.match("{",!1)&&f(a))return m(a,{type:"codeblock"}),a.tokenize=n,"string"}return"string"}}(a,i);return m(r,{type:"string",name:a,tokenize:o}),t(e,r,o)}function i(e,t){var r=/[\w\$_-]/;if(e.eat('"')){for(;'"'!==e.next(););e.eat(":")}else e.eatWhile(r),e.match(":=",!1)||e.eat(":");return e.eatWhile(r),t.tokenize=n,"variable"}function o(e,t){var r=e.next();return"/"==r&&e.eat(">")?(f(t)&&x(t),l(t)&&x(t),"tag"):">"==r?(f(t)&&x(t),"tag"):"="==r?null:'"'==r||"'"==r?a(e,t,r,o):(f(t)||m(t,{type:"attribute",tokenize:o}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(x(t),t.tokenize=n),"attribute")}function s(e,t){for(var r;r=e.next();)if("-"==r&&e.match("->",!0))return t.tokenize=n,"comment"}function c(e,t){for(var r;r=e.next();)if("]"==r&&e.match("]",!0))return t.tokenize=n,"comment"}function u(e,t){for(var r;r=e.next();)if("?"==r&&e.match(">",!0))return t.tokenize=n,"processingInstruction"}function l(e){return p(e,"tag")}function f(e){return p(e,"attribute")}function p(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function m(e,t){e.stack.push(t)}function x(e){e.stack.pop();var t=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=t||n}const d={name:"xquery",startState:function(){return{tokenize:n,cc:[],stack:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},languageData:{commentTokens:{block:{open:"(:",close:":)"}}}};export{d as xQuery};
1
+ var h=function(){function e(l){return{type:l,style:"keyword"}}for(var t=e("operator"),n={type:"atom",style:"atom"},p={type:"axis_specifier",style:"qualifier"},i={",":{type:"punctuation",style:null}},c=["after","all","allowing","ancestor","ancestor-or-self","any","array","as","ascending","at","attribute","base-uri","before","boundary-space","by","case","cast","castable","catch","child","collation","comment","construction","contains","content","context","copy","copy-namespaces","count","decimal-format","declare","default","delete","descendant","descendant-or-self","descending","diacritics","different","distance","document","document-node","element","else","empty","empty-sequence","encoding","end","entire","every","exactly","except","external","first","following","following-sibling","for","from","ftand","ftnot","ft-option","ftor","function","fuzzy","greatest","group","if","import","in","inherit","insensitive","insert","instance","intersect","into","invoke","is","item","language","last","lax","least","let","levels","lowercase","map","modify","module","most","namespace","next","no","node","nodes","no-inherit","no-preserve","not","occurs","of","only","option","order","ordered","ordering","paragraph","paragraphs","parent","phrase","preceding","preceding-sibling","preserve","previous","processing-instruction","relationship","rename","replace","return","revalidation","same","satisfies","schema","schema-attribute","schema-element","score","self","sensitive","sentence","sentences","sequence","skip","sliding","some","stable","start","stemming","stop","strict","strip","switch","text","then","thesaurus","times","to","transform","treat","try","tumbling","type","typeswitch","union","unordered","update","updating","uppercase","using","validate","value","variable","version","weight","when","where","wildcards","window","with","without","word","words","xquery"],r=0,s=c.length;r<s;r++)i[c[r]]=e(c[r]);var a=["xs:anyAtomicType","xs:anySimpleType","xs:anyType","xs:anyURI","xs:base64Binary","xs:boolean","xs:byte","xs:date","xs:dateTime","xs:dateTimeStamp","xs:dayTimeDuration","xs:decimal","xs:double","xs:duration","xs:ENTITIES","xs:ENTITY","xs:float","xs:gDay","xs:gMonth","xs:gMonthDay","xs:gYear","xs:gYearMonth","xs:hexBinary","xs:ID","xs:IDREF","xs:IDREFS","xs:int","xs:integer","xs:item","xs:java","xs:language","xs:long","xs:Name","xs:NCName","xs:negativeInteger","xs:NMTOKEN","xs:NMTOKENS","xs:nonNegativeInteger","xs:nonPositiveInteger","xs:normalizedString","xs:NOTATION","xs:numeric","xs:positiveInteger","xs:precisionDecimal","xs:QName","xs:short","xs:string","xs:time","xs:token","xs:unsignedByte","xs:unsignedInt","xs:unsignedLong","xs:unsignedShort","xs:untyped","xs:untypedAtomic","xs:yearMonthDuration"];for(r=0,s=a.length;r<s;r++)i[a[r]]=n;var x=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(r=0,s=x.length;r<s;r++)i[x[r]]=t;var g=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"];for(r=0,s=g.length;r<s;r++)i[g[r]]=p;return i}();function f(e,t,n){return t.tokenize=n,n(e,t)}function u(e,t){var n=e.next(),p=!1,i=function(l){return l.current()==='"'?l.match(/^[^\"]+\"\:/,!1):l.current()==="'"&&l.match(/^[^\"]+\'\:/,!1)}(e);if(n=="<"){if(e.match("!--",!0))return f(e,t,S);if(e.match("![CDATA",!1))return t.tokenize=D,"tag";if(e.match("?",!1))return f(e,t,E);var c=e.eat("/");e.eatSpace();for(var r,s="";r=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)s+=r;return f(e,t,function(l,T){return function(d,y){return d.eatSpace(),T&&d.eat(">")?(o(y),y.tokenize=u,"tag"):(d.eat("/")||m(y,{type:"tag",name:l,tokenize:u}),d.eat(">")?(y.tokenize=u,"tag"):(y.tokenize=k,"tag"))}}(s,c))}if(n=="{")return m(t,{type:"codeblock"}),null;if(n=="}")return o(t),null;if(z(t))return n==">"?"tag":n=="/"&&e.eat(">")?(o(t),"tag"):"variable";if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if(n==="("&&e.eat(":"))return m(t,{type:"comment"}),f(e,t,I);if(i||n!=='"'&&n!=="'"){if(n==="$")return f(e,t,N);if(n===":"&&e.eat("="))return"keyword";if(n==="(")return m(t,{type:"paren"}),null;if(n===")")return o(t),null;if(n==="[")return m(t,{type:"bracket"}),null;if(n==="]")return o(t),null;var a=h.propertyIsEnumerable(n)&&h[n];if(i&&n==='"')for(;e.next()!=='"';);if(i&&n==="'")for(;e.next()!=="'";);a||e.eatWhile(/[\w\$_-]/);var x=e.eat(":");!e.eat(":")&&x&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(p=!0);var g=e.current();return a=h.propertyIsEnumerable(g)&&h[g],p&&!a&&(a={type:"function_call",style:"def"}),function(l){return b(l,"xmlconstructor")}(t)?(o(t),"variable"):(g!="element"&&g!="attribute"&&a.type!="axis_specifier"||m(t,{type:"xmlconstructor"}),a?a.style:"variable")}return w(e,t,n)}function I(e,t){for(var n,p=!1,i=!1,c=0;n=e.next();){if(n==")"&&p){if(!(c>0)){o(t);break}c--}else n==":"&&i&&c++;p=n==":",i=n=="("}return"comment"}function w(e,t,n,p){let i=function(c,r){return function(s,a){for(var x;x=s.next();){if(x==c){o(a),r&&(a.tokenize=r);break}if(s.match("{",!1)&&v(a))return m(a,{type:"codeblock"}),a.tokenize=u,"string"}return"string"}}(n,p);return m(t,{type:"string",name:n,tokenize:i}),f(e,t,i)}function N(e,t){var n=/[\w\$_-]/;if(e.eat('"')){for(;e.next()!=='"';);e.eat(":")}else e.eatWhile(n),e.match(":=",!1)||e.eat(":");return e.eatWhile(n),t.tokenize=u,"variable"}function k(e,t){var n=e.next();return n=="/"&&e.eat(">")?(v(t)&&o(t),z(t)&&o(t),"tag"):n==">"?(v(t)&&o(t),"tag"):n=="="?null:n=='"'||n=="'"?w(e,t,n,k):(v(t)||m(t,{type:"attribute",tokenize:k}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(o(t),t.tokenize=u),"attribute")}function S(e,t){for(var n;n=e.next();)if(n=="-"&&e.match("->",!0))return t.tokenize=u,"comment"}function D(e,t){for(var n;n=e.next();)if(n=="]"&&e.match("]",!0))return t.tokenize=u,"comment"}function E(e,t){for(var n;n=e.next();)if(n=="?"&&e.match(">",!0))return t.tokenize=u,"processingInstruction"}function z(e){return b(e,"tag")}function v(e){return b(e,"attribute")}function b(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function m(e,t){e.stack.push(t)}function o(e){e.stack.pop();var t=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=t||u}const _={name:"xquery",startState:function(){return{tokenize:u,cc:[],stack:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},languageData:{commentTokens:{block:{open:"(:",close:":)"}}}};export{_ as xQuery};
@@ -0,0 +1,7 @@
1
+ var F,N,V,X,Y,U,H,G,j,Q;import{_ as a,s as ai,g as hi,q as Mt,p as oi,a as ri,b as li,l as It,I as ci,d as gi,y as ui,F as ut,E as $t,G as xi,L as di,h as pi,a8 as fi}from"./mermaid-CMGFQ7sl.js";import"./transform-Cyp0GDF-.js";import{i as mi}from"./init-DLRA0X12.js";import{o as yi}from"./ordinal-DDUp3AbE.js";import{r as bi}from"./range-CtcPcB_L.js";import{l as Bt}from"./linear-CCD4VqSh.js";import{l as zt}from"./step-BwsUM5iJ.js";import"./index-BJsnjxpc.js";import"./timer-DFzT7np-.js";function xt(){var e,t,i=yi().unknown(void 0),s=i.domain,n=i.range,r=0,l=1,d=!1,x=0,_=0,T=.5;function S(){var m=s().length,D=l<r,C=D?l:r,L=D?r:l;e=(L-C)/Math.max(1,m-x+2*_),d&&(e=Math.floor(e)),C+=(L-C-e*(m-x))*T,t=e*(1-x),d&&(C=Math.round(C),t=Math.round(t));var f=bi(m).map(function(k){return C+e*k});return n(D?f.reverse():f)}return delete i.unknown,i.domain=function(m){return arguments.length?(s(m),S()):s()},i.range=function(m){return arguments.length?([r,l]=m,r=+r,l=+l,S()):[r,l]},i.rangeRound=function(m){return[r,l]=m,r=+r,l=+l,d=!0,S()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(m){return arguments.length?(d=!!m,S()):d},i.padding=function(m){return arguments.length?(x=Math.min(1,_=+m),S()):x},i.paddingInner=function(m){return arguments.length?(x=Math.min(1,m),S()):x},i.paddingOuter=function(m){return arguments.length?(_=+m,S()):_},i.align=function(m){return arguments.length?(T=Math.max(0,Math.min(1,m)),S()):T},i.copy=function(){return xt(s(),[r,l]).round(d).paddingInner(x).paddingOuter(_).align(T)},mi.apply(S(),arguments)}var dt=function(){var e=a(function(o,b,g,u){for(g=g||{},u=o.length;u--;g[o[u]]=b);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],r=[1,6],l=[1,7],d=[1,5,10,12,14,16,18,19,21,23,34,35,36],x=[1,25],_=[1,26],T=[1,28],S=[1,29],m=[1,30],D=[1,31],C=[1,32],L=[1,33],f=[1,34],k=[1,35],c=[1,36],v=[1,37],K=[1,43],_t=[1,42],Tt=[1,47],tt=[1,50],w=[1,10,12,14,16,18,19,21,23,34,35,36],rt=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],Rt=[1,64],lt={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(o,b,g,u,A,h,q){var p=h.length-1;switch(A){case 5:u.setOrientation(h[p]);break;case 9:u.setDiagramTitle(h[p].text.trim());break;case 12:u.setLineData({text:"",type:"text"},h[p]);break;case 13:u.setLineData(h[p-1],h[p]);break;case 14:u.setBarData({text:"",type:"text"},h[p]);break;case 15:u.setBarData(h[p-1],h[p]);break;case 16:this.$=h[p].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=h[p].trim(),u.setAccDescription(this.$);break;case 19:case 27:this.$=h[p-1];break;case 20:this.$=[Number(h[p-2]),...h[p]];break;case 21:this.$=[Number(h[p])];break;case 22:u.setXAxisTitle(h[p]);break;case 23:u.setXAxisTitle(h[p-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(h[p]);break;case 26:u.setXAxisRangeData(Number(h[p-2]),Number(h[p]));break;case 28:this.$=[h[p-2],...h[p]];break;case 29:this.$=[h[p]];break;case 30:u.setYAxisTitle(h[p]);break;case 31:u.setYAxisTitle(h[p-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(h[p-2]),Number(h[p]));break;case 37:case 38:this.$={text:h[p],type:"text"};break;case 39:this.$={text:h[p],type:"markdown"};break;case 40:this.$=h[p];break;case 41:this.$=h[p-1]+""+h[p]}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:r,36:l}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:r,36:l}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:r,36:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(d,[2,34]),e(d,[2,35]),e(d,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:r,36:l}),{1:[2,3]},e(d,[2,5]),e(t,[2,7],{4:22,34:n,35:r,36:l}),{11:23,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:39,13:38,24:K,27:_t,29:40,30:41,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:45,15:44,27:Tt,33:46,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:49,17:48,24:tt,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:52,17:51,24:tt,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{20:[1,53]},{22:[1,54]},e(w,[2,18]),{1:[2,2]},e(w,[2,8]),e(w,[2,9]),e(rt,[2,37],{40:55,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v}),e(rt,[2,38]),e(rt,[2,39]),e(E,[2,40]),e(E,[2,42]),e(E,[2,43]),e(E,[2,44]),e(E,[2,45]),e(E,[2,46]),e(E,[2,47]),e(E,[2,48]),e(E,[2,49]),e(E,[2,50]),e(E,[2,51]),e(w,[2,10]),e(w,[2,22],{30:41,29:56,24:K,27:_t}),e(w,[2,24]),e(w,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},e(w,[2,11]),e(w,[2,30],{33:60,27:Tt}),e(w,[2,32]),{31:[1,61]},e(w,[2,12]),{17:62,24:tt},{25:63,27:Rt},e(w,[2,14]),{17:65,24:tt},e(w,[2,16]),e(w,[2,17]),e(E,[2,41]),e(w,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(w,[2,31]),{27:[1,69]},e(w,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(w,[2,15]),e(w,[2,26]),e(w,[2,27]),{11:59,32:72,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},e(w,[2,33]),e(w,[2,19]),{25:73,27:Rt},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(o,b){if(!b.recoverable){var g=new Error(o);throw g.hash=b,g}this.trace(o)},"parseError"),parse:a(function(o){var b=this,g=[0],u=[],A=[null],h=[],q=this.table,p="",et=0,Dt=0,si=h.slice.call(arguments,1),R=Object.create(this.lexer),B={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(B.yy[ct]=this.yy[ct]);R.setInput(o,B.yy),B.yy.lexer=R,B.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var gt=R.yylloc;h.push(gt);var ni=R.options&&R.options.ranges;function Lt(){var I;return typeof(I=u.pop()||R.lex()||1)!="number"&&(I instanceof Array&&(I=(u=I).pop()),I=b.symbols_[I]||I),I}typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(I){g.length=g.length-2*I,A.length=A.length-I,h.length=h.length-I},"popStack"),a(Lt,"lex");for(var P,z,M,Pt,st,$,vt,nt,O={};;){if(z=g[g.length-1],this.defaultActions[z]?M=this.defaultActions[z]:(P==null&&(P=Lt()),M=q[z]&&q[z][P]),M===void 0||!M.length||!M[0]){var Et="";for(st in nt=[],q[z])this.terminals_[st]&&st>2&&nt.push("'"+this.terminals_[st]+"'");Et=R.showPosition?"Parse error on line "+(et+1)+`:
2
+ `+R.showPosition()+`
3
+ Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":"Parse error on line "+(et+1)+": Unexpected "+(P==1?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(Et,{text:R.match,token:this.terminals_[P]||P,line:R.yylineno,loc:gt,expected:nt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+P);switch(M[0]){case 1:g.push(P),A.push(R.yytext),h.push(R.yylloc),g.push(M[1]),P=null,Dt=R.yyleng,p=R.yytext,et=R.yylineno,gt=R.yylloc;break;case 2:if($=this.productions_[M[1]][1],O.$=A[A.length-$],O._$={first_line:h[h.length-($||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-($||1)].first_column,last_column:h[h.length-1].last_column},ni&&(O._$.range=[h[h.length-($||1)].range[0],h[h.length-1].range[1]]),(Pt=this.performAction.apply(O,[p,Dt,et,B.yy,M[1],A,h].concat(si)))!==void 0)return Pt;$&&(g=g.slice(0,-1*$*2),A=A.slice(0,-1*$),h=h.slice(0,-1*$)),g.push(this.productions_[M[1]][0]),A.push(O.$),h.push(O._$),vt=q[g[g.length-2]][g[g.length-1]],g.push(vt);break;case 3:return!0}}return!0},"parse")},ei=function(){return{EOF:1,parseError:a(function(o,b){if(!this.yy.parser)throw new Error(o);this.yy.parser.parseError(o,b)},"parseError"),setInput:a(function(o,b){return this.yy=b||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:a(function(o){var b=o.length,g=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===u.length?this.yylloc.first_column:0)+u[u.length-g.length].length-g[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(o){this.unput(this.match.slice(o))},"less"),pastInput:a(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var o=this.pastInput(),b=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+b+"^"},"showPosition"),test_match:a(function(o,b){var g,u,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),(u=o[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],g=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var h in A)this[h]=A[h];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var o,b,g,u;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),h=0;h<A.length;h++)if((g=this._input.match(this.rules[A[h]]))&&(!b||g[0].length>b[0].length)){if(b=g,u=h,this.options.backtrack_lexer){if((o=this.test_match(g,A[h]))!==!1)return o;if(this._backtrack){b=!1;continue}return!1}if(!this.options.flex)break}return b?(o=this.test_match(b,A[u]))!==!1&&o:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var o=this.next();return o||this.lex()},"lex"),begin:a(function(o){this.conditionStack.push(o)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(o){return(o=this.conditionStack.length-1-Math.abs(o||0))>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:a(function(o){this.begin(o)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(o,b,g,u){switch(g){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function it(){this.yy={}}return lt.lexer=ei,a(it,"Parser"),it.prototype=lt,lt.Parser=it,new it}();dt.parser=dt;var Ai=dt;function pt(e){return e.type==="bar"}function ft(e){return e.type==="band"}function W(e){return e.type==="linear"}a(pt,"isBarPlot"),a(ft,"isBandAxisData"),a(W,"isLinearAxisData");var Ot=(F=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((r,l)=>Math.max(l.length,r),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const r of t){const l=fi(n,1,r),d=l?l.width:r.length*i,x=l?l.height:i;s.width=Math.max(s.width,d),s.height=Math.max(s.height,x)}return n.remove(),s}},a(F,"TextDimensionCalculatorWithFont"),F),Wt=(N=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=.2*t.width;this.outerPadding=Math.min(s.width/2,n);const r=s.height+2*this.axisConfig.labelPadding;this.labelTextHeight=s.height,r<=i&&(i-=r,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+2*this.axisConfig.titlePadding;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=.2*t.height;this.outerPadding=Math.min(s.height/2,n);const r=s.width+2*this.axisConfig.labelPadding;r<=i&&(i-=r,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+2*this.axisConfig.titlePadding;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(N,"BaseAxis"),N),Si=(V=class extends Wt{constructor(t,i,s,n,r){super(t,n,r,i),this.categories=s,this.scale=xt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=xt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),It.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(V,"BandAxis"),V),wi=(X=class extends Wt{constructor(t,i,s,n,r){super(t,n,r,i),this.domain=s,this.scale=Bt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Bt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(X,"LinearAxis"),X);function mt(e,t,i,s){const n=new Ot(s);return ft(e)?new Si(t,i,e.categories,e.title,n):new wi(t,i,[e.min,e.max],e.title,n)}a(mt,"getAxis");var Ci=(Y=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(Y,"ChartTitle"),Y);function Ft(e,t,i,s){const n=new Ot(s);return new Ci(n,e,t,i)}a(Ft,"getChartTitleComponent");var ki=(U=class{constructor(t,i,s,n,r){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=r}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return i=this.orientation==="horizontal"?zt().y(s=>s[0]).x(s=>s[1])(t):zt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(U,"LinePlot"),U),_i=(H=class{constructor(t,i,s,n,r,l){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=r,this.plotIndex=l}getDrawableElement(){const t=this.barData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),s=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:this.boundingRect.x,y:n[0]-s,height:i,width:n[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:n[0]-s,y:n[1],width:i,height:this.boundingRect.y+this.boundingRect.height-n[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(H,"BarPlot"),H),Ti=(G=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new ki(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new _i(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}}return t}},a(G,"BasePlot"),G);function Nt(e,t,i){return new Ti(e,t,i)}a(Nt,"getPlotComponent");var Vt,Ri=(j=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ft(t,i,s,n),plot:Nt(t,i,s),xAxis:mt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:mt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,r=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),d=this.componentStore.plot.calculateSpace({width:r,height:l});t-=d.width,i-=d.height,d=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=d.height,i-=d.height,this.componentStore.xAxis.setAxisPosition("bottom"),d=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=d.height,this.componentStore.yAxis.setAxisPosition("left"),d=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=d.width,t-=d.width,t>0&&(r+=t,t=0),i>0&&(l+=i,i=0),this.componentStore.plot.calculateSpace({width:r,height:l}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+r]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+l}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(x=>pt(x))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,r=0,l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),d=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:l,height:d});t-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("left"),x=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=x.width,n=x.width,this.componentStore.yAxis.setAxisPosition("top"),x=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=x.height,r=s+x.height,t>0&&(l+=t,t=0),i>0&&(d+=i,i=0),this.componentStore.plot.calculateSpace({width:l,height:d}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([r,r+d]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(_=>pt(_))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(j,"Orchestrator"),j),Di=(Q=class{static build(t,i,s,n){return new Ri(t,i,s,n).getDrawableElement()}},a(Q,"XYChartBuilder"),Q),Z=0,at=St(),J=At(),y=Xt(),yt=J.plotColorPalette.split(",").map(e=>e.trim()),ht=!1,bt=!1;function At(){const e=di(),t=ut();return $t(e.xyChart,t.themeVariables.xyChart)}function St(){const e=ut();return $t(xi.xyChart,e.xyChart)}function Xt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function ot(e){const t=ut();return pi(e.trim(),t)}function Yt(e){Vt=e}function Ut(e){at.chartOrientation=e==="horizontal"?"horizontal":"vertical"}function Ht(e){y.xAxis.title=ot(e.text)}function wt(e,t){y.xAxis={type:"linear",title:y.xAxis.title,min:e,max:t},ht=!0}function Gt(e){y.xAxis={type:"band",title:y.xAxis.title,categories:e.map(t=>ot(t.text))},ht=!0}function jt(e){y.yAxis.title=ot(e.text)}function Qt(e,t){y.yAxis={type:"linear",title:y.yAxis.title,min:e,max:t},bt=!0}function Kt(e){const t=Math.min(...e),i=Math.max(...e),s=W(y.yAxis)?y.yAxis.min:1/0,n=W(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}function Ct(e){let t=[];if(e.length===0)return t;if(!ht){const i=W(y.xAxis)?y.xAxis.min:1/0,s=W(y.xAxis)?y.xAxis.max:-1/0;wt(Math.min(i,1),Math.max(s,e.length))}if(bt||Kt(e),ft(y.xAxis)&&(t=y.xAxis.categories.map((i,s)=>[i,e[s]])),W(y.xAxis)){const i=y.xAxis.min,s=y.xAxis.max,n=(s-i)/(e.length-1),r=[];for(let l=i;l<=s;l+=n)r.push(`${l}`);t=r.map((l,d)=>[l,e[d]])}return t}function kt(e){return yt[e===0?0:e%yt.length]}function qt(e,t){const i=Ct(t);y.plots.push({type:"line",strokeFill:kt(Z),strokeWidth:2,data:i}),Z++}function Zt(e,t){const i=Ct(t);y.plots.push({type:"bar",fill:kt(Z),data:i}),Z++}function Jt(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=Mt(),Di.build(at,y,J,Vt)}function ti(){return J}function ii(){return at}a(At,"getChartDefaultThemeConfig"),a(St,"getChartDefaultConfig"),a(Xt,"getChartDefaultData"),a(ot,"textSanitizer"),a(Yt,"setTmpSVGG"),a(Ut,"setOrientation"),a(Ht,"setXAxisTitle"),a(wt,"setXAxisRangeData"),a(Gt,"setXAxisBand"),a(jt,"setYAxisTitle"),a(Qt,"setYAxisRangeData"),a(Kt,"setYAxisRangeFromPlotData"),a(Ct,"transformDataWithoutCategory"),a(kt,"getPlotColorFromPalette"),a(qt,"setLineData"),a(Zt,"setBarData"),a(Jt,"getDrawableElem"),a(ti,"getChartThemeConfig"),a(ii,"getChartConfig");var Li={parser:Ai,db:{getDrawableElem:Jt,clear:a(function(){ui(),Z=0,at=St(),y={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},J=At(),yt=J.plotColorPalette.split(",").map(e=>e.trim()),ht=!1,bt=!1},"clear"),setAccTitle:li,getAccTitle:ri,setDiagramTitle:oi,getDiagramTitle:Mt,getAccDescription:hi,setAccDescription:ai,setOrientation:Ut,setXAxisTitle:Ht,setXAxisRangeData:wt,setXAxisBand:Gt,setYAxisTitle:jt,setYAxisRangeData:Qt,setLineData:qt,setBarData:Zt,setTmpSVGG:Yt,getChartThemeConfig:ti,getChartConfig:ii},renderer:{draw:a((e,t,i,s)=>{const n=s.db,r=n.getChartThemeConfig(),l=n.getChartConfig();function d(f){return f==="top"?"text-before-edge":"middle"}function x(f){return f==="left"?"start":f==="right"?"end":"middle"}function _(f){return`translate(${f.x}, ${f.y}) rotate(${f.rotation||0})`}a(d,"getDominantBaseLine"),a(x,"getTextAnchor"),a(_,"getTextTransformation"),It.debug(`Rendering xychart chart
7
+ `+e);const T=ci(t),S=T.append("g").attr("class","main"),m=S.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");gi(T,l.height,l.width,!0),T.attr("viewBox",`0 0 ${l.width} ${l.height}`),m.attr("fill",r.backgroundColor),n.setTmpSVGG(T.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),C={};function L(f){let k=S,c="";for(const[v]of f.entries()){let K=S;v>0&&C[c]&&(K=C[c]),c+=f[v],k=C[c],k||(k=C[c]=K.append("g").attr("class",f[v]))}return k}a(L,"getGroup");for(const f of D){if(f.data.length===0)continue;const k=L(f.groupTexts);switch(f.type){case"rect":k.selectAll("rect").data(f.data).enter().append("rect").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).attr("fill",c=>c.fill).attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth);break;case"text":k.selectAll("text").data(f.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",c=>c.fill).attr("font-size",c=>c.fontSize).attr("dominant-baseline",c=>d(c.verticalPos)).attr("text-anchor",c=>x(c.horizontalPos)).attr("transform",c=>_(c)).text(c=>c.text);break;case"path":k.selectAll("path").data(f.data).enter().append("path").attr("d",c=>c.path).attr("fill",c=>c.fill?c.fill:"none").attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth)}}},"draw")}};export{Li as diagram};
@@ -1 +1 @@
1
- var e=function(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),t="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",n=new RegExp("(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)"),r=new RegExp(t),o=new RegExp(t+"?_"+t),a=new RegExp(t+"\\s*\\(");function i(t,i){var s;if('"'===(s=t.next()))return i.tokenize=c,i.tokenize(t,i);if("/"===s){if(t.eat("*"))return i.tokenize=u,i.tokenize(t,i);if(t.eat("/"))return t.skipToEnd(),"comment"}t.backUp(1);var p=t.match(/^(\w+)\s*\(/,!1);null!==p&&e.hasOwnProperty(p[1])&&i.scopes.push("bodied");var m=l(i);if("bodied"===m&&"["===s&&i.scopes.pop(),"["!==s&&"{"!==s&&"("!==s||i.scopes.push(s),("["===(m=l(i))&&"]"===s||"{"===m&&"}"===s||"("===m&&")"===s)&&i.scopes.pop(),";"===s)for(;"bodied"===m;)i.scopes.pop(),m=l(i);return t.match(/\d+ *#/,!0,!1)?"qualifier":t.match(n,!0,!1)?"number":t.match(o,!0,!1)?"variableName.special":t.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":t.match(a,!0,!1)?(t.backUp(1),"variableName.function"):t.match(r,!0,!1)?"variable":t.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function c(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if('"'===n&&!o){r=!0;break}o=!o&&"\\"===n}return r&&!o&&(t.tokenize=i),"string"}function u(e,t){for(var n,r;null!=(r=e.next());){if("*"===n&&"/"===r){t.tokenize=i;break}n=r}return"comment"}function l(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}const s={name:"yacas",startState:function(){return{tokenize:i,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(e,t,n){if(e.tokenize!==i&&null!==e.tokenize)return null;var r=0;return"]"!==t&&"];"!==t&&"}"!==t&&"};"!==t&&");"!==t||(r=-1),(e.scopes.length+r)*n.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{s as yacas};
1
+ var l=function(e){for(var n={},r=e.split(" "),o=0;o<r.length;++o)n[r[o]]=!0;return n}("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),t="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",i=new RegExp("(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)"),s=new RegExp(t),p=new RegExp(t+"?_"+t),m=new RegExp(t+"\\s*\\(");function c(e,n){var r;if((r=e.next())==='"')return n.tokenize=f,n.tokenize(e,n);if(r==="/"){if(e.eat("*"))return n.tokenize=k,n.tokenize(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}e.backUp(1);var o=e.match(/^(\w+)\s*\(/,!1);o!==null&&l.hasOwnProperty(o[1])&&n.scopes.push("bodied");var a=u(n);if(a==="bodied"&&r==="["&&n.scopes.pop(),r!=="["&&r!=="{"&&r!=="("||n.scopes.push(r),((a=u(n))==="["&&r==="]"||a==="{"&&r==="}"||a==="("&&r===")")&&n.scopes.pop(),r===";")for(;a==="bodied";)n.scopes.pop(),a=u(n);return e.match(/\d+ *#/,!0,!1)?"qualifier":e.match(i,!0,!1)?"number":e.match(p,!0,!1)?"variableName.special":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(m,!0,!1)?(e.backUp(1),"variableName.function"):e.match(s,!0,!1)?"variable":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function f(e,n){for(var r,o=!1,a=!1;(r=e.next())!=null;){if(r==='"'&&!a){o=!0;break}a=!a&&r==="\\"}return o&&!a&&(n.tokenize=c),"string"}function k(e,n){for(var r,o;(o=e.next())!=null;){if(r==="*"&&o==="/"){n.tokenize=c;break}r=o}return"comment"}function u(e){var n=null;return e.scopes.length>0&&(n=e.scopes[e.scopes.length-1]),n}const h={name:"yacas",startState:function(){return{tokenize:c,scopes:[]}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},indent:function(e,n,r){if(e.tokenize!==c&&e.tokenize!==null)return null;var o=0;return n!=="]"&&n!=="];"&&n!=="}"&&n!=="};"&&n!==");"||(o=-1),(e.scopes.length+o)*r.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{h as yacas};
@@ -1 +1 @@
1
- function e(e){var t,r;e?(t=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,r=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(t=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,r=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var i=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,n=/^(n?[zc]|p[oe]?|m)\b/i,l=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,a=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:"z80",startState:function(){return{context:0}},token:function(c,s){if(c.column()||(s.context=0),c.eatSpace())return null;var o;if(c.eatWhile(/\w/)){if(e&&c.eat(".")&&c.eatWhile(/\w/),o=c.current(),!c.indentation())return c.match(a)?"number":null;if((1==s.context||4==s.context)&&i.test(o))return s.context=4,"variable";if(2==s.context&&n.test(o))return s.context=4,"variableName.special";if(t.test(o))return s.context=1,"keyword";if(r.test(o))return s.context=2,"keyword";if(4==s.context&&a.test(o))return"number";if(l.test(o))return"error"}else{if(c.eat(";"))return c.skipToEnd(),"comment";if(c.eat('"')){for(;(o=c.next())&&'"'!=o;)"\\"==o&&c.next();return"string"}if(c.eat("'")){if(c.match(/\\?.'/))return"number"}else if(c.eat(".")||c.sol()&&c.eat("#")){if(s.context=5,c.eatWhile(/\w/))return"def"}else if(c.eat("$")){if(c.eatWhile(/[\da-f]/i))return"number"}else if(c.eat("%")){if(c.eatWhile(/[01]/))return"number"}else c.next()}return null}}}const t=e(!1),r=e(!0);export{r as ez80,t as z80};
1
+ function o(a){var i,n;a?(i=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,n=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(i=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,n=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var s=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,d=/^(n?[zc]|p[oe]?|m)\b/i,u=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,l=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:"z80",startState:function(){return{context:0}},token:function(e,t){if(e.column()||(t.context=0),e.eatSpace())return null;var r;if(e.eatWhile(/\w/)){if(a&&e.eat(".")&&e.eatWhile(/\w/),r=e.current(),!e.indentation())return e.match(l)?"number":null;if((t.context==1||t.context==4)&&s.test(r))return t.context=4,"variable";if(t.context==2&&d.test(r))return t.context=4,"variableName.special";if(i.test(r))return t.context=1,"keyword";if(n.test(r))return t.context=2,"keyword";if(t.context==4&&l.test(r))return"number";if(u.test(r))return"error"}else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(r=e.next())&&r!='"';)r=="\\"&&e.next();return"string"}if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(t.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}const f=o(!1),x=o(!0);export{x as ez80,f as z80};
@@ -1 +1 @@
1
- function t(t){return((t=Math.exp(t))+1/t)/2}const r=function r(n,a,e){function u(r,u){var h,o,M=r[0],i=r[1],c=r[2],f=u[0],s=u[1],x=u[2],p=f-M,l=s-i,v=p*p+l*l;if(v<1e-12)o=Math.log(x/c)/n,h=function(t){return[M+t*p,i+t*l,c*Math.exp(n*t*o)]};else{var g=Math.sqrt(v),q=(x*x-c*c+e*v)/(2*c*a*g),Q=(x*x-c*c-e*v)/(2*x*a*g),R=Math.log(Math.sqrt(q*q+1)-q),S=Math.log(Math.sqrt(Q*Q+1)-Q);o=(S-R)/n,h=function(r){var e,u=r*o,h=t(R),f=c/(a*g)*(h*(e=n*u+R,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(R));return[M+f*p,i+f*l,c*h/t(n*u+R)]}}return h.duration=1e3*o*n/Math.SQRT2,h}return u.rho=function(t){var n=Math.max(.001,+t),a=n*n;return r(n,a,a*a)},u}(Math.SQRT2,2,4);export{r as i};
1
+ function w(h){return((h=Math.exp(h))+1/h)/2}const B=function h(n,p,m){function q(o,a){var r,u,l=o[0],v=o[1],t=o[2],y=a[0],z=a[1],e=a[2],f=y-l,c=z-v,s=f*f+c*c;if(s<1e-12)u=Math.log(e/t)/n,r=function(i){return[l+i*f,v+i*c,t*Math.exp(n*i*u)]};else{var S=Math.sqrt(s),T=(e*e-t*t+m*s)/(2*t*p*S),d=(e*e-t*t-m*s)/(2*e*p*S),M=Math.log(Math.sqrt(T*T+1)-T),A=Math.log(Math.sqrt(d*d+1)-d);u=(A-M)/n,r=function(i){var x,b=i*u,j=w(M),k=t/(p*S)*(j*(x=n*b+M,((x=Math.exp(2*x))-1)/(x+1))-function(g){return((g=Math.exp(g))-1/g)/2}(M));return[l+k*f,v+k*c,t*j/w(n*b+M)]}}return r.duration=1e3*u*n/Math.SQRT2,r}return q.rho=function(o){var a=Math.max(.001,+o),r=a*a;return h(a,r,r*r)},q}(Math.SQRT2,2,4);export{B as i};
package/dist/index.html CHANGED
@@ -59,8 +59,8 @@
59
59
  <marimo-app-config data-config='{{ app_config }}' hidden></marimo-app-config>
60
60
  <marimo-server-token data-token='{{ server_token }}' hidden></marimo-server-token>
61
61
  <title>{{ title }}</title>
62
- <script type="module" crossorigin src="./assets/index-Bsc9SEYH.js"></script>
63
- <link rel="stylesheet" crossorigin href="./assets/index-BbEv2iVN.css">
62
+ <script type="module" crossorigin src="./assets/index-BJsnjxpc.js"></script>
63
+ <link rel="stylesheet" crossorigin href="./assets/index-CSziElQw.css">
64
64
  </head>
65
65
  <body>
66
66
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/frontend",
3
- "version": "0.13.7-dev7",
3
+ "version": "0.13.7-dev9",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -113,6 +113,8 @@
113
113
  "js-cookie": "^3.0.5",
114
114
  "katex": "^0.16.22",
115
115
  "lodash-es": "^4.17.21",
116
+ "loro-codemirror": "^0.1.6",
117
+ "loro-crdt": "^1.5.4",
116
118
  "lucide-react": "^0.503.0",
117
119
  "lz-string": "^1.5.0",
118
120
  "marked": "^15.0.11",
@@ -150,9 +152,6 @@
150
152
  "vega-loader": "^4.5.3",
151
153
  "vscode-languageserver-protocol": "^3.17.5",
152
154
  "web-vitals": "^4.2.4",
153
- "y-codemirror.next": "^0.3.5",
154
- "y-websocket": "^2.1.0",
155
- "yjs": "^13.6.26",
156
155
  "zod": "^3.24.3"
157
156
  },
158
157
  "scripts": {
@@ -238,6 +237,8 @@
238
237
  "turbo": "^2.5.2",
239
238
  "typescript": "^5.8.3",
240
239
  "vite": "^6.3.2",
240
+ "vite-plugin-top-level-await": "^1.5.0",
241
+ "vite-plugin-wasm": "^3.4.1",
241
242
  "vite-tsconfig-paths": "^5.1.4",
242
243
  "vitest": "^3.1.1"
243
244
  },