uigraph 1.0.0 → 1.0.2

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 (323) hide show
  1. package/README.md +30 -51
  2. package/dist/bin.mjs +1608 -59037
  3. package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
  4. package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
  5. package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
  6. package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
  7. package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
  8. package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
  9. package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
  10. package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
  11. package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
  12. package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
  13. package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
  14. package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
  15. package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
  16. package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
  17. package/dist/viewer/assets/button-DZj74qS7.js +1 -0
  18. package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
  19. package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
  20. package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
  21. package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
  22. package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
  23. package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
  24. package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
  25. package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
  26. package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
  27. package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
  28. package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
  29. package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
  30. package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
  31. package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
  32. package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
  33. package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
  34. package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
  35. package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
  36. package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
  37. package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
  38. package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
  39. package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
  40. package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
  41. package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
  42. package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
  43. package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
  44. package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
  45. package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
  46. package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
  47. package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
  48. package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
  49. package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
  50. package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
  51. package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
  52. package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
  53. package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
  54. package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
  55. package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
  56. package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
  57. package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
  58. package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
  59. package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
  60. package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
  61. package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
  62. package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
  63. package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
  64. package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
  65. package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
  66. package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
  67. package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
  68. package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
  69. package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
  70. package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
  71. package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
  72. package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
  73. package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
  74. package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
  75. package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
  76. package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
  77. package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
  78. package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
  79. package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
  80. package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
  81. package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
  82. package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
  83. package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
  84. package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
  85. package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
  86. package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
  87. package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
  88. package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
  89. package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
  90. package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
  91. package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
  92. package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
  93. package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
  94. package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
  95. package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
  96. package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
  97. package/dist/viewer/assets/index-CIf0GId3.js +74 -0
  98. package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
  99. package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
  100. package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
  101. package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
  102. package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
  103. package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
  104. package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
  105. package/dist/viewer/assets/input--C59pq6j.js +1 -0
  106. package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
  107. package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
  108. package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
  109. package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
  110. package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
  111. package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
  112. package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
  113. package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
  114. package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
  115. package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
  116. package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
  117. package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
  118. package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
  119. package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
  120. package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
  121. package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
  122. package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
  123. package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
  124. package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
  125. package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
  126. package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
  127. package/dist/viewer/assets/popover-476u3TN0.js +1 -0
  128. package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
  129. package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
  130. package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
  131. package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
  132. package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
  133. package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
  134. package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
  135. package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
  136. package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
  137. package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
  138. package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
  139. package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
  140. package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
  141. package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
  142. package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
  143. package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
  144. package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
  145. package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
  146. package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
  147. package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
  148. package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
  149. package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
  150. package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
  151. package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
  152. package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
  153. package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
  154. package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
  155. package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
  156. package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
  157. package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
  158. package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
  159. package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
  160. package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
  161. package/dist/viewer/assets/table-B4pFND-o.js +1 -0
  162. package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
  163. package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
  164. package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
  165. package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
  166. package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
  167. package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
  168. package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
  169. package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
  170. package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
  171. package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
  172. package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
  173. package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
  174. package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
  175. package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
  176. package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
  177. package/dist/viewer/index.html +10 -1
  178. package/package.json +57 -57
  179. package/dist/abort-signals-B4fc3ahg.mjs +0 -34
  180. package/dist/agents.md +0 -28
  181. package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
  182. package/dist/auth-storage-BvNH97p9.mjs +0 -2180
  183. package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
  184. package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
  185. package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
  186. package/dist/cli-2R6QQFp1.mjs +0 -451
  187. package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
  188. package/dist/config-D8DMGzIq.mjs +0 -647
  189. package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
  190. package/dist/diagnostics-xdSgQR8t.mjs +0 -131
  191. package/dist/dist-BRyghrKX.mjs +0 -404
  192. package/dist/dist-D0EzrblG.mjs +0 -12161
  193. package/dist/dist-EKhnHWHG.mjs +0 -140221
  194. package/dist/dist-pQtuusFv.mjs +0 -1243
  195. package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
  196. package/dist/env-api-keys-uytNub6O.mjs +0 -122
  197. package/dist/error-body-FhmCtR7m.mjs +0 -101
  198. package/dist/esm-D5isprgl.mjs +0 -1533
  199. package/dist/esm-DnqE4pfM.mjs +0 -104876
  200. package/dist/execute-BoTKl80U.mjs +0 -1715
  201. package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
  202. package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
  203. package/dist/google-shared-2CyYa4VE.mjs +0 -33438
  204. package/dist/google-vertex-DZDUQPKa.mjs +0 -378
  205. package/dist/hash-DN7ukSfd.mjs +0 -16
  206. package/dist/headers-GhQHLk-3.mjs +0 -17
  207. package/dist/jiti-9kWALm4Y.mjs +0 -5439
  208. package/dist/jiti-loader-f21DrY1K.mjs +0 -27
  209. package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
  210. package/dist/json-parse-B2mHg7o7.mjs +0 -381
  211. package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
  212. package/dist/lib-Dj1gKQJc.mjs +0 -24379
  213. package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
  214. package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
  215. package/dist/models-DBdii9gQ.mjs +0 -1255
  216. package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
  217. package/dist/node-B0NU8X55.mjs +0 -2479
  218. package/dist/node-B8gaKm9g.mjs +0 -23
  219. package/dist/openai-I3_AqKDX.mjs +0 -17357
  220. package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
  221. package/dist/openai-completions-a_mH01ii.mjs +0 -994
  222. package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
  223. package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
  224. package/dist/openai-responses-a9lV_U7O.mjs +0 -270
  225. package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
  226. package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
  227. package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
  228. package/dist/pi-messages-B5ietIBq.mjs +0 -306
  229. package/dist/plan-prompt.md +0 -56
  230. package/dist/prompt.md +0 -44
  231. package/dist/provider-env-BJhgA66g.mjs +0 -37
  232. package/dist/provider-retry-DXYM7rVE.mjs +0 -79
  233. package/dist/runtime-DTkBxiaM.mjs +0 -2822
  234. package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
  235. package/dist/shell-836_JFnI.mjs +0 -162
  236. package/dist/source-CKPndhKl.mjs +0 -478
  237. package/dist/src-DNm2QRm3.mjs +0 -5028
  238. package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
  239. package/dist/token-DEUkymby.mjs +0 -56
  240. package/dist/token-util-Cx5S4eKt.mjs +0 -3
  241. package/dist/tool-DHDYqsyG.mjs +0 -6673
  242. package/dist/transform-messages-BClk99Vn.mjs +0 -477
  243. package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
  244. package/dist/typescript-Br-vsRJV.mjs +0 -6737
  245. package/dist/uuid-CNCZqNBb.mjs +0 -49
  246. package/dist/v2-1z8ijsD3.mjs +0 -6120
  247. package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
  248. package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
  249. package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
  250. package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
  251. package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
  252. package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
  253. package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
  254. package/dist/viewer/assets/button-DadqadpO.js +0 -1
  255. package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
  256. package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
  257. package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
  258. package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
  259. package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
  260. package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
  261. package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
  262. package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
  263. package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
  264. package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
  265. package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
  266. package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
  267. package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
  268. package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
  269. package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
  270. package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
  271. package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
  272. package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
  273. package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
  274. package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
  275. package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
  276. package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
  277. package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
  278. package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
  279. package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
  280. package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
  281. package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
  282. package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
  283. package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
  284. package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
  285. package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
  286. package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
  287. package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
  288. package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
  289. package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
  290. package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
  291. package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
  292. package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
  293. package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
  294. package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
  295. package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
  296. package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
  297. package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
  298. package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
  299. package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
  300. package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
  301. package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
  302. package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
  303. package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
  304. package/dist/viewer/assets/select-DDtnmSET.js +0 -1
  305. package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
  306. package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
  307. package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
  308. package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
  309. package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
  310. package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
  311. package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
  312. package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
  313. package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
  314. package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
  315. package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
  316. package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
  317. package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
  318. package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
  319. package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
  320. package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
  321. package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
  322. package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
  323. package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
@@ -1,74 +0,0 @@
1
- function Gt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Bn(e,t="|"){return e.map(n=>Gr(n)).join(t)}function Yt(e,t){return typeof t=="bigint"?t.toString():t}class Do{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function Ct(e){return new Do(e)}function Ro(e){return e==null}function pn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Lo(e,t){const n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const Un=Symbol("evaluating");function No(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Un)return r===void 0&&(r=Un,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Se(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function dn(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function ze(e){return dn(e._zod.def)??e._zod.def.shape}function Hr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return Se(this,t,r),r},enumerable:!0,configurable:!0})}function Wr(e,t,n){t in e?Se(e,t,n):e[t]=n}function je(e,t,n,r){const i=ze(t);for(const o of n){const u=Object.getOwnPropertyDescriptor(i,o);u.enumerable&&(u.get?Hr(e,o,()=>{const s=t._zod.def.shape[o];return r?r(s,o):s}):Wr(e,o,r?r(u.value,o):u.value))}}function jo(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Hr(e,n,()=>t[n]):Wr(e,n,r.value))}}function ue(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Mo(e){return JSON.stringify(e)}function Bo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Kr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function st(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Uo=Ct(()=>{if(ge.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Je(e){if(st(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(st(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Qr(e){return Je(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Vo=new Set(["string","number","symbol"]);function He(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $e(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function E(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Gr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qo(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Yr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Jo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ho(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o={};return je(o,e,Pt(e,t)),$e(e,ue(n,{shape:o,checks:[]}))}function Pt(e,t){const n=ze(e),r=[];for(const i of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,i)?.enumerable)throw new Error(`Unrecognized key: "${String(i)}"`);t[i]&&r.push(i)}return r}function Wo(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=new Set(Pt(e,t)),u={};return je(u,e,Reflect.ownKeys(ze(e)).filter(s=>!o.has(s))),$e(e,ue(n,{shape:u,checks:[]}))}function Ko(e,t){if(!Je(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=ze(e);for(const o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return $e(e,ue(e._zod.def,{shape:Xr(e,t)}))}function Xr(e,t){const n={};return je(n,e,Reflect.ownKeys(ze(e))),jo(n,t),n}function Qo(e,t){if(!Je(t))throw new Error("Invalid input to safeExtend: expected a plain object");return $e(e,ue(e._zod.def,{shape:Xr(e,t)}))}function Go(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};je(n,e,Reflect.ownKeys(ze(e))),je(n,t,Reflect.ownKeys(ze(t)));const r=ue(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return $e(e,r)}function Vn(e,t,n,r="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const s=n?new Set(Pt(t,n)):void 0,a={};return je(a,t,Reflect.ownKeys(ze(t)),e&&((l,c)=>s&&!s.has(c)?l:new e({type:"optional",innerType:l}))),$e(t,ue(t._zod.def,{shape:a,checks:[]}))}function Yo(e,t,n){const r=n?new Set(Pt(t,n)):void 0,i={};return je(i,t,Reflect.ownKeys(ze(t)),(o,u)=>r&&!r.has(u)?o:new e({type:"nonoptional",innerType:o})),$e(t,ue(t._zod.def,{shape:i}))}function ve(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Xo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Le(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function et(e){return typeof e=="string"?e:e?.message}function qn(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ce(e,t,n){var r;const i=e.inst?._zod?.traits;i?.has("$ZodType")&&(i.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,u=e.message?e.message:et(e.inst?._zod.def?.error?.(e))??et(o?.(e))??et(t?.error?.(e))??et(n.customError?.(e))??et(n.localeError?.(e))??"Invalid input",s={};for(const a of Object.keys(e))a==="inst"||a==="schema"||a==="continue"||a==="input"||a==="__proto__"||(s[a]=e[a]);return s.path??(s.path=[]),s.message=u,t?.reportInput&&(s.input=e.input),s}const eu=/[\uD800-\uDBFF]/;function mn(e){const t=e.length;if(!eu.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function gn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function tu(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function at(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function nu(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ru(e,n,r.value)}}function Pe(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function kn(e,t,n){return Pe(e,t,n,!1)}function ei(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Pe(this,n,r(this))},set(i){Pe(this,n,i)}})}return t}function ru(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Pe(this,t,n.bind(this))},set(r){Pe(this,t,r)}})}function iu(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let Nt,Te=!1;const ou={configurable:!0,get(){Te=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&Nt!==e._zod){Nt=void 0;return}Nt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ou);const i=Te;Te=!1;try{const o=n(this);return Te?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),Te=Te||i,o}catch(o){throw delete this[t],Te=Te||i,o}},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i})}})}function uu(e,t,n,r){const i=iu(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){const o={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,o),o.value=n(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:o})}})}const su="~constantCatch";function au(e){const t=()=>e;return t[su]=!0,t}var Jn;const jt={value:void 0,enumerable:!1};let Hn="captureStackTrace"in Error?Error:null;function lu(e){const t=Hn;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Hn=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function _(e,t,n,r){const i={};function o(p){this.def=p,this.constr=f,this.traits=new Set}o.prototype=i;const u=n,s=u&&new WeakSet;function a(p,h){if(p._zod){if(p._zod.traits.has(e))return}else{jt.value=new o(h);try{Object.defineProperty(p,"_zod",jt)}finally{jt.value=void 0}}if(p._zod.traits.add(e),t(p,h),s){const w=Object.getPrototypeOf(p),v=p._zod.constr.prototype;let k=w;for(;k&&k!==v;)k=Object.getPrototypeOf(k);const I=k??w;s.has(I)||(s.add(I),nu(I,u))}const d=f.prototype;for(const w in d)Object.prototype.hasOwnProperty.call(d,w)&&(w in p||(p[w]=d[w].bind(p)))}const l=r?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:e});function f(p){const h=r?.Parent?lu(c):this;a(h,p);const d=h._zod.deferred;if(d){for(const v of d)v();h._zod.deferred=void 0}const w=globalThis.__zod_globalConfig?.postProcessor;return w&&w(h),h}return Object.defineProperty(f,"init",{value:a}),Object.defineProperty(f,Symbol.hasInstance,{value:p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class Ne extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ti extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Jn=globalThis).__zod_globalConfig??(Jn.__zod_globalConfig={});const ge=globalThis.__zod_globalConfig;function ke(e){return e&&Object.assign(ge,e),ge}function cu(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Yt,2)),e.message}function fu(e){this._zod.message=e}const hu={get:cu,set:fu,enumerable:!0,configurable:!0},Mt={value:void 0,enumerable:!1},Wn=new WeakSet([Object.prototype,Error.prototype]),pu=(e,t)=>{e.name="$ZodError",Mt.value=t,Object.defineProperty(e,"issues",Mt),Mt.value=void 0,Object.defineProperty(e,"message",hu);const n=Object.getPrototypeOf(e);Wn.has(n)||(Wn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},du=_("$ZodError",pu);function mu(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function gu(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?mu(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ku(e,t=n=>n.message){const n={_errors:[]},r=(i,o=[])=>{for(const u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(s=>r({issues:s},[...o,...u.path]));else if(u.code==="invalid_key")r({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")r({issues:u.issues},[...o,...u.path]);else{const s=[...o,...u.path];if(s.length===0)n._errors.push(t(u));else{let a=n,l=0;for(;l<s.length;){const c=s[l],f=l===s.length-1;if(c==="_errors"){f&&a._errors.push(t(u)),l++;continue}Object.prototype.hasOwnProperty.call(a,c)||Object.defineProperty(a,c,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const p=a[c];f&&p._errors.push(t(u)),a=p,l++}}}};return r(e),n}function At(e,t){return{callee:t?.callee??e,Err:t?.Err}}const bn=e=>{const t=(n,r,i,o)=>{const u=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},u);if(s instanceof Promise)throw new Ne;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(l=>Ce(l,u,ke())));throw Kr(a,o?.callee??t),a}return s.value};return t},yn=e=>{const t=async(n,r,i,o)=>{const u=i?{...i,async:!0}:{async:!0};let s=n._zod.run({value:r,issues:[]},u);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(l=>Ce(l,u,ke())));throw Kr(a,o?.callee??t),a}return s.value};return t},_n=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Ne;return o.issues.length?ni(e,o.issues,i):{success:!0,data:o.value}};function ni(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(i=>Ce(i,n,ke()))),t=void 0,n=void 0),r},set error(i){r=i,t=void 0,n=void 0}}}const wn=e=>async(t,n,r)=>{const i=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?ni(e,o.issues,i):{success:!0,data:o.value}},bu=Symbol.for("zod.compile.invalid"),yu=Symbol.for("zod.compile.fallback"),_u=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==bu)return!0;if(r.definite===!0&&n===void 0)return!1}return wu(e,t,n)});function wu(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun;let o;if(i?(r[yu]=!0,o=i({value:t,issues:[]},r)):o=e._zod.run({value:t,issues:[]},r),o instanceof Promise)throw new Ne;return o.issues.length===0}const xu=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},vu=e=>{const t=bn(e),n=(r,i,o,u)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return t(r,i,s,At(n,u))};return n},zu=e=>{const t=bn(e),n=(r,i,o,u)=>t(r,i,o,At(n,u));return n},Su=e=>{const t=yn(e),n=async(r,i,o,u)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(r,i,s,At(n,u))};return n},Iu=e=>{const t=yn(e),n=async(r,i,o,u)=>await t(r,i,o,At(n,u));return n},Ou=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return _n(e)(t,n,i)},Eu=e=>(t,n,r)=>_n(e)(t,n,r),Tu=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return wn(e)(t,n,i)},Cu=e=>async(t,n,r)=>wn(e)(t,n,r),Pu=/^[cC][0-9a-z]{6,}$/,Au=/^[0-9a-z]+$/,$u=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Fu=/^[0-9a-vA-V]{20}$/,Zu=/^[A-Za-z0-9]{27}$/,Du=/^[a-zA-Z0-9_-]{21}$/;function Ru(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Lu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nu=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Kn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ju=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Mu="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Bu(){return new RegExp(Mu,"u")}const Uu=/^(?:(?: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])$/,Vu=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,qu=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ju=/^(([0-9a-fA-F]{1,4}:){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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wu=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ku=/^https?$/,Qu=/^\+[1-9]\d{6,14}$/,ri="(?:(?:\\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])))";function Gu(e){return new RegExp(`^${e}$`)}const Yu=Gu(ri);function Xt(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Xu(e){return new RegExp(`^${Xt(e)}$`)}function es(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${Xt({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Xt({precision:e.precision})}`:n;return new RegExp(`^${ri}T(?:${r})$`)}const ts=/^[\s\S]{0,}$/,ns=/^-?\d+$/,xn=/^-?\d+(?:\.\d+)?$/,rs=/^(?:true|false)$/i,is=/^[^A-Z]*$/,os=/^[^a-z]*$/,ne=_("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vn=e=>{const t=e.value;return!Ro(t)&&t.length!==void 0},wt={number:"number",bigint:"bigint",object:"date"},ii=_("$ZodCheckLessThan",(e,t)=>{ne.init(e,t);const n=wt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:wt[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oi=_("$ZodCheckGreaterThan",(e,t)=>{ne.init(e,t);const n=wt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:wt[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),us=_("$ZodCheckMultipleOf",(e,t)=>{ne.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Lo(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ss=_("$ZodCheckNumberFormat",(e,t)=>{ne.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=Yr[t.format];e._zod.check=u=>{const s=u.value;if(n){if(!Number.isInteger(s)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?u.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):u.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&u.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&u.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),as=_("$ZodCheckMaxLength",(e,t)=>{var n;ne.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.check=r=>{const i=r.value,o=i.length;if((typeof i=="string"&&o>t.maximum?mn(i):o)<=t.maximum)return;const s=gn(i);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ls=_("$ZodCheckMinLength",(e,t)=>{var n;ne.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.check=r=>{const i=r.value,o=i.length;if((typeof i=="string"&&o>=t.minimum&&o<t.minimum*2?mn(i):o)>=t.minimum)return;const s=gn(i);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),cs=_("$ZodCheckLengthEquals",(e,t)=>{var n;ne.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.check=r=>{const i=r.value,o=i.length,u=typeof i=="string"&&o>=t.length&&o<=t.length*2?mn(i):o;if(u===t.length)return;const s=gn(i),a=u>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),$t=_("$ZodCheckStringFormat",(e,t)=>{var n,r;ne.init(e,t),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),fs=_("$ZodCheckRegex",(e,t)=>{$t.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),hs=_("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=is),$t.init(e,t)}),ps=_("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=os),$t.init(e,t)}),ds=_("$ZodCheckIncludes",(e,t)=>{ne.init(e,t);const n=He(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),ms=_("$ZodCheckStartsWith",(e,t)=>{ne.init(e,t);const n=new RegExp(`^${He(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),gs=_("$ZodCheckEndsWith",(e,t)=>{ne.init(e,t);const n=new RegExp(`.*${He(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function Qn(e,t,n){e.issues.length&&t.issues.push(...Le(n,e.issues))}const ks=_("$ZodCheckProperties",(e,t)=>{ne.init(e,t),kn(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});return}n??(n=Reflect.ownKeys(t.shape).map(u=>[u,t.shape[u]]));const i=r.value;let o;for(const[u,s]of n){const a=s._zod.run({value:i[u],issues:[]},{});a instanceof Promise?(o??(o=[]),o.push(a.then(l=>Qn(l,r,u)))):Qn(a,r,u)}if(o)return Promise.all(o).then(()=>{})}}),bs=_("$ZodCheckOverwrite",(e,t)=>{ne.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class ys{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
- `).filter(u=>u),i=Math.min(...r.map(u=>u.length-u.trimStart().length)),o=r.map(u=>u.slice(i)).map(u=>" ".repeat(this.indent*2)+u);for(const u of o)this.content.push(u)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
3
- ${n.join(`
4
- `)}
5
- };`)(...Object.values(this.closed))}}const _s={major:4,minor:6,patch:5},q=_("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_s;const r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,l)=>{if(s.memo)return s;let c=ve(s),f;for(const p of a){if(p._zod.def.when){if(Xo(s)||!p._zod.def.when(s))continue}else if(c)continue;const h=s.issues.length,d=p._zod.check(s);if(d instanceof Promise&&l?.async===!1)throw new Ne;if(f||d instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await d,s.issues.length!==h&&(qn(s.issues,h,e),c||(c=ve(s,h)))});else{if(s.issues.length===h)continue;qn(s.issues,h,e),c||(c=ve(s,h))}}return f?f.then(()=>s):s},u=(s,a,l)=>{if(ve(s))return s.aborted=!0,s;const c=o(a,i,l);if(c instanceof Promise){if(l.async===!1)throw new Ne;return c.then(f=>e._zod.parse(f,l))}return e._zod.parse(c,l)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(f=>u(f,s,a)):u(c,s,a)}const l=e._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new Ne;return l.then(c=>o(c,i,a))}return o(l,i,a)}}},{get"~standard"(){return kn(this,"~standard",si(this))},set"~standard"(e){Pe(this,"~standard",e)}}),ui=(e,t)=>e.issues.length?{issues:e.issues.map(n=>Ce(n,t,ke()))}:{value:e.value};async function ws(e,t){const n={async:!0};return ui(await e._zod.run({value:t,issues:[]},n),n)}function si(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return ui(r,n)}catch{}return ws(e,t)},vendor:"zod",version:1}}const zn=_("$ZodString",(e,t)=>{q.init(e,t),e._zod.pattern=t.pattern??ts,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),H=_("$ZodStringFormat",(e,t)=>{$t.init(e,t),zn.init(e,t)}),xs=_("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Nu),H.init(e,t)}),vs=_("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Kn(r))}else t.pattern??(t.pattern=Kn());H.init(e,t)}),zs=_("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ju),H.init(e,t)}),ai=1,xt=2;function li(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Ss(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?li(e)||xt:Is(e,t)}function Is(e,t){if(!t.normalize&&t.protocol?.source===Ku.source&&!/^https?:\/\//i.test(e))return ai;try{if(typeof URL<"u"){const n=URL;if(typeof n.parse=="function")return n.parse(e)??xt}return new URL(e)}catch{return xt}}const Os=/[\t\n\r]/g;function Gn(e){return e.replace(Os,"")}function Es(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ts(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Cs=_("$ZodURL",(e,t)=>{H.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=Ss(r,t);if(i===ai){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(i===xt){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Gn(r);return}t.hostname&&!Es(i,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Ts(i,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Gn(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Ps=_("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Bu()),H.init(e,t)}),As=_("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Du:Ru(t.length)),H.init(e,t)}),$s=_("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Pu),H.init(e,t)}),Fs=_("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Au),H.init(e,t)}),Zs=_("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$u),H.init(e,t)}),Ds=_("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Fu),H.init(e,t)}),Rs=_("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zu),H.init(e,t)}),Ls=_("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=es(t)),H.init(e,t)}),Ns=_("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Yu),H.init(e,t)}),js=_("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Xu(t)),H.init(e,t)}),Ms=_("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lu),H.init(e,t)}),Bs=_("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Uu),H.init(e,t)}),Us=/^[0-9a-fA-F:.]+$/;function ci(e){return Us.test(e)?li(`http://[${e}]`):!1}const Vs=_("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Vu),H.init(e,t),e._zod.check=n=>{ci(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),qs=_("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=qu),H.init(e,t)});function Js(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const i=Number(r);return`${i}`!==r||i<0||i>128?!1:ci(n)}const Hs=_("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ju),H.init(e,t),e._zod.check=n=>{Js(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function fi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const hi=/^[0-9a-zA-Z+/]*={0,2}$/,Ws=_("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=hi),H.init(e,t),e._zod.check=n=>{fi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Sn=/^[A-Za-z0-9_-]*$/;function Ks(e){if(!Sn.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return fi(n)}const Qs=_("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Sn),H.init(e,t),e._zod.check=n=>{Ks(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Gs=_("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qu),H.init(e,t)});function Ys(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const Xs=_("$ZodJWT",(e,t)=>{H.init(e,t),e._zod.check=n=>{Ys(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),pi=_("$ZodNumber",(e,t)=>{q.init(e,t),e._zod.pattern=xn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),ea=_("$ZodNumberFormat",(e,t)=>{ss.init(e,t),pi.init(e,t)}),ta=_("$ZodBoolean",(e,t)=>{q.init(e,t),e._zod.pattern=rs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),na=_("$ZodAny",(e,t)=>{q.init(e,t),e._zod.parse=n=>n}),ra=_("$ZodUnknown",(e,t)=>{q.init(e,t),e._zod.parse=n=>n}),ia=_("$ZodNever",(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Yn(e,t,n){e.issues.length&&t.issues.push(...Le(n,e.issues)),t.value[n]=e.value}const oa=_("$ZodArray",(e,t)=>{q.init(e,t);const n=ge.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=n?n.alloc(e,r,Array(o.length),i):Array(o.length);const u=[],s=i?.abortEarly;for(let a=0;a<o.length;a++){const l=o[a],c=t.element._zod.run({value:l,issues:[]},i);if(c instanceof Promise)u.push(c.then(f=>Yn(f,r,a)));else if(Yn(c,r,a),s&&c.issues.length!==0&&ve(c))break}return u.length?Promise.all(u).then(()=>r):r}});function vt(e,t,n,r,i,o){const u=n in r,s=o==="optional";if(!(!u&&s&&i==="optional")){if(e.issues.length){if(i!==void 0&&s&&!u)return;t.issues.push(...Le(n,e.issues))}if(!u&&i===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(u||i==="defaulted"&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}const ua=[];function di(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ua,i=r.length?[...t,...r]:t;for(const u of i)if(!e.shape?.[u]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(u)}": expected a Zod schema`);const o=qo(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function mi(e,t,n,r,i,o,u){const s=[],a=i.keySet,l=i.catchall._zod,c=l.def.type,f=l.optin,p=l.optout;let h=0;for(const d in t){if(u&&n.issues.length!==h){if(ve(n,h))break;h=n.issues.length}if(a.has(d))continue;if(d==="__proto__"){c==="never"&&s.push(d);continue}if(c==="never"){s.push(d);continue}const w=l.run({value:t[d],issues:[]},r);w instanceof Promise?e.push(w.then(v=>vt(v,n,d,t,f,p))):vt(w,n,d,t,f,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const sa=_("$ZodObject",(e,t)=>{q.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const l=()=>{const c={...r};return Object.defineProperty(t,"shape",{value:c}),l.raw=c,c};l.raw=r,Object.defineProperty(t,"shape",{get:l})}const i=Ct(()=>di(t));R(e,"propValues",l=>{const c=l.def.shape,f={};for(const p in c){const h=c[p]._zod;if(h.values){Object.prototype.hasOwnProperty.call(f,p)||Se(f,p,new Set);for(const d of h.values)f[p].add(d);h.optin!==void 0&&f[p].add(void 0)}}return f});const o=st,u=t.catchall;let s;const a=ge.memoizer;a?.attach(e),e._zod.parse=(l,c)=>{s??(s=i.value);const f=l.value;if(!o(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;l.value=a?a.alloc(e,l,{},c):{};const p=[],h=s.shape,d=c?.abortEarly;let w=l.issues.length;for(const v of s.allKeys){if(d&&l.issues.length!==w){if(ve(l,w))break;w=l.issues.length}if(v==="__proto__")continue;const k=h[v],I=k._zod.optin,z=k._zod.optout,A=k._zod.run({value:f[v],issues:[]},c);A instanceof Promise?p.push(A.then(T=>vt(T,l,v,f,I,z))):vt(A,l,v,f,I,z)}return u?mi(p,f,l,c,i.value,e,d===!0):p.length?Promise.all(p).then(()=>l):l}}),aa=_("$ZodObjectJIT",(e,t)=>{sa.init(e,t);const n=e._zod.parse,r=Ct(()=>di(t)),i=ge.memoizer,o=h=>{const d=r.value,w=d.symbolKeys,v=new ys(["payload","ctx"],{shape:h,inst:e,memo:i,syms:w}),k=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,I=(T,b)=>`
6
- let ${T}_ab = false;
7
- for (let i = 0; i < ${T}.issues.length; i++) {
8
- const iss = ${T}.issues[i];
9
- iss.path = iss.path ? [${b}, ...iss.path] : [${b}];
10
- payload.issues.push(iss);
11
- if (iss.continue !== true) ${T}_ab = true;
12
- }
13
- if (${T}_ab && ctx && ctx.abortEarly) {
14
- payload.value = newResult;
15
- return payload;
16
- }`;v.write("const input = payload.value;");const z=Object.create(null);let A=0;for(const T of d.allKeys)z[T]=`key_${A++}`;v.write(i?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const T of d.allKeys){if(T==="__proto__")continue;const b=z[T],$=typeof T=="symbol"?`syms[${w.indexOf(T)}]`:Mo(T),L=`${$} in input`,j=h[T],y=j?._zod?.optin,O=y!==void 0,C=j?._zod?.optout==="optional";if(v.write(`const ${b} = ${k($)};`),O&&C){const B=y==="optional"?`${b}_present`:`${b}.value !== undefined || ${b}_present`;v.write(`
17
- const ${b}_present = ${L};
18
- if (!${b}.issues.length || ${b}_present) {
19
- if (${b}.issues.length) {${I(b,$)}
20
- }
21
-
22
- if (${B}) {
23
- newResult[${$}] = ${b}.value;
24
- }
25
- }
26
-
27
- `)}else O?(v.write(`
28
- if (${b}.issues.length) {${I(b,$)}
29
- }
30
- `),y==="defaulted"?v.write(`newResult[${$}] = ${b}.value;`):v.write(`
31
- if (${b}.value !== undefined || ${L}) {
32
- newResult[${$}] = ${b}.value;
33
- }
34
- `)):v.write(`
35
- const ${b}_present = ${L};
36
- if (${b}.issues.length) {${I(b,$)}
37
- }
38
- if (!${b}_present && !${b}.issues.length) {
39
- payload.issues.push({
40
- code: "invalid_type",
41
- expected: "nonoptional",
42
- input: undefined,
43
- path: [${$}]
44
- });
45
- if (ctx && ctx.abortEarly) {
46
- payload.value = newResult;
47
- return payload;
48
- }
49
- }
50
-
51
- if (${b}_present) {
52
- newResult[${$}] = ${b}.value;
53
- }
54
-
55
- `)}return v.write("payload.value = newResult;"),v.write("return payload;"),v.compile()};let u;const s=st,a=!ge.jitless,c=a&&Uo.value,f=t.catchall;let p;e._zod.parse=(h,d)=>{p??(p=r.value);const w=h.value;return s(w)?a&&c&&d?.async===!1&&d.jitless!==!0?(u||(u=o(t.shape)),h=u(h,d),f?mi([],w,h,d,p,e,d?.abortEarly===!0):h):n(h,d):(h.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),h)}});function Xn(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!ve(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(u=>Ce(u,r,ke())))}),t)}const gi=_("$ZodUnion",(e,t)=>{q.init(e,t),R(e,"optin",r=>r.def.options.some(i=>i._zod.optin==="defaulted")?"defaulted":r.def.options.some(i=>i._zod.optin!==void 0)?"optional":void 0),R(e,"optout",r=>r.def.options.some(i=>i._zod.optout==="optional")?"optional":void 0),R(e,"values",r=>{if(r.def.options.every(i=>i._zod.values))return new Set(r.def.options.flatMap(i=>Array.from(i._zod.values)))}),R(e,"pattern",r=>{if(r.def.options.every(i=>i._zod.pattern)){const i=r.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>pn(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1;const u=[];for(const s of t.options){const a=s._zod.run({value:r.value,issues:[]},i);if(a instanceof Promise)u.push(a),o=!0;else{if(a.issues.length===0)return a;u.push(a)}}return o?Promise.all(u).then(s=>Xn(s,r,e,i)):Xn(u,r,e,i)}});function la(e){const t=new Map;for(const n of e.options){const r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(const i of r)if(t.has(i)){if(i!==void 0)throw new Error(`Duplicate discriminator value "${String(i)}"`);t.set(i,null)}else t.set(i,n)}return t}const ca=_("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gi.init(e,t);const n=e._zod.parse;R(e,"propValues",i=>{const o={};let u=0;for(const s of i.def.options){const a=s._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${i.def.options.indexOf(s)}"`);a[i.def.discriminator]?.has(void 0)&&u++;for(const[l,c]of Object.entries(a)){Object.prototype.hasOwnProperty.call(o,l)||Se(o,l,new Set);for(const f of c)o[l].add(f)}}return!i.def.unionFallback&&u>1&&o[i.def.discriminator]?.delete(void 0),o}),t.options.forEach((i,o)=>{const u=dn(i._zod.def);if(u&&!Object.prototype.hasOwnProperty.call(u,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});const r=Ct(()=>la(t));e._zod.parse=(i,o)=>{const u=i.value;if(!st(u))return i.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),i;const s=u?.[t.discriminator],a=r.value.get(s);return a&&(s!==void 0||o.direction!=="backward")?a._zod.run(i,o):t.unionFallback||o.direction==="backward"?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(l=>r.value.get(l)!==null),input:u,path:[t.discriminator],inst:e}),i)}}),fa=_("$ZodIntersection",(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,o=t.left._zod.run({value:i,issues:[]},r),u=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||u instanceof Promise?Promise.all([o,u]).then(([a,l])=>er(n,a,l)):er(n,o,u)}});function en(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Je(e)&&Je(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,"__proto__")&&delete i.__proto__;for(const o of r){if(o==="__proto__")continue;const u=en(e[o],t[o]);if(!u.valid)return{valid:!1,mergeErrorPath:[o,...u.mergeErrorPath]};i[o]=u.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[r],u=en(i,o);if(!u.valid)return{valid:!1,mergeErrorPath:[r,...u.mergeErrorPath]};n.push(u.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function er(e,t,n){const r=new Map;let i;const o=new Map,u=(l,c)=>{let f;if(l.code==="unrecognized_keys"&&!l.path?.length)i??(i=l),f=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){const p=String(l.path[0]);o.has(p)||o.set(p,l),f=[p]}else return!1;for(const p of f)r.has(p)||r.set(p,{}),r.get(p)[c]=!0;return!0};for(const l of t.issues)u(l,"l")||e.issues.push(l);for(const l of n.issues)u(l,"r")||e.issues.push(l);const s=[...r].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(s.length){const l=i?s.filter(c=>i.keys.includes(c)):[];l.length&&e.issues.push({...i,keys:l});for(const c of s)!l.includes(c)&&o.has(c)&&e.issues.push(o.get(c))}const a=en(t.value,n.value);if(!a.valid){if(ve(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`)}return e.value=a.data,e}const ha=_("$ZodRecord",(e,t)=>{q.init(e,t);const n=ge.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{const o=r.value;if(!Je(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;const u=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};const a=new Set;for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){if(a.add(typeof c=="number"?c.toString():c),c==="__proto__")continue;const f=t.keyType._zod.run({value:c,issues:[]},i);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(f.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(d=>Ce(d,i,ke())),input:c,path:[c],inst:e});continue}const p=f.value;if(p==="__proto__")continue;const h=t.valueType._zod.run({value:o[c],issues:[]},i);h instanceof Promise?u.push(h.then(d=>{d.issues.length&&r.issues.push(...Le(c,d.issues)),r.value[p]=d.value})):(h.issues.length&&r.issues.push(...Le(c,h.issues)),r.value[p]=h.value)}let l;for(const c in o)if(!a.has(c))if(t.mode==="loose"){if(c==="__proto__")continue;r.value[c]=o[c]}else l=l??[],l.push(c);l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let a;for(const l of Reflect.ownKeys(o)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,l))continue;let c=t.keyType._zod.run({value:l,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&xn.test(l)&&c.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[l]=o[l]:s?(a=a??[],a.push(l)):r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>Ce(d,i,ke())),input:l,path:[l],inst:e});continue}const p=c.value;if(p==="__proto__")continue;const h=t.valueType._zod.run({value:o[l],issues:[]},i);h instanceof Promise?u.push(h.then(d=>{d.issues.length&&r.issues.push(...Le(l,d.issues)),r.value[p]=d.value})):(h.issues.length&&r.issues.push(...Le(l,h.issues)),r.value[p]=h.value)}a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a,continue:!0})}return u.length?Promise.all(u).then(()=>r):r}}),pa=_("$ZodEnum",(e,t)=>{q.init(e,t);const n=Gt(t.entries),r=new Set(n);e._zod.values=r,R(e,"pattern",i=>{const o=Gt(i.def.entries).filter(u=>Vo.has(typeof u));return new RegExp(o.length?`^(${o.map(u=>He(u.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,o)=>{const u=i.value;return r.has(u)||i.issues.push({code:"invalid_value",values:n,input:u,inst:e}),i}}),da=_("$ZodLiteral",(e,t)=>{q.init(e,t);const n=new Set(t.values);e._zod.values=n,R(e,"pattern",r=>{const i=r.def.values;return new RegExp(i.length?`^(${i.map(o=>typeof o=="string"?He(o):o?He(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,i)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),ma=_("$ZodTransform",(e,t)=>{q.init(e,t),e._zod.optin="optional",ge.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ti(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(u=>(n.value=u,n));if(i instanceof Promise)throw new Ne;return n.value=i,n}});function tr(e,t){return e.value=t.issues.length?void 0:t.value,e}const ki=_("$ZodOptional",(e,t)=>{q.init(e,t),R(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",R(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),R(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${pn(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const i=t.innerType._zod.run({value:n.value,issues:[]},r);return i instanceof Promise?i.then(o=>tr(n,o)):tr(n,i)}return t.innerType._zod.run(n,r)}}),ga=_("$ZodExactOptional",(e,t)=>{ki.init(e,t),R(e,"values",n=>n.def.innerType._zod.values),R(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),ka=_("$ZodNullable",(e,t)=>{q.init(e,t),R(e,"optin",n=>n.def.innerType._zod.optin),R(e,"optout",n=>n.def.innerType._zod.optout),R(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${pn(r.source)}|null)$`):void 0}),R(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),ba=_("$ZodDefault",(e,t)=>{q.init(e,t),e._zod.optin="defaulted",R(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>nr(o,t)):nr(i,t)}});function nr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ya=_("$ZodPrefault",(e,t)=>{q.init(e,t),e._zod.optin="defaulted",R(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),_a=_("$ZodNonOptional",(e,t)=>{q.init(e,t),R(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>rr(o,e)):rr(i,e)}});function rr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ir(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(i=>Ce(i,r,ke()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const wa=_("$ZodCatch",(e,t)=>{q.init(e,t),R(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),R(e,"optout",n=>n.def.innerType._zod.optout),R(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run({value:n.value,issues:[]},r);return i instanceof Promise?i.then(o=>ir(n,o,t,r)):ir(n,i,t,r)}}),xa=_("$ZodPipe",(e,t)=>{q.init(e,t),R(e,"values",n=>n.def.in._zod.values),R(e,"optin",n=>n.def.in._zod.optin),R(e,"optout",n=>n.def.out._zod.optout),R(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(u=>ft(u,t.in,r)):ft(o,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>ft(o,t.out,r)):ft(i,t.out,r)}});function ft(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const va=_("$ZodReadonly",(e,t)=>{q.init(e,t),R(e,"propValues",n=>n.def.innerType._zod.propValues),R(e,"values",n=>n.def.innerType._zod.values),R(e,"optin",n=>n.def.innerType?._zod?.optin),R(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(or):or(i)}});function or(e){return e.memo||(e.value=Object.freeze(e.value)),e}const za=_("$ZodLazy",(e,t)=>{q.init(e,t),No(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),R(e,"pattern",n=>n.innerType?._zod?.pattern),R(e,"propValues",n=>n.innerType?._zod?.propValues),R(e,"optin",n=>n.innerType?._zod?.optin??void 0),R(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Sa=_("$ZodCustom",(e,t)=>{ne.init(e,t),q.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>ur(o,n,r,e));ur(i,n,r,e)}});function ur(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(at(i))}}class Ia extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const tn="~memo",sr=[];function bi(e){return e!==null&&typeof e=="object"}function Bt(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const yi=new WeakMap,nt=0,kt=1,it=2;function bt(e,t,n){const r=yi.get(e);if(r!==void 0)return r?it:nt;if(t.has(e))return it;t.add(e);let i=nt;const o=c=>{if(i!==it&&c?._zod){const f=bt(c,t);f>i&&(i=f)}},u=(c,f)=>{let p=nt;for(const h of Reflect.ownKeys(c)){const d=Object.getOwnPropertyDescriptor(c,h);if(!d.enumerable)continue;const w=d.get?kt:d.value?._zod?bt(d.value,t):nt;w>p&&(p=w)}return p},s=c=>{c>i&&(i=c)},a=e._zod.def;switch(a.type){case"object":{const c=dn(a);s(c?u(c):kt),o(a.catchall);break}case"array":o(a.element);break;case"tuple":for(const c of a.items)o(c);o(a.rest);break;case"record":case"map":o(a.keyType),o(a.valueType);break;case"set":o(a.valueType);break;case"union":for(const c of a.options)o(c);break;case"intersection":o(a.left),o(a.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(a.innerType);break;case"pipe":o(a.in),o(a.out);break;case"function":o(a.input),o(a.output);break;case"lazy":{const c=a._cachedInner??void 0;s(c?bt(c,t):kt);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const c in a){const f=Object.getOwnPropertyDescriptor(a,c);if(!f||f.get)continue;const p=f.value;if(!(!p||typeof p!="object")){if(p._zod)o(p);else if(Array.isArray(p))for(const h of p)o(h)}}}return t.delete(e),Oa(e,i)}function Oa(e,t){return t!==kt&&yi.set(e,t===it),t}function Ea(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let ht;const pt=[],Ta={alloc(e,t,n){const r=ht;if(!r)return n;ht=void 0;const i={value:n,issues:null};return r.set(t.value,i),pt.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(i,o)=>{if(o.direction!=="backward"&&Pa(o,i.value))throw new Ia;return n(i,o)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r=!1,i,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const u=e._zod.parse,s=(a,l)=>{if(n===void 0){const k=bt(e,new Set);if(k===nt)return e._zod.parse=u,e._zod.run===s&&(e._zod.run=u),u(a,l);k===it||r?n=!0:r=!0}const c=a.value;if(!bi(c))return u(a,l);let f=l[tn];f||(f={buckets:new WeakMap,backEdges:void 0},l[tn]=f);let p;i===l?p=o:(p=Ea(f,e),i=l,o=p);const h=p.get(c);if(h)return a.value=h.value,h.issues?h.issues.length&&a.issues.push(...Bt(h.issues)):(a.memo=!0,f.backEdges??(f.backEdges=new WeakSet),f.backEdges.add(h.value)),a;ht=p;const d=pt.length,w=u(a,l);ht=void 0;const v=pt.length>d?pt.pop():void 0;return w instanceof Promise?w.then(k=>(v&&(v.issues=k.issues.length?Bt(k.issues):sr),k)):(v&&(v.issues=w.issues.length?Bt(w.issues):sr),w)};e._zod.parse=s,e._zod.run===u&&(e._zod.run=s)})}};function Ca(){return Ta}function Pa(e,t){const n=e[tn]?.backEdges;return n!==void 0&&bi(t)&&n.has(t)}const Aa=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(o,u){return o==="number"&&typeof u=="number"&&!Number.isFinite(u)?String(u):r[o]??o}return o=>{switch(o.code){case"invalid_type":{const u=i(o.expected),s=tu(o.input),a=i(s,o.input);return`Invalid input: expected ${u}, received ${a}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Gr(o.values[0])}`:`Invalid option: expected one of ${Bn(o.values,"|")}`;case"too_big":{const u=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${u}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${u}${o.maximum.toString()}`}case"too_small":{const u=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${u}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${u}${o.minimum.toString()}`}case"invalid_format":{const u=o;return u.format==="starts_with"?`Invalid string: must start with "${u.prefix}"`:u.format==="ends_with"?`Invalid string: must end with "${u.suffix}"`:u.format==="includes"?`Invalid string: must include "${u.includes}"`:u.format==="regex"?`Invalid string: must match pattern ${u.pattern}`:`Invalid ${n[u.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${Bn(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function $a(){return{localeError:Aa()}}var ar;class Fa{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Za(){return new Fa}(ar=globalThis).__zod_globalRegistry??(ar.__zod_globalRegistry=Za());const rt=globalThis.__zod_globalRegistry;function _i(e){return e.checks&&(e.checks=[...e.checks]),e}function Da(e,t){return new e(_i({type:"string",...E(t)}))}function Ra(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function La(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Na(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function ja(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function Ma(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function Ba(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function wi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function Ua(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function Va(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function qa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function Ja(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function Ha(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function Wa(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function Ka(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function Qa(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function Ga(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function Ya(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function Xa(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function el(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function tl(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function nl(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function rl(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}function il(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function ol(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function ul(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function sl(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function al(e,t){return new e(_i({type:"number",checks:[],...E(t)}))}function ll(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function cl(e,t){return new e({type:"boolean",...E(t)})}function fl(e){return new e({type:"any"})}function hl(e){return new e({type:"unknown"})}function pl(e,t){return new e({type:"never",...E(t)})}function lr(e,t){return new ii({check:"less_than",...E(t),value:e,inclusive:!1})}function Ut(e,t){return new ii({check:"less_than",...E(t),value:e,inclusive:!0})}function cr(e,t){return new oi({check:"greater_than",...E(t),value:e,inclusive:!1})}function Vt(e,t){return new oi({check:"greater_than",...E(t),value:e,inclusive:!0})}function fr(e,t){return new us({check:"multiple_of",...E(t),value:e})}function xi(e,t){return new as({check:"max_length",...E(t),maximum:e})}function zt(e,t){return new ls({check:"min_length",...E(t),minimum:e})}function vi(e,t){return new cs({check:"length_equals",...E(t),length:e})}function dl(e,t){return new fs({check:"string_format",format:"regex",...E(t),pattern:e})}function ml(e){return new hs({check:"string_format",format:"lowercase",...E(e)})}function gl(e){return new ps({check:"string_format",format:"uppercase",...E(e)})}function kl(e,t){return new ds({check:"string_format",format:"includes",...E(t),includes:e})}function bl(e,t){return new ms({check:"string_format",format:"starts_with",...E(t),prefix:e})}function yl(e,t){return new gs({check:"string_format",format:"ends_with",...E(t),suffix:e})}function _l(e,t){return new ks({check:"properties",shape:e,...E(t)})}function Qe(e){return new bs({check:"overwrite",tx:e})}function wl(e){return Qe(t=>t.normalize(e))}function xl(){return Qe(e=>e.trim())}function vl(){return Qe(e=>e.toLowerCase())}function zl(){return Qe(e=>e.toUpperCase())}function Sl(){return Qe(e=>Bo(e))}function Il(e,t,n){return new e({type:"array",element:t,...E(n)})}function Ol(e,t,n){const r=E(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function El(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function Tl(e,t){const n=Cl(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(at(i,r.value,n._zod.def));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(at(o))}},e(r.value,r)),t);return n}function Cl(e,t){const n=new ne({check:"custom",...E(t)});return n._zod.check=e,n}function ot(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Se(e,r,n[r]);return e}function zi(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??rt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Ae(e,t,n,r,i){const o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(i);return Object.assign(n,o),!0}function Q(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const u={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,u),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const s=e._zod.toJSONSchema?.();if(s)u.schema=s;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,c);else{const p=u.schema,h=t.processors[i.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);h(e,t,p,c)}const f=e._zod.parent;f&&(u.ref||(u.ref=f),Q(f,t,c),t.seen.get(f).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&ot(u.schema,a),t.io==="input"&&ee(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&"_prefault"in u.schema&&((r=u.schema).default??(r.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function hr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Si(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const u of e.seen.entries()){const s=e.metadataRegistry.get(u[0])?.id;if(s){const a=r.get(s);if(a&&a!==u[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(s,u[0])}}const i=u=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(u[0])?.id,p=e.external.uri??(d=>d);if(f)return{ref:p(f)};const h=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=h,{defId:h,ref:`${p("__shared")}#/${s}/${hr(h)}`}}const a="#",l=`${a}/${s}/`;if(u[1]===n&&!u[1].schema.id)return{ref:a};const c=u[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+hr(c)}},o=u=>{if(u[1].schema.$ref)return;const s=u[1],{ref:a,defId:l}=i(u);s.def={...s.schema},l&&(s.defId=l);const c=s.schema;for(const f in c)delete c[f];c.$ref=a};if(e.cycles==="throw")for(const u of e.seen.entries()){const s=u[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
56
-
57
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const s=u[1];if(t===u[0]){o(u);continue}if(e.external){const l=e.external.registry.get(u[0])?.id;if(t!==u[0]&&l){o(u);continue}}if(e.metadataRegistry.get(u[0])?.id){o(u);continue}if(s.cycle){o(u);continue}s.count>1&&e.reused==="ref"&&o(u)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ii(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;Ii(r);const i=Object.keys(r);if(i.length!==1||i[0]!=="type")return;const o=r.type;for(const u of Array.isArray(o)?o:[o]){if(typeof u!="string")return;n.includes(u)||n.push(u)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Oi=new Set(["type","properties","required","additionalProperties"]),pr=["oneOf","anyOf"];function dr(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function nn(e){const t=[];for(const o of e){if(typeof o!="object"||o.type!=="object")return null;for(const u in o)if(!Oi.has(u))return null;t.push(o)}const n={},r=new Set;for(const o of t){for(const u in o.properties){if(Object.prototype.hasOwnProperty.call(n,u))continue;const s=[];for(const l of t){const c=l.properties?.[u]??dr(l);c!=null&&(s.some(f=>JSON.stringify(f)===JSON.stringify(c))||s.push(c))}const a=s.length===1?s[0]:nn(s)??{allOf:s};Se(n,u,a)}for(const u of o.required??[])r.add(u)}const i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(o=>o.additionalProperties===!1))i.additionalProperties=!1;else{const o=[];for(const u of t){const s=dr(u);s&&!o.some(a=>JSON.stringify(a)===JSON.stringify(s))&&o.push(s)}o.length===1?i.additionalProperties=o[0]:o.length>1&&(i.additionalProperties={allOf:o})}return i}function Pl(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const i of Oi)if(i in e)return;const n=t.filter(i=>pr.some(o=>Array.isArray(i[o])));let r=null;if(!n.length)r=nn(t);else{const i=n[0],o=pr.find(a=>Array.isArray(i[a]));if(Object.keys(i).length!==1)return;const u=t.filter(a=>a!==i),s=i[o].map(a=>nn([...u,a]));if(s.some(a=>!a))return;r={[o]:s}}r&&(delete e.allOf,ot(e,r))}function Ei(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const a=e.seen.get(s);if(a.ref===null)return;const l=a.def??a.schema,c={...l},f=a.ref;if(a.ref=null,f){r(f);const h=e.seen.get(f),d=h.schema;if(d.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(d)):ot(l,d),ot(l,c),s._zod.parent===f)for(const v in l)v==="$ref"||v==="allOf"||v in c||delete l[v];if(d.$ref&&h.def)for(const v in l)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(l[v])===JSON.stringify(h.def[v])&&delete l[v]}const p=s._zod.parent;if(p&&p!==f){r(p);const h=e.seen.get(p);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(const d in l)d==="$ref"||d==="allOf"||d in h.def&&JSON.stringify(l[d])===JSON.stringify(h.def[d])&&delete l[d]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const s of[...e.seen.entries()].reverse())r(s[0]);if(e.target!=="openapi-3.0")for(const s of e.seen.entries())Ii(s[1].def??s[1].schema);for(const s of e.deferred)s();if(e.intersections.length){const s=new Map;for(const a of e.seen.values())for(const l of[a.schema,a.def]){const c=l?.allOf;if(!Array.isArray(c))continue;const f=s.get(c);f?f.push(l):s.set(c,[l])}for(const a of e.intersections)for(const l of s.get(a)??[])Pl(l)}}const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}ot(i,n.defId?n.schema:n.def??n.schema);const o=e.metadataRegistry.get(t)?.id;o!==void 0&&i.id===o&&delete i.id;const u=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,Se(u,a.defId,a.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?i.$defs=u:i.definitions=u);try{const s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:St(t,"input",e.processors),output:St(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ee(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ee(r.element,n);if(r.type==="set")return ee(r.valueType,n);if(r.type==="lazy")return ee(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return ee(r.innerType,n);if(r.type==="intersection")return ee(r.left,n)||ee(r.right,n);if(r.type==="record"||r.type==="map")return ee(r.keyType,n)||ee(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ee(r.in,n)||ee(r.out,n);if(r.type==="object"){for(const i in r.shape)if(ee(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(ee(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(ee(i,n))return!0;return!!(r.rest&&ee(r.rest,n))}return!1}const Al=(e,t={})=>n=>{const r=zi({...n,processors:t});return Q(e,r),Si(r,e),Ei(r,e)},St=(e,t,n={})=>r=>{const{libraryOptions:i,target:o}=r??{},u=zi({...i??{},target:o,io:t,processors:n});return Q(e,u),Si(u,e),Ei(u,e)},We=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Ke=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},mr=(e,t)=>{We(e,"minimum",t),Ke(e,"maximum",t)},Ti=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Ci=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Pi=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},Ai=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},gr=(e,t)=>We(e,"minimum",t.minimum),kr=(e,t)=>Ke(e,"maximum",t.maximum),br=e=>(t,n)=>{Ai(t,n.format);const[r,i]=e[n.format];We(t,"minimum",r),Ke(t,"maximum",i)},$l={greater_than:(e,t)=>We(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Ke(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Ti(e,t.value),number_format:br(Yr),bigint_format:br(Jo),min_length:gr,max_length:kr,length_equals:(e,t)=>mr(e,t.length),min_size:gr,max_size:kr,size_equals:(e,t)=>mr(e,t.size),string_format:(e,t)=>{Ai(e,t.format),t.pattern&&Ci(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Pi(e,t.mime)};function pe(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const o of r)$l[o._zod.def.check]?.(t,o._zod.def);const i=e._zod.bag;i.minimum!==void 0&&We(t,"minimum",i.minimum),i.exclusiveMinimum!==void 0&&We(t,"exclusiveMinimum",i.exclusiveMinimum),i.maximum!==void 0&&Ke(t,"maximum",i.maximum),i.exclusiveMaximum!==void 0&&Ke(t,"exclusiveMaximum",i.exclusiveMaximum),i.multipleOf!==void 0&&Ti(t,i.multipleOf),i.format!==void 0&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&Pi(t,i.mime);for(const o of i.patterns??[])Ci(t,o);return t}const Fl={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zl=new Map([[hi,Hu],[Sn,Wu]]),$i=e=>Zl.get(e)??e,Dl=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:o,maximum:u,format:s,patterns:a,contentEncoding:l,laxFormat:c}=pe(e);if(typeof o=="number"&&(i.minLength=o),typeof u=="number"&&(i.maxLength=u),s&&(i.format=Fl[s]??s,i.format===""&&delete i.format,(s==="time"||c)&&delete i.format),l&&(i.contentEncoding=l),a&&a.size>0){const f=[...a].map($i);f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Rl=(e,t,n,r)=>{const i=n,{minimum:o,maximum:u,multipleOf:s,exclusiveMaximum:a,exclusiveMinimum:l,isInt:c}=pe(e);i.type=c?"integer":"number";const f=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),p=typeof a=="number"&&a<=(u??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";if(f?h?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof o=="number"&&(i.minimum=o),p?h?(i.maximum=a,i.exclusiveMaximum=!0):i.exclusiveMaximum=a:typeof u=="number"&&(i.maximum=u),s){const d=new Set;for(const k of s)Number.isFinite(k)&&k!==0?d.add(Math.abs(k)):Ae(e,t,i,r,`A multipleOf divisor of ${k} cannot be represented in JSON Schema`);const[w,...v]=d;w!==void 0&&(i.multipleOf=w),v.length&&(i.allOf=[...i.allOf??[],...v.map(k=>({multipleOf:k}))])}},Ll=(e,t,n,r)=>{n.type="boolean"},Nl=(e,t,n,r)=>{n.not={}},jl=(e,t,n,r)=>{},Ml=(e,t,n,r)=>{},Bl=(e,t,n,r)=>{const i=e._zod.def,o=Gt(i.entries);if(o.length===0){n.not={};return}o.every(u=>typeof u=="number")&&(n.type="number"),o.every(u=>typeof u=="string")&&(n.type="string"),n.enum=o},Ul=(e,t,n,r)=>{const i=e._zod.def;if(i.values.length===0){n.not={};return}const o=[];for(const u of i.values)if(u===void 0){if(Ae(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof u=="bigint"){if(Ae(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(u))}else o.push(u);if(o.length!==0)if(o.length===1){const u=o[0];n.type=u===null?"null":typeof u,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[u]:n.const=u}else o.every(u=>typeof u=="number")&&(n.type="number"),o.every(u=>typeof u=="string")&&(n.type="string"),o.every(u=>typeof u=="boolean")&&(n.type="boolean"),o.every(u=>u===null)&&(n.type="null"),n.enum=o},Vl=(e,t,n,r)=>{Ae(e,t,n,r,"Custom types cannot be represented in JSON Schema")},ql=(e,t,n,r)=>{Ae(e,t,n,r,"Transforms cannot be represented in JSON Schema")},Jl=(e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:u,maximum:s}=pe(e);typeof u=="number"&&(i.minItems=u),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Q(o.element,t,{...r,path:[...r.path,"items"]})};function It(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?It(t.out):t.type==="catch"?It(t.innerType):e._zod.optin}const Hl=(e,t,n,r)=>{const i=n,o=e._zod.def,u=o.shape;if(Object.getOwnPropertySymbols(u).length&&Ae(e,t,i,r,"Symbol keys cannot be represented in JSON Schema"))return;i.type="object",i.properties={};for(const l in u)Se(i.properties,l,Q(u[l],t,{...r,path:[...r.path,"properties",l]}));const a=[];for(const l of Object.keys(u)){const c=o.shape[l];(t.io==="input"?It(c)===void 0:c._zod.optout===void 0)&&a.push(l)}a.length>0&&(i.required=a),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Q(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Wl=(e,t,n,r)=>{const i=e._zod.def,o=i.inclusive===!1,u=i.options.map((s,a)=>Q(s,t,{...r,path:[...r.path,o?"oneOf":"anyOf",a]}));o?n.oneOf=u:n.anyOf=u},Kl=(e,t,n,r)=>{const i=e._zod.def,o=Q(i.left,t,{...r,path:[...r.path,"allOf",0]}),u=Q(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,a=[...s(o)?o.allOf:[o],...s(u)?u.allOf:[u]];n.allOf=a,t.intersections.push(a)};function rn(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);const d=e.get(t)?.def;if(!d)return t;const w=rn(e,d,n);return w===d?t:w}for(const d of["anyOf","oneOf"]){const w=t[d];if(!Array.isArray(w))continue;const v=w.map(k=>rn(e,k,n));v.some((k,I)=>k!==w[I])&&(t={...t,[d]:v})}const r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes("string")&&r.some(d=>d==="number"||d==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!i&&!o?.some(d=>typeof d=="number"))return t;const{minimum:u,maximum:s,exclusiveMinimum:a,exclusiveMaximum:l,multipleOf:c,format:f,id:p,...h}=t;return h.enum?h.enum=h.enum.map(d=>typeof d=="number"?String(d):d):typeof h.const=="number"&&(h.const=String(h.const)),i&&(h.type="string",o||(h.pattern=(r.includes("number")?xn:ns).source)),h}const on=new WeakMap;function Ql(e){const t=new Map;for(const r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);const n=new Map;for(const r of on.get(e)??[]){const i=e.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;const u=rn(t,o,new Set);u!==o&&n.set(o,u)}if(n.size)for(const r of e.seen.values())for(const i of[r.schema,r.def]){const o=i&&n.get(i.propertyNames);o&&(i.propertyNames=o)}}const Gl=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object";const u=o.keyType,s=pe(u).patterns;if(o.mode==="loose"&&s&&s.size>0){const c=Q(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const f of s)Se(i.patternProperties,$i(f).source,c)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){i.propertyNames=Q(o.keyType,t,{...r,path:[...r.path,"propertyNames"]});let c=on.get(t);c||(c=[],on.set(t,c),t.deferred.push(()=>Ql(t))),c.push(e)}i.additionalProperties=Q(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const a=u._zod.values,l=t.io==="input"&&It(o.valueType)!==void 0;if(a&&!o.partial&&!l){const c=[...a].filter(f=>typeof f=="string"||typeof f=="number");c.length>0&&(i.required=c.map(String))}},Yl=(e,t,n,r)=>{const i=e._zod.def,o=Q(i.innerType,t,r),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Xl=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},In=Symbol();function Fi(e,t,n,r,i){let o=!1;const u=JSON.stringify(e,(s,a)=>typeof a!="bigint"?a:(o=!0,null));return o?(Ae(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),In):JSON.parse(u)}const ec=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType;const u=Fi(i.defaultValue,e,t,n,r);u!==In&&(n.default=u)},tc=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);if(o.ref=i.innerType,t.io!=="input")return;const u=Fi(i.defaultValue,e,t,n,r);u!==In&&(n._prefault=u)},nc=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType;let u;try{u=i.catchValue(void 0)}catch{Ae(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=u},rc=(e,t,n,r)=>{const i=e._zod.def,o=i.in._zod.traits.has("$ZodTransform"),u=t.io==="input"?o?i.out:i.in:i.out;Q(u,t,r);const s=t.seen.get(e);s.ref=u},ic=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.readOnly=!0},Zi=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},oc=(e,t,n,r)=>{const i=e._zod.innerType;Q(i,t,r);const o=t.seen.get(e);o.ref=i},yr=new WeakSet([Object.prototype,Error.prototype]);function dt(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const uc=(e,t)=>{du.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);yr.has(n)||(yr.add(n),dt(n,"format",r=>i=>ku(r,i)),dt(n,"flatten",r=>i=>gu(r,i)),dt(n,"addIssue",r=>i=>{r.issues.push(i),r.message=JSON.stringify(r.issues,Yt,2)}),dt(n,"addIssues",r=>i=>{r.issues.push(...i),r.message=JSON.stringify(r.issues,Yt,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},ae=_("ZodError",uc,void 0,{Parent:Error}),sc=bn(ae),ac=yn(ae),lc=_n(ae),cc=wn(ae),fc=vu(ae),hc=zu(ae),pc=Su(ae),dc=Iu(ae),mc=Ou(ae),gc=Eu(ae),kc=Tu(ae),bc=Cu(ae);function yc(){ge.localeError||ke($a())}function Ft(){ge.memoizer||ke({memoizer:Ca()})}const J=_("ZodType",(e,t)=>(yc(),q.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(ue(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return $e(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_f(e,t))},superRefine(e,t){return this.check(wf(e,t))},overwrite(e){return this.check(Qe(e))},optional(){return vr(this)},exactOptional(){return sf(this)},nullable(){return zr(this)},nullish(){return vr(zr(this))},nonoptional(e){return pf(this,e)},array(){return Qc(this)},or(e){return Yc([this,e])},and(e){return tf(this,e)},transform(e){return Sr(this,uf(e))},default(e){return cf(this,e)},prefault(e){return hf(this,e)},catch(e){return mf(this,e)},pipe(e){return Sr(this,e)},readonly(){return bf(this)},describe(e){const t=this.clone();return rt.add(t,{description:e}),t},meta(...e){if(e.length===0)return rt.get(this);const t=this.clone();return rt.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return kn(this,"~standard",{...si(this),jsonSchema:{input:St(this,"input"),output:St(this,"output")}})},set"~standard"(e){Pe(this,"~standard",e)},parse:function e(t,n){return sc(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ac(this,t,n,{callee:e})},safeParse(e,t){return lc(this,e,t)},async safeParseAsync(e,t){return cc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Pe(this,"spa",e)},validate(e,t){return _u(this,e,t)},validateAsync(e,t){return xu(this,e,t)},encode:function e(t,n){return fc(this,t,n,{callee:e})},decode:function e(t,n){return hc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await pc(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await dc(this,t,n,{callee:e})},safeEncode(e,t){return mc(this,e,t)},safeDecode(e,t){return gc(this,e,t)},async safeEncodeAsync(e,t){return kc(this,e,t)},async safeDecodeAsync(e,t){return bc(this,e,t)},toJSONSchema(e){return Al(this,{})(e)},get description(){return rt.get(this)?.description},get _def(){return this._zod.def}}),Di=_("_ZodString",(e,t)=>{zn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Dl(e,n,r)},ei({format:e=>pe(e).format??null,minLength:e=>pe(e).minimum??null,maxLength:e=>pe(e).maximum??null},{regex(...e){return this.check(dl(...e))},includes(...e){return this.check(kl(...e))},startsWith(...e){return this.check(bl(...e))},endsWith(...e){return this.check(yl(...e))},min(...e){return this.check(zt(...e))},max(...e){return this.check(xi(...e))},length(...e){return this.check(vi(...e))},nonempty(...e){return this.check(zt(1,...e))},lowercase(e){return this.check(ml(e))},uppercase(e){return this.check(gl(e))},trim(){return this.check(xl())},normalize(...e){return this.check(wl(...e))},toLowerCase(){return this.check(vl())},toUpperCase(){return this.check(zl())},slugify(){return this.check(Sl())}})),_c=_("ZodString",(e,t)=>{zn.init(e,t),Di.init(e,t)},{email(e){return this.check(Ra(Ic,e))},url(e){return this.check(wi(Ri,e))},jwt(e){return this.check(rl(Bc,e))},emoji(e){return this.check(Ua(Ec,e))},guid(e){return this.check(La(Oc,e))},uuid(e){return this.check(Na(mt,e))},uuidv4(e){return this.check(ja(mt,e))},uuidv6(e){return this.check(Ma(mt,e))},uuidv7(e){return this.check(Ba(mt,e))},nanoid(e){return this.check(Va(Tc,e))},cuid(e){return this.check(qa(Cc,e))},cuid2(e){return this.check(Ja(Pc,e))},ulid(e){return this.check(Ha(Ac,e))},base64(e){return this.check(el(Nc,e))},base64url(e){return this.check(tl(jc,e))},xid(e){return this.check(Wa($c,e))},ksuid(e){return this.check(Ka(Fc,e))},ipv4(e){return this.check(Qa(Zc,e))},ipv6(e){return this.check(Ga(Dc,e))},cidrv4(e){return this.check(Ya(Rc,e))},cidrv6(e){return this.check(Xa(Lc,e))},e164(e){return this.check(nl(Mc,e))},datetime(e){return this.check(il(xc,e))},date(e){return this.check(ol(vc,e))},time(e){return this.check(ul(zc,e))},duration(e){return this.check(sl(Sc,e))}});function wc(e){return Da(_c,e)}const K=_("ZodStringFormat",(e,t)=>{H.init(e,t),Di.init(e,t)}),xc=_("ZodISODateTime",(e,t)=>{Ls.init(e,t),K.init(e,t)}),vc=_("ZodISODate",(e,t)=>{Ns.init(e,t),K.init(e,t)}),zc=_("ZodISOTime",(e,t)=>{js.init(e,t),K.init(e,t)}),Sc=_("ZodISODuration",(e,t)=>{Ms.init(e,t),K.init(e,t)}),Ic=_("ZodEmail",(e,t)=>{zs.init(e,t),K.init(e,t)}),Oc=_("ZodGUID",(e,t)=>{xs.init(e,t),K.init(e,t)}),mt=_("ZodUUID",(e,t)=>{vs.init(e,t),K.init(e,t)}),Ri=_("ZodURL",(e,t)=>{Cs.init(e,t),K.init(e,t)});function Lm(e){return wi(Ri,e)}const Ec=_("ZodEmoji",(e,t)=>{Ps.init(e,t),K.init(e,t)}),Tc=_("ZodNanoID",(e,t)=>{As.init(e,t),K.init(e,t)}),Cc=_("ZodCUID",(e,t)=>{$s.init(e,t),K.init(e,t)}),Pc=_("ZodCUID2",(e,t)=>{Fs.init(e,t),K.init(e,t)}),Ac=_("ZodULID",(e,t)=>{Zs.init(e,t),K.init(e,t)}),$c=_("ZodXID",(e,t)=>{Ds.init(e,t),K.init(e,t)}),Fc=_("ZodKSUID",(e,t)=>{Rs.init(e,t),K.init(e,t)}),Zc=_("ZodIPv4",(e,t)=>{Bs.init(e,t),K.init(e,t)}),Dc=_("ZodIPv6",(e,t)=>{Vs.init(e,t),K.init(e,t)}),Rc=_("ZodCIDRv4",(e,t)=>{qs.init(e,t),K.init(e,t)}),Lc=_("ZodCIDRv6",(e,t)=>{Hs.init(e,t),K.init(e,t)}),Nc=_("ZodBase64",(e,t)=>{Ws.init(e,t),K.init(e,t)}),jc=_("ZodBase64URL",(e,t)=>{Qs.init(e,t),K.init(e,t)}),Mc=_("ZodE164",(e,t)=>{Gs.init(e,t),K.init(e,t)}),Bc=_("ZodJWT",(e,t)=>{Xs.init(e,t),K.init(e,t)}),Li=_("ZodNumber",(e,t)=>{pi.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Rl(e,n,r,i),e.isFinite=!0},ei({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=pe(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=pe(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=pe(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>pe(e).format??null},{gt(e,t){return this.check(cr(e,t))},gte(e,t){return this.check(Vt(e,t))},min(e,t){return this.check(Vt(e,t))},lt(e,t){return this.check(lr(e,t))},lte(e,t){return this.check(Ut(e,t))},max(e,t){return this.check(Ut(e,t))},int(e){return this.check(_r(e))},safe(e){return this.check(_r(e))},positive(e){return this.check(cr(0,e))},nonnegative(e){return this.check(Vt(0,e))},negative(e){return this.check(lr(0,e))},nonpositive(e){return this.check(Ut(0,e))},multipleOf(e,t){return this.check(fr(e,t))},step(e,t){return this.check(fr(e,t))},finite(){return this}}));function Nm(e){return al(Li,e)}const Uc=_("ZodNumberFormat",(e,t)=>{ea.init(e,t),Li.init(e,t)});function _r(e){return ll(Uc,e)}const Vc=_("ZodBoolean",(e,t)=>{ta.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ll(e,n,r)});function jm(e){return cl(Vc,e)}const qc=_("ZodAny",(e,t)=>{na.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jl()});function Mm(){return fl(qc)}const Jc=_("ZodUnknown",(e,t)=>{ra.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ml()});function wr(){return hl(Jc)}const Hc=_("ZodNever",(e,t)=>{ia.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Nl(e,n,r)});function Wc(e){return pl(Hc,e)}const Kc=_("ZodArray",(e,t)=>{Ft(),oa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Jl(e,n,r,i),e.element=t.element},{min(e,t){return this.check(zt(e,t))},nonempty(e){return this.check(zt(1,e))},max(e,t){return this.check(xi(e,t))},length(e,t){return this.check(vi(e,t))},unwrap(){return this.element}});function Qc(e,t){return Il(Kc,e,t)}const Gc=_("ZodObject",(e,t)=>{Ft(),aa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Hl(e,n,r,i),uu(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return nf(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(ue(this._zod.def,{catchall:e}))},passthrough(){return this.clone(ue(this._zod.def,{catchall:wr()}))},loose(){return this.clone(ue(this._zod.def,{catchall:wr()}))},strict(){return this.clone(ue(this._zod.def,{catchall:Wc()}))},strip(){return this.clone(ue(this._zod.def,{catchall:void 0}))},extend(e){return Ko(this,e)},safeExtend(e){return Qo(this,e)},merge(e){return Go(this,e)},pick(e){return Ho(this,e)},omit(e){return Wo(this,e)},partial(...e){return Vn(ji,this,e[0])},exactPartial(...e){return Vn(Mi,this,e[0],"exactPartial")},required(...e){return Yo(Bi,this,e[0])}});function Bm(e,t){const n={type:"object",shape:e??{},...E(t)};return new Gc(n)}const Ni=_("ZodUnion",(e,t)=>{gi.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Wl(e,n,r,i),e.options=t.options});function Yc(e,t){return new Ni({type:"union",options:e,...E(t)})}const Xc=_("ZodDiscriminatedUnion",(e,t)=>{Ni.init(e,t),ca.init(e,t)});function Um(e,t,n){return new Xc({type:"union",options:t,discriminator:e,...E(n)})}const ef=_("ZodIntersection",(e,t)=>{fa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Kl(e,n,r,i)});function tf(e,t){return new ef({type:"intersection",left:e,right:t})}const xr=_("ZodRecord",(e,t)=>{Ft(),ha.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Gl(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Vm(e,t,n){return!t||!t._zod?new xr({type:"record",keyType:wc(),valueType:e,...E(t)}):new xr({type:"record",keyType:e,valueType:t,...E(n)})}const un=_("ZodEnum",(e,t)=>{pa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,i,o)=>Bl(e,r,i),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const o={};for(const u of r)if(n.has(u))o[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new un({...t,checks:[],...E(i),entries:o})},e.exclude=(r,i)=>{const o={...t.entries};for(const u of r)if(n.has(u))delete o[u];else throw new Error(`Key ${u} not found in enum`);return new un({...t,checks:[],...E(i),entries:o})}});function nf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new un({type:"enum",entries:n,...E(t)})}const rf=_("ZodLiteral",(e,t)=>{da.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ul(e,n,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function qm(e,t){return new rf({type:"literal",values:Array.isArray(e)?e:[e],...E(t)})}const of=_("ZodTransform",(e,t)=>{Ft(),ma.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ql(e,n,r,i),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ti(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(at(o,n.value,t));else{const u=o;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),"input"in u||(u.input=n.value),u.inst??(u.inst=e),n.issues.push(at(u))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function uf(e){return new of({type:"transform",transform:e})}const ji=_("ZodOptional",(e,t)=>{ki.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Zi(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function vr(e){return new ji({type:"optional",innerType:e})}const Mi=_("ZodExactOptional",(e,t)=>{ga.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Zi(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function sf(e){return new Mi({type:"optional",innerType:e})}const af=_("ZodNullable",(e,t)=>{ka.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Yl(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function zr(e){return new af({type:"nullable",innerType:e})}const lf=_("ZodDefault",(e,t)=>{ba.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ec(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cf(e,t){return new lf({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Qr(t)}})}const ff=_("ZodPrefault",(e,t)=>{ya.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function hf(e,t){return new ff({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Qr(t)}})}const Bi=_("ZodNonOptional",(e,t)=>{_a.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Xl(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function pf(e,t){return new Bi({type:"nonoptional",innerType:e,...E(t)})}const df=_("ZodCatch",(e,t)=>{wa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mf(e,t){return new df({type:"catch",innerType:e,catchValue:typeof t=="function"?t:au(t)})}const gf=_("ZodPipe",(e,t)=>{xa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>rc(e,n,r,i),e.in=t.in,e.out=t.out});function Sr(e,t){return new gf({type:"pipe",in:e,out:t})}const kf=_("ZodReadonly",(e,t)=>{va.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ic(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function bf(e){return new kf({type:"readonly",innerType:e})}const yf=_("ZodLazy",(e,t)=>{za.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>oc(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function Jm(e){return new yf({type:"lazy",getter:e})}const On=_("ZodCustom",(e,t)=>{Sa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Vl(e,n,r,i)});function Hm(e,t){return Ol(On,e??(()=>!0),t)}function _f(e,t={}){return El(On,e,t)}function wf(e,t){return Tl(e,t)}const xf=_("ZodInstanceOf",(e,t)=>{On.init(e,t)},{properties(e,t){return this.check(_l(e,t))}});function Wm(e,t={}){const n=new xf({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...E(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}const vf={};function En(e,t){const n=vf,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ui(e,r,i)}function Ui(e,t,n){if(zf(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ir(e.children,t,n)}return Array.isArray(e)?Ir(e,t,n):""}function Ir(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ui(e[i],t,n);return r.join("")}function zf(e){return!!(e&&typeof e=="object")}const Or=document.createElement("i");function Tn(e){const t="&"+e+";";Or.innerHTML=t;const n=Or.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function de(e,t,n,r){const i=e.length;let o=0,u;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);o<r.length;)u=r.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function se(e,t){return e.length>0?(de(e,e.length,0,t),e):t}const Er={}.hasOwnProperty;function Vi(e){const t={};let n=-1;for(;++n<e.length;)Sf(t,e[n]);return t}function Sf(e,t){let n;for(n in t){const i=(Er.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){Er.call(i,u)||(i[u]=[]);const s=o[u];If(i[u],Array.isArray(s)?s:s?[s]:[])}}}function If(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);de(e,0,0,r)}function qi(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function me(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const te=Fe(/[A-Za-z]/),ie=Fe(/[\dA-Za-z]/),Of=Fe(/[#-'*+\--9=?A-Z^-~]/);function Ot(e){return e!==null&&(e<32||e===127)}const sn=Fe(/\d/),Ef=Fe(/[\dA-Fa-f]/),Tf=Fe(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const Zt=Fe(/\p{P}|\p{S}/u),Me=Fe(/\s/);function Fe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function M(e,t,n,r){const i=r?r-1:1/0;let o=0;return u;function u(a){return Z(a)?(e.enter(n),s(a)):t(a)}function s(a){return Z(a)&&o++<i?(e.consume(a),s):(e.exit(n),t(a))}}function Ji(e,t,n,r,i,o){let u=0;return s;function s(c){return Z(c)?(e.enter(r),a(c)):l(c)}function a(c){return Z(c)&&u<o?(e.consume(c),u++,a):(e.exit(r),l(c))}function l(c){return u>=i?t(c):n(c)}}const Cf={tokenize:Pf};function Pf(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),M(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,u(s)}function u(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return P(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),u)}}let Et=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Tr(this,t,n,r,!1)}addBefore(t,n,r){Tr(this,t,n,r,!0)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function Tr(e,t,n,r,i){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const u=[t,n,r];e.map.push(u),e.index.set(t,u)}const Af={tokenize:$f},Cr={tokenize:Ff};function $f(e){const t=this,n=[];let r=0,i,o,u;return s;function s(z){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,a,l)(z)}return l(z)}function a(z){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const A=t.events.length;let T=A,b;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){b=t.events[T][1].end;break}k(r);let $=A;for(;$<t.events.length;)t.events[$][1].end={...b},$++;const L=new Et;return L.add(T+1,0,t.events.slice(A)),L.add(A,$-A,[]),L.consume(t.events),l(z)}return s(z)}function l(z){if(r===n.length){if(!i)return p(z);if(i.currentConstruct&&i.currentConstruct.concrete)return d(z);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Cr,c,f)(z)}function c(z){return i&&I(),k(r),p(z)}function f(z){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,d(z)}function p(z){return t.containerState={},e.attempt(Cr,h,d)(z)}function h(z){return r++,n.push([t.currentConstruct,t.containerState]),p(z)}function d(z){if(z===null){i&&I(),k(0),e.consume(z);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),w(z)}function w(z){if(z===null){v(e.exit("chunkFlow"),!0),k(0),e.consume(z);return}return P(z)?(e.consume(z),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(z),w)}function v(z,A){const T=t.sliceStream(z);if(A&&T.push(null),z.previous=o,o&&(o.next=z),o=z,i.defineSkip(z.start),i.write(T),t.parser.lazy[z.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<u&&(!i.events[b][1].end||i.events[b][1].end.offset>u))return;const $=t.events.length;let L=$,j,y;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(j){y=t.events[L][1].end;break}j=!0}for(k(r),b=$;b<t.events.length;)t.events[b][1].end={...y},b++;const O=new Et;O.add(L+1,0,t.events.slice($)),O.add($,b-$,[]),O.consume(t.events)}}function k(z){let A=n.length;for(;A-- >z;){const T=n[A];t.containerState=T[1],T[0].exit.call(t,e)}n.length=z}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ff(e,t,n){return M(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tt(e){if(e===null||V(e)||Me(e))return 1;if(Zt(e))return 2}function Dt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const an={name:"attention",resolveAll:Zf,tokenize:Df};function Zf(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,u={...e[i][1].end},s={...e[n][1].start};Pr(u,-o),Pr(s,o);const a={type:o>1?"strongSequence":"emphasisSequence",start:u,end:{...e[i][1].end}},l={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:s},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},f={type:o>1?"strong":"emphasis",start:{...a.start},end:{...l.end}};e[i][1].end={...a.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=se(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=se(r,[["enter",f,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=se(r,Dt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=se(r,[["exit",c,t],["enter",l,t],["exit",l,t],["exit",f,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=se(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),de(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Df(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Tt(r);let o;return u;function u(a){return o=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===o)return e.consume(a),s;const l=e.exit("attentionSequence"),c=Tt(a),f=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,p=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return l._open=!!(o===42?f:f&&(i||!p)),l._close=!!(o===42?p:p&&(c||!f)),t(a)}}function Pr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Rf={name:"autolink",tokenize:Lf};function Lf(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return te(h)?(e.consume(h),u):h===64?n(h):l(h)}function u(h){return h===43||h===45||h===46||ie(h)?(r=1,s(h)):l(h)}function s(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||ie(h))&&r++<32?(e.consume(h),s):(r=0,l(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ot(h)?n(h):(e.consume(h),a)}function l(h){return h===64?(e.consume(h),c):Of(h)?(e.consume(h),l):n(h)}function c(h){return ie(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||ie(h))&&r++<63){const d=h===45?p:f;return e.consume(h),d}return n(h)}}const lt={partial:!0,tokenize:Nf};function Nf(e,t,n){return r;function r(o){return Z(o)?M(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||P(o)?t(o):n(o)}}const Hi={continuation:{tokenize:Mf},exit:Bf,name:"blockQuote",tokenize:jf};function jf(e,t,n){const r=this;return i;function i(u){if(u===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return n(u)}function o(u){return Z(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Mf(e,t,n){const r=this;return i;function i(u){return Z(u)?M(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(Hi,t,n)(u)}}function Bf(e){e.exit("blockQuote")}const Wi={name:"characterEscape",tokenize:Uf};function Uf(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Tf(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ki={name:"characterReference",tokenize:Vf};function Vf(e,t,n){const r=this;let i=0,o,u;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),a}function a(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,u=ie,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=Ef,c):(e.enter("characterReferenceValue"),o=7,u=sn,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return u===ie&&!Tn(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(f)&&i++<o?(e.consume(f),c):n(f)}}const ln={partial:!0,tokenize:qf};function qf(e,t,n){const r=this;return i;function i(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Ar={concrete:!0,name:"codeFenced",tokenize:Jf};function Jf(e,t,n){const r=this,i={partial:!0,tokenize:T};let o=0,u=0,s;return a;function a(b){return l(b)}function l(b){const $=r.events[r.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===s?(u++,e.consume(b),c):u<3?n(b):(e.exit("codeFencedFenceSequence"),Z(b)?M(e,f,"whitespace")(b):f(b))}function f(b){return b===null||P(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(ln,w,A)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||P(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(b)):Z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),M(e,h,"whitespace")(b)):b===96&&b===s?n(b):(e.consume(b),p)}function h(b){return b===null||P(b)?f(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||P(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(b)):b===96&&b===s?n(b):(e.consume(b),d)}function w(b){return e.attempt(i,A,v)(b)}function v(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return o>0&&Z(b)?M(e,I,"linePrefix",o+1)(b):I(b)}function I(b){return b===null||P(b)?e.check(ln,w,A)(b):(e.enter("codeFlowValue"),z(b))}function z(b){return b===null||P(b)?(e.exit("codeFlowValue"),I(b)):(e.consume(b),z)}function A(b){return e.exit("codeFenced"),t(b)}function T(b,$,L){let j=0;return y;function y(N){return b.enter("lineEnding"),b.consume(N),b.exit("lineEnding"),O}function O(N){return b.enter("codeFencedFence"),Z(N)?M(b,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):C(N)}function C(N){return N===s?(b.enter("codeFencedFenceSequence"),B(N)):L(N)}function B(N){return N===s?(j++,b.consume(N),B):j>=u?(b.exit("codeFencedFenceSequence"),Z(N)?M(b,W,"whitespace")(N):W(N)):L(N)}function W(N){return N===null||P(N)?(b.exit("codeFencedFence"),$(N)):L(N)}}}const qt={name:"codeIndented",tokenize:Wf},Hf={partial:!0,tokenize:Kf};function Wf(e,t,n){return r;function r(s){return e.enter("codeIndented"),Ji(e,i,n,"linePrefix",4,4)(s)}function i(s){return s===null?u(s):P(s)?e.attempt(Hf,i,u)(s):(e.enter("codeFlowValue"),o(s))}function o(s){return s===null||P(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),o)}function u(s){return e.exit("codeIndented"),t(s)}}function Kf(e,t,n){const r=this;return i;function i(u){return r.parser.lazy[r.now().line]?n(u):P(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i):Ji(e,t,o,"linePrefix",4,4)(u)}function o(u){return P(u)?i(u):n(u)}}const Qf={name:"codeText",previous:Yf,resolve:Gf,tokenize:Xf};function Gf(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Yf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Xf(e,t,n){let r=0,i,o;return u;function u(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),a):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):P(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||P(f)?(e.exit("codeTextData"),a(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",l(f))}}class eh{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&tt(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),tt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),tt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);tt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);tt(this.left,n.reverse())}}}function tt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Qi(e){const t={};let n=-1,r,i,o,u,s,a,l;const c=new eh(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,th(c,n)),n=t[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(u=c.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),u[1].type="lineEnding",i=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return de(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function th(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const s=u.events,a=[],l={};let c,f,p=-1,h=n,d=0,w=0;const v=[w];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&u.defineSkip(h.start),h._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(c),h._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(w=p+1,v.push(w),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(u.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),p=v.length;p--;){const k=s.slice(v[p],v[p+1]),I=o.pop();a.push([I,I+k.length-1]),e.splice(I,2,k)}for(a.reverse(),p=-1;++p<a.length;)l[d+a[p][0]]=d+a[p][1],d+=a[p][1]-a[p][0]-1;return l}const nh={resolve:ih,tokenize:oh},rh={partial:!0,tokenize:uh};function ih(e){return Qi(e),e}function oh(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):P(s)?e.check(rh,u,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function u(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function uh(e,t,n){const r=this;return i;function i(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),M(e,o,"linePrefix")}function o(u){if(u===null||P(u))return n(u);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Gi(e,t,n,r,i,o,u,s,a){const l=a||Number.POSITIVE_INFINITY;let c=0;return f;function f(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),p):k===null||k===32||k===41||Ot(k)?n(k):(e.enter(r),e.enter(u),e.enter(s),e.enter("chunkString",{contentType:"string"}),w(k))}function p(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===62?(e.exit("chunkString"),e.exit(s),p(k)):k===null||k===60||P(k)?n(k):(e.consume(k),k===92?d:h)}function d(k){return k===60||k===62||k===92?(e.consume(k),h):h(k)}function w(k){return!c&&(k===null||k===41||V(k))?(e.exit("chunkString"),e.exit(s),e.exit(u),e.exit(r),t(k)):c<l&&k===40?(e.consume(k),c++,w):k===41?(e.consume(k),c--,w):k===null||k===32||k===40||Ot(k)?n(k):(e.consume(k),k===92?v:w)}function v(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function Yi(e,t,n,r,i,o){const u=this;let s=0,a;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return s>999||h===null||h===91||h===93&&!a||h===94&&!s&&"_hiddenFootnoteSupport"in u.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):P(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||P(h)||s++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!Z(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,f):f(h)}}function Xi(e,t,n,r,i,o){let u;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),u=p===40?41:p,a):n(p)}function a(p){return p===u?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),l(p))}function l(p){return p===u?(e.exit(o),a(u)):p===null?n(p):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),M(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===u||p===null||P(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===u||p===92?(e.consume(p),c):c(p)}}function ut(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?M(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const sh={name:"definition",tokenize:lh},ah={partial:!0,tokenize:ch};function lh(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),u(h)}function u(h){return Yi.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return V(h)?ut(e,l)(h):l(h)}function l(h){return Gi(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(ah,f,f)(h)}function f(h){return Z(h)?M(e,p,"whitespace")(h):p(h)}function p(h){return h===null||P(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function ch(e,t,n){return r;function r(s){return V(s)?ut(e,i)(s):n(s)}function i(s){return Xi(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Z(s)?M(e,u,"whitespace")(s):u(s)}function u(s){return s===null||P(s)?t(s):n(s)}}const fh={name:"hardBreakEscape",tokenize:hh};function hh(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return P(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ph={name:"headingAtx",resolve:dh,tokenize:mh};function dh(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};de(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function mh(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),u(c)}function u(c){return c===35&&r++<6?(e.consume(c),u):c===null||V(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||P(c)?(e.exit("atxHeading"),t(c)):Z(c)?M(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||V(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const gh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$r=["pre","script","style","textarea"],kh={concrete:!0,name:"htmlFlow",resolveTo:yh,tokenize:_h},bh={partial:!0,tokenize:wh};function yh(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _h(e,t,n){const r=this;let i,o,u,s,a;return l;function l(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,w):g===63?(e.consume(g),i=3,r.interrupt?t:m):te(g)?(e.consume(g),u=String.fromCharCode(g),v):n(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,s=0,d):te(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const fe="CDATA[";return g===fe.charCodeAt(s++)?(e.consume(g),s===fe.length?r.interrupt?t:C:d):n(g)}function w(g){return te(g)?(e.consume(g),u=String.fromCharCode(g),v):n(g)}function v(g){if(g===null||g===47||g===62||V(g)){const fe=g===47,Ze=u.toLowerCase();return!fe&&!o&&$r.includes(Ze)?(i=1,r.interrupt?t(g):C(g)):gh.includes(u.toLowerCase())?(i=6,fe?(e.consume(g),k):r.interrupt?t(g):C(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?I(g):z(g))}return g===45||ie(g)?(e.consume(g),u+=String.fromCharCode(g),v):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:C):n(g)}function I(g){return Z(g)?(e.consume(g),I):y(g)}function z(g){return g===47?(e.consume(g),y):g===58||g===95||te(g)?(e.consume(g),A):Z(g)?(e.consume(g),z):y(g)}function A(g){return g===45||g===46||g===58||g===95||ie(g)?(e.consume(g),A):T(g)}function T(g){return g===61?(e.consume(g),b):Z(g)?(e.consume(g),T):z(g)}function b(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),a=g,$):Z(g)?(e.consume(g),b):L(g)}function $(g){return g===a?(e.consume(g),a=null,j):g===null||P(g)?n(g):(e.consume(g),$)}function L(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?T(g):(e.consume(g),L)}function j(g){return g===47||g===62||Z(g)?z(g):n(g)}function y(g){return g===62?(e.consume(g),O):n(g)}function O(g){return g===null||P(g)?C(g):Z(g)?(e.consume(g),O):n(g)}function C(g){return g===45&&i===2?(e.consume(g),X):g===60&&i===1?(e.consume(g),G):g===62&&i===4?(e.consume(g),ce):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),ye):P(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(bh,_e,B)(g)):g===null||P(g)?(e.exit("htmlFlowData"),B(g)):(e.consume(g),C)}function B(g){return e.check(ln,W,_e)(g)}function W(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||P(g)?B(g):(e.enter("htmlFlowData"),C(g))}function X(g){return g===45?(e.consume(g),m):C(g)}function G(g){return g===47?(e.consume(g),u="",le):C(g)}function le(g){if(g===62){const fe=u.toLowerCase();return $r.includes(fe)?(e.consume(g),ce):C(g)}return te(g)&&u.length<8?(e.consume(g),u+=String.fromCharCode(g),le):C(g)}function ye(g){return g===93?(e.consume(g),m):C(g)}function m(g){return g===62?(e.consume(g),ce):g===45&&i===2?(e.consume(g),m):C(g)}function ce(g){return g===null||P(g)?(e.exit("htmlFlowData"),_e(g)):(e.consume(g),ce)}function _e(g){return e.exit("htmlFlow"),t(g)}}function wh(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(lt,t,n)}}const xh={name:"htmlText",tokenize:vh};function vh(e,t,n){const r=this;let i,o,u;return s;function s(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),a}function a(m){return m===33?(e.consume(m),l):m===47?(e.consume(m),T):m===63?(e.consume(m),z):te(m)?(e.consume(m),L):n(m)}function l(m){return m===45?(e.consume(m),c):m===91?(e.consume(m),o=0,d):te(m)?(e.consume(m),I):n(m)}function c(m){return m===45?(e.consume(m),h):n(m)}function f(m){return m===null?n(m):m===45?(e.consume(m),p):P(m)?(u=f,G(m)):(e.consume(m),f)}function p(m){return m===45?(e.consume(m),h):f(m)}function h(m){return m===62?X(m):m===45?p(m):f(m)}function d(m){const ce="CDATA[";return m===ce.charCodeAt(o++)?(e.consume(m),o===ce.length?w:d):n(m)}function w(m){return m===null?n(m):m===93?(e.consume(m),v):P(m)?(u=w,G(m)):(e.consume(m),w)}function v(m){return m===93?(e.consume(m),k):w(m)}function k(m){return m===62?X(m):m===93?(e.consume(m),k):w(m)}function I(m){return m===null||m===62?X(m):P(m)?(u=I,G(m)):(e.consume(m),I)}function z(m){return m===null?n(m):m===63?(e.consume(m),A):P(m)?(u=z,G(m)):(e.consume(m),z)}function A(m){return m===62?X(m):z(m)}function T(m){return te(m)?(e.consume(m),b):n(m)}function b(m){return m===45||ie(m)?(e.consume(m),b):$(m)}function $(m){return P(m)?(u=$,G(m)):Z(m)?(e.consume(m),$):X(m)}function L(m){return m===45||ie(m)?(e.consume(m),L):m===47||m===62||V(m)?j(m):n(m)}function j(m){return m===47?(e.consume(m),X):m===58||m===95||te(m)?(e.consume(m),y):P(m)?(u=j,G(m)):Z(m)?(e.consume(m),j):X(m)}function y(m){return m===45||m===46||m===58||m===95||ie(m)?(e.consume(m),y):O(m)}function O(m){return m===61?(e.consume(m),C):P(m)?(u=O,G(m)):Z(m)?(e.consume(m),O):j(m)}function C(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,B):P(m)?(u=C,G(m)):Z(m)?(e.consume(m),C):(e.consume(m),W)}function B(m){return m===i?(e.consume(m),i=void 0,N):m===null?n(m):P(m)?(u=B,G(m)):(e.consume(m),B)}function W(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||V(m)?j(m):(e.consume(m),W)}function N(m){return m===47||m===62||V(m)?j(m):n(m)}function X(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function G(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),le}function le(m){return Z(m)?M(e,ye,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ye(m)}function ye(m){return e.enter("htmlTextData"),u(m)}}const Cn={name:"labelEnd",resolveAll:Oh,resolveTo:Eh,tokenize:Th},zh={tokenize:Ch},Sh={tokenize:Ph},Ih={tokenize:Ah};function Oh(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&de(e,0,e.length,n),e}function Eh(e,t){let n=e.length,r=0,i,o,u;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=n)}const s={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},l={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",s,t],["enter",a,t]],u=se(u,e.slice(i+1,i+r+3)),u=se(u,[["enter",l,t]]),u=se(u,Dt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),u=se(u,[["exit",l,t],e[o-2],e[o-1],["exit",a,t]]),u=se(u,e.slice(o+1)),u=se(u,[["exit",s,t]]),de(e,i,e.length,u),e}function Th(e,t,n){const r=this,i=r._labelStarts;let o,u;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return s;function s(p){return o?o._inactive?f(p):(u=r.parser.defined.includes(me(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),a):n(p)}function a(p){return p===40?e.attempt(zh,c,u?c:f)(p):p===91?e.attempt(Sh,c,u?l:f)(p):u?c(p):f(p)}function l(p){return e.attempt(Ih,c,f)(p)}function c(p){return i.pop(),t(p)}function f(p){return o._balanced=!0,n(p)}}function Ch(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return V(f)?ut(e,o)(f):o(f)}function o(f){return f===41?c(f):Gi(e,u,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function u(f){return V(f)?ut(e,a)(f):c(f)}function s(f){return n(f)}function a(f){return f===34||f===39||f===40?Xi(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return V(f)?ut(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Ph(e,t,n){const r=this;return i;function i(s){return Yi.call(r,e,o,u,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function u(s){return n(s)}}function Ah(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const $h={name:"labelStartImage",resolveAll:Cn.resolveAll,tokenize:Fh};function Fh(e,t,n){const r=this;let i;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),u}function u(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}const Zh={name:"labelStartLink",resolveAll:Cn.resolveAll,tokenize:Dh};function Dh(e,t,n){const r=this;let i;return o;function o(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelLink"),u}function u(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(s))}}const Jt={name:"lineEnding",tokenize:Rh};function Rh(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),M(e,t,"linePrefix")}}const yt={name:"thematicBreak",tokenize:Lh};function Lh(e,t,n){let r=0,i;return o;function o(l){return e.enter("thematicBreak"),u(l)}function u(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),a(l)):r>=3&&(l===null||P(l))?(e.exit("thematicBreak"),t(l)):n(l)}function a(l){return l===i?(e.consume(l),r++,a):(e.exit("thematicBreakSequence"),Z(l)?M(e,s,"whitespace")(l):s(l))}}const re={continuation:{tokenize:Bh},exit:Vh,name:"list",tokenize:Mh},Nh={partial:!0,tokenize:qh},jh={partial:!0,tokenize:Uh};function Mh(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,u=0;return s;function s(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:sn(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(yt,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return sn(h)&&++u<10?(e.consume(h),a):(!r.interrupt||u<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(lt,r.interrupt?n:c,e.attempt(Nh,p,f))}function c(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function f(h){return Z(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Bh(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(lt,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Z(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jh,t,u)(s))}function u(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Uh(e,t,n){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(o){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(o):n(o)}}function Vh(e){e.exit(this.containerState.type)}function qh(e,t,n){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const u=r.events[r.events.length-1];return!Z(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Fr={name:"setextUnderline",resolveTo:Jh,tokenize:Hh};function Jh(e,t){const n=new Et;let r=e.length,i,o,u;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!u&&e[r][1].type==="definition"&&(u=r);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(n.add(o,0,[["enter",s,t]]),n.add(u+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[u][1].end}):e[i][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e}function Hh(e,t,n){const r=this;let i;return o;function o(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,u(l)):n(l)}function u(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Z(l)?M(e,a,"lineSuffix")(l):a(l))}function a(l){return l===null||P(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Wh={tokenize:Kh};function Kh(e){const t=this,n=e.attempt(lt,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(nh,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Qh={resolveAll:to()},Gh=eo("string"),Yh=eo("text");function eo(e){return{resolveAll:to(e==="text"?Xh:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,u,s);return u;function u(c){return l(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return l(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function l(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function to(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Xh(e,t){const n=new Et;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=t.sliceStream(i);let u=o.length,s=-1,a=0,l;for(;u--;){const c=o[u];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){u++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const c={type:r===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?s:i.start._bufferIndex+s,_index:i.start._index+u,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const ep={42:re,43:re,45:re,48:re,49:re,50:re,51:re,52:re,53:re,54:re,55:re,56:re,57:re,62:Hi},tp={91:sh},np={[-2]:qt,[-1]:qt,32:qt},rp={35:ph,42:yt,45:[Fr,yt],60:kh,61:Fr,95:yt,96:Ar,126:Ar},ip={38:Ki,92:Wi},op={[-5]:Jt,[-4]:Jt,[-3]:Jt,33:$h,38:Ki,42:an,60:[Rf,xh],91:Zh,92:[fh,Wi],93:Cn,95:an,96:Qf},up={null:[an,Qh]},sp={null:[42,95]},ap={null:[]},lp=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:sp,contentInitial:tp,disable:ap,document:ep,flow:rp,flowInitial:np,insideSpan:up,string:ip,text:op},Symbol.toStringTag,{value:"Module"}));function cp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let u=[],s=[];const a={attempt:$(T),check:$(b),consume:I,enter:z,exit:A,interrupt:$(b,{interrupt:!0})},l={code:null,containerState:{},defineSkip:w,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:f};let c=t.tokenize.call(l,a);return t.resolveAll&&o.push(t),l;function f(O){return u=se(u,O),v(),u[u.length-1]!==null?[]:(L(t,0),l.events=Dt(o,l.events,l),l.events)}function p(O,C){return hp(h(O),C)}function h(O){return fp(u,O)}function d(){const{_bufferIndex:O,_index:C,line:B,column:W,offset:N}=r;return{_bufferIndex:O,_index:C,line:B,column:W,offset:N}}function w(O){i[O.line]=O.column,y()}function v(){for(;r._index<u.length;){const O=u[r._index];if(typeof O=="string"){const C=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===C&&r._bufferIndex<O.length;)k(O.charCodeAt(r._bufferIndex))}else k(O)}}function k(O){c=c(O)}function I(O){P(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,y()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=O}function z(O,C){const B=C||{};return B.type=O,B.start=d(),l.events.push(["enter",B,l]),s.push(B),B}function A(O){const C=s.pop();return C.end=d(),l.events.push(["exit",C,l]),C}function T(O,C){L(O,C.from)}function b(O,C){C.restore()}function $(O,C){return B;function B(W,N,X){let G,le,ye,m;return Array.isArray(W)?_e(W):"tokenize"in W?_e([W]):ce(W);function ce(Y){return Ge;function Ge(Oe){const Be=Oe!==null&&Y[Oe],Ue=Oe!==null&&Y.null,ct=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return _e(ct)(Oe)}}function _e(Y){return G=Y,le=0,Y.length===0?X:g(Y[le])}function g(Y){return Ge;function Ge(Oe){return m=j(),ye=Y,Y.partial||(l.currentConstruct=Y),Y.name&&l.parser.constructs.disable.null.includes(Y.name)?Ze():Y.tokenize.call(C?Object.assign(Object.create(l),C):l,a,fe,Ze)(Oe)}}function fe(Y){return O(ye,m),N}function Ze(Y){return m.restore(),++le<G.length?g(G[le]):X}}}function L(O,C){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&de(l.events,C,l.events.length-C,O.resolve(l.events.slice(C),l)),O.resolveTo&&(l.events=O.resolveTo(l.events,l))}function j(){const O=d(),C=l.previous,B=l.currentConstruct,W=l.events.length,N=Array.from(s);return{from:W,restore:X};function X(){r=O,l.previous=C,l.currentConstruct=B,l.events.length=W,s=N,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function fp(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let u;if(n===i)u=[e[n].slice(r,o)];else{if(u=e.slice(n,i),r>-1){const s=u[0];typeof s=="string"?u[0]=s.slice(r):u.shift()}o>0&&u.push(e[i].slice(0,o))}return u}function hp(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
58
- `;break}case-3:{u=`\r
59
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&i)continue;u=" ";break}default:u=String.fromCharCode(o)}i=o===-2,r.push(u)}return r.join("")}function pp(e){const r={constructs:Vi([lp,...(e||{}).extensions||[]]),content:i(Cf),defined:[],document:i(Af),flow:i(Wh),lazy:{},string:i(Gh),text:i(Yh)};return r;function i(o){return u;function u(s){return cp(r,o,s)}}}function dp(e){for(;!Qi(e););return e}const Zr=/[\0\t\n\r]/g;function mp(){let e=1,t="",n=!0,r;return i;function i(o,u,s){o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o));const a=[];let l=0;for(t="",n&&(o.charCodeAt(0)===65279&&l++,n=void 0);l<o.length;){Zr.lastIndex=l;const c=Zr.exec(o),f=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(f);if(!c){t=o.slice(l);break}if(p===10&&l===f&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),l<f&&(a.push(o.slice(l,f)),e+=f-l),p){case 0:{a.push(65533),e++;break}case 9:{const h=Math.ceil(e/4)*4;for(a.push(-2);e++<h;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}l=f+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const gp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kp(e){return e.replace(gp,bp)}function bp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return qi(n.slice(o?2:1),o?16:10)}return Tn(n)||e}function _t(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Dr(e.position):"start"in e||"end"in e?Dr(e):"line"in e||"column"in e?cn(e):""}function cn(e){return Rr(e&&e.line)+":"+Rr(e&&e.column)}function Dr(e){return cn(e&&e.start)+"-"+cn(e&&e.end)}function Rr(e){return e&&typeof e=="number"?e:1}const no={}.hasOwnProperty;function Qm(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yp(n)(dp(pp(n).document().write(mp()(e,t,!0))))}function yp(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(jn),autolinkProtocol:j,autolinkEmail:j,atxHeading:o(Rn),blockQuote:o(Ue),characterEscape:j,characterReference:j,codeFenced:o(ct),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(ct,u),codeText:o(Oo,u),codeTextData:j,data:j,codeFlowValue:j,definition:o(Eo),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(To),hardBreakEscape:o(Ln),hardBreakTrailing:o(Ln),htmlFlow:o(Nn,u),htmlFlowData:j,htmlText:o(Nn,u),htmlTextData:j,image:o(Co),label:u,link:o(jn),listItem:o(Po),listItemValue:p,listOrdered:o(Mn,f),listUnordered:o(Mn),paragraph:o(Ao),reference:g,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(Rn),strong:o($o),thematicBreak:o(Zo)},exit:{atxHeading:a(),atxHeadingSequence:T,autolink:a(),autolinkEmail:Be,autolinkProtocol:Oe,blockQuote:a(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ze,characterReferenceMarkerNumeric:Ze,characterReferenceValue:Y,characterReference:Ge,codeFenced:a(v),codeFencedFence:w,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:y,codeIndented:a(k),codeText:a(N),codeTextData:y,data:y,definition:a(),definitionDestinationString:A,definitionLabelString:I,definitionTitleString:z,emphasis:a(),hardBreakEscape:a(C),hardBreakTrailing:a(C),htmlFlow:a(B),htmlFlowData:y,htmlText:a(W),htmlTextData:y,image:a(G),label:ye,labelText:le,lineEnding:O,link:a(X),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:fe,resourceDestinationString:m,resourceTitleString:ce,resource:_e,setextHeading:a(L),setextHeadingLineSequence:$,setextHeadingText:b,strong:a(),thematicBreak:a()}};ro(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(x){let S={type:"root",children:[]};const F={stack:[S],tokenStack:[],config:t,enter:s,exit:l,buffer:u,resume:c,data:n},D=[];let U=-1;for(;++U<x.length;)if(x[U][1].type==="listOrdered"||x[U][1].type==="listUnordered")if(x[U][0]==="enter")D.push(U);else{const he=D.pop();U=i(x,he,U)}for(U=-1;++U<x.length;){const he=t[x[U][0]];no.call(he,x[U][1].type)&&he[x[U][1].type].call(Object.assign({sliceSerialize:x[U][2].sliceSerialize},F),x[U][1])}if(F.tokenStack.length>0){const he=F.tokenStack[F.tokenStack.length-1];(he[1]||Lr).call(F,void 0,he[0])}for(S.position={start:Ee(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:Ee(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)S=t.transforms[U](S)||S;return S}function i(x,S,F){let D=S-1,U=-1,he=!1,De,we,Ye,Xe;for(;++D<=F;){const oe=x[D];switch(oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{oe[0]==="enter"?U++:U--,Xe=void 0;break}case"lineEndingBlank":{oe[0]==="enter"&&(De&&!Xe&&!U&&!Ye&&(Ye=D),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=void 0}if(!U&&oe[0]==="enter"&&oe[1].type==="listItemPrefix"||U===-1&&oe[0]==="exit"&&(oe[1].type==="listUnordered"||oe[1].type==="listOrdered")){if(De){let Ve=D;for(we=void 0;Ve--;){const xe=x[Ve];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;we&&(x[we][1].type="lineEndingBlank",he=!0),xe[1].type="lineEnding",we=Ve}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}Ye&&(!we||Ye<we)&&(De._spread=!0),De.end=Object.assign({},we?x[we][1].start:oe[1].end),x.splice(we||D,0,["exit",De,oe[2]]),D++,F++}if(oe[1].type==="listItemPrefix"){const Ve={type:"listItem",_spread:!1,start:Object.assign({},oe[1].start),end:void 0};De=Ve,x.splice(D,0,["enter",Ve,oe[2]]),D++,F++,Ye=void 0,Xe=!0}}}return x[S][1]._spread=he,F}function o(x,S){return F;function F(D){s.call(this,x(D),D),S&&S.call(this,D)}}function u(){this.stack.push({type:"fragment",children:[]})}function s(x,S,F){this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([S,F||void 0]),x.position={start:Ee(S.start),end:void 0}}function a(x){return S;function S(F){x&&x.call(this,F),l.call(this,F)}}function l(x,S){const F=this.stack.pop(),D=this.tokenStack.pop();if(D)D[0].type!==x.type&&(S?S.call(this,x,D[0]):(D[1]||Lr).call(this,x,D[0]));else throw new Error("Cannot close `"+x.type+"` ("+_t({start:x.start,end:x.end})+"): it’s not open");F.position.end=Ee(x.end)}function c(){return En(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(x){if(this.data.expectingFirstListItemValue){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(x),10),this.data.expectingFirstListItemValue=void 0}}function h(){const x=this.resume(),S=this.stack[this.stack.length-1];S.lang=x}function d(){const x=this.resume(),S=this.stack[this.stack.length-1];S.meta=x}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const x=this.resume(),S=this.stack[this.stack.length-1];S.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const x=this.resume(),S=this.stack[this.stack.length-1];S.value=x.replace(/(\r?\n|\r)$/g,"")}function I(x){const S=this.resume(),F=this.stack[this.stack.length-1];F.label=S,F.identifier=me(this.sliceSerialize(x)).toLowerCase()}function z(){const x=this.resume(),S=this.stack[this.stack.length-1];S.title=x}function A(){const x=this.resume(),S=this.stack[this.stack.length-1];S.url=x}function T(x){const S=this.stack[this.stack.length-1];if(!S.depth){const F=this.sliceSerialize(x).length;S.depth=F}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function $(x){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(x).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function j(x){const F=this.stack[this.stack.length-1].children;let D=F[F.length-1];(!D||D.type!=="text")&&(D=Fo(),D.position={start:Ee(x.start),end:void 0},F.push(D)),this.stack.push(D)}function y(x){const S=this.stack.pop();S.value+=this.sliceSerialize(x),S.position.end=Ee(x.end)}function O(x){const S=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=S.children[S.children.length-1];F.position.end=Ee(x.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(S.type)&&(j.call(this,x),y.call(this,x))}function C(){this.data.atHardBreak=!0}function B(){const x=this.resume(),S=this.stack[this.stack.length-1];S.value=x}function W(){const x=this.resume(),S=this.stack[this.stack.length-1];S.value=x}function N(){const x=this.resume(),S=this.stack[this.stack.length-1];S.value=x}function X(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=S,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function G(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=S,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function le(x){const S=this.sliceSerialize(x),F=this.stack[this.stack.length-2];F.label=kp(S),F.identifier=me(S).toLowerCase()}function ye(){const x=this.stack[this.stack.length-1],S=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const D=x.children;F.children=D}else F.alt=S}function m(){const x=this.resume(),S=this.stack[this.stack.length-1];S.url=x}function ce(){const x=this.resume(),S=this.stack[this.stack.length-1];S.title=x}function _e(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function fe(x){const S=this.resume(),F=this.stack[this.stack.length-1];F.label=S,F.identifier=me(this.sliceSerialize(x)).toLowerCase(),this.data.referenceType="full"}function Ze(x){this.data.characterReferenceType=x.type}function Y(x){const S=this.sliceSerialize(x),F=this.data.characterReferenceType;let D;F?(D=qi(S,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):D=Tn(S);const U=this.stack[this.stack.length-1];U.value+=D}function Ge(x){const S=this.stack.pop();S.position.end=Ee(x.end)}function Oe(x){y.call(this,x);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(x)}function Be(x){y.call(this,x);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(x)}function Ue(){return{type:"blockquote",children:[]}}function ct(){return{type:"code",lang:null,meta:null,value:""}}function Oo(){return{type:"inlineCode",value:""}}function Eo(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function To(){return{type:"emphasis",children:[]}}function Rn(){return{type:"heading",depth:0,children:[]}}function Ln(){return{type:"break"}}function Nn(){return{type:"html",value:""}}function Co(){return{type:"image",title:null,url:"",alt:null}}function jn(){return{type:"link",title:null,url:"",children:[]}}function Mn(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function Po(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function Ao(){return{type:"paragraph",children:[]}}function $o(){return{type:"strong",children:[]}}function Fo(){return{type:"text",value:""}}function Zo(){return{type:"thematicBreak"}}}function Ee(e){return{line:e.line,column:e.column,offset:e.offset}}function ro(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ro(e,r):_p(e,r)}}function _p(e,t){let n;for(n in t)if(no.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Lr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_t({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_t({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_t({start:t.start,end:t.end})+") is still open")}const Rt=(function(e){if(e==null)return zp;if(typeof e=="function")return Lt(e);if(typeof e=="object")return Array.isArray(e)?wp(e):xp(e);if(typeof e=="string")return vp(e);throw new Error("Expected function, string, or object as test")});function wp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rt(e[n]);return Lt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function xp(e){const t=e;return Lt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function vp(e){return Lt(t);function t(n){return n&&n.type===e}}function Lt(e){return t;function t(n,r,i){return!!(Sp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function zp(){return!0}function Sp(e){return e!==null&&typeof e=="object"&&"type"in e}const Ip=Rt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]),Nr={}.hasOwnProperty;function Gm(e,t){const n=t||{};function r(i,...o){let u=r.invalid;const s=r.handlers;if(i&&Nr.call(i,e)){const a=String(i[e]);u=Nr.call(s,a)?s[a]:r.unknown}if(u)return u.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function Op(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const u=n.indentLines(n.containerFlow(e,o.current()),Ep);return i(),u}function Ep(e,t,n){return">"+(n?"":" ")+e}function Tp(e,t){return jr(e,t.inConstruct,!0)&&!jr(e,t.notInConstruct,!1)}function jr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Mr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const o=n.unsafe[i];if(o.character===`
60
- `&&!o.before&&!o.after&&Tp(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
61
- `}function Cp(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>u&&(u=o):o=1,i=r+t.length,r=n.indexOf(t,i);return u}function Pp(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Ap(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function $p(e,t,n,r){const i=Ap(n),o=e.value||"";if(Pp(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(o,Fp);return f(),p}const u=n.createTracker(r),s=i.repeat(Math.max(Cp(o,i)+1,3)),a=n.enter("codeFenced"),l=i==="`"?"GraveAccent":"Tilde";let c=u.move(s);if(e.lang){const f=n.enter(`codeFencedLang${l}`);c+=u.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${l}`);c+=u.move(" "),c+=u.move(n.safe(e.meta,{before:c,after:`
62
- `,encode:["`"],...u.current()})),f()}return c+=u.move(`
63
- `),o&&(c+=u.move(o+`
64
- `)),c+=u.move(s),a(),c}function Fp(e,t,n){return(n?"":" ")+e}function Pn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Zp(e,t,n,r){const i=Pn(n),o=i==='"'?"Quote":"Apostrophe",u=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");return l+=a.move(n.safe(n.associationId(e),{before:l,after:"]",...a.current()})),l+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(s=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":`
65
- `,...a.current()}))),s(),e.title&&(s=n.enter(`title${o}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),s()),u(),l}function Dp(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}An.attention=Rp;An.peek=Lp;function An(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function Rp(e,t){return{construct:"emphasis",markers:Dp(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Lp(e,t,n){return n.options.emphasis||"*"}function Np(e){return"&#x"+e.toString(16).toUpperCase()+";"}const io=[],jp=!0,fn=!1,Mp="skip";function oo(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Rt(i),u=r?-1:1;s(e,void 0,[])();function s(a,l,c){const f=a&&typeof a=="object"?a:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=io,d,w,v;if((!t||o(a,l,c[c.length-1]||void 0))&&(h=Bp(n(a,c)),h[0]===fn))return h;if("children"in a&&a.children){const k=a;if(k.children&&h[0]!==Mp)for(w=(r?k.children.length:-1)+u,v=c.concat(k);w>-1&&w<k.children.length;){const I=k.children[w];if(d=s(I,w,v)(),d[0]===fn)return d;w=typeof d[1]=="number"?d[1]:w+u}}return h}}}function Bp(e){return Array.isArray(e)?e:typeof e=="number"?[jp,e]:e==null?io:[e]}function Up(e,t,n,r){let i,o,u;typeof t=="function"&&typeof n!="function"?(o=void 0,u=t,i=n):(o=t,u=n,i=r),oo(e,o,s,i);function s(a,l){const c=l[l.length-1],f=c?c.children.indexOf(a):void 0;return u(a,f,c)}}function Vp(e,t){let n=!1;return Up(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,fn}),!!((!e.depth||e.depth<3)&&En(e)&&(t.options.setext||n))}function qp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Vp(e,n)){const f=n.enter("headingSetext"),p=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
66
- `,after:`
67
- `});return p(),f(),h+`
68
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
69
- `))+1))}const u="#".repeat(i),s=n.enter("headingAtx"),a=n.enter("phrasing");o.move(u+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
70
- `,...o.current()});const c=l.charCodeAt(0);return(c===9||c===32)&&(l=Np(c)+l.slice(1)),l=l?u+" "+l:u,n.options.closeAtx&&(l+=" "+u),a(),s(),l}uo.peek=Jp;function uo(e){return e.value||""}function Jp(){return"<"}so.peek=Hp;function so(e,t,n,r){const i=Pn(n),o=i==='"'?"Quote":"Apostrophe",u=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");return l+=a.move(n.safe(e.alt,{before:l,after:"]",...a.current()})),l+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(s=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${o}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),s()),l+=a.move(")"),u(),l}function Hp(){return"!"}ao.peek=Wp;function ao(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let u=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const l=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(l+"]["),u();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),u=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return u(),n.stack=c,o(),i==="full"||!l||l!==f?a+=s.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Wp(){return"!"}lo.peek=Kp;function lo(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const u=n.unsafe[o],s=n.compilePattern(u);if(!u.atBreak)continue;let a;for(;a=s.exec(r);){let l=a.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(a.index+1)}}return i+r+i}function Kp(){return"`"}function co(e,t){const n=En(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fo.peek=Qp;function fo(e,t,n,r){const i=Pn(n),o=i==='"'?"Quote":"Apostrophe",u=n.createTracker(r);if(co(e,n)){const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"});const f=n.enter("autolink");let p=u.move("<");return p+=u.move(n.containerPhrasing(e,{before:p,after:">",...u.current()})),p+=u.move(">"),f(),n.stack=c,p}const s=n.enter("link");let a=n.enter("label"),l=u.move("[");return l+=u.move(n.containerPhrasing(e,{before:l,after:"](",...u.current()})),l+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),l+=u.move(")"),s(),l}function Qp(e,t,n){return co(e,n)?"<":"["}ho.peek=Gp;function ho(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let u=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const l=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(l+"]["),u();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),u=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return u(),n.stack=c,o(),i==="full"||!l||l!==f?a+=s.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Gp(){return"["}function $n(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Yp(e){const t=$n(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Xp(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function po(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ed(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let u=e.ordered?Xp(n):$n(n);const s=e.ordered?u==="."?")":".":Yp(n);let a=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),po(n)===u&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(u=s),n.bulletCurrent=u;const l=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=o,i(),l}function td(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nd(e,t,n,r){const i=td(n);let o=n.bulletCurrent||$n(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let u=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(u-o.length)),s.shift(u);const a=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return a(),l;function c(f,p,h){return p?(h?"":" ".repeat(u))+f:(h?o:o+" ".repeat(u-o.length))+f}}function rd(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),u=n.containerPhrasing(e,r);return o(),i(),u}function id(e,t,n,r){if(!e.children.some(function(s){return Ip(s)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),u=n.containerPhrasing(e,r);return o(),u}function od(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Fn.attention=ud;Fn.peek=sd;function Fn(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function ud(e,t){return{construct:"strong",markers:od(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function sd(e,t,n){return n.options.strong||"*"}function ad(e,t,n,r){return n.safe(e.value,r)}function ld(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function cd(e,t,n){const r=(po(n)+(n.options.ruleSpaces?" ":"")).repeat(ld(n));return n.options.ruleSpaces?r.slice(0,-1):r}const mo={blockquote:Op,break:Mr,code:$p,definition:Zp,emphasis:An,hardBreak:Mr,heading:qp,html:uo,image:so,imageReference:ao,inlineCode:lo,link:fo,linkReference:ho,list:ed,listItem:nd,paragraph:rd,root:id,strong:Fn,text:ad,thematicBreak:cd};function Br(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ym(){}function Xm(){}function fd(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hd(e,t,n){const i=Rt((n||{}).ignore||[]),o=pd(t);let u=-1;for(;++u<o.length;)oo(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){const h=c[f],d=p?p.children:void 0;if(i(h,d?d.indexOf(h):void 0,p))return;p=h}if(p)return a(l,c)}function a(l,c){const f=c[c.length-1],p=o[u][0],h=o[u][1];let d=0;const v=f.children.indexOf(l);let k=!1,I=[];p.lastIndex=0;let z=p.exec(l.value);for(;z;){const A=z.index,T={index:z.index,input:z.input,stack:[...c,l]};let b=h(...z,T);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=A+1:(d!==A&&I.push({type:"text",value:l.value.slice(d,A)}),Array.isArray(b)?I.push(...b):b&&I.push(b),d=A+z[0].length,k=!0),!p.global)break;z=p.exec(l.value)}return k?(d<l.value.length&&I.push({type:"text",value:l.value.slice(d)}),f.children.splice(v,1,...I)):I=[l],v+I.length}}function pd(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([dd(i[0]),md(i[1])])}return t}function dd(e){return typeof e=="string"?new RegExp(fd(e),"g"):e}function md(e){return typeof e=="function"?e:function(){return e}}const Ht="phrasing",Wt=["autolink","link","image","label"];function gd(){return{transforms:[vd],enter:{literalAutolink:bd,literalAutolinkEmail:Kt,literalAutolinkHttp:Kt,literalAutolinkWww:Kt},exit:{literalAutolink:xd,literalAutolinkEmail:wd,literalAutolinkHttp:yd,literalAutolinkWww:_d}}}function kd(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ht,notInConstruct:Wt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ht,notInConstruct:Wt},{character:":",before:"[ps]",after:"\\/",inConstruct:Ht,notInConstruct:Wt}]}}function bd(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Kt(e){this.config.enter.autolinkProtocol.call(this,e)}function yd(e){this.config.exit.autolinkProtocol.call(this,e)}function _d(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function wd(e){this.config.exit.autolinkEmail.call(this,e)}function xd(e){this.exit(e)}function vd(e){hd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zd],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Sd]],{ignore:["link","linkReference"]})}function zd(e,t,n,r,i){let o="";if(!go(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Id(n)))return!1;const u=Od(n+r);if(!u[0])return!1;const s={type:"link",title:null,url:o+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[s,{type:"text",value:u[1]}]:s}function Sd(e,t,n,r){return!go(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Id(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Od(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Br(e,"(");let o=Br(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function go(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Me(n)||Zt(n))&&(!t||n!==47)}ko.peek=Dd;function Ed(){this.buffer()}function Td(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Cd(){this.buffer()}function Pd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ad(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=me(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $d(e){this.exit(e)}function Fd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=me(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zd(e){this.exit(e)}function Dd(){return"["}function ko(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const u=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),u(),o+=i.move("]"),o}function Rd(){return{enter:{gfmFootnoteCallString:Ed,gfmFootnoteCall:Td,gfmFootnoteDefinitionLabelString:Cd,gfmFootnoteDefinition:Pd},exit:{gfmFootnoteCallString:Ad,gfmFootnoteCall:$d,gfmFootnoteDefinitionLabelString:Fd,gfmFootnoteDefinition:Zd}}}function Ld(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ko},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,u){const s=o.createTracker(u);let a=s.move("[^");const l=o.enter("footnoteDefinition"),c=o.enter("label");return a+=s.move(o.safe(o.associationId(r),{before:a,after:"]"})),c(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
71
- `:" ")+o.indentLines(o.containerFlow(r,s.current()),t?bo:Nd))),l(),a}}function Nd(e,t,n){return t===0?e:bo(e,t,n)}function bo(e,t,n){return(n?"":" ")+e}const jd=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zn.attention=qd;Zn.peek=Jd;function Md(){return{canContainEols:["delete"],enter:{strikethrough:Ud},exit:{strikethrough:Vd}}}function Bd(){return{handlers:{delete:Zn},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jd}]}}function Ud(e){this.enter({type:"delete",children:[],position:void 0},e)}function Vd(e){this.exit(e)}function Zn(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",u=n.enter("strikethrough");let s=i.move(o);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(o),u(),s}function qd(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Jd(){return"~"}function Hd(e){return e.length}function Wd(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Hd,o=[],u=[],s=[],a=[];let l=0,c=-1;for(;++c<e.length;){const w=[],v=[];let k=-1;for(e[c].length>l&&(l=e[c].length);++k<e[c].length;){const I=Kd(e[c][k]);if(n.alignDelimiters!==!1){const z=i(I);v[k]=z,(a[k]===void 0||z>a[k])&&(a[k]=z)}w.push(I)}u[c]=w,s[c]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)o[f]=Ur(r[f]);else{const w=Ur(r);for(;++f<l;)o[f]=w}f=-1;const p=[],h=[];for(;++f<l;){const w=o[f];let v="",k="";w===99?(v=":",k=":"):w===108?v=":":w===114&&(k=":");let I=n.alignDelimiters===!1?1:Math.max(1,a[f]-v.length-k.length);const z=v+"-".repeat(I)+k;n.alignDelimiters!==!1&&(I=v.length+I+k.length,I>a[f]&&(a[f]=I),h[f]=I),p[f]=z}u.splice(1,0,p),s.splice(1,0,h),c=-1;const d=[];for(;++c<u.length;){const w=u[c],v=s[c];f=-1;const k=[];for(;++f<l;){const I=w[f]||"";let z="",A="";if(n.alignDelimiters!==!1){const T=a[f]-(v[f]||0),b=o[f];b===114?z=" ".repeat(T):b===99?T%2?(z=" ".repeat(T/2+.5),A=" ".repeat(T/2-.5)):(z=" ".repeat(T/2),A=z):A=" ".repeat(T)}n.delimiterStart!==!1&&!f&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||f)&&k.push(" "),n.alignDelimiters!==!1&&k.push(z),k.push(I),n.alignDelimiters!==!1&&k.push(A),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
72
- `)}function Kd(e){return e==null?"":String(e)}function Ur(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Qd(){return{enter:{table:Gd,tableData:Vr,tableHeader:Vr,tableRow:Xd},exit:{codeText:em,table:Yd,tableData:Qt,tableHeader:Qt,tableRow:Qt}}}function Gd(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Yd(e){this.exit(e),this.data.inTable=void 0}function Xd(e){this.enter({type:"tableRow",children:[]},e)}function Qt(e){this.exit(e)}function Vr(e){this.enter({type:"tableCell",children:[]},e)}function em(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tm));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tm(e,t){return t==="|"?t:e}function nm(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
73
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:u,tableCell:a,tableRow:s}};function u(h,d,w,v){return l(c(h,w,v),h.align)}function s(h,d,w,v){const k=f(h,w,v),I=l([k]);return I.slice(0,I.indexOf(`
74
- `))}function a(h,d,w,v){const k=w.enter("tableCell"),I=w.enter("phrasing"),z=w.containerPhrasing(h,{...v,before:o,after:o});return I(),k(),z}function l(h,d){return Wd(h,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function c(h,d,w){const v=h.children;let k=-1;const I=[],z=d.enter("table");for(;++k<v.length;)I[k]=f(v[k],d,w);return z(),I}function f(h,d,w){const v=h.children;let k=-1;const I=[],z=d.enter("tableRow");for(;++k<v.length;)I[k]=a(v[k],h,d,w);return z(),I}function p(h,d,w){let v=mo.inlineCode(h,d,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function rm(){return{exit:{taskListCheckValueChecked:qr,taskListCheckValueUnchecked:qr,paragraph:om}}}function im(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:um}}}function qr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function om(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,u;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){u=s;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function um(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(u);let a=mo.listItem(e,t,n,{...r,...s.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),a;function l(c){return c+u}}function eg(){return[gd(),Rd(),Md(),Qd(),rm()]}function tg(e){return{extensions:[kd(),Ld(e),Bd(),nm(e),im()]}}const sm={tokenize:pm,partial:!0},yo={tokenize:dm,partial:!0},_o={tokenize:mm,partial:!0},wo={tokenize:gm,partial:!0},am={tokenize:km,partial:!0},xo={name:"wwwAutolink",tokenize:fm,previous:zo},vo={name:"protocolAutolink",tokenize:hm,previous:So},Ie={name:"emailAutolink",tokenize:cm,previous:Io},be={};function lm(){return{text:be}}let Re=48;for(;Re<123;)be[Re]=Ie,Re++,Re===58?Re=65:Re===91&&(Re=97);be[43]=Ie;be[45]=Ie;be[46]=Ie;be[95]=Ie;be[72]=[Ie,vo];be[104]=[Ie,vo];be[87]=[Ie,xo];be[119]=[Ie,xo];function cm(e,t,n){const r=this;let i,o;return u;function u(f){return!hn(f)||!Io.call(r,r.previous)||Dn(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return hn(f)?(e.consume(f),s):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check(am,c,l)(f):f===45||f===95||ie(f)?(o=!0,e.consume(f),a):c(f)}function l(f){return e.consume(f),i=!0,a}function c(f){return o&&i&&te(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function fm(e,t,n){const r=this;return i;function i(u){return u!==87&&u!==119||!zo.call(r,r.previous)||Dn(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sm,e.attempt(yo,e.attempt(_o,o),n),n)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function hm(e,t,n){const r=this;let i="",o=!1;return u;function u(f){return(f===72||f===104)&&So.call(r,r.previous)&&!Dn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(te(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),a}return n(f)}function a(f){return f===47?(e.consume(f),o?l:(o=!0,a)):n(f)}function l(f){return f===null||Ot(f)||V(f)||Me(f)||Zt(f)?n(f):e.attempt(yo,e.attempt(_o,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function pm(e,t,n){let r=0;return i;function i(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),i):u===46&&r===3?(e.consume(u),o):n(u)}function o(u){return u===null?n(u):t(u)}}function dm(e,t,n){let r,i,o;return u;function u(l){return l===46||l===95?e.check(wo,a,s)(l):l===null||V(l)||Me(l)||l!==45&&Zt(l)?a(l):(o=!0,e.consume(l),u)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),u}function a(l){return i||r||!o?n(l):t(l)}}function mm(e,t){let n=0,r=0;return i;function i(u){return u===40?(n++,e.consume(u),i):u===41&&r<n?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(wo,t,o)(u):u===null||V(u)||Me(u)?t(u):(e.consume(u),i)}function o(u){return u===41&&r++,e.consume(u),i}}function gm(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||V(s)||Me(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||V(s)||Me(s)?t(s):r(s)}function o(s){return te(s)?u(s):n(s)}function u(s){return s===59?(e.consume(s),r):te(s)?(e.consume(s),u):n(s)}}function km(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ie(o)?n(o):t(o)}}function zo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function So(e){return!te(e)}function Io(e){return!(e===47||hn(e))}function hn(e){return e===43||e===45||e===46||e===95||ie(e)}function Dn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const bm={tokenize:Im,partial:!0};function ym(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vm,continuation:{tokenize:zm},exit:Sm}},text:{91:{name:"gfmFootnoteCall",tokenize:xm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_m,resolveTo:wm}}}}function _m(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){u=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!u||!u._balanced)return n(a);const l=me(r.sliceSerialize({start:u.end,end:r.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function wm(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function xm(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,u;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!u||f===null||f===91||V(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(me(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return V(f)||(u=!0),o++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,l):l(f)}}function vm(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,u=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(d)}function c(d){if(u>999||d===93&&!s||d===null||d===91||V(d))return n(d);if(d===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=me(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return V(d)||(s=!0),u++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),u++,c):c(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(o)||i.push(o),M(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function zm(e,t,n){return e.check(lt,t,e.attempt(bm,t,n))}function Sm(e){e.exit("gfmFootnoteDefinition")}function Im(e,t,n){const r=this;return M(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(o):n(o)}}function Om(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(u,s){let a=-1;for(;++a<u.length;)if(u[a][0]==="enter"&&u[a][1].type==="strikethroughSequenceTemporary"&&u[a][1]._close){let l=a;for(;l--;)if(u[l][0]==="exit"&&u[l][1].type==="strikethroughSequenceTemporary"&&u[l][1]._open&&u[a][1].end.offset-u[a][1].start.offset===u[l][1].end.offset-u[l][1].start.offset){u[a][1].type="strikethroughSequence",u[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},u[l][1].start),end:Object.assign({},u[a][1].end)},f={type:"strikethroughText",start:Object.assign({},u[l][1].end),end:Object.assign({},u[a][1].start)},p=[["enter",c,s],["enter",u[l][1],s],["exit",u[l][1],s],["enter",f,s]],h=s.parser.constructs.insideSpan.null;h&&de(p,p.length,0,Dt(h,u.slice(l+1,a),s)),de(p,p.length,0,[["exit",f,s],["enter",u[a][1],s],["exit",u[a][1],s],["exit",c,s]]),de(u,l-1,a-l+3,p),a=l+p.length-2;break}}for(a=-1;++a<u.length;)u[a][1].type==="strikethroughSequenceTemporary"&&(u[a][1].type="data");return u}function o(u,s,a){const l=this.previous,c=this.events;let f=0;return p;function p(d){return l===126&&c[c.length-1][1].type!=="characterEscape"?a(d):(u.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const w=Tt(l);if(d===126)return f>1?a(d):(u.consume(d),f++,h);if(f<2&&!n)return a(d);const v=u.exit("strikethroughSequenceTemporary"),k=Tt(d);return v._open=!k||k===2&&!!w,v._close=!w||w===2&&!!k,s(d)}}}class Em{constructor(){this.map=[],this.index=new Map}add(t,n,r){Tm(this,t,n,r)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function Tm(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function Cm(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Pm(){return{flow:{null:{name:"table",tokenize:Am,resolveAll:$m}}}}function Am(e,t,n){const r=this;let i=0,o=0,u;return s;function s(y){let O=r.events.length-1;for(;O>-1;){const{type:W}=r.events[O][1];if(W==="lineEnding"||W==="linePrefix")O--;else break}const C=O>-1?r.events[O][1].type:null,B=C==="tableHead"||C==="tableRow"?b:a;return B===b&&r.parser.lazy[r.now().line]?n(y):B(y)}function a(y){return e.enter("tableHead"),e.enter("tableRow"),l(y)}function l(y){return y===124||(u=!0,o+=1),c(y)}function c(y){return y===null?n(y):P(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):n(y):Z(y)?M(e,c,"whitespace")(y):(o+=1,u&&(u=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),u=!0,c):(e.enter("data"),f(y)))}function f(y){return y===null||y===124||V(y)?(e.exit("data"),c(y)):(e.consume(y),y===92?p:f)}function p(y){return y===92||y===124?(e.consume(y),f):f(y)}function h(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),u=!1,Z(y)?M(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):d(y))}function d(y){return y===45||y===58?v(y):y===124?(u=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),w):T(y)}function w(y){return Z(y)?M(e,v,"whitespace")(y):v(y)}function v(y){return y===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),k):y===45?(o+=1,k(y)):y===null||P(y)?A(y):T(y)}function k(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):T(y)}function I(y){return y===45?(e.consume(y),I):y===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),z):(e.exit("tableDelimiterFiller"),z(y))}function z(y){return Z(y)?M(e,A,"whitespace")(y):A(y)}function A(y){return y===124?d(y):y===null||P(y)?!u||i!==o?T(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):T(y)}function T(y){return n(y)}function b(y){return e.enter("tableRow"),$(y)}function $(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),$):y===null||P(y)?(e.exit("tableRow"),t(y)):Z(y)?M(e,$,"whitespace")(y):(e.enter("data"),L(y))}function L(y){return y===null||y===124||V(y)?(e.exit("data"),$(y)):(e.consume(y),y===92?j:L)}function j(y){return y===92||y===124?(e.consume(y),L):L(y)}}function $m(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],u=[0,0,0,0],s=!1,a=0,l,c,f;const p=new Em;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Jr(p,t,a,l,c),c=void 0,a=0),l={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",l,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],u=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",c,t]])),i=d.type==="tableDelimiterRow"?2:c?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],f=gt(p,t,o,i,void 0,f),o=[0,0,0,0]),u[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(u[0]=u[1],f=gt(p,t,o,i,void 0,f)),o=u,u=[o[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,o[1]!==0?(u[0]=u[1],f=gt(p,t,o,i,n,f)):u[1]!==0&&(f=gt(p,t,u,i,n,f)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(u[3]=n)}for(a!==0&&Jr(p,t,a,l,c),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Cm(t.events,n))}return e}function gt(e,t,n,r,i,o){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},qe(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=qe(t.events,n[1]);if(o={type:u,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const l=qe(t.events,n[2]),c=qe(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,w=n[3]-n[2]-1;e.add(d,w,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},qe(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Jr(e,t,n,r,i){const o=[],u=qe(t.events,n);i&&(i.end=Object.assign({},u),o.push(["exit",i,t])),r.end=Object.assign({},u),o.push(["exit",r,t]),e.add(n+1,0,o)}function qe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Fm={name:"tasklistCheck",tokenize:Dm};function Zm(){return{text:{91:Fm}}}function Dm(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return V(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),u):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),u):n(a)}function u(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return P(a)?t(a):Z(a)?e.check({tokenize:Rm},t,n)(a):n(a)}}function Rm(e,t,n){return M(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ng(e){return Vi([lm(),ym(),Om(e),Pm(),Zm()])}export{tg as A,qm as B,Jm as C,Hm as D,Mm as E,_t as F,Ym as G,Up as H,Xm as I,Br as J,Um as K,Lm as L,Tn as M,Rt as N,oo as O,Cp as P,M as Q,P as R,Mp as S,Wm as _,wr as a,jm as b,nf as c,Qc as d,te as e,ie as f,gh as g,$r as h,Pp as i,Vp as j,kp as k,Tt as l,Tf as m,Nm as n,Bm as o,Np as p,Tp as q,Vm as r,wc as s,mo as t,Yc as u,Ip as v,Qm as w,eg as x,ng as y,Gm as z};
@@ -1,2 +0,0 @@
1
- import{_ as e,l as s,F as n,d as i}from"./mermaid.core-BCRBv8Us.js";import{p}from"./cynefin-OW5HDTMX-yz-uw9Kz.js";import"./index-5E1tJ7yK.js";import"./transform-BqqRT-Iy.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.2"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram
2
- `+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},w={parser:g,db:m,renderer:l};export{w as diagram};
@@ -1 +0,0 @@
1
- import{j as t,c as n}from"./index-5E1tJ7yK.js";function a({className:e,type:i,...r}){return t.jsx("input",{type:i,"data-slot":"input",className:n("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}export{a as I};