uigraph 1.0.0 → 1.0.1

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 (319) hide show
  1. package/dist/bin.mjs +134 -56911
  2. package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
  3. package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
  4. package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
  5. package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
  6. package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
  7. package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
  8. package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
  9. package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
  10. package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
  11. package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
  12. package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
  13. package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
  14. package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
  15. package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
  16. package/dist/viewer/assets/button-DZj74qS7.js +1 -0
  17. package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
  18. package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
  19. package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
  20. package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
  21. package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
  22. package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
  23. package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
  24. package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
  25. package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
  26. package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
  27. package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
  28. package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
  29. package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
  30. package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
  31. package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
  32. package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
  33. package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
  34. package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
  35. package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
  36. package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
  37. package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
  38. package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
  39. package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
  40. package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
  41. package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
  42. package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
  43. package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
  44. package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
  45. package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
  46. package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
  47. package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
  48. package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
  49. package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
  50. package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
  51. package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
  52. package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
  53. package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
  54. package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
  55. package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
  56. package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
  57. package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
  58. package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
  59. package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
  60. package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
  61. package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
  62. package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
  63. package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
  64. package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
  65. package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
  66. package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
  67. package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
  68. package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
  69. package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
  70. package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
  71. package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
  72. package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
  73. package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
  74. package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
  75. package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
  76. package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
  77. package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
  78. package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
  79. package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
  80. package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
  81. package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
  82. package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
  83. package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
  84. package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
  85. package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
  86. package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
  87. package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
  88. package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
  89. package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
  90. package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
  91. package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
  92. package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
  93. package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
  94. package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
  95. package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
  96. package/dist/viewer/assets/index-CIf0GId3.js +74 -0
  97. package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
  98. package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
  99. package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
  100. package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
  101. package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
  102. package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
  103. package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
  104. package/dist/viewer/assets/input--C59pq6j.js +1 -0
  105. package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
  106. package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
  107. package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
  108. package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
  109. package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
  110. package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
  111. package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
  112. package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
  113. package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
  114. package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
  115. package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
  116. package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
  117. package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
  118. package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
  119. package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
  120. package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
  121. package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
  122. package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
  123. package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
  124. package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
  125. package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
  126. package/dist/viewer/assets/popover-476u3TN0.js +1 -0
  127. package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
  128. package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
  129. package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
  130. package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
  131. package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
  132. package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
  133. package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
  134. package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
  135. package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
  136. package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
  137. package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
  138. package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
  139. package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
  140. package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
  141. package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
  142. package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
  143. package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
  144. package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
  145. package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
  146. package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
  147. package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
  148. package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
  149. package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
  150. package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
  151. package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
  152. package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
  153. package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
  154. package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
  155. package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
  156. package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
  157. package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
  158. package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
  159. package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
  160. package/dist/viewer/assets/table-B4pFND-o.js +1 -0
  161. package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
  162. package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
  163. package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
  164. package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
  165. package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
  166. package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
  167. package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
  168. package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
  169. package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
  170. package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
  171. package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
  172. package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
  173. package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
  174. package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
  175. package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
  176. package/dist/viewer/index.html +10 -1
  177. package/package.json +56 -56
  178. package/dist/abort-signals-B4fc3ahg.mjs +0 -34
  179. package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
  180. package/dist/auth-storage-BvNH97p9.mjs +0 -2180
  181. package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
  182. package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
  183. package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
  184. package/dist/cli-2R6QQFp1.mjs +0 -451
  185. package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
  186. package/dist/config-D8DMGzIq.mjs +0 -647
  187. package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
  188. package/dist/diagnostics-xdSgQR8t.mjs +0 -131
  189. package/dist/dist-BRyghrKX.mjs +0 -404
  190. package/dist/dist-D0EzrblG.mjs +0 -12161
  191. package/dist/dist-EKhnHWHG.mjs +0 -140221
  192. package/dist/dist-pQtuusFv.mjs +0 -1243
  193. package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
  194. package/dist/env-api-keys-uytNub6O.mjs +0 -122
  195. package/dist/error-body-FhmCtR7m.mjs +0 -101
  196. package/dist/esm-D5isprgl.mjs +0 -1533
  197. package/dist/esm-DnqE4pfM.mjs +0 -104876
  198. package/dist/execute-BoTKl80U.mjs +0 -1715
  199. package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
  200. package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
  201. package/dist/google-shared-2CyYa4VE.mjs +0 -33438
  202. package/dist/google-vertex-DZDUQPKa.mjs +0 -378
  203. package/dist/hash-DN7ukSfd.mjs +0 -16
  204. package/dist/headers-GhQHLk-3.mjs +0 -17
  205. package/dist/jiti-9kWALm4Y.mjs +0 -5439
  206. package/dist/jiti-loader-f21DrY1K.mjs +0 -27
  207. package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
  208. package/dist/json-parse-B2mHg7o7.mjs +0 -381
  209. package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
  210. package/dist/lib-Dj1gKQJc.mjs +0 -24379
  211. package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
  212. package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
  213. package/dist/models-DBdii9gQ.mjs +0 -1255
  214. package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
  215. package/dist/node-B0NU8X55.mjs +0 -2479
  216. package/dist/node-B8gaKm9g.mjs +0 -23
  217. package/dist/openai-I3_AqKDX.mjs +0 -17357
  218. package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
  219. package/dist/openai-completions-a_mH01ii.mjs +0 -994
  220. package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
  221. package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
  222. package/dist/openai-responses-a9lV_U7O.mjs +0 -270
  223. package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
  224. package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
  225. package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
  226. package/dist/pi-messages-B5ietIBq.mjs +0 -306
  227. package/dist/provider-env-BJhgA66g.mjs +0 -37
  228. package/dist/provider-retry-DXYM7rVE.mjs +0 -79
  229. package/dist/runtime-DTkBxiaM.mjs +0 -2822
  230. package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
  231. package/dist/shell-836_JFnI.mjs +0 -162
  232. package/dist/source-CKPndhKl.mjs +0 -478
  233. package/dist/src-DNm2QRm3.mjs +0 -5028
  234. package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
  235. package/dist/token-DEUkymby.mjs +0 -56
  236. package/dist/token-util-Cx5S4eKt.mjs +0 -3
  237. package/dist/tool-DHDYqsyG.mjs +0 -6673
  238. package/dist/transform-messages-BClk99Vn.mjs +0 -477
  239. package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
  240. package/dist/typescript-Br-vsRJV.mjs +0 -6737
  241. package/dist/uuid-CNCZqNBb.mjs +0 -49
  242. package/dist/v2-1z8ijsD3.mjs +0 -6120
  243. package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
  244. package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
  245. package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
  246. package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
  247. package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
  248. package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
  249. package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
  250. package/dist/viewer/assets/button-DadqadpO.js +0 -1
  251. package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
  252. package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
  253. package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
  254. package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
  255. package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
  256. package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
  257. package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
  258. package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
  259. package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
  260. package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
  261. package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
  262. package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
  263. package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
  264. package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
  265. package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
  266. package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
  267. package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
  268. package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
  269. package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
  270. package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
  271. package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
  272. package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
  273. package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
  274. package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
  275. package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
  276. package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
  277. package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
  278. package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
  279. package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
  280. package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
  281. package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
  282. package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
  283. package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
  284. package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
  285. package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
  286. package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
  287. package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
  288. package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
  289. package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
  290. package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
  291. package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
  292. package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
  293. package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
  294. package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
  295. package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
  296. package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
  297. package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
  298. package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
  299. package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
  300. package/dist/viewer/assets/select-DDtnmSET.js +0 -1
  301. package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
  302. package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
  303. package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
  304. package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
  305. package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
  306. package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
  307. package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
  308. package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
  309. package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
  310. package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
  311. package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
  312. package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
  313. package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
  314. package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
  315. package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
  316. package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
  317. package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
  318. package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
  319. package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
@@ -0,0 +1,74 @@
1
+ function Xt(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 Hn(e,t="|"){return e.map(n=>ni(n)).join(t)}function en(e,t){return typeof t=="bigint"?t.toString():t}class Mo{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 Mo(e)}function Bo(e){return e==null}function gn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Uo(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 Wn=Symbol("evaluating");function Vo(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Wn)return r===void 0&&(r=Wn,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ie(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function kn(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Se(e){return kn(e._zod.def)??e._zod.def.shape}function Yr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return Ie(this,t,r),r},enumerable:!0,configurable:!0})}function Xr(e,t,n){t in e?Ie(e,t,n):e[t]=n}function Ne(e,t,n,r){const i=Se(t);for(const o of n){const u=Object.getOwnPropertyDescriptor(i,o);u.enumerable&&(u.get?Yr(e,o,()=>{const s=t._zod.def.shape[o];return r?r(s,o):s}):Xr(e,o,r?r(u.value,o):u.value))}}function qo(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Yr(e,n,()=>t[n]):Xr(e,n,r.value))}}function ae(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Jo(e){return JSON.stringify(e)}function Ho(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ei="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function at(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Wo=Ct(()=>{if(ke.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(at(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(at(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ti(e){return Je(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ko=new Set(["string","number","symbol"]);function He(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function T(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 ni(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 ri={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]},Go={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Yo(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 Ne(o,e,At(e,t)),Fe(e,ae(n,{shape:o,checks:[]}))}function At(e,t){const n=Se(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 Xo(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(At(e,t)),u={};return Ne(u,e,Reflect.ownKeys(Se(e)).filter(s=>!o.has(s))),Fe(e,ae(n,{shape:u,checks:[]}))}function eu(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=Se(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 Fe(e,ae(e._zod.def,{shape:ii(e,t)}))}function ii(e,t){const n={};return Ne(n,e,Reflect.ownKeys(Se(e))),qo(n,t),n}function tu(e,t){if(!Je(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Fe(e,ae(e._zod.def,{shape:ii(e,t)}))}function nu(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={};Ne(n,e,Reflect.ownKeys(Se(e))),Ne(n,t,Reflect.ownKeys(Se(t)));const r=ae(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Fe(e,r)}function Kn(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(At(t,n)):void 0,a={};return Ne(a,t,Reflect.ownKeys(Se(t)),e&&((l,c)=>s&&!s.has(c)?l:new e({type:"optional",innerType:l}))),Fe(t,ae(t._zod.def,{shape:a,checks:[]}))}function ru(e,t,n){const r=n?new Set(At(t,n)):void 0,i={};return Ne(i,t,Reflect.ownKeys(Se(t)),(o,u)=>r&&!r.has(u)?o:new e({type:"nonoptional",innerType:o})),Fe(t,ae(t._zod.def,{shape:i}))}function ze(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 iu(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 Re(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function tt(e){return typeof e=="string"?e:e?.message}function Qn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const i=r.maximum??r.length??r.size;i>=0&&t.push([i,n])}return t}function tn(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ae(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:tt(e.inst?._zod.def?.error?.(e))??tt(o?.(e))??tt(t?.error?.(e))??tt(n.customError?.(e))??tt(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 ou=/[\uD800-\uDBFF]/;function bn(e){const t=e.length;if(!ou.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 yn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function uu(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 lt(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function su(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):au(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 _n(e,t,n){return Pe(e,t,n,!1)}function oi(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 au(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 lu(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let Mt,Ce=!1;const cu={configurable:!0,get(){Ce=!0}};function L(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&Mt!==e._zod){Mt=void 0;return}Mt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,cu);const i=Ce;Ce=!1;try{const o=n(this);return Ce?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),Ce=Ce||i,o}catch(o){throw delete this[t],Ce=Ce||i,o}},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i})}})}function fu(e,t,n,r){const i=lu(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 hu="~constantCatch";function pu(e){const t=()=>e;return t[hu]=!0,t}var Gn;const Bt={value:void 0,enumerable:!1};let Yn="captureStackTrace"in Error?Error:null;function du(e){const t=Yn;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Yn=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function w(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{Bt.value=new o(h);try{Object.defineProperty(p,"_zod",Bt)}finally{Bt.value=void 0}}if(p._zod.traits.add(e),t(p,h),s){const x=Object.getPrototypeOf(p),v=p._zod.constr.prototype;let k=x;for(;k&&k!==v;)k=Object.getPrototypeOf(k);const O=k??x;s.has(O)||(s.add(O),su(O,u))}const d=f.prototype;for(const x in d)Object.prototype.hasOwnProperty.call(d,x)&&(x in p||(p[x]=d[x].bind(p)))}const l=r?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:e});function f(p){const h=r?.Parent?du(c):this;a(h,p);const d=h._zod.deferred;if(d){for(const v of d)v();h._zod.deferred=void 0}const x=globalThis.__zod_globalConfig?.postProcessor;return x&&x(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 Le extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ui extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Gn=globalThis).__zod_globalConfig??(Gn.__zod_globalConfig={});const ke=globalThis.__zod_globalConfig;function ye(e){return e&&Object.assign(ke,e),ke}function mu(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,en,2)),e.message}function gu(e){this._zod.message=e}const ku={get:mu,set:gu,enumerable:!0,configurable:!0},Ut={value:void 0,enumerable:!1},Xn=new WeakSet([Object.prototype,Error.prototype]),bu=(e,t)=>{e.name="$ZodError",Ut.value=t,Object.defineProperty(e,"issues",Ut),Ut.value=void 0,Object.defineProperty(e,"message",ku);const n=Object.getPrototypeOf(e);Xn.has(n)||(Xn.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})}}))},yu=w("$ZodError",bu);function _u(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 wu(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?_u(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xu(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 Pt(e,t){return{callee:t?.callee??e,Err:t?.Err}}const wn=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 Le;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(l=>Ae(l,u,ye())));throw ei(a,o?.callee??t),a}return s.value};return t},xn=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=>Ae(l,u,ye())));throw ei(a,o?.callee??t),a}return s.value};return t},vn=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 Le;return o.issues.length?si(e,o.issues,i):{success:!0,data:o.value}};function si(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(i=>Ae(i,n,ye()))),t=void 0,n=void 0),r},set error(i){r=i,t=void 0,n=void 0}}}const zn=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?si(e,o.issues,i):{success:!0,data:o.value}},vu=Symbol.for("zod.compile.invalid"),zu=Symbol.for("zod.compile.fallback"),Su=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==vu)return!0;if(r.definite===!0&&n===void 0)return!1}return Iu(e,t,n)});function Iu(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[zu]=!0,o=i({value:t,issues:[]},r)):o=e._zod.run({value:t,issues:[]},r),o instanceof Promise)throw new Le;return o.issues.length===0}const Ou=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},Eu=e=>{const t=wn(e),n=(r,i,o,u)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return t(r,i,s,Pt(n,u))};return n},Tu=e=>{const t=wn(e),n=(r,i,o,u)=>t(r,i,o,Pt(n,u));return n},Cu=e=>{const t=xn(e),n=async(r,i,o,u)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(r,i,s,Pt(n,u))};return n},Au=e=>{const t=xn(e),n=async(r,i,o,u)=>await t(r,i,o,Pt(n,u));return n},Pu=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return vn(e)(t,n,i)},$u=e=>(t,n,r)=>vn(e)(t,n,r),Fu=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return zn(e)(t,n,i)},Zu=e=>async(t,n,r)=>zn(e)(t,n,r),Du=/^[cC][0-9a-z]{6,}$/,Ru=/^[0-9a-z]+$/,Lu=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Nu=/^[0-9a-vA-V]{20}$/,ju=/^[A-Za-z0-9]{27}$/,Mu=/^[a-zA-Z0-9_-]{21}$/;function Bu(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Uu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vu=/^([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})$/,er=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)$/,qu=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ju="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Hu(){return new RegExp(Ju,"u")}const Wu=/^(?:(?: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])$/,Ku=/^(([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])$/,Gu=/^(([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])$/,Yu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xu=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,es=/^https?$/,ts=/^\+[1-9]\d{6,14}$/,ai="(?:(?:\\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 ns(e){return new RegExp(`^${e}$`)}const rs=ns(ai);function nn(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 is(e){return new RegExp(`^${nn(e)}$`)}function os(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${nn({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${nn({precision:e.precision})}`:n;return new RegExp(`^${ai}T(?:${r})$`)}const us=/^[\s\S]{0,}$/,ss=/^-?\d+$/,Sn=/^-?\d+(?:\.\d+)?$/,as=/^(?:true|false)$/i,ls=/^[^A-Z]*$/,cs=/^[^a-z]*$/,ne=w("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),In=e=>{const t=e.value;return!Bo(t)&&t.length!==void 0},wt={number:"number",bigint:"bigint",object:"date"},li=w("$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})}}),ci=w("$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})}}),fs=w("$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):Uo(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})}}),hs=w("$ZodCheckNumberFormat",(e,t)=>{ne.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=ri[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})}}),ps=w("$ZodCheckMaxLength",(e,t)=>{var n;ne.init(e,t),(n=e._zod.def).when??(n.when=In),e._zod.check=r=>{const i=r.value,o=i.length;if((typeof i=="string"&&o>t.maximum?bn(i):o)<=t.maximum)return;const s=yn(i);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ds=w("$ZodCheckMinLength",(e,t)=>{var n;ne.init(e,t),(n=e._zod.def).when??(n.when=In),e._zod.check=r=>{const i=r.value,o=i.length;if((typeof i=="string"&&o>=t.minimum&&o<t.minimum*2?bn(i):o)>=t.minimum)return;const s=yn(i);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ms=w("$ZodCheckLengthEquals",(e,t)=>{var n;ne.init(e,t),(n=e._zod.def).when??(n.when=In),e._zod.check=r=>{const i=r.value,o=i.length,u=typeof i=="string"&&o>=t.length&&o<=t.length*2?bn(i):o;if(u===t.length)return;const s=yn(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=w("$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=()=>{})}),gs=w("$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})}}),ks=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ls),$t.init(e,t)}),bs=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cs),$t.init(e,t)}),ys=w("$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})}}),_s=w("$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})}}),ws=w("$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 tr(e,t,n){e.issues.length&&t.issues.push(...Re(n,e.issues))}const xs=w("$ZodCheckProperties",(e,t)=>{ne.init(e,t),_n(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=>tr(l,r,u)))):tr(a,r,u)}if(o)return Promise.all(o).then(()=>{})}}),vs=w("$ZodCheckOverwrite",(e,t)=>{ne.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class zs{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 Ss={major:4,minor:6,patch:7},V=w("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ss;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=ze(s),f;for(const p of a){if(p._zod.def.when){if(iu(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 Le;if(f||d instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await d,s.issues.length!==h&&(tn(s.issues,h,e),c||(c=ze(s,h)))});else{if(s.issues.length===h)continue;tn(s.issues,h,e),c||(c=ze(s,h))}}return f?f.then(()=>s):s},u=(s,a,l)=>{if(ze(s))return s.aborted=!0,s;const c=o(a,i,l);if(c instanceof Promise){if(l.async===!1)throw new Le;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 Le;return l.then(c=>o(c,i,a))}return o(l,i,a)}}},{get"~standard"(){return _n(this,"~standard",hi(this))},set"~standard"(e){Pe(this,"~standard",e)}}),fi=(e,t)=>e.issues.length?{issues:e.issues.map(n=>Ae(n,t,ye()))}:{value:e.value};async function Is(e,t){const n={async:!0};return fi(await e._zod.run({value:t,issues:[]},n),n)}function hi(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return fi(r,n)}catch{}return Is(e,t)},vendor:"zod",version:1}}const On=w("$ZodString",(e,t)=>{V.init(e,t),e._zod.pattern=t.pattern??us,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}}),J=w("$ZodStringFormat",(e,t)=>{$t.init(e,t),On.init(e,t)}),Os=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Vu),J.init(e,t)}),Es=w("$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=er(r))}else t.pattern??(t.pattern=er());J.init(e,t)}),Ts=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qu),J.init(e,t)}),pi=1,xt=2;function di(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Cs(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?di(e)||xt:As(e,t)}function As(e,t){if(!t.normalize&&t.protocol?.source===es.source&&!/^https?:\/\//i.test(e))return pi;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 Ps=/[\t\n\r]/g;function nr(e){return e.replace(Ps,"")}function $s(e,t){return t.lastIndex=0,t.test(e.hostname)}function Fs(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Zs=w("$ZodURL",(e,t)=>{J.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=Cs(r,t);if(i===pi){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=nr(r);return}t.hostname&&!$s(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&&!Fs(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:nr(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Ds=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Hu()),J.init(e,t)}),Rs=w("$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?Mu:Bu(t.length)),J.init(e,t)}),Ls=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Du),J.init(e,t)}),Ns=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ru),J.init(e,t)}),js=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Lu),J.init(e,t)}),Ms=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Nu),J.init(e,t)}),Bs=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ju),J.init(e,t)}),Us=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=os(t)),J.init(e,t)}),Vs=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=rs),J.init(e,t)}),qs=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=is(t)),J.init(e,t)}),Js=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Uu),J.init(e,t)}),Hs=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Wu),J.init(e,t)}),Ws=/^[0-9a-fA-F:.]+$/;function mi(e){return Ws.test(e)?di(`http://[${e}]`):!1}const Ks=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ku),J.init(e,t),e._zod.check=n=>{mi(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),Qs=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Qu),J.init(e,t)});function Gs(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:mi(n)}const Ys=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Gu),J.init(e,t),e._zod.check=n=>{Gs(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function gi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ki=/^[0-9a-zA-Z+/]*={0,2}$/,Xs=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ki),J.init(e,t),e._zod.check=n=>{gi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),En=/^[A-Za-z0-9_-]*$/;function ea(e){if(!En.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return gi(n)}const ta=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=En),J.init(e,t),e._zod.check=n=>{ea(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),na=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ts),J.init(e,t)});function ra(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 ia=w("$ZodJWT",(e,t)=>{J.init(e,t),e._zod.check=n=>{ra(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),bi=w("$ZodNumber",(e,t)=>{V.init(e,t),e._zod.pattern=Sn,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}}),oa=w("$ZodNumberFormat",(e,t)=>{hs.init(e,t),bi.init(e,t)}),ua=w("$ZodBoolean",(e,t)=>{V.init(e,t),e._zod.pattern=as,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}}),sa=w("$ZodAny",(e,t)=>{V.init(e,t),e._zod.parse=n=>n}),aa=w("$ZodUnknown",(e,t)=>{V.init(e,t),e._zod.parse=n=>n}),la=w("$ZodNever",(e,t)=>{V.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function ca(e,t){const n=Qn(e._zod.def.checks);if(!n.length)return;const r=Math.min(...n.map(o=>o[0])),i=e._zod.parse;e._zod.parse=(o,u)=>{const s=t(o.value);if(s>r&&!u?.skipChecks&&u?.direction!=="backward"){for(const[a,l]of Qn(e._zod.def.checks))if(s>a&&l._zod.def.when(o)){const c=o.issues.length;return l._zod.check(o),o.issues[c].continue=!1,tn(o.issues,c,e),o}}return i(o,u)}}const fa=e=>Array.isArray(e)?e.length:-1;function rr(e,t,n){e.issues.length&&t.issues.push(...Re(n,e.issues)),t.value[n]=e.value}const ha=w("$ZodArray",(e,t)=>{V.init(e,t);const n=ke.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=>rr(f,r,a)));else if(rr(c,r,a),s&&c.issues.length!==0&&ze(c))break}return u.length?Promise.all(u).then(()=>r):r},ca(e,fa)});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(...Re(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 pa=[];function yi(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:pa,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 _i(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(ze(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 x=l.run({value:t[d],issues:[]},r);x instanceof Promise?e.push(x.then(v=>vt(v,n,d,t,f,p))):vt(x,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 da=w("$ZodObject",(e,t)=>{V.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(()=>yi(t));L(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)||Ie(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=at,u=t.catchall;let s;const a=ke.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 x=l.issues.length;for(const v of s.allKeys){if(d&&l.issues.length!==x){if(ze(l,x))break;x=l.issues.length}if(v==="__proto__")continue;const k=h[v],O=k._zod.optin,z=k._zod.optout,$=k._zod.run({value:f[v],issues:[]},c);$ instanceof Promise?p.push($.then(E=>vt(E,l,v,f,O,z))):vt($,l,v,f,O,z)}return u?_i(p,f,l,c,i.value,e,d===!0):p.length?Promise.all(p).then(()=>l):l}}),ma=w("$ZodObjectJIT",(e,t)=>{da.init(e,t);const n=e._zod.parse,r=Ct(()=>yi(t)),i=ke.memoizer,o=h=>{const d=r.value,x=d.symbolKeys,v=new zs(["payload","ctx"],{shape:h,inst:e,memo:i,syms:x}),k=E=>`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`,O=(E,y)=>`
6
+ let ${E}_ab = false;
7
+ for (let i = 0; i < ${E}.issues.length; i++) {
8
+ const iss = ${E}.issues[i];
9
+ iss.path = iss.path ? [${y}, ...iss.path] : [${y}];
10
+ payload.issues.push(iss);
11
+ if (iss.continue !== true) ${E}_ab = true;
12
+ }
13
+ if (${E}_ab && ctx && ctx.abortEarly) {
14
+ payload.value = newResult;
15
+ return payload;
16
+ }`;v.write("const input = payload.value;");const z=Object.create(null);let $=0;for(const E of d.allKeys)z[E]=`key_${$++}`;v.write(i?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const E of d.allKeys){if(E==="__proto__")continue;const y=z[E],C=typeof E=="symbol"?`syms[${x.indexOf(E)}]`:Jo(E),R=`${C} in input`,H=h[E],b=H?._zod?.optin,I=b!==void 0,A=H?._zod?.optout==="optional";if(v.write(`const ${y} = ${k(C)};`),I&&A){const M=b==="optional"?`${y}_present`:`${y}.value !== undefined || ${y}_present`;v.write(`
17
+ const ${y}_present = ${R};
18
+ if (!${y}.issues.length || ${y}_present) {
19
+ if (${y}.issues.length) {${O(y,C)}
20
+ }
21
+
22
+ if (${M}) {
23
+ newResult[${C}] = ${y}.value;
24
+ }
25
+ }
26
+
27
+ `)}else I?(v.write(`
28
+ if (${y}.issues.length) {${O(y,C)}
29
+ }
30
+ `),b==="defaulted"?v.write(`newResult[${C}] = ${y}.value;`):v.write(`
31
+ if (${y}.value !== undefined || ${R}) {
32
+ newResult[${C}] = ${y}.value;
33
+ }
34
+ `)):v.write(`
35
+ const ${y}_present = ${R};
36
+ if (${y}.issues.length) {${O(y,C)}
37
+ }
38
+ if (!${y}_present && !${y}.issues.length) {
39
+ payload.issues.push({
40
+ code: "invalid_type",
41
+ expected: "nonoptional",
42
+ input: undefined,
43
+ path: [${C}]
44
+ });
45
+ if (ctx && ctx.abortEarly) {
46
+ payload.value = newResult;
47
+ return payload;
48
+ }
49
+ }
50
+
51
+ if (${y}_present) {
52
+ newResult[${C}] = ${y}.value;
53
+ }
54
+
55
+ `)}return v.write("payload.value = newResult;"),v.write("return payload;"),v.compile()};let u;const s=at,a=!ke.jitless,c=a&&Wo.value,f=t.catchall;let p;e._zod.parse=(h,d)=>{p??(p=r.value);const x=h.value;return s(x)?a&&c&&d?.async===!1&&d.jitless!==!0?(u||(u=o(t.shape)),h=u(h,d),f?_i([],x,h,d,p,e,d?.abortEarly===!0):h):n(h,d):(h.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),h)}});function ir(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=>!ze(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=>Ae(u,r,ye())))}),t)}const wi=w("$ZodUnion",(e,t)=>{V.init(e,t),L(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),L(e,"optout",r=>r.def.options.some(i=>i._zod.optout==="optional")?"optional":void 0),L(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)))}),L(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=>gn(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=>ir(s,r,e,i)):ir(u,r,e,i)}});function ga(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 ka=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,wi.init(e,t);const n=e._zod.parse;L(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)||Ie(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=kn(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(()=>ga(t));e._zod.parse=(i,o)=>{const u=i.value;if(!at(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)}}),ba=w("$ZodIntersection",(e,t)=>{V.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])=>or(n,a,l)):or(n,o,u)}});function rn(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=rn(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=rn(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 or(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=rn(t.value,n.value);if(!a.valid){if(ze(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`)}return e.value=a.data,e}const ya=w("$ZodRecord",(e,t)=>{V.init(e,t);const n=ke.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=>Ae(d,i,ye())),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(...Re(c,d.issues)),r.value[p]=d.value})):(h.issues.length&&r.issues.push(...Re(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"&&Sn.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=>Ae(d,i,ye())),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(...Re(l,d.issues)),r.value[p]=d.value})):(h.issues.length&&r.issues.push(...Re(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}}),_a=w("$ZodEnum",(e,t)=>{V.init(e,t);const n=Xt(t.entries),r=new Set(n);e._zod.values=r,L(e,"pattern",i=>{const o=Xt(i.def.entries).filter(u=>Ko.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}}),wa=w("$ZodLiteral",(e,t)=>{V.init(e,t);const n=new Set(t.values);e._zod.values=n,L(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}}),xa=w("$ZodTransform",(e,t)=>{V.init(e,t),e._zod.optin="optional",ke.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ui(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 Le;return n.value=i,n}});function ur(e,t){return e.value=t.issues.length?void 0:t.value,e}const xi=w("$ZodOptional",(e,t)=>{V.init(e,t),L(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",L(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),L(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${gn(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=>ur(n,o)):ur(n,i)}return t.innerType._zod.run(n,r)}}),va=w("$ZodExactOptional",(e,t)=>{xi.init(e,t),L(e,"values",n=>n.def.innerType._zod.values),L(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),za=w("$ZodNullable",(e,t)=>{V.init(e,t),L(e,"optin",n=>n.def.innerType._zod.optin),L(e,"optout",n=>n.def.innerType._zod.optout),L(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${gn(r.source)}|null)$`):void 0}),L(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)}),Sa=w("$ZodDefault",(e,t)=>{V.init(e,t),e._zod.optin="defaulted",L(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=>sr(o,t)):sr(i,t)}});function sr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Ia=w("$ZodPrefault",(e,t)=>{V.init(e,t),e._zod.optin="defaulted",L(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))}),Oa=w("$ZodNonOptional",(e,t)=>{V.init(e,t),L(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=>ar(o,e)):ar(i,e)}});function ar(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 lr(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(i=>Ae(i,r,ye()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Ea=w("$ZodCatch",(e,t)=>{V.init(e,t),L(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),L(e,"optout",n=>n.def.innerType._zod.optout),L(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=>lr(n,o,t,r)):lr(n,i,t,r)}}),Ta=w("$ZodPipe",(e,t)=>{V.init(e,t),L(e,"values",n=>n.def.in._zod.values),L(e,"optin",n=>n.def.in._zod.optin),L(e,"optout",n=>n.def.out._zod.optout),L(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 Ca=w("$ZodReadonly",(e,t)=>{V.init(e,t),L(e,"propValues",n=>n.def.innerType._zod.propValues),L(e,"values",n=>n.def.innerType._zod.values),L(e,"optin",n=>n.def.innerType?._zod?.optin),L(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(cr):cr(i)}});function cr(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Aa=w("$ZodLazy",(e,t)=>{V.init(e,t),Vo(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),L(e,"pattern",n=>n.innerType?._zod?.pattern),L(e,"propValues",n=>n.innerType?._zod?.propValues),L(e,"optin",n=>n.innerType?._zod?.optin??void 0),L(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Pa=w("$ZodCustom",(e,t)=>{ne.init(e,t),V.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=>fr(o,n,r,e));fr(i,n,r,e)}});function fr(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(lt(i))}}class $a extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const on="~memo",hr=[];function vi(e){return e!==null&&typeof e=="object"}function Vt(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const zi=new WeakMap,rt=0,kt=1,ot=2;function bt(e,t,n){const r=zi.get(e);if(r!==void 0)return r?ot:rt;if(t.has(e))return ot;t.add(e);let i=rt;const o=c=>{if(i!==ot&&c?._zod){const f=bt(c,t);f>i&&(i=f)}},u=(c,f)=>{let p=rt;for(const h of Reflect.ownKeys(c)){const d=Object.getOwnPropertyDescriptor(c,h);if(!d.enumerable)continue;const x=d.get?kt:d.value?._zod?bt(d.value,t):rt;x>p&&(p=x)}return p},s=c=>{c>i&&(i=c)},a=e._zod.def;switch(a.type){case"object":{const c=kn(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),Fa(e,i)}function Fa(e,t){return t!==kt&&zi.set(e,t===ot),t}function Za(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let ht;const pt=[],Da={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"&&La(o,i.value))throw new $a;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===rt)return e._zod.parse=u,e._zod.run===s&&(e._zod.run=u),u(a,l);k===ot||r?n=!0:r=!0}const c=a.value;if(!vi(c))return u(a,l);let f=l[on];f||(f={buckets:new WeakMap,backEdges:void 0},l[on]=f);let p;i===l?p=o:(p=Za(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(...Vt(h.issues)):(a.memo=!0,f.backEdges??(f.backEdges=new WeakSet),f.backEdges.add(h.value)),a;ht=p;const d=pt.length,x=u(a,l);ht=void 0;const v=pt.length>d?pt.pop():void 0;return x instanceof Promise?x.then(k=>(v&&(v.issues=k.issues.length?Vt(k.issues):hr),k)):(v&&(v.issues=x.issues.length?Vt(x.issues):hr),x)};e._zod.parse=s,e._zod.run===u&&(e._zod.run=s)})}};function Ra(){return Da}function La(e,t){const n=e[on]?.backEdges;return n!==void 0&&vi(t)&&n.has(t)}const Na=()=>{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=uu(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 ${ni(o.values[0])}`:`Invalid option: expected one of ${Hn(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":""}: ${Hn(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 ja(){return{localeError:Na()}}var pr;class Ma{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 Ba(){return new Ma}(pr=globalThis).__zod_globalRegistry??(pr.__zod_globalRegistry=Ba());const it=globalThis.__zod_globalRegistry;function Si(e){return e.checks&&(e.checks=[...e.checks]),e}function Ua(e,t){return new e(Si({type:"string",...T(t)}))}function Va(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}function qa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}function Ja(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}function Ha(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}function Wa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}function Ka(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}function Ii(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}function Qa(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}function Ga(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}function Ya(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}function Xa(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}function el(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}function tl(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}function nl(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}function rl(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}function il(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}function ol(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}function ul(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}function sl(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}function al(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}function ll(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}function cl(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}function fl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}function hl(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}function pl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}function dl(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}function ml(e,t){return new e(Si({type:"number",checks:[],...T(t)}))}function gl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}function kl(e,t){return new e({type:"boolean",...T(t)})}function bl(e){return new e({type:"any"})}function yl(e){return new e({type:"unknown"})}function _l(e,t){return new e({type:"never",...T(t)})}function dr(e,t){return new li({check:"less_than",...T(t),value:e,inclusive:!1})}function qt(e,t){return new li({check:"less_than",...T(t),value:e,inclusive:!0})}function mr(e,t){return new ci({check:"greater_than",...T(t),value:e,inclusive:!1})}function Jt(e,t){return new ci({check:"greater_than",...T(t),value:e,inclusive:!0})}function gr(e,t){return new fs({check:"multiple_of",...T(t),value:e})}function Oi(e,t){return new ps({check:"max_length",...T(t),maximum:e})}function zt(e,t){return new ds({check:"min_length",...T(t),minimum:e})}function Ei(e,t){return new ms({check:"length_equals",...T(t),length:e})}function wl(e,t){return new gs({check:"string_format",format:"regex",...T(t),pattern:e})}function xl(e){return new ks({check:"string_format",format:"lowercase",...T(e)})}function vl(e){return new bs({check:"string_format",format:"uppercase",...T(e)})}function zl(e,t){return new ys({check:"string_format",format:"includes",...T(t),includes:e})}function Sl(e,t){return new _s({check:"string_format",format:"starts_with",...T(t),prefix:e})}function Il(e,t){return new ws({check:"string_format",format:"ends_with",...T(t),suffix:e})}function Ol(e,t){return new xs({check:"properties",shape:e,...T(t)})}function Qe(e){return new vs({check:"overwrite",tx:e})}function El(e){return Qe(t=>t.normalize(e))}function Tl(){return Qe(e=>e.trim())}function Cl(){return Qe(e=>e.toLowerCase())}function Al(){return Qe(e=>e.toUpperCase())}function Pl(){return Qe(e=>Ho(e))}function $l(e,t,n){return new e({type:"array",element:t,...T(n)})}function Fl(e,t,n){const r=T(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function Zl(e,t,n){return new e({type:"custom",check:"custom",fn:t,...T(n)})}function Dl(e,t){const n=Rl(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(lt(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(lt(o))}},e(r.value,r)),t);return n}function Rl(e,t){const n=new ne({check:"custom",...T(t)});return n._zod.check=e,n}function ut(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Ie(e,r,n[r]);return e}function Ti(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??it,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 $e(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&&ut(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 kr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ci(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}/${kr(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+kr(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 Ai(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;Ai(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 Pi=new Set(["type","properties","required","additionalProperties"]),br=["oneOf","anyOf"];function yr(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function un(e){const t=[];for(const o of e){if(typeof o!="object"||o.type!=="object")return null;for(const u in o)if(!Pi.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]??yr(l);c!=null&&(s.some(f=>JSON.stringify(f)===JSON.stringify(c))||s.push(c))}const a=s.length===1?s[0]:un(s)??{allOf:s};Ie(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=yr(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 Ll(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const i of Pi)if(i in e)return;const n=t.filter(i=>br.some(o=>Array.isArray(i[o])));let r=null;if(!n.length)r=un(t);else{const i=n[0],o=br.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=>un([...u,a]));if(s.some(a=>!a))return;r={[o]:s}}r&&(delete e.allOf,ut(e,r))}function $i(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)):ut(l,d),ut(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())Ai(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)??[])Ll(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)}ut(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,Ie(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 Nl=(e,t={})=>n=>{const r=Ti({...n,processors:t});return Q(e,r),Ci(r,e),$i(r,e)},St=(e,t,n={})=>r=>{const{libraryOptions:i,target:o}=r??{},u=Ti({...i??{},target:o,io:t,processors:n});return Q(e,u),Ci(u,e),$i(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)},_r=(e,t)=>{We(e,"minimum",t),Ke(e,"maximum",t)},Fi=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Zi=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Di=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},Ri=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},wr=(e,t)=>We(e,"minimum",t.minimum),xr=(e,t)=>Ke(e,"maximum",t.maximum),vr=e=>(t,n)=>{Ri(t,n.format);const[r,i]=e[n.format];We(t,"minimum",r),Ke(t,"maximum",i)},jl={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)=>Fi(e,t.value),number_format:vr(ri),bigint_format:vr(Go),min_length:wr,max_length:xr,length_equals:(e,t)=>_r(e,t.length),min_size:wr,max_size:xr,size_equals:(e,t)=>_r(e,t.size),string_format:(e,t)=>{Ri(e,t.format),t.pattern&&Zi(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)=>Di(e,t.mime)};function de(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const o of r)jl[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&&Fi(t,i.multipleOf),i.format!==void 0&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&Di(t,i.mime);for(const o of i.patterns??[])Zi(t,o);return t}const Ml={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Bl=new Map([[ki,Yu],[En,Xu]]),Li=e=>Bl.get(e)??e,Ul=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:o,maximum:u,format:s,patterns:a,contentEncoding:l,laxFormat:c}=de(e);if(typeof o=="number"&&(i.minLength=o),typeof u=="number"&&(i.maxLength=u),s&&(i.format=Ml[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(Li);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}))])}},Vl=(e,t,n,r)=>{const i=n,{minimum:o,maximum:u,multipleOf:s,exclusiveMaximum:a,exclusiveMinimum:l,isInt:c}=de(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)):$e(e,t,i,r,`A multipleOf divisor of ${k} cannot be represented in JSON Schema`);const[x,...v]=d;x!==void 0&&(i.multipleOf=x),v.length&&(i.allOf=[...i.allOf??[],...v.map(k=>({multipleOf:k}))])}},ql=(e,t,n,r)=>{n.type="boolean"},Jl=(e,t,n,r)=>{n.not={}},Hl=(e,t,n,r)=>{},Wl=(e,t,n,r)=>{},Kl=(e,t,n,r)=>{const i=e._zod.def,o=Xt(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},Ql=(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($e(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof u=="bigint"){if($e(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},Gl=(e,t,n,r)=>{$e(e,t,n,r,"Custom types cannot be represented in JSON Schema")},Yl=(e,t,n,r)=>{$e(e,t,n,r,"Transforms cannot be represented in JSON Schema")},Xl=(e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:u,maximum:s}=de(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 ec=(e,t,n,r)=>{const i=n,o=e._zod.def,u=o.shape;if(Object.getOwnPropertySymbols(u).length&&$e(e,t,i,r,"Symbol keys cannot be represented in JSON Schema"))return;i.type="object",i.properties={};for(const l in u)Ie(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)},tc=(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},nc=(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 sn(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 x=sn(e,d,n);return x===d?t:x}for(const d of["anyOf","oneOf"]){const x=t[d];if(!Array.isArray(x))continue;const v=x.map(k=>sn(e,k,n));v.some((k,O)=>k!==x[O])&&(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")?Sn:ss).source)),h}const an=new WeakMap;function rc(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 an.get(e)??[]){const i=e.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;const u=sn(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 ic=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object";const u=o.keyType,s=de(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)Ie(i.patternProperties,Li(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=an.get(t);c||(c=[],an.set(t,c),t.deferred.push(()=>rc(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))}},oc=(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"}]},uc=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},Tn=Symbol();function Ni(e,t,n,r,i){let o=!1;const u=JSON.stringify(e,(s,a)=>typeof a!="bigint"?a:(o=!0,null));return o?($e(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),Tn):JSON.parse(u)}const sc=(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=Ni(i.defaultValue,e,t,n,r);u!==Tn&&(n.default=u)},ac=(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=Ni(i.defaultValue,e,t,n,r);u!==Tn&&(n._prefault=u)},lc=(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{$e(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=u},cc=(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},fc=(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},ji=(e,t,n,r)=>{const i=e._zod.def;Q(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},hc=(e,t,n,r)=>{const i=e._zod.innerType;Q(i,t,r);const o=t.seen.get(e);o.ref=i},zr=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 pc=(e,t)=>{yu.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);zr.has(n)||(zr.add(n),dt(n,"format",r=>i=>xu(r,i)),dt(n,"flatten",r=>i=>wu(r,i)),dt(n,"addIssue",r=>i=>{r.issues.push(i),r.message=JSON.stringify(r.issues,en,2)}),dt(n,"addIssues",r=>i=>{r.issues.push(...i),r.message=JSON.stringify(r.issues,en,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},ce=w("ZodError",pc,void 0,{Parent:Error}),dc=wn(ce),mc=xn(ce),gc=vn(ce),kc=zn(ce),bc=Eu(ce),yc=Tu(ce),_c=Cu(ce),wc=Au(ce),xc=Pu(ce),vc=$u(ce),zc=Fu(ce),Sc=Zu(ce);function Ic(){ke.localeError||ye(ja())}function Ft(){ke.memoizer||ye({memoizer:Ra()})}const q=w("ZodType",(e,t)=>(Ic(),V.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(ae(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 Fe(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Of(e,t))},superRefine(e,t){return this.check(Ef(e,t))},overwrite(e){return this.check(Qe(e))},optional(){return Er(this)},exactOptional(){return df(this)},nullable(){return Tr(this)},nullish(){return Er(Tr(this))},nonoptional(e){return _f(this,e)},array(){return rf(this)},or(e){return uf([this,e])},and(e){return lf(this,e)},transform(e){return Cr(this,pf(e))},default(e){return kf(this,e)},prefault(e){return yf(this,e)},catch(e){return xf(this,e)},pipe(e){return Cr(this,e)},readonly(){return Sf(this)},describe(e){const t=this.clone();return it.add(t,{description:e}),t},meta(...e){if(e.length===0)return it.get(this);const t=this.clone();return it.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 _n(this,"~standard",{...hi(this),jsonSchema:{input:St(this,"input"),output:St(this,"output")}})},set"~standard"(e){Pe(this,"~standard",e)},parse:function e(t,n){return dc(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await mc(this,t,n,{callee:e})},safeParse(e,t){return gc(this,e,t)},async safeParseAsync(e,t){return kc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Pe(this,"spa",e)},validate(e,t){return Su(this,e,t)},validateAsync(e,t){return Ou(this,e,t)},encode:function e(t,n){return bc(this,t,n,{callee:e})},decode:function e(t,n){return yc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await _c(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await wc(this,t,n,{callee:e})},safeEncode(e,t){return xc(this,e,t)},safeDecode(e,t){return vc(this,e,t)},async safeEncodeAsync(e,t){return zc(this,e,t)},async safeDecodeAsync(e,t){return Sc(this,e,t)},toJSONSchema(e){return Nl(this,{})(e)},get description(){return it.get(this)?.description},get _def(){return this._zod.def}}),Mi=w("_ZodString",(e,t)=>{On.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ul(e,n,r)},oi({format:e=>de(e).format??null,minLength:e=>de(e).minimum??null,maxLength:e=>de(e).maximum??null},{regex(...e){return this.check(wl(...e))},includes(...e){return this.check(zl(...e))},startsWith(...e){return this.check(Sl(...e))},endsWith(...e){return this.check(Il(...e))},min(...e){return this.check(zt(...e))},max(...e){return this.check(Oi(...e))},length(...e){return this.check(Ei(...e))},nonempty(...e){return this.check(zt(1,...e))},lowercase(e){return this.check(xl(e))},uppercase(e){return this.check(vl(e))},trim(){return this.check(Tl())},normalize(...e){return this.check(El(...e))},toLowerCase(){return this.check(Cl())},toUpperCase(){return this.check(Al())},slugify(){return this.check(Pl())}})),Oc=w("ZodString",(e,t)=>{On.init(e,t),Mi.init(e,t)},{email(e){return this.check(Va($c,e))},url(e){return this.check(Ii(Bi,e))},jwt(e){return this.check(cl(Kc,e))},emoji(e){return this.check(Qa(Zc,e))},guid(e){return this.check(qa(Fc,e))},uuid(e){return this.check(Ja(mt,e))},uuidv4(e){return this.check(Ha(mt,e))},uuidv6(e){return this.check(Wa(mt,e))},uuidv7(e){return this.check(Ka(mt,e))},nanoid(e){return this.check(Ga(Dc,e))},cuid(e){return this.check(Ya(Rc,e))},cuid2(e){return this.check(Xa(Lc,e))},ulid(e){return this.check(el(Nc,e))},base64(e){return this.check(sl(Jc,e))},base64url(e){return this.check(al(Hc,e))},xid(e){return this.check(tl(jc,e))},ksuid(e){return this.check(nl(Mc,e))},ipv4(e){return this.check(rl(Bc,e))},ipv6(e){return this.check(il(Uc,e))},cidrv4(e){return this.check(ol(Vc,e))},cidrv6(e){return this.check(ul(qc,e))},e164(e){return this.check(ll(Wc,e))},datetime(e){return this.check(fl(Tc,e))},date(e){return this.check(hl(Cc,e))},time(e){return this.check(pl(Ac,e))},duration(e){return this.check(dl(Pc,e))}});function Ec(e){return Ua(Oc,e)}const K=w("ZodStringFormat",(e,t)=>{J.init(e,t),Mi.init(e,t)}),Tc=w("ZodISODateTime",(e,t)=>{Us.init(e,t),K.init(e,t)}),Cc=w("ZodISODate",(e,t)=>{Vs.init(e,t),K.init(e,t)}),Ac=w("ZodISOTime",(e,t)=>{qs.init(e,t),K.init(e,t)}),Pc=w("ZodISODuration",(e,t)=>{Js.init(e,t),K.init(e,t)}),$c=w("ZodEmail",(e,t)=>{Ts.init(e,t),K.init(e,t)}),Fc=w("ZodGUID",(e,t)=>{Os.init(e,t),K.init(e,t)}),mt=w("ZodUUID",(e,t)=>{Es.init(e,t),K.init(e,t)}),Bi=w("ZodURL",(e,t)=>{Zs.init(e,t),K.init(e,t)});function qm(e){return Ii(Bi,e)}const Zc=w("ZodEmoji",(e,t)=>{Ds.init(e,t),K.init(e,t)}),Dc=w("ZodNanoID",(e,t)=>{Rs.init(e,t),K.init(e,t)}),Rc=w("ZodCUID",(e,t)=>{Ls.init(e,t),K.init(e,t)}),Lc=w("ZodCUID2",(e,t)=>{Ns.init(e,t),K.init(e,t)}),Nc=w("ZodULID",(e,t)=>{js.init(e,t),K.init(e,t)}),jc=w("ZodXID",(e,t)=>{Ms.init(e,t),K.init(e,t)}),Mc=w("ZodKSUID",(e,t)=>{Bs.init(e,t),K.init(e,t)}),Bc=w("ZodIPv4",(e,t)=>{Hs.init(e,t),K.init(e,t)}),Uc=w("ZodIPv6",(e,t)=>{Ks.init(e,t),K.init(e,t)}),Vc=w("ZodCIDRv4",(e,t)=>{Qs.init(e,t),K.init(e,t)}),qc=w("ZodCIDRv6",(e,t)=>{Ys.init(e,t),K.init(e,t)}),Jc=w("ZodBase64",(e,t)=>{Xs.init(e,t),K.init(e,t)}),Hc=w("ZodBase64URL",(e,t)=>{ta.init(e,t),K.init(e,t)}),Wc=w("ZodE164",(e,t)=>{na.init(e,t),K.init(e,t)}),Kc=w("ZodJWT",(e,t)=>{ia.init(e,t),K.init(e,t)}),Ui=w("ZodNumber",(e,t)=>{bi.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Vl(e,n,r,i),e.isFinite=!0},oi({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=de(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=de(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=de(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>de(e).format??null},{gt(e,t){return this.check(mr(e,t))},gte(e,t){return this.check(Jt(e,t))},min(e,t){return this.check(Jt(e,t))},lt(e,t){return this.check(dr(e,t))},lte(e,t){return this.check(qt(e,t))},max(e,t){return this.check(qt(e,t))},int(e){return this.check(Sr(e))},safe(e){return this.check(Sr(e))},positive(e){return this.check(mr(0,e))},nonnegative(e){return this.check(Jt(0,e))},negative(e){return this.check(dr(0,e))},nonpositive(e){return this.check(qt(0,e))},multipleOf(e,t){return this.check(gr(e,t))},step(e,t){return this.check(gr(e,t))},finite(){return this}}));function Jm(e){return ml(Ui,e)}const Qc=w("ZodNumberFormat",(e,t)=>{oa.init(e,t),Ui.init(e,t)});function Sr(e){return gl(Qc,e)}const Gc=w("ZodBoolean",(e,t)=>{ua.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ql(e,n,r)});function Hm(e){return kl(Gc,e)}const Yc=w("ZodAny",(e,t)=>{sa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Hl()});function Wm(){return bl(Yc)}const Xc=w("ZodUnknown",(e,t)=>{aa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Wl()});function Ir(){return yl(Xc)}const ef=w("ZodNever",(e,t)=>{la.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Jl(e,n,r)});function tf(e){return _l(ef,e)}const nf=w("ZodArray",(e,t)=>{Ft(),ha.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Xl(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(Oi(e,t))},length(e,t){return this.check(Ei(e,t))},unwrap(){return this.element}});function rf(e,t){return $l(nf,e,t)}const of=w("ZodObject",(e,t)=>{Ft(),ma.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ec(e,n,r,i),fu(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return cf(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(ae(this._zod.def,{catchall:e}))},passthrough(){return this.clone(ae(this._zod.def,{catchall:Ir()}))},loose(){return this.clone(ae(this._zod.def,{catchall:Ir()}))},strict(){return this.clone(ae(this._zod.def,{catchall:tf()}))},strip(){return this.clone(ae(this._zod.def,{catchall:void 0}))},extend(e){return eu(this,e)},safeExtend(e){return tu(this,e)},merge(e){return nu(this,e)},pick(e){return Yo(this,e)},omit(e){return Xo(this,e)},partial(...e){return Kn(qi,this,e[0])},exactPartial(...e){return Kn(Ji,this,e[0],"exactPartial")},required(...e){return ru(Hi,this,e[0])}});function Km(e,t){const n={type:"object",shape:e??{},...T(t)};return new of(n)}const Vi=w("ZodUnion",(e,t)=>{wi.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tc(e,n,r,i),e.options=t.options});function uf(e,t){return new Vi({type:"union",options:e,...T(t)})}const sf=w("ZodDiscriminatedUnion",(e,t)=>{Vi.init(e,t),ka.init(e,t)});function Qm(e,t,n){return new sf({type:"union",options:t,discriminator:e,...T(n)})}const af=w("ZodIntersection",(e,t)=>{ba.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nc(e,n,r,i)});function lf(e,t){return new af({type:"intersection",left:e,right:t})}const Or=w("ZodRecord",(e,t)=>{Ft(),ya.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ic(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Gm(e,t,n){return!t||!t._zod?new Or({type:"record",keyType:Ec(),valueType:e,...T(t)}):new Or({type:"record",keyType:e,valueType:t,...T(n)})}const ln=w("ZodEnum",(e,t)=>{_a.init(e,t),q.init(e,t),e._zod.processJSONSchema=(r,i,o)=>Kl(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 ln({...t,checks:[],...T(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 ln({...t,checks:[],...T(i),entries:o})}});function cf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ln({type:"enum",entries:n,...T(t)})}const ff=w("ZodLiteral",(e,t)=>{wa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ql(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 Ym(e,t){return new ff({type:"literal",values:Array.isArray(e)?e:[e],...T(t)})}const hf=w("ZodTransform",(e,t)=>{Ft(),xa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Yl(e,n,r,i),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ui(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(lt(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(lt(u))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function pf(e){return new hf({type:"transform",transform:e})}const qi=w("ZodOptional",(e,t)=>{xi.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ji(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Er(e){return new qi({type:"optional",innerType:e})}const Ji=w("ZodExactOptional",(e,t)=>{va.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ji(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function df(e){return new Ji({type:"optional",innerType:e})}const mf=w("ZodNullable",(e,t)=>{za.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>oc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Tr(e){return new mf({type:"nullable",innerType:e})}const gf=w("ZodDefault",(e,t)=>{Sa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kf(e,t){return new gf({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ti(t)}})}const bf=w("ZodPrefault",(e,t)=>{Ia.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ac(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function yf(e,t){return new bf({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ti(t)}})}const Hi=w("ZodNonOptional",(e,t)=>{Oa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>uc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function _f(e,t){return new Hi({type:"nonoptional",innerType:e,...T(t)})}const wf=w("ZodCatch",(e,t)=>{Ea.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>lc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xf(e,t){return new wf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:pu(t)})}const vf=w("ZodPipe",(e,t)=>{Ta.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>cc(e,n,r,i),e.in=t.in,e.out=t.out});function Cr(e,t){return new vf({type:"pipe",in:e,out:t})}const zf=w("ZodReadonly",(e,t)=>{Ca.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fc(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Sf(e){return new zf({type:"readonly",innerType:e})}const If=w("ZodLazy",(e,t)=>{Aa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hc(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function Xm(e){return new If({type:"lazy",getter:e})}const Cn=w("ZodCustom",(e,t)=>{Pa.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Gl(e,n,r,i)});function eg(e,t){return Fl(Cn,e??(()=>!0),t)}function Of(e,t={}){return Zl(Cn,e,t)}function Ef(e,t){return Dl(e,t)}const Tf=w("ZodInstanceOf",(e,t)=>{Cn.init(e,t)},{properties(e,t){return this.check(Ol(e,t))}});function tg(e,t={}){const n=new Tf({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...T(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 Cf={};function An(e,t){const n=Cf,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wi(e,r,i)}function Wi(e,t,n){if(Af(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 Ar(e.children,t,n)}return Array.isArray(e)?Ar(e,t,n):""}function Ar(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wi(e[i],t,n);return r.join("")}function Af(e){return!!(e&&typeof e=="object")}const Pr=document.createElement("i");function Pn(e){const t="&"+e+";";Pr.innerHTML=t;const n=Pr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function me(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 le(e,t){return e.length>0?(me(e,e.length,0,t),e):t}const $r={}.hasOwnProperty;function Ki(e){const t={};let n=-1;for(;++n<e.length;)Pf(t,e[n]);return t}function Pf(e,t){let n;for(n in t){const i=($r.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){$r.call(i,u)||(i[u]=[]);const s=o[u];$f(i[u],Array.isArray(s)?s:s?[s]:[])}}}function $f(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);me(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 ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const te=Ze(/[A-Za-z]/),ue=Ze(/[\dA-Za-z]/),Ff=Ze(/[#-'*+\--9=?A-Z^-~]/);function Ot(e){return e!==null&&(e<32||e===127)}const cn=Ze(/\d/),Zf=Ze(/[\dA-Fa-f]/),Df=Ze(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function B(e){return e!==null&&(e<0||e===32)}function D(e){return e===-2||e===-1||e===32}const Zt=Ze(/\p{P}|\p{S}/u),je=Ze(/\s/);function Ze(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function j(e,t,n,r){const i=r?r-1:1/0;let o=0;return u;function u(a){return D(a)?(e.enter(n),s(a)):t(a)}function s(a){return D(a)&&o++<i?(e.consume(a),s):(e.exit(n),t(a))}}function Gi(e,t,n,r,i,o){let u=0;return s;function s(c){return D(c)?(e.enter(r),a(c)):l(c)}function a(c){return D(c)&&u<o?(e.consume(c),u++,a):(e.exit(r),l(c))}function l(c){return u>=i?t(c):n(c)}}const Rf={tokenize:Lf};function Lf(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"),j(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){Fr(this,t,n,r,!1)}addBefore(t,n,r){Fr(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 Fr(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 Nf={tokenize:jf},Zr={tokenize:Mf};function jf(e){const t=this,n=[];let r=0,i,o,u;return s;function s(z){if(r<n.length){const $=n[r];return t.containerState=$[1],e.attempt($[0].continuation,a,l)(z)}return l(z)}function a(z){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&O();const $=t.events.length;let E=$,y;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){y=t.events[E][1].end;break}k(r);let C=$;for(;C<t.events.length;)t.events[C][1].end={...y},C++;const R=new Et;return R.add(E+1,0,t.events.slice($)),R.add($,C-$,[]),R.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(Zr,c,f)(z)}function c(z){return i&&O(),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(Zr,h,d)(z)}function h(z){return r++,n.push([t.currentConstruct,t.containerState]),p(z)}function d(z){if(z===null){i&&O(),k(0),e.consume(z);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(z)}function x(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),x)}function v(z,$){const E=t.sliceStream(z);if($&&E.push(null),z.previous=o,o&&(o.next=z),o=z,i.defineSkip(z.start),i.write(E),t.parser.lazy[z.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<u&&(!i.events[y][1].end||i.events[y][1].end.offset>u))return;const C=t.events.length;let R=C,H,b;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(H){b=t.events[R][1].end;break}H=!0}for(k(r),y=C;y<t.events.length;)t.events[y][1].end={...b},y++;const I=new Et;I.add(R+1,0,t.events.slice(C)),I.add(C,y-C,[]),I.consume(t.events)}}function k(z){let $=n.length;for(;$-- >z;){const E=n[$];t.containerState=E[1],E[0].exit.call(t,e)}n.length=z}function O(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mf(e,t,n){return j(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||B(e)||je(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 fn={name:"attention",resolveAll:Bf,tokenize:Uf};function Bf(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};Dr(u,-o),Dr(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=le(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=le(r,[["enter",f,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=le(r,Dt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=le(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=le(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),me(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 Uf(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 Dr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vf={name:"autolink",tokenize:qf};function qf(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||ue(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||ue(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):Ff(h)?(e.consume(h),l):n(h)}function c(h){return ue(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||ue(h))&&r++<63){const d=h===45?p:f;return e.consume(h),d}return n(h)}}const ct={partial:!0,tokenize:Jf};function Jf(e,t,n){return r;function r(o){return D(o)?j(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||P(o)?t(o):n(o)}}const Yi={continuation:{tokenize:Wf},exit:Kf,name:"blockQuote",tokenize:Hf};function Hf(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 D(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Wf(e,t,n){const r=this;return i;function i(u){return D(u)?j(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(Yi,t,n)(u)}}function Kf(e){e.exit("blockQuote")}const Xi={name:"characterEscape",tokenize:Qf};function Qf(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 Df(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const eo={name:"characterReference",tokenize:Gf};function Gf(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=ue,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=Zf,c):(e.enter("characterReferenceValue"),o=7,u=cn,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return u===ue&&!Pn(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 hn={partial:!0,tokenize:Yf};function Yf(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 Rr={concrete:!0,name:"codeFenced",tokenize:Xf};function Xf(e,t,n){const r=this,i={partial:!0,tokenize:E};let o=0,u=0,s;return a;function a(y){return l(y)}function l(y){const C=r.events[r.events.length-1];return o=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(y)}function c(y){return y===s?(u++,e.consume(y),c):u<3?n(y):(e.exit("codeFencedFenceSequence"),D(y)?j(e,f,"whitespace")(y):f(y))}function f(y){return y===null||P(y)?(e.exit("codeFencedFence"),r.interrupt?t(y):e.check(hn,x,$)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||P(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(y)):D(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),j(e,h,"whitespace")(y)):y===96&&y===s?n(y):(e.consume(y),p)}function h(y){return y===null||P(y)?f(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===null||P(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(y)):y===96&&y===s?n(y):(e.consume(y),d)}function x(y){return e.attempt(i,$,v)(y)}function v(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),k}function k(y){return o>0&&D(y)?j(e,O,"linePrefix",o+1)(y):O(y)}function O(y){return y===null||P(y)?e.check(hn,x,$)(y):(e.enter("codeFlowValue"),z(y))}function z(y){return y===null||P(y)?(e.exit("codeFlowValue"),O(y)):(e.consume(y),z)}function $(y){return e.exit("codeFenced"),t(y)}function E(y,C,R){let H=0;return b;function b(N){return y.enter("lineEnding"),y.consume(N),y.exit("lineEnding"),I}function I(N){return y.enter("codeFencedFence"),D(N)?j(y,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):A(N)}function A(N){return N===s?(y.enter("codeFencedFenceSequence"),M(N)):R(N)}function M(N){return N===s?(H++,y.consume(N),M):H>=u?(y.exit("codeFencedFenceSequence"),D(N)?j(y,W,"whitespace")(N):W(N)):R(N)}function W(N){return N===null||P(N)?(y.exit("codeFencedFence"),C(N)):R(N)}}}const Ht={name:"codeIndented",tokenize:th},eh={partial:!0,tokenize:nh};function th(e,t,n){return r;function r(s){return e.enter("codeIndented"),Gi(e,i,n,"linePrefix",4,4)(s)}function i(s){return s===null?u(s):P(s)?e.attempt(eh,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 nh(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):Gi(e,t,o,"linePrefix",4,4)(u)}function o(u){return P(u)?i(u):n(u)}}const rh={name:"codeText",previous:oh,resolve:ih,tokenize:uh};function ih(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 oh(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uh(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 sh{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&&nt(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),nt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),nt(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);nt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);nt(this.left,n.reverse())}}}function nt(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 to(e){const t={};let n=-1,r,i,o,u,s,a,l;const c=new sh(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,ah(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 me(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function ah(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,x=0;const v=[x];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&&(x=p+1,v.push(x),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]),O=o.pop();a.push([O,O+k.length-1]),e.splice(O,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 lh={resolve:fh,tokenize:hh},ch={partial:!0,tokenize:ph};function fh(e){return to(e),e}function hh(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(ch,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 ph(e,t,n){const r=this;return i;function i(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),j(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 no(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"}),x(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 x(k){return!c&&(k===null||k===41||B(k))?(e.exit("chunkString"),e.exit(s),e.exit(u),e.exit(r),t(k)):c<l&&k===40?(e.consume(k),c++,x):k===41?(e.consume(k),c--,x):k===null||k===32||k===40||Ot(k)?n(k):(e.consume(k),k===92?v:x)}function v(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function ro(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=!D(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,f):f(h)}}function io(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"),j(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 st(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):D(i)?j(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const dh={name:"definition",tokenize:gh},mh={partial:!0,tokenize:kh};function gh(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),u(h)}function u(h){return ro.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=ge(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 B(h)?st(e,l)(h):l(h)}function l(h){return no(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(mh,f,f)(h)}function f(h){return D(h)?j(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 kh(e,t,n){return r;function r(s){return B(s)?st(e,i)(s):n(s)}function i(s){return io(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return D(s)?j(e,u,"whitespace")(s):u(s)}function u(s){return s===null||P(s)?t(s):n(s)}}const bh={name:"hardBreakEscape",tokenize:yh};function yh(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 _h={name:"headingAtx",resolve:wh,tokenize:xh};function wh(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"};me(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function xh(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||B(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)):D(c)?j(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||B(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const vh=["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"],Lr=["pre","script","style","textarea"],zh={concrete:!0,name:"htmlFlow",resolveTo:Ih,tokenize:Oh},Sh={partial:!0,tokenize:Eh};function Ih(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 Oh(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,x):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 pe="CDATA[";return g===pe.charCodeAt(s++)?(e.consume(g),s===pe.length?r.interrupt?t:A:d):n(g)}function x(g){return te(g)?(e.consume(g),u=String.fromCharCode(g),v):n(g)}function v(g){if(g===null||g===47||g===62||B(g)){const pe=g===47,Me=u.toLowerCase();return!pe&&!o&&Lr.includes(Me)?(i=1,r.interrupt?t(g):A(g)):vh.includes(u.toLowerCase())?(i=6,pe?(e.consume(g),k):r.interrupt?t(g):A(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?O(g):z(g))}return g===45||ue(g)?(e.consume(g),u+=String.fromCharCode(g),v):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:A):n(g)}function O(g){return D(g)?(e.consume(g),O):b(g)}function z(g){return g===47?(e.consume(g),b):g===58||g===95||te(g)?(e.consume(g),$):D(g)?(e.consume(g),z):b(g)}function $(g){return g===45||g===46||g===58||g===95||ue(g)?(e.consume(g),$):E(g)}function E(g){return g===61?(e.consume(g),y):D(g)?(e.consume(g),E):z(g)}function y(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),a=g,C):D(g)?(e.consume(g),y):R(g)}function C(g){return g===a?(e.consume(g),a=null,H):g===null||P(g)?n(g):(e.consume(g),C)}function R(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||B(g)?E(g):(e.consume(g),R)}function H(g){return g===47||g===62||D(g)?z(g):n(g)}function b(g){return g===62?(e.consume(g),I):n(g)}function I(g){return g===null||P(g)?A(g):D(g)?(e.consume(g),I):n(g)}function A(g){return g===45&&i===2?(e.consume(g),X):g===60&&i===1?(e.consume(g),Y):g===62&&i===4?(e.consume(g),he):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),we):P(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Sh,xe,M)(g)):g===null||P(g)?(e.exit("htmlFlowData"),M(g)):(e.consume(g),A)}function M(g){return e.check(hn,W,xe)(g)}function W(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||P(g)?M(g):(e.enter("htmlFlowData"),A(g))}function X(g){return g===45?(e.consume(g),m):A(g)}function Y(g){return g===47?(e.consume(g),u="",fe):A(g)}function fe(g){if(g===62){const pe=u.toLowerCase();return Lr.includes(pe)?(e.consume(g),he):A(g)}return te(g)&&u.length<8?(e.consume(g),u+=String.fromCharCode(g),fe):A(g)}function we(g){return g===93?(e.consume(g),m):A(g)}function m(g){return g===62?(e.consume(g),he):g===45&&i===2?(e.consume(g),m):A(g)}function he(g){return g===null||P(g)?(e.exit("htmlFlowData"),xe(g)):(e.consume(g),he)}function xe(g){return e.exit("htmlFlow"),t(g)}}function Eh(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ct,t,n)}}const Th={name:"htmlText",tokenize:Ch};function Ch(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),E):m===63?(e.consume(m),z):te(m)?(e.consume(m),R):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),O):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,Y(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 he="CDATA[";return m===he.charCodeAt(o++)?(e.consume(m),o===he.length?x:d):n(m)}function x(m){return m===null?n(m):m===93?(e.consume(m),v):P(m)?(u=x,Y(m)):(e.consume(m),x)}function v(m){return m===93?(e.consume(m),k):x(m)}function k(m){return m===62?X(m):m===93?(e.consume(m),k):x(m)}function O(m){return m===null||m===62?X(m):P(m)?(u=O,Y(m)):(e.consume(m),O)}function z(m){return m===null?n(m):m===63?(e.consume(m),$):P(m)?(u=z,Y(m)):(e.consume(m),z)}function $(m){return m===62?X(m):z(m)}function E(m){return te(m)?(e.consume(m),y):n(m)}function y(m){return m===45||ue(m)?(e.consume(m),y):C(m)}function C(m){return P(m)?(u=C,Y(m)):D(m)?(e.consume(m),C):X(m)}function R(m){return m===45||ue(m)?(e.consume(m),R):m===47||m===62||B(m)?H(m):n(m)}function H(m){return m===47?(e.consume(m),X):m===58||m===95||te(m)?(e.consume(m),b):P(m)?(u=H,Y(m)):D(m)?(e.consume(m),H):X(m)}function b(m){return m===45||m===46||m===58||m===95||ue(m)?(e.consume(m),b):I(m)}function I(m){return m===61?(e.consume(m),A):P(m)?(u=I,Y(m)):D(m)?(e.consume(m),I):H(m)}function A(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,M):P(m)?(u=A,Y(m)):D(m)?(e.consume(m),A):(e.consume(m),W)}function M(m){return m===i?(e.consume(m),i=void 0,N):m===null?n(m):P(m)?(u=M,Y(m)):(e.consume(m),M)}function W(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||B(m)?H(m):(e.consume(m),W)}function N(m){return m===47||m===62||B(m)?H(m):n(m)}function X(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Y(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),fe}function fe(m){return D(m)?j(e,we,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):we(m)}function we(m){return e.enter("htmlTextData"),u(m)}}const $n={name:"labelEnd",resolveAll:Fh,resolveTo:Zh,tokenize:Dh},Ah={tokenize:Rh},Ph={tokenize:Lh},$h={tokenize:Nh};function Fh(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&&me(e,0,e.length,n),e}function Zh(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=le(u,e.slice(i+1,i+r+3)),u=le(u,[["enter",l,t]]),u=le(u,Dt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),u=le(u,[["exit",l,t],e[o-2],e[o-1],["exit",a,t]]),u=le(u,e.slice(o+1)),u=le(u,[["exit",s,t]]),me(e,i,e.length,u),e}function Dh(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(ge(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(Ah,c,u?c:f)(p):p===91?e.attempt(Ph,c,u?l:f)(p):u?c(p):f(p)}function l(p){return e.attempt($h,c,f)(p)}function c(p){return i.pop(),t(p)}function f(p){return o._balanced=!0,n(p)}}function Rh(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 B(f)?st(e,o)(f):o(f)}function o(f){return f===41?c(f):no(e,u,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function u(f){return B(f)?st(e,a)(f):c(f)}function s(f){return n(f)}function a(f){return f===34||f===39||f===40?io(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return B(f)?st(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 Lh(e,t,n){const r=this;return i;function i(s){return ro.call(r,e,o,u,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function u(s){return n(s)}}function Nh(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 jh={name:"labelStartImage",resolveAll:$n.resolveAll,tokenize:Mh};function Mh(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 Bh={name:"labelStartLink",resolveAll:$n.resolveAll,tokenize:Uh};function Uh(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 Wt={name:"lineEnding",tokenize:Vh};function Vh(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),j(e,t,"linePrefix")}}const yt={name:"thematicBreak",tokenize:qh};function qh(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"),D(l)?j(e,s,"whitespace")(l):s(l))}}const oe={continuation:{tokenize:Kh},exit:Gh,name:"list",tokenize:Wh},Jh={partial:!0,tokenize:Yh},Hh={partial:!0,tokenize:Qh};function Wh(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:cn(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 cn(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(ct,r.interrupt?n:c,e.attempt(Jh,p,f))}function c(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function f(h){return D(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 Kh(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ct,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,j(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!D(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(Hh,t,u)(s))}function u(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,j(e,e.attempt(oe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Qh(e,t,n){const r=this;return j(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 Gh(e){e.exit(this.containerState.type)}function Yh(e,t,n){const r=this;return j(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!D(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Nr={name:"setextUnderline",resolveTo:Xh,tokenize:ep};function Xh(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 ep(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"),D(l)?j(e,a,"lineSuffix")(l):a(l))}function a(l){return l===null||P(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const tp={tokenize:np};function np(e){const t=this,n=e.attempt(ct,r,e.attempt(this.parser.constructs.flowInitial,i,j(e,e.attempt(this.parser.constructs.flow,i,e.attempt(lh,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 rp={resolveAll:uo()},ip=oo("string"),op=oo("text");function oo(e){return{resolveAll:uo(e==="text"?up: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 uo(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 up(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 sp={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:Yi},ap={91:dh},lp={[-2]:Ht,[-1]:Ht,32:Ht},cp={35:_h,42:yt,45:[Nr,yt],60:zh,61:Nr,95:yt,96:Rr,126:Rr},fp={38:eo,92:Xi},hp={[-5]:Wt,[-4]:Wt,[-3]:Wt,33:jh,38:eo,42:fn,60:[Vf,Th],91:Bh,92:[bh,Xi],93:$n,95:fn,96:rh},pp={null:[fn,rp]},dp={null:[42,95]},mp={null:[]},gp=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dp,contentInitial:ap,disable:mp,document:sp,flow:cp,flowInitial:lp,insideSpan:pp,string:fp,text:hp},Symbol.toStringTag,{value:"Module"}));function kp(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:C(E),check:C(y),consume:O,enter:z,exit:$,interrupt:C(y,{interrupt:!0})},l={code:null,containerState:{},defineSkip:x,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(I){return u=le(u,I),v(),u[u.length-1]!==null?[]:(R(t,0),l.events=Dt(o,l.events,l),l.events)}function p(I,A){return yp(h(I),A)}function h(I){return bp(u,I)}function d(){const{_bufferIndex:I,_index:A,line:M,column:W,offset:N}=r;return{_bufferIndex:I,_index:A,line:M,column:W,offset:N}}function x(I){i[I.line]=I.column,b()}function v(){for(;r._index<u.length;){const I=u[r._index];if(typeof I=="string"){const A=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<I.length;)k(I.charCodeAt(r._bufferIndex))}else k(I)}}function k(I){c=c(I)}function O(I){P(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,b()):I!==-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=I}function z(I,A){const M=A||{};return M.type=I,M.start=d(),l.events.push(["enter",M,l]),s.push(M),M}function $(I){const A=s.pop();return A.end=d(),l.events.push(["exit",A,l]),A}function E(I,A){R(I,A.from)}function y(I,A){A.restore()}function C(I,A){return M;function M(W,N,X){let Y,fe,we,m;return Array.isArray(W)?xe(W):"tokenize"in W?xe([W]):he(W);function he(G){return Ge;function Ge(Ee){const Be=Ee!==null&&G[Ee],Ue=Ee!==null&&G.null,Nt=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return xe(Nt)(Ee)}}function xe(G){return Y=G,fe=0,G.length===0?X:g(G[fe])}function g(G){return Ge;function Ge(Ee){return m=H(),we=G,G.partial||(l.currentConstruct=G),G.name&&l.parser.constructs.disable.null.includes(G.name)?Me():G.tokenize.call(A?Object.assign(Object.create(l),A):l,a,pe,Me)(Ee)}}function pe(G){return I(we,m),N}function Me(G){return m.restore(),++fe<Y.length?g(Y[fe]):X}}}function R(I,A){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&me(l.events,A,l.events.length-A,I.resolve(l.events.slice(A),l)),I.resolveTo&&(l.events=I.resolveTo(l.events,l))}function H(){const I=d(),A=l.previous,M=l.currentConstruct,W=l.events.length,N=Array.from(s);return{from:W,restore:X};function X(){r=I,l.previous=A,l.currentConstruct=M,l.events.length=W,s=N,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function bp(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 yp(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 _p(e){const r={constructs:Ki([gp,...(e||{}).extensions||[]]),content:i(Rf),defined:[],document:i(Nf),flow:i(tp),lazy:{},string:i(ip),text:i(op)};return r;function i(o){return u;function u(s){return kp(r,o,s)}}}function wp(e){for(;!to(e););return e}const jr=/[\0\t\n\r]/g;function xp(){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;){jr.lastIndex=l;const c=jr.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 vp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zp(e){return e.replace(vp,Sp)}function Sp(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 Pn(n)||e}function _t(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mr(e.position):"start"in e||"end"in e?Mr(e):"line"in e||"column"in e?pn(e):""}function pn(e){return Br(e&&e.line)+":"+Br(e&&e.column)}function Mr(e){return pn(e&&e.start)+"-"+pn(e&&e.end)}function Br(e){return e&&typeof e=="number"?e:1}const so={}.hasOwnProperty;function rg(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ip(n)(wp(_p(n).document().write(xp()(e,t,!0))))}function Ip(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Vn),autolinkProtocol:b,autolinkEmail:b,atxHeading:u(Mn),blockQuote:u(Nt),characterEscape:b,characterReference:b,codeFenced:u(jn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(jn,s),codeText:u(Po,s),codeTextData:b,data:b,codeFlowValue:b,definition:u($o),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(Fo),hardBreakEscape:u(Bn),hardBreakTrailing:u(Bn),htmlFlow:u(Un,s),htmlFlowData:b,htmlText:u(Un,s),htmlTextData:b,image:u(Zo),label:s,link:u(Vn),listItem:u(Do),listItemValue:h,listOrdered:u(qn,p),listUnordered:u(qn),paragraph:u(Ro),reference:pe,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(Mn),strong:u(Lo),thematicBreak:u(jo)},exit:{atxHeading:l(),atxHeadingSequence:y,autolink:l(),autolinkEmail:Ue,autolinkProtocol:Be,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:Ge,characterReference:Ee,codeFenced:l(k),codeFencedFence:v,codeFencedFenceInfo:d,codeFencedFenceMeta:x,codeFlowValue:I,codeIndented:l(O),codeText:l(X),codeTextData:I,data:I,definition:l(),definitionDestinationString:E,definitionLabelString:z,definitionTitleString:$,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(W),htmlFlowData:I,htmlText:l(N),htmlTextData:I,image:l(fe),label:m,labelText:we,lineEnding:A,link:l(Y),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Me,resourceDestinationString:he,resourceTitleString:xe,resource:g,setextHeading:l(H),setextHeadingLineSequence:R,setextHeadingText:C,strong:l(),thematicBreak:l()}};ao(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_){let S={type:"root",children:[],position:void 0};const F={stack:[S],tokenStack:[],config:t,enter:a,exit:c,buffer:s,resume:f,data:n},Z=[],re=[];let U=-1;for(;++U<_.length;)if(re.push(_[U]),_[U][1].type==="listOrdered"||_[U][1].type==="listUnordered")if(_[U][0]==="enter")Z.push(re.length-1);else{const ie=Z.pop();o(re,ie)}for(_=re,U=-1;++U<_.length;){const ie=t[_[U][0]];_[U][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...F,sliceSerialize:_[U][2].sliceSerialize},_[U][1]),so.call(ie,_[U][1].type)&&ie[_[U][1].type].call({...F,sliceSerialize:_[U][2].sliceSerialize},_[U][1]),_[U][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...F,sliceSerialize:_[U][2].sliceSerialize},_[U][1])}if(F.tokenStack.length>0){const ie=F.tokenStack[F.tokenStack.length-1];(ie[1]||Ur).call(F,void 0,ie[0])}for(S.position={start:Te(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:Te(_.length>0?_[_.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(_,S,F){let Z=-1;for(;++Z<_.length;)_[Z].call(S,F)}function o(_,S){const F=_.length-1;let Z=S-1,re=-1,U=!1,ie,be,Ye,Xe;const et=[];for(;++Z<=F;){const se=_[Z];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?re++:re--,Xe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(ie&&!Xe&&!re&&!Ye&&(Ye=Z),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=void 0}if(!re&&se[0]==="enter"&&se[1].type==="listItemPrefix"||re===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(ie){let Ve=Z;for(be=void 0;Ve--;){const ve=_[Ve];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;be&&(_[be][1].type="lineEndingBlank",U=!0),ve[1].type="lineEnding",be=Ve}else if(!(ve[1].type==="linePrefix"||ve[1].type==="blockQuotePrefix"||ve[1].type==="blockQuotePrefixWhitespace"||ve[1].type==="blockQuoteMarker"||ve[1].type==="listItemIndent"))break}Ye&&(!be||Ye<be)&&(ie._spread=!0),ie.end=Object.assign({},be?_[be][1].start:se[1].end),et.push({at:be||Z,event:["exit",ie,se[2]]})}if(se[1].type==="listItemPrefix"){const Ve={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};ie=Ve,et.push({at:Z,event:["enter",Ve,se[2]]}),Ye=void 0,Xe=!0}}}const Jn=_.splice(S);let jt=0;for(Z=-1;++Z<Jn.length;){for(;jt<et.length&&et[jt].at===S+Z;)_.push(et[jt++].event);_.push(Jn[Z])}_[S][1]._spread=U}function u(_,S){return F;function F(Z){a.call(this,_(Z),Z),S&&S.call(this,Z)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(_,S,F){this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([S,F||void 0]),_.position={start:Te(S.start),end:void 0}}function l(_){return S;function S(F){_&&_.call(this,F),c.call(this,F)}}function c(_,S){const F=this.stack.pop(),Z=this.tokenStack.pop();if(!Z)throw new Error("Cannot close `"+_.type+"` ("+_t({start:_.start,end:_.end})+"): it’s not open");Z[0].type!==_.type&&(S?S.call(this,_,Z[0]):(Z[1]||Ur).call(this,_,Z[0])),F.position.end=Te(_.end)}function f(){return An(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(_){if(this.data.expectingFirstListItemValue){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(_),10),this.data.expectingFirstListItemValue=void 0}}function d(){const _=this.resume(),S=this.stack[this.stack.length-1];S.lang=_}function x(){const _=this.resume(),S=this.stack[this.stack.length-1];S.meta=_}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const _=this.resume(),S=this.stack[this.stack.length-1];S.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const _=this.resume(),S=this.stack[this.stack.length-1];S.value=_.replace(/(\r?\n|\r)$/g,"")}function z(_){const S=this.resume(),F=this.stack[this.stack.length-1];F.label=S,F.identifier=ge(this.sliceSerialize(_)).toLowerCase()}function $(){const _=this.resume(),S=this.stack[this.stack.length-1];S.title=_}function E(){const _=this.resume(),S=this.stack[this.stack.length-1];S.url=_}function y(_){const S=this.stack[this.stack.length-1];if(!S.depth){const F=this.sliceSerialize(_).length;S.depth=F}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(_){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function b(_){const F=this.stack[this.stack.length-1].children;let Z=F[F.length-1];(!Z||Z.type!=="text")&&(Z=No(),Z.position={start:Te(_.start),end:void 0},F.push(Z)),this.stack.push(Z)}function I(_){const S=this.stack.pop();S.value+=this.sliceSerialize(_),S.position.end=Te(_.end)}function A(_){const S=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=S.children[S.children.length-1];F.position.end=Te(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(S.type)&&(b.call(this,_),I.call(this,_))}function M(){this.data.atHardBreak=!0}function W(){const _=this.resume(),S=this.stack[this.stack.length-1];S.value=_}function N(){const _=this.resume(),S=this.stack[this.stack.length-1];S.value=_}function X(){const _=this.resume(),S=this.stack[this.stack.length-1];S.value=_}function Y(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=S,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function fe(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=S,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function we(_){const S=this.sliceSerialize(_),F=this.stack[this.stack.length-2];F.label=zp(S),F.identifier=ge(S).toLowerCase()}function m(){const _=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 Z=_.children;F.children=Z}else F.alt=S}function he(){const _=this.resume(),S=this.stack[this.stack.length-1];S.url=_}function xe(){const _=this.resume(),S=this.stack[this.stack.length-1];S.title=_}function g(){this.data.inReference=void 0}function pe(){this.data.referenceType="collapsed"}function Me(_){const S=this.resume(),F=this.stack[this.stack.length-1];F.label=S,F.identifier=ge(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function G(_){this.data.characterReferenceType=_.type}function Ge(_){const S=this.sliceSerialize(_),F=this.data.characterReferenceType;let Z;F?(Z=Qi(S,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=Pn(S);const re=this.stack[this.stack.length-1];re.value+=Z}function Ee(_){const S=this.stack.pop();S.position.end=Te(_.end)}function Be(_){I.call(this,_);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(_)}function Ue(_){I.call(this,_);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(_)}function Nt(){return{type:"blockquote",children:[],position:void 0}}function jn(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Po(){return{type:"inlineCode",value:"",position:void 0}}function $o(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Fo(){return{type:"emphasis",children:[],position:void 0}}function Mn(){return{type:"heading",depth:0,children:[],position:void 0}}function Bn(){return{type:"break",position:void 0}}function Un(){return{type:"html",value:"",position:void 0}}function Zo(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Vn(){return{type:"link",title:null,url:"",children:[],position:void 0}}function qn(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[],position:void 0}}function Do(_){return{type:"listItem",spread:_._spread,checked:null,children:[],position:void 0}}function Ro(){return{type:"paragraph",children:[],position:void 0}}function Lo(){return{type:"strong",children:[],position:void 0}}function No(){return{type:"text",value:"",position:void 0}}function jo(){return{type:"thematicBreak",position:void 0}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function ao(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ao(e,r):Op(e,r)}}function Op(e,t){let n;for(n in t)if(so.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"afterExit":case"beforeEnter":{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 Ur(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 Ap;if(typeof e=="function")return Lt(e);if(typeof e=="object")return Array.isArray(e)?Ep(e):Tp(e);if(typeof e=="string")return Cp(e);throw new Error("Expected function, string, or object as test")});function Ep(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 Tp(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 Cp(e){return Lt(t);function t(n){return n&&n.type===e}}function Lt(e){return t;function t(n,r,i){return!!(Pp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ap(){return!0}function Pp(e){return e!==null&&typeof e=="object"&&"type"in e}const $p=Rt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]),Vr={}.hasOwnProperty;function ig(e,t){const n=t||{};function r(i,...o){let u=r.invalid;const s=r.handlers;if(i&&Vr.call(i,e)){const a=String(i[e]);u=Vr.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 Fp(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()),Zp);return i(),u}function Zp(e,t,n){return">"+(n?"":" ")+e}function Dp(e,t){return qr(e,t.inConstruct,!0)&&!qr(e,t.notInConstruct,!1)}function qr(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 Jr(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&&Dp(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
61
+ `}function Rp(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 Lp(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 Np(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 jp(e,t,n,r){const i=Np(n),o=e.value||"";if(Lp(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(o,Mp);return f(),p}const u=n.createTracker(r),s=i.repeat(Math.max(Rp(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 Mp(e,t,n){return(n?"":" ")+e}function Fn(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 Bp(e,t,n,r){const i=Fn(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 Up(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Zn.attention=Vp;Zn.peek=qp;function Zn(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function Vp(e,t){return{construct:"emphasis",markers:Up(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function qp(e,t,n){return n.options.emphasis||"*"}function Jp(e){return"&#x"+e.toString(16).toUpperCase()+";"}const lo=[],Hp=!0,dn=!1,Wp="skip";function co(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=lo,d,x,v;if((!t||o(a,l,c[c.length-1]||void 0))&&(h=Kp(n(a,c)),h[0]===dn))return h;if("children"in a&&a.children){const k=a;if(k.children&&h[0]!==Wp)for(x=(r?k.children.length:-1)+u,v=c.concat(k);x>-1&&x<k.children.length;){const O=k.children[x];if(d=s(O,x,v)(),d[0]===dn)return d;x=typeof d[1]=="number"?d[1]:x+u}}return h}}}function Kp(e){return Array.isArray(e)?e:typeof e=="number"?[Hp,e]:e==null?lo:[e]}function Qp(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),co(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 Gp(e,t){let n=!1;return Qp(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,dn}),!!((!e.depth||e.depth<3)&&An(e)&&(t.options.setext||n))}function Yp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Gp(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=Jp(c)+l.slice(1)),l=l?u+" "+l:u,n.options.closeAtx&&(l+=" "+u),a(),s(),l}fo.peek=Xp;function fo(e){return e.value||""}function Xp(){return"<"}ho.peek=ed;function ho(e,t,n,r){const i=Fn(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 ed(){return"!"}po.peek=td;function po(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 td(){return"!"}mo.peek=nd;function mo(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 nd(){return"`"}function go(e,t){const n=An(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))}ko.peek=rd;function ko(e,t,n,r){const i=Fn(n),o=i==='"'?"Quote":"Apostrophe",u=n.createTracker(r);if(go(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 rd(e,t,n){return go(e,n)?"<":"["}bo.peek=id;function bo(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 id(){return"["}function Dn(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 od(e){const t=Dn(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 ud(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 yo(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 sd(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let u=e.ordered?ud(n):Dn(n);const s=e.ordered?u==="."?")":".":od(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),yo(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 ad(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 ld(e,t,n,r){const i=ad(n);let o=n.bulletCurrent||Dn(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 cd(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),u=n.containerPhrasing(e,r);return o(),i(),u}function fd(e,t,n,r){if(!e.children.some(function(s){return $p(s)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),u=n.containerPhrasing(e,r);return o(),u}function hd(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Rn.attention=pd;Rn.peek=dd;function Rn(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function pd(e,t){return{construct:"strong",markers:hd(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function dd(e,t,n){return n.options.strong||"*"}function md(e,t,n,r){const i=t?t.children:[],o=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function gd(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 kd(e,t,n){const r=(yo(n)+(n.options.ruleSpaces?" ":"")).repeat(gd(n));return n.options.ruleSpaces?r.slice(0,-1):r}const _o={blockquote:Fp,break:Jr,code:jp,definition:Bp,emphasis:Zn,hardBreak:Jr,heading:Yp,html:fo,image:ho,imageReference:po,inlineCode:mo,link:ko,linkReference:bo,list:sd,listItem:ld,paragraph:cd,root:fd,strong:Rn,text:md,thematicBreak:kd};function Hr(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 og(){}function ug(){}function bd(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yd(e,t,n){const i=Rt((n||{}).ignore||[]),o=_d(t);let u=-1;for(;++u<o.length;)co(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,O=[];p.lastIndex=0;let z=p.exec(l.value);for(;z;){const E=z.index,y={index:z.index,input:z.input,stack:[...c,l]};let C=h(...z,y);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1)p.lastIndex=E+1;else{if(d!==E&&$({type:"text",value:l.value.slice(d,E)}),Array.isArray(C))for(const R of C)$(R);else C&&$(C);d=E+z[0].length,k=!0}if(!p.global)break;z=p.exec(l.value)}return k?(d<l.value.length&&$({type:"text",value:l.value.slice(d)}),f.children.splice(v,1,...O)):O=[l],v+O.length;function $(E){const y=O[O.length-1];y&&y.type==="text"&&E.type==="text"?y.value+=E.value:O.push(E)}}}function _d(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([wd(i[0]),xd(i[1])])}return t}function wd(e){return typeof e=="string"?new RegExp(bd(e),"g"):e}function xd(e){return typeof e=="function"?e:function(){return e}}const Kt="phrasing",Qt=["autolink","link","image","label"];function vd(){return{transforms:[Cd],enter:{literalAutolink:Sd,literalAutolinkEmail:Gt,literalAutolinkHttp:Gt,literalAutolinkWww:Gt},exit:{literalAutolink:Td,literalAutolinkEmail:Ed,literalAutolinkHttp:Id,literalAutolinkWww:Od}}}function zd(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kt,notInConstruct:Qt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kt,notInConstruct:Qt},{character:":",before:"[ps]",after:"\\/",inConstruct:Kt,notInConstruct:Qt}]}}function Sd(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gt(e){this.config.enter.autolinkProtocol.call(this,e)}function Id(e){this.config.exit.autolinkProtocol.call(this,e)}function Od(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 Ed(e){this.config.exit.autolinkEmail.call(this,e)}function Td(e){this.exit(e)}function Cd(e){yd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ad],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Pd]],{ignore:["link","linkReference"]})}function Ad(e,t,n,r,i){let o="";if(!wo(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!$d(n)))return!1;const u=Fd(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 Pd(e,t,n,r){return!wo(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function $d(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 Fd(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=Hr(e,"(");let o=Hr(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 wo(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||je(n)||Zt(n))&&(!t||n!==47)}xo.peek=Ud;function Zd(){this.buffer()}function Dd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Rd(){this.buffer()}function Ld(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Nd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ge(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jd(e){this.exit(e)}function Md(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ge(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bd(e){this.exit(e)}function Ud(){return"["}function xo(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 Vd(){return{enter:{gfmFootnoteCallString:Zd,gfmFootnoteCall:Dd,gfmFootnoteDefinitionLabelString:Rd,gfmFootnoteDefinition:Ld},exit:{gfmFootnoteCallString:Nd,gfmFootnoteCall:jd,gfmFootnoteDefinitionLabelString:Md,gfmFootnoteDefinition:Bd}}}function qd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xo},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?vo:Jd))),l(),a}}function Jd(e,t,n){return t===0?e:vo(e,t,n)}function vo(e,t,n){return(n?"":" ")+e}const Hd=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ln.attention=Yd;Ln.peek=Xd;function Wd(){return{canContainEols:["delete"],enter:{strikethrough:Qd},exit:{strikethrough:Gd}}}function Kd(){return{handlers:{delete:Ln},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Hd}]}}function Qd(e){this.enter({type:"delete",children:[],position:void 0},e)}function Gd(e){this.exit(e)}function Ln(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 Yd(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Xd(){return"~"}function em(e){return e.length}function tm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||em,o=[],u=[],s=[],a=[];let l=0,c=-1;for(;++c<e.length;){const x=[],v=[];let k=-1;for(e[c].length>l&&(l=e[c].length);++k<e[c].length;){const O=nm(e[c][k]);if(n.alignDelimiters!==!1){const z=i(O);v[k]=z,(a[k]===void 0||z>a[k])&&(a[k]=z)}x.push(O)}u[c]=x,s[c]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)o[f]=Wr(r[f]);else{const x=Wr(r);for(;++f<l;)o[f]=x}f=-1;const p=[],h=[];for(;++f<l;){const x=o[f];let v="",k="";x===99?(v=":",k=":"):x===108?v=":":x===114&&(k=":");let O=n.alignDelimiters===!1?1:Math.max(1,a[f]-v.length-k.length);const z=v+"-".repeat(O)+k;n.alignDelimiters!==!1&&(O=v.length+O+k.length,O>a[f]&&(a[f]=O),h[f]=O),p[f]=z}u.splice(1,0,p),s.splice(1,0,h),c=-1;const d=[];for(;++c<u.length;){const x=u[c],v=s[c];f=-1;const k=[];for(;++f<l;){const O=x[f]||"";let z="",$="";if(n.alignDelimiters!==!1){const E=a[f]-(v[f]||0),y=o[f];y===114?z=" ".repeat(E):y===99?E%2?(z=" ".repeat(E/2+.5),$=" ".repeat(E/2-.5)):(z=" ".repeat(E/2),$=z):$=" ".repeat(E)}n.delimiterStart!==!1&&!f&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||f)&&k.push(" "),n.alignDelimiters!==!1&&k.push(z),k.push(O),n.alignDelimiters!==!1&&k.push($),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 nm(e){return e==null?"":String(e)}function Wr(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 rm(){return{enter:{table:im,tableData:Kr,tableHeader:Kr,tableRow:um},exit:{codeText:sm,table:om,tableData:Yt,tableHeader:Yt,tableRow:Yt}}}function im(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 om(e){this.exit(e),this.data.inTable=void 0}function um(e){this.enter({type:"tableRow",children:[]},e)}function Yt(e){this.exit(e)}function Kr(e){this.enter({type:"tableCell",children:[]},e)}function sm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,am));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function am(e,t){return t==="|"?t:e}function lm(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,x,v){return l(c(h,x,v),h.align)}function s(h,d,x,v){const k=f(h,x,v),O=l([k]);return O.slice(0,O.indexOf(`
74
+ `))}function a(h,d,x,v){const k=x.enter("tableCell"),O=x.enter("phrasing"),z=x.containerPhrasing(h,{...v,before:o,after:o});return O(),k(),z}function l(h,d){return tm(h,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function c(h,d,x){const v=h.children;let k=-1;const O=[],z=d.enter("table");for(;++k<v.length;)O[k]=f(v[k],d,x);return z(),O}function f(h,d,x){const v=h.children;let k=-1;const O=[],z=d.enter("tableRow");for(;++k<v.length;)O[k]=a(v[k],h,d,x);return z(),O}function p(h,d,x){let v=_o.inlineCode(h,d,x);return x.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function cm(){return{exit:{taskListCheckValueChecked:Qr,taskListCheckValueUnchecked:Qr,paragraph:hm}}}function fm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pm}}}function Qr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hm(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 pm(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=_o.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 sg(){return[vd(),Vd(),Wd(),rm(),cm()]}function ag(e){return{extensions:[zd(),qd(e),Kd(),lm(e),fm()]}}const dm={tokenize:_m,partial:!0},zo={tokenize:wm,partial:!0},So={tokenize:xm,partial:!0},Io={tokenize:vm,partial:!0},mm={tokenize:zm,partial:!0},Oo={name:"wwwAutolink",tokenize:bm,previous:To},Eo={name:"protocolAutolink",tokenize:ym,previous:Co},Oe={name:"emailAutolink",tokenize:km,previous:Ao},_e={};function gm(){return{text:_e}}let De=48;for(;De<123;)_e[De]=Oe,De++,De===58?De=65:De===91&&(De=97);_e[43]=Oe;_e[45]=Oe;_e[46]=Oe;_e[95]=Oe;_e[72]=[Oe,Eo];_e[104]=[Oe,Eo];_e[87]=[Oe,Oo];_e[119]=[Oe,Oo];function km(e,t,n){const r=this;let i,o;return u;function u(f){return!mn(f)||!Ao.call(r,r.previous)||Nn(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return mn(f)?(e.consume(f),s):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check(mm,c,l)(f):f===45||f===95||ue(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 bm(e,t,n){const r=this;return i;function i(u){return u!==87&&u!==119||!To.call(r,r.previous)||Nn(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dm,e.attempt(zo,e.attempt(So,o),n),n)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function ym(e,t,n){const r=this;let i="",o=!1;return u;function u(f){return(f===72||f===104)&&Co.call(r,r.previous)&&!Nn(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)||B(f)||je(f)||Zt(f)?n(f):e.attempt(zo,e.attempt(So,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function _m(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 wm(e,t,n){let r,i,o;return u;function u(l){return l===46||l===95?e.check(Io,a,s)(l):l===null||B(l)||je(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 xm(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(Io,t,o)(u):u===null||B(u)||je(u)?t(u):(e.consume(u),i)}function o(u){return u===41&&r++,e.consume(u),i}}function vm(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||B(s)||je(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||B(s)||je(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 zm(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ue(o)?n(o):t(o)}}function To(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||B(e)}function Co(e){return!te(e)}function Ao(e){return!(e===47||mn(e))}function mn(e){return e===43||e===45||e===46||e===95||ue(e)}function Nn(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 Sm={tokenize:$m,partial:!0};function Im(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Cm,continuation:{tokenize:Am},exit:Pm}},text:{91:{name:"gfmFootnoteCall",tokenize:Tm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Om,resolveTo:Em}}}}function Om(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=ge(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 Em(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 Tm(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||B(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ge(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return B(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 Cm(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||B(d))return n(d);if(d===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=ge(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return B(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),j(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function Am(e,t,n){return e.check(ct,t,e.attempt(Sm,t,n))}function Pm(e){e.exit("gfmFootnoteDefinition")}function $m(e,t,n){const r=this;return j(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 Fm(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&&me(p,p.length,0,Dt(h,u.slice(l+1,a),s)),me(p,p.length,0,[["exit",f,s],["enter",u[a][1],s],["exit",u[a][1],s],["exit",c,s]]),me(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 x=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&&!!x,v._close=!x||x===2&&!!k,s(d)}}}class Zm{constructor(){this.map=[],this.index=new Map}add(t,n,r){Dm(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 Dm(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 Rm(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 Lm(){return{flow:{null:{name:"table",tokenize:Nm,resolveAll:jm}}}}function Nm(e,t,n){const r=this;let i=0,o=0,u;return s;function s(b){let I=r.events.length-1;for(;I>-1;){const{type:W}=r.events[I][1];if(W==="lineEnding"||W==="linePrefix")I--;else break}const A=I>-1?r.events[I][1].type:null,M=A==="tableHead"||A==="tableRow"?y:a;return M===y&&r.parser.lazy[r.now().line]?n(b):M(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),l(b)}function l(b){return b===124||(u=!0,o+=1),c(b)}function c(b){return b===null?n(b):P(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):n(b):D(b)?j(e,c,"whitespace")(b):(o+=1,u&&(u=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),u=!0,c):(e.enter("data"),f(b)))}function f(b){return b===null||b===124||B(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?p:f)}function p(b){return b===92||b===124?(e.consume(b),f):f(b)}function h(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),u=!1,D(b)?j(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?v(b):b===124?(u=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),x):E(b)}function x(b){return D(b)?j(e,v,"whitespace")(b):v(b)}function v(b){return b===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),k):b===45?(o+=1,k(b)):b===null||P(b)?$(b):E(b)}function k(b){return b===45?(e.enter("tableDelimiterFiller"),O(b)):E(b)}function O(b){return b===45?(e.consume(b),O):b===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),z):(e.exit("tableDelimiterFiller"),z(b))}function z(b){return D(b)?j(e,$,"whitespace")(b):$(b)}function $(b){return b===124?d(b):b===null||P(b)?!u||i!==o?E(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):E(b)}function E(b){return n(b)}function y(b){return e.enter("tableRow"),C(b)}function C(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),C):b===null||P(b)?(e.exit("tableRow"),t(b)):D(b)?j(e,C,"whitespace")(b):(e.enter("data"),R(b))}function R(b){return b===null||b===124||B(b)?(e.exit("data"),C(b)):(e.consume(b),b===92?H:R)}function H(b){return b===92||b===124?(e.consume(b),R):R(b)}}function jm(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 Zm;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Gr(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&&Gr(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=Rm(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,x=n[3]-n[2]-1;e.add(d,x,[])}}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 Gr(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 Mm={name:"tasklistCheck",tokenize:Um};function Bm(){return{text:{91:Mm}}}function Um(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 B(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):D(a)?e.check({tokenize:Vm},t,n)(a):n(a)}}function Vm(e,t,n){return j(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function lg(e){return Ki([gm(),Im(),Fm(e),Lm(),Bm()])}export{ag as A,Ym as B,Xm as C,eg as D,Wm as E,_t as F,og as G,Qp as H,ug as I,Hr as J,Qm as K,qm as L,Pn as M,Rt as N,co as O,Rp as P,j as Q,P as R,Wp as S,tg as _,Ir as a,Hm as b,cf as c,rf as d,te as e,ue as f,vh as g,Lr as h,Lp as i,Gp as j,zp as k,Tt as l,Df as m,Jm as n,Km as o,Jp as p,Dp as q,Gm as r,Ec as s,_o as t,uf as u,$p as v,rg as w,sg as x,lg as y,ig as z};