@wirecat/drive-cli 0.71.0 → 0.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/README.md +150 -71
  2. package/contracts/wirecat.json +77 -8
  3. package/dist/bin/drive.js +2 -2
  4. package/dist/bundle/agent-23OB2NZP.js +46 -0
  5. package/dist/bundle/{all-profiles-3QJG2NAN.js → all-profiles-GXGDVNQJ.js} +67 -25
  6. package/dist/bundle/{anthropic-PSWTEU6G.js → anthropic-H5C4GQHC.js} +9 -9
  7. package/dist/bundle/{app-server-PVTA6ABR.js → app-server-EQ3UK4C7.js} +97 -79
  8. package/dist/bundle/{bun-LU5LP3JI.js → bun-DTJVSRY3.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-PYMKLBRU.js → bun-sqlite-JIFY7MAE.js} +9 -9
  10. package/dist/bundle/chunk-2Q325BBD.js +353 -0
  11. package/dist/bundle/chunk-35FIJGTT.js +52 -0
  12. package/dist/bundle/{chunk-RWDKMU74.js → chunk-3FRQ6V4T.js} +3 -3
  13. package/dist/bundle/chunk-47L262VI.js +340 -0
  14. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  15. package/dist/bundle/{chunk-YVI5SQPY.js → chunk-4HPXWYTE.js} +1 -1
  16. package/dist/bundle/{chunk-QETR5HIZ.js → chunk-4IUNYYYL.js} +4385 -2684
  17. package/dist/bundle/{chunk-I4RWW3UD.js → chunk-4JS32SRX.js} +20 -5
  18. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  19. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  20. package/dist/bundle/{chunk-3N2OFXB5.js → chunk-55FH6IEL.js} +5 -5
  21. package/dist/bundle/{chunk-6TNNT2MQ.js → chunk-5BNMWSU2.js} +483 -176
  22. package/dist/bundle/{chunk-6XFIITOG.js → chunk-5H747A76.js} +5532 -3265
  23. package/dist/bundle/{chunk-MNLL5YLM.js → chunk-5KWCO56H.js} +2 -2
  24. package/dist/bundle/{chunk-GZ2D4KXG.js → chunk-5U3NCE5R.js} +35 -12
  25. package/dist/bundle/{chunk-CJLVYIOP.js → chunk-6CCO3JCM.js} +30 -21
  26. package/dist/bundle/{chunk-26DHFMGZ.js → chunk-6ZW2ZJYC.js} +2 -2
  27. package/dist/bundle/{chunk-COJSWDNU.js → chunk-75DAHQOV.js} +3 -3
  28. package/dist/bundle/{chunk-Q7DOMFJ4.js → chunk-77OBW43F.js} +6 -6
  29. package/dist/bundle/{chunk-FCS26CYQ.js → chunk-7EFM6AW3.js} +4 -4
  30. package/dist/bundle/{chunk-XMMFBPGC.js → chunk-A3S7QM5L.js} +3 -3
  31. package/dist/bundle/{chunk-ASMMG72J.js → chunk-AA4LKC6W.js} +244 -565
  32. package/dist/bundle/chunk-ASTKHB6B.js +3233 -0
  33. package/dist/bundle/{chunk-LXKYKRHD.js → chunk-BM6V7456.js} +8 -227
  34. package/dist/bundle/chunk-BO6EDBYJ.js +50 -0
  35. package/dist/bundle/{chunk-YPFWNVHV.js → chunk-BPA3R4KN.js} +2 -100
  36. package/dist/bundle/chunk-CIFE4KPX.js +2159 -0
  37. package/dist/bundle/chunk-CKB4XZZJ.js +730 -0
  38. package/dist/bundle/{chunk-RJOQH5YY.js → chunk-COJTCEZP.js} +111 -859
  39. package/dist/bundle/{chunk-FJH7DJWK.js → chunk-CWPYDT73.js} +6 -6
  40. package/dist/bundle/{chunk-BKSQBBYG.js → chunk-D4JNCXS7.js} +9 -9
  41. package/dist/bundle/chunk-DCPWZIOV.js +696 -0
  42. package/dist/bundle/{chunk-PRW6SYA3.js → chunk-DHMNCOQI.js} +313 -257
  43. package/dist/bundle/chunk-DOQMH4DC.js +280 -0
  44. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  45. package/dist/bundle/{chunk-YJIGGUPI.js → chunk-DWRUOLBF.js} +4 -4
  46. package/dist/bundle/{chunk-6W763DZN.js → chunk-E3VWZC3K.js} +14 -13
  47. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  48. package/dist/bundle/{chunk-KGYVHPGE.js → chunk-EVG3AA5M.js} +2 -2
  49. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  50. package/dist/bundle/{chunk-Y2NWGNUB.js → chunk-FBEZSA76.js} +5 -5
  51. package/dist/bundle/{chunk-2BVVU7GG.js → chunk-FBQJN74J.js} +1 -1
  52. package/dist/bundle/{chunk-Z56QFOBR.js → chunk-FIZOPJYY.js} +1 -1
  53. package/dist/bundle/chunk-FNAYSZWK.js +783 -0
  54. package/dist/bundle/{chunk-GPQ44Y2R.js → chunk-FRCJHGZM.js} +2 -2
  55. package/dist/bundle/{chunk-35SCQ4VI.js → chunk-FTG5QBSD.js} +41 -33
  56. package/dist/bundle/{chunk-KYKW2W6X.js → chunk-FUDUXIVG.js} +1 -1
  57. package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
  58. package/dist/bundle/{chunk-FT3LN3HP.js → chunk-GIEZYBRC.js} +1 -1
  59. package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
  60. package/dist/bundle/chunk-GU6ICH53.js +108 -0
  61. package/dist/bundle/{chunk-ACUAV6VX.js → chunk-GUMKKRE6.js} +107 -71
  62. package/dist/bundle/{chunk-KGERXYTV.js → chunk-GWCDOYSC.js} +1 -1
  63. package/dist/bundle/{chunk-OJSBWP3F.js → chunk-GXGSC622.js} +69 -7
  64. package/dist/bundle/chunk-HAGXTGJC.js +188 -0
  65. package/dist/bundle/{chunk-XF4EXO2C.js → chunk-IMAWQC5K.js} +6 -6
  66. package/dist/bundle/{chunk-HKY7X6NY.js → chunk-IVGVVSPW.js} +4 -4
  67. package/dist/bundle/{chunk-P7CUM5IB.js → chunk-J4NUHSM7.js} +1 -1
  68. package/dist/bundle/{chunk-MIA7P6FZ.js → chunk-K652FYCO.js} +6 -6
  69. package/dist/bundle/chunk-K6ZWNTXY.js +561 -0
  70. package/dist/bundle/{chunk-COOOO5B3.js → chunk-KF3ZBQJV.js} +4 -4
  71. package/dist/bundle/chunk-KFZCHJRT.js +80 -0
  72. package/dist/bundle/chunk-KLPFDFLI.js +221 -0
  73. package/dist/bundle/{chunk-EOEU3AZN.js → chunk-KP2XMCNT.js} +13 -13
  74. package/dist/bundle/{chunk-FP54WSIR.js → chunk-KWDZ3KVH.js} +4 -4
  75. package/dist/bundle/{chunk-QNRRK3CN.js → chunk-KX4C32WD.js} +2 -2
  76. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  77. package/dist/bundle/{chunk-2LHAVY4U.js → chunk-M2ZWYVWO.js} +1 -1
  78. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  79. package/dist/bundle/{chunk-3EBBLKIT.js → chunk-ML2QIWX2.js} +4 -4
  80. package/dist/bundle/{chunk-ZM63SUHG.js → chunk-MUFF2YTH.js} +2 -2
  81. package/dist/bundle/{chunk-2PUNKUYJ.js → chunk-N24YSLED.js} +9150 -9869
  82. package/dist/bundle/chunk-N4GTCPML.js +7 -0
  83. package/dist/bundle/{chunk-B5KSXHJ7.js → chunk-NBMGDRP4.js} +1 -1
  84. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  85. package/dist/bundle/{chunk-JDV7HNNQ.js → chunk-NNGA4QDR.js} +13 -26
  86. package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
  87. package/dist/bundle/chunk-O7CZZ36M.js +80 -0
  88. package/dist/bundle/{chunk-ICDCAQ6K.js → chunk-OAONP6KI.js} +13 -9
  89. package/dist/bundle/{chunk-WVDCCYS3.js → chunk-OESP4PHB.js} +17 -17
  90. package/dist/bundle/chunk-OHR6IZNH.js +116 -0
  91. package/dist/bundle/{chunk-4QNW4NK6.js → chunk-OLCU7Q2B.js} +1 -1
  92. package/dist/bundle/{chunk-SDKQNOL5.js → chunk-OLDQLEPA.js} +6 -6
  93. package/dist/bundle/{chunk-ZCR3IRZ2.js → chunk-OPIPG6AP.js} +16 -9
  94. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  95. package/dist/bundle/chunk-PRYMT3OG.js +30 -0
  96. package/dist/bundle/chunk-QDUIVMEW.js +36 -0
  97. package/dist/bundle/{chunk-ZZ32DXTH.js → chunk-QKBPCX7Y.js} +1 -1
  98. package/dist/bundle/{chunk-QXC6IEH6.js → chunk-QSLOACDT.js} +201 -423
  99. package/dist/bundle/{chunk-7PDHGZN4.js → chunk-QUZFDU4K.js} +4 -4
  100. package/dist/bundle/{chunk-3UGYFXH6.js → chunk-R32DHS6J.js} +187 -379
  101. package/dist/bundle/{chunk-6SJOTNHF.js → chunk-R57QUYBG.js} +6 -28
  102. package/dist/bundle/{chunk-UTO2GO4P.js → chunk-R64OSDOD.js} +45 -66
  103. package/dist/bundle/{chunk-GBKNJWOZ.js → chunk-RSPBVKOC.js} +8 -8
  104. package/dist/bundle/{chunk-HL52XXZX.js → chunk-SPNPJ3FZ.js} +3 -4
  105. package/dist/bundle/chunk-SQHDSIFL.js +388 -0
  106. package/dist/bundle/{chunk-YPNWIB6H.js → chunk-ST35FIUG.js} +3 -3
  107. package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
  108. package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
  109. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  110. package/dist/bundle/{chunk-X4TIMMKJ.js → chunk-TTPWKTVR.js} +1 -1
  111. package/dist/bundle/{chunk-TAFHYHKA.js → chunk-U7VEJ3CW.js} +45 -27
  112. package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
  113. package/dist/bundle/{chunk-4HWJOU7N.js → chunk-UIQ35CA5.js} +1 -1
  114. package/dist/bundle/{chunk-SAKO3P4H.js → chunk-UJY26HW4.js} +1 -1
  115. package/dist/bundle/{chunk-D5TGYUVU.js → chunk-UWG3PRY7.js} +9 -60
  116. package/dist/bundle/{chunk-JZHBZOJR.js → chunk-VAR3MJU6.js} +3 -3
  117. package/dist/bundle/{chunk-GOWXXYEF.js → chunk-VPQSI5IU.js} +4 -4
  118. package/dist/bundle/{chunk-QFR2PNJN.js → chunk-VQPT3Y7W.js} +12 -12
  119. package/dist/bundle/{chunk-Z3KUSRCF.js → chunk-WMG3H2VK.js} +2 -2
  120. package/dist/bundle/{chunk-4PA4DHYV.js → chunk-X5BGAZC5.js} +6 -6
  121. package/dist/bundle/{chunk-2UUWXPOB.js → chunk-XC6TRWLZ.js} +3 -3
  122. package/dist/bundle/{chunk-OF422U5D.js → chunk-XQZEMRCU.js} +402 -402
  123. package/dist/bundle/{chunk-72C4YOCH.js → chunk-XZ7MO6EU.js} +7 -7
  124. package/dist/bundle/{chunk-SERXSCN3.js → chunk-YAIOEPKU.js} +337 -390
  125. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  126. package/dist/bundle/{chunk-RESDD3Q4.js → chunk-YWOLQEDV.js} +16 -3
  127. package/dist/bundle/{chunk-YMJ6IDGT.js → chunk-ZFDSJ5YJ.js} +38 -8
  128. package/dist/bundle/{chunk-HMS6EEQL.js → chunk-ZFUZEFU6.js} +3 -3
  129. package/dist/bundle/{chunk-TAUBRNC5.js → chunk-ZJKXSMXK.js} +72 -59
  130. package/dist/bundle/{chunk-22QQUKWA.js → chunk-ZKWT6HXT.js} +1 -1
  131. package/dist/bundle/chunk-ZPUY3COZ.js +250 -0
  132. package/dist/bundle/{cli-556DERZL.js → cli-2P5FW2RL.js} +201 -98
  133. package/dist/bundle/command-contract-BMQT2G5X.js +45 -0
  134. package/dist/bundle/{command-server-entry-AYLGNZWD.js → command-server-entry-KP2UDGLA.js} +36 -34
  135. package/dist/bundle/{decode-QU24MWMN.js → decode-K2JZ5D6V.js} +10 -10
  136. package/dist/bundle/{dispatch-4KODNOXV.js → dispatch-KOQZA74A.js} +10 -10
  137. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  138. package/dist/bundle/drive.js +11 -11
  139. package/dist/bundle/{echarts-BXX4OQWC.js → echarts-URO3QGCG.js} +2 -2
  140. package/dist/bundle/{embed-KG27KG3D.js → embed-JLIPWTNN.js} +10 -10
  141. package/dist/bundle/{embedder-IPAVUQUV.js → embedder-LUTDO3HS.js} +15 -15
  142. package/dist/bundle/entry-AVF6LMG7.js +25 -0
  143. package/dist/bundle/{failure-ESL7ETL4.js → failure-GJMQLM7O.js} +4 -4
  144. package/dist/bundle/first-run-VYTIEUDA.js +31 -0
  145. package/dist/bundle/first-screen-QVZPF7KL.js +45 -0
  146. package/dist/bundle/google-VX7IPACN.js +46 -0
  147. package/dist/bundle/{google-api-VCDBSNOW.js → google-api-RFXKRLL4.js} +88 -73
  148. package/dist/bundle/grants-4XWJFVD6.js +133 -0
  149. package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
  150. package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
  151. package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
  152. package/dist/bundle/{identity-LOWMVGZY.js → identity-FXPB5EMT.js} +7 -6
  153. package/dist/bundle/{instructions-2VECIDXF.js → instructions-IROIUVZI.js} +1 -1
  154. package/dist/bundle/{login-7GBONT7V.js → login-WIY5VQU7.js} +96 -81
  155. package/dist/bundle/{mcp-O6ACR2DX.js → mcp-NJIOKW3E.js} +2 -2
  156. package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
  157. package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
  158. package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
  159. package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
  160. package/dist/bundle/meeting-combined-JUNV35GM.js +28 -0
  161. package/dist/bundle/meeting-model-XY4UNWWK.js +29 -0
  162. package/dist/bundle/{meeting-semantic-G7PFOKU7.js → meeting-semantic-62QNQMOM.js} +10 -10
  163. package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
  164. package/dist/bundle/{node-MPEQSFI3.js → node-IACCI2CW.js} +2 -2
  165. package/dist/bundle/{node-sqlite-OLQMAYB4.js → node-sqlite-WYIRC7C7.js} +10 -10
  166. package/dist/bundle/notes-search-DEDUJKSN.js +70 -0
  167. package/dist/bundle/oauth-HXBXF4VI.js +22 -0
  168. package/dist/bundle/{open-OXTE672W.js → open-H32B6BCT.js} +8 -8
  169. package/dist/bundle/{openai-EB3TPIZY.js → openai-VHMPJJUG.js} +22 -21
  170. package/dist/bundle/{process-F6TKXWWA.js → process-RNHPF5OK.js} +1 -1
  171. package/dist/bundle/{program-4IFDZ7FM.js → program-GYMJ3DDH.js} +275 -1148
  172. package/dist/bundle/{prompt-F5RRHPN2.js → prompt-TOG2CRCE.js} +8 -8
  173. package/dist/bundle/{reasons-UORHJDHK.js → reasons-TLFQ45YX.js} +6 -5
  174. package/dist/bundle/{recognize-DAVNZND3.js → recognize-GYGY45EY.js} +7 -7
  175. package/dist/bundle/remote-6XN2QLI5.js +35 -0
  176. package/dist/bundle/{rerank-CND2GVLZ.js → rerank-HJO3O4TW.js} +11 -11
  177. package/dist/bundle/{serve-ZHSPUIGX.js → serve-XPCNLHCR.js} +19 -19
  178. package/dist/bundle/server-UBJZ66XE.js +97 -0
  179. package/dist/bundle/{server-YMAK4LHC.js → server-WPT3NC5B.js} +89 -70
  180. package/dist/bundle/{services-ZILSFJ6E.js → services-253KKKVU.js} +109 -89
  181. package/dist/bundle/{sqlite-runtime-S5VPMZQH.js → sqlite-runtime-EZASGJXW.js} +9 -9
  182. package/dist/bundle/{start-CR6X25RT.js → start-UHI35JFL.js} +7 -7
  183. package/dist/bundle/{state-YFPHVIIJ.js → state-KJTSPFGK.js} +9 -9
  184. package/dist/bundle/{store-UODRT6X4.js → store-62J2H2A3.js} +36 -25
  185. package/dist/bundle/{store-CL4ZJZRI.js → store-G5B7T7M7.js} +38 -23
  186. package/dist/bundle/store-maintenance-command-C6T4YLVF.js +85 -0
  187. package/dist/bundle/surface-3OT64BHS.js +83 -0
  188. package/dist/bundle/tokens-EHYO6D2X.js +133 -0
  189. package/dist/commands/documents.d.ts.map +1 -1
  190. package/dist/commands/documents.js +11 -1
  191. package/dist/commands/documents.js.map +1 -1
  192. package/dist/commands/remote.d.ts.map +1 -1
  193. package/dist/commands/remote.js +8 -22
  194. package/dist/commands/remote.js.map +1 -1
  195. package/dist/commands/sync.d.ts.map +1 -1
  196. package/dist/commands/sync.js +14 -4
  197. package/dist/commands/sync.js.map +1 -1
  198. package/dist/config.d.ts +5 -0
  199. package/dist/config.d.ts.map +1 -1
  200. package/dist/config.js +5 -0
  201. package/dist/config.js.map +1 -1
  202. package/dist/first-screen.d.ts.map +1 -1
  203. package/dist/first-screen.js +2 -1
  204. package/dist/first-screen.js.map +1 -1
  205. package/dist/generated/manifest.d.ts +2 -1
  206. package/dist/generated/manifest.d.ts.map +1 -1
  207. package/dist/generated/manifest.js +782 -0
  208. package/dist/generated/manifest.js.map +1 -1
  209. package/dist/generated/types.d.ts +262 -58
  210. package/dist/generated/types.d.ts.map +1 -1
  211. package/dist/google.d.ts.map +1 -1
  212. package/dist/google.js +5 -5
  213. package/dist/google.js.map +1 -1
  214. package/dist/model.d.ts +5 -2
  215. package/dist/model.d.ts.map +1 -1
  216. package/dist/model.js.map +1 -1
  217. package/dist/policy-keys.js +1 -1
  218. package/dist/policy-keys.js.map +1 -1
  219. package/dist/program.d.ts.map +1 -1
  220. package/dist/program.js +9 -4
  221. package/dist/program.js.map +1 -1
  222. package/dist/state.d.ts.map +1 -1
  223. package/dist/state.js +6 -1
  224. package/dist/state.js.map +1 -1
  225. package/dist/store.d.ts.map +1 -1
  226. package/dist/store.js +2 -7
  227. package/dist/store.js.map +1 -1
  228. package/dist/supported.d.ts +2 -2
  229. package/dist/supported.d.ts.map +1 -1
  230. package/dist/supported.js +2 -3
  231. package/dist/supported.js.map +1 -1
  232. package/dist/sync.d.ts +2 -1
  233. package/dist/sync.d.ts.map +1 -1
  234. package/dist/sync.js +5 -2
  235. package/dist/sync.js.map +1 -1
  236. package/dist/version.d.ts +1 -1
  237. package/dist/version.js +1 -1
  238. package/package.json +3 -3
  239. package/scenarios/find-decision.md +1 -1
  240. package/skills/drive-cli/SKILL.md +4 -2
  241. package/dist/bundle/chunk-J5Q5FS2N.js +0 -593
  242. package/dist/bundle/chunk-L46C6HQ7.js +0 -729
  243. package/dist/bundle/chunk-UDMNY63V.js +0 -899
  244. package/dist/bundle/chunk-VKE77B3F.js +0 -2
  245. package/dist/bundle/command-contract-VRTOAV6W.js +0 -43
  246. package/dist/bundle/entry-MVXQETWS.js +0 -25
  247. package/dist/bundle/first-run-4UVLW2WR.js +0 -31
  248. package/dist/bundle/first-screen-JAKAIINI.js +0 -41
  249. package/dist/bundle/google-22NXXJX5.js +0 -45
  250. package/dist/bundle/grants-MQMTVCRQ.js +0 -118
  251. package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
  252. package/dist/bundle/meeting-combined-LVP4AZKA.js +0 -27
  253. package/dist/bundle/meeting-model-RAY5XDXZ.js +0 -29
  254. package/dist/bundle/oauth-SGH2I2BY.js +0 -22
  255. package/dist/bundle/remote-D5EYYIAU.js +0 -35
  256. package/dist/bundle/server-DUVJWP3Q.js +0 -80
  257. package/dist/bundle/store-maintenance-command-DY5XIBWR.js +0 -72
  258. package/dist/bundle/tokens-AF7QOFOF.js +0 -118
@@ -0,0 +1,925 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ ok
5
+ } from "./chunk-ECYOTDJM.js";
6
+ import {
7
+ ccount
8
+ } from "./chunk-MEYYH47C.js";
9
+ import {
10
+ normalizeIdentifier
11
+ } from "./chunk-F4BX7TH2.js";
12
+ import {
13
+ handle
14
+ } from "./chunk-GTPPUBYU.js";
15
+ import "./chunk-NMQRSEZM.js";
16
+ import {
17
+ SKIP,
18
+ convert,
19
+ visitParents
20
+ } from "./chunk-TRYYWV7J.js";
21
+ import "./chunk-4HP6KGBI.js";
22
+ import "./chunk-35FIJGTT.js";
23
+ import "./chunk-SZ7XJZGH.js";
24
+ import "./chunk-XFLCVHSQ.js";
25
+ import {
26
+ unicodePunctuation,
27
+ unicodeWhitespace
28
+ } from "./chunk-UC7JLE6J.js";
29
+ import {
30
+ __name
31
+ } from "./chunk-ZVVMGPBJ.js";
32
+
33
+ // node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
34
+ function escapeStringRegexp(string) {
35
+ if (typeof string !== "string") {
36
+ throw new TypeError("Expected a string");
37
+ }
38
+ return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
39
+ }
40
+ __name(escapeStringRegexp, "escapeStringRegexp");
41
+
42
+ // node_modules/.pnpm/mdast-util-find-and-replace@3.0.4/node_modules/mdast-util-find-and-replace/lib/index.js
43
+ function findAndReplace(tree, list, options) {
44
+ const settings = options || {};
45
+ const ignored = convert(settings.ignore || []);
46
+ const pairs = toPairs(list);
47
+ let pairIndex = -1;
48
+ while (++pairIndex < pairs.length) {
49
+ visitParents(tree, visitor);
50
+ }
51
+ function visitor(node, parents, index) {
52
+ if (node.type === "text" && typeof index === "number") {
53
+ return handler(node, parents, index);
54
+ }
55
+ if (ignored(node, index, parents[parents.length - 1])) return SKIP;
56
+ }
57
+ __name(visitor, "visitor");
58
+ function handler(node, parents, index) {
59
+ const parent = parents[parents.length - 1];
60
+ const find = pairs[pairIndex][0];
61
+ const replace2 = pairs[pairIndex][1];
62
+ let start = 0;
63
+ let change = false;
64
+ let nodes = [];
65
+ find.lastIndex = 0;
66
+ let match = find.exec(node.value);
67
+ while (match) {
68
+ const position = match.index;
69
+ const matchObject = {
70
+ index: match.index,
71
+ input: match.input,
72
+ stack: [...parents, node]
73
+ };
74
+ let value = replace2(...match, matchObject);
75
+ if (typeof value === "string") {
76
+ value = value.length > 0 ? { type: "text", value } : void 0;
77
+ }
78
+ if (value === false) {
79
+ find.lastIndex = position + 1;
80
+ } else {
81
+ if (start !== position) {
82
+ add({ type: "text", value: node.value.slice(start, position) });
83
+ }
84
+ if (Array.isArray(value)) {
85
+ for (const child of value) add(child);
86
+ } else if (value) {
87
+ add(value);
88
+ }
89
+ start = position + match[0].length;
90
+ change = true;
91
+ }
92
+ if (!find.global) {
93
+ break;
94
+ }
95
+ match = find.exec(node.value);
96
+ }
97
+ if (change) {
98
+ if (start < node.value.length) {
99
+ add({ type: "text", value: node.value.slice(start) });
100
+ }
101
+ parent.children.splice(index, 1, ...nodes);
102
+ } else {
103
+ nodes = [node];
104
+ }
105
+ return index + nodes.length;
106
+ function add(child) {
107
+ const previous2 = nodes[nodes.length - 1];
108
+ if (previous2 && previous2.type === "text" && child.type === "text") {
109
+ previous2.value += child.value;
110
+ } else {
111
+ nodes.push(child);
112
+ }
113
+ }
114
+ __name(add, "add");
115
+ }
116
+ __name(handler, "handler");
117
+ }
118
+ __name(findAndReplace, "findAndReplace");
119
+ function toPairs(tupleOrList) {
120
+ if (!Array.isArray(tupleOrList)) {
121
+ throw new TypeError("Expected find and replace tuple or list of tuples");
122
+ }
123
+ const result = [];
124
+ const list = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? (
125
+ /** @type {FindAndReplaceList} */
126
+ tupleOrList
127
+ ) : [
128
+ /** @type {FindAndReplaceTuple} */
129
+ tupleOrList
130
+ ];
131
+ let index = -1;
132
+ while (++index < list.length) {
133
+ const tuple = list[index];
134
+ result.push([toExpression(tuple[0]), toFunction(tuple[1])]);
135
+ }
136
+ return result;
137
+ }
138
+ __name(toPairs, "toPairs");
139
+ function toExpression(find) {
140
+ return typeof find === "string" ? new RegExp(escapeStringRegexp(find), "g") : find;
141
+ }
142
+ __name(toExpression, "toExpression");
143
+ function toFunction(replace2) {
144
+ return typeof replace2 === "function" ? replace2 : function() {
145
+ return replace2;
146
+ };
147
+ }
148
+ __name(toFunction, "toFunction");
149
+
150
+ // node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
151
+ var inConstruct = "phrasing";
152
+ var notInConstruct = ["autolink", "link", "image", "label"];
153
+ function gfmAutolinkLiteralFromMarkdown() {
154
+ return {
155
+ transforms: [transformGfmAutolinkLiterals],
156
+ enter: {
157
+ literalAutolink: enterLiteralAutolink,
158
+ literalAutolinkEmail: enterLiteralAutolinkValue,
159
+ literalAutolinkHttp: enterLiteralAutolinkValue,
160
+ literalAutolinkWww: enterLiteralAutolinkValue
161
+ },
162
+ exit: {
163
+ literalAutolink: exitLiteralAutolink,
164
+ literalAutolinkEmail: exitLiteralAutolinkEmail,
165
+ literalAutolinkHttp: exitLiteralAutolinkHttp,
166
+ literalAutolinkWww: exitLiteralAutolinkWww
167
+ }
168
+ };
169
+ }
170
+ __name(gfmAutolinkLiteralFromMarkdown, "gfmAutolinkLiteralFromMarkdown");
171
+ function gfmAutolinkLiteralToMarkdown() {
172
+ return {
173
+ unsafe: [
174
+ {
175
+ character: "@",
176
+ before: "[+\\-.\\w]",
177
+ after: "[\\-.\\w]",
178
+ inConstruct,
179
+ notInConstruct
180
+ },
181
+ {
182
+ character: ".",
183
+ before: "[Ww]",
184
+ after: "[\\-.\\w]",
185
+ inConstruct,
186
+ notInConstruct
187
+ },
188
+ {
189
+ character: ":",
190
+ before: "[ps]",
191
+ after: "\\/",
192
+ inConstruct,
193
+ notInConstruct
194
+ }
195
+ ]
196
+ };
197
+ }
198
+ __name(gfmAutolinkLiteralToMarkdown, "gfmAutolinkLiteralToMarkdown");
199
+ function enterLiteralAutolink(token) {
200
+ this.enter({ type: "link", title: null, url: "", children: [] }, token);
201
+ }
202
+ __name(enterLiteralAutolink, "enterLiteralAutolink");
203
+ function enterLiteralAutolinkValue(token) {
204
+ this.config.enter.autolinkProtocol.call(this, token);
205
+ }
206
+ __name(enterLiteralAutolinkValue, "enterLiteralAutolinkValue");
207
+ function exitLiteralAutolinkHttp(token) {
208
+ this.config.exit.autolinkProtocol.call(this, token);
209
+ }
210
+ __name(exitLiteralAutolinkHttp, "exitLiteralAutolinkHttp");
211
+ function exitLiteralAutolinkWww(token) {
212
+ this.config.exit.data.call(this, token);
213
+ const node = this.stack[this.stack.length - 1];
214
+ ok(node.type === "link");
215
+ node.url = "http://" + this.sliceSerialize(token);
216
+ }
217
+ __name(exitLiteralAutolinkWww, "exitLiteralAutolinkWww");
218
+ function exitLiteralAutolinkEmail(token) {
219
+ this.config.exit.autolinkEmail.call(this, token);
220
+ }
221
+ __name(exitLiteralAutolinkEmail, "exitLiteralAutolinkEmail");
222
+ function exitLiteralAutolink(token) {
223
+ this.exit(token);
224
+ }
225
+ __name(exitLiteralAutolink, "exitLiteralAutolink");
226
+ function transformGfmAutolinkLiterals(tree) {
227
+ findAndReplace(
228
+ tree,
229
+ [
230
+ [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
231
+ [new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), findEmail]
232
+ ],
233
+ { ignore: ["link", "linkReference"] }
234
+ );
235
+ }
236
+ __name(transformGfmAutolinkLiterals, "transformGfmAutolinkLiterals");
237
+ function findUrl(_, protocol, domain, path, match) {
238
+ let prefix = "";
239
+ if (!previous(match)) {
240
+ return false;
241
+ }
242
+ if (/^w/i.test(protocol)) {
243
+ domain = protocol + domain;
244
+ protocol = "";
245
+ prefix = "http://";
246
+ }
247
+ if (!isCorrectDomain(domain)) {
248
+ return false;
249
+ }
250
+ const parts = splitUrl(domain + path);
251
+ if (!parts[0]) return false;
252
+ const result = {
253
+ type: "link",
254
+ title: null,
255
+ url: prefix + protocol + parts[0],
256
+ children: [{ type: "text", value: protocol + parts[0] }]
257
+ };
258
+ if (parts[1]) {
259
+ return [result, { type: "text", value: parts[1] }];
260
+ }
261
+ return result;
262
+ }
263
+ __name(findUrl, "findUrl");
264
+ function findEmail(_, atext, label, match) {
265
+ if (
266
+ // Not an expected previous character.
267
+ !previous(match, true) || // Label ends in not allowed character.
268
+ /[-\d_]$/.test(label)
269
+ ) {
270
+ return false;
271
+ }
272
+ return {
273
+ type: "link",
274
+ title: null,
275
+ url: "mailto:" + atext + "@" + label,
276
+ children: [{ type: "text", value: atext + "@" + label }]
277
+ };
278
+ }
279
+ __name(findEmail, "findEmail");
280
+ function isCorrectDomain(domain) {
281
+ const parts = domain.split(".");
282
+ if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) {
283
+ return false;
284
+ }
285
+ return true;
286
+ }
287
+ __name(isCorrectDomain, "isCorrectDomain");
288
+ function splitUrl(url) {
289
+ const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
290
+ if (!trailExec) {
291
+ return [url, void 0];
292
+ }
293
+ url = url.slice(0, trailExec.index);
294
+ let trail = trailExec[0];
295
+ let closingParenIndex = trail.indexOf(")");
296
+ const openingParens = ccount(url, "(");
297
+ let closingParens = ccount(url, ")");
298
+ while (closingParenIndex !== -1 && openingParens > closingParens) {
299
+ url += trail.slice(0, closingParenIndex + 1);
300
+ trail = trail.slice(closingParenIndex + 1);
301
+ closingParenIndex = trail.indexOf(")");
302
+ closingParens++;
303
+ }
304
+ return [url, trail];
305
+ }
306
+ __name(splitUrl, "splitUrl");
307
+ function previous(match, email) {
308
+ const code = match.input.charCodeAt(match.index - 1);
309
+ return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && // If it’s an email, the previous character should not be a slash.
310
+ (!email || code !== 47);
311
+ }
312
+ __name(previous, "previous");
313
+
314
+ // node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
315
+ footnoteReference.peek = footnoteReferencePeek;
316
+ function enterFootnoteCallString() {
317
+ this.buffer();
318
+ }
319
+ __name(enterFootnoteCallString, "enterFootnoteCallString");
320
+ function enterFootnoteCall(token) {
321
+ this.enter({ type: "footnoteReference", identifier: "", label: "" }, token);
322
+ }
323
+ __name(enterFootnoteCall, "enterFootnoteCall");
324
+ function enterFootnoteDefinitionLabelString() {
325
+ this.buffer();
326
+ }
327
+ __name(enterFootnoteDefinitionLabelString, "enterFootnoteDefinitionLabelString");
328
+ function enterFootnoteDefinition(token) {
329
+ this.enter(
330
+ { type: "footnoteDefinition", identifier: "", label: "", children: [] },
331
+ token
332
+ );
333
+ }
334
+ __name(enterFootnoteDefinition, "enterFootnoteDefinition");
335
+ function exitFootnoteCallString(token) {
336
+ const label = this.resume();
337
+ const node = this.stack[this.stack.length - 1];
338
+ ok(node.type === "footnoteReference");
339
+ node.identifier = normalizeIdentifier(
340
+ this.sliceSerialize(token)
341
+ ).toLowerCase();
342
+ node.label = label;
343
+ }
344
+ __name(exitFootnoteCallString, "exitFootnoteCallString");
345
+ function exitFootnoteCall(token) {
346
+ this.exit(token);
347
+ }
348
+ __name(exitFootnoteCall, "exitFootnoteCall");
349
+ function exitFootnoteDefinitionLabelString(token) {
350
+ const label = this.resume();
351
+ const node = this.stack[this.stack.length - 1];
352
+ ok(node.type === "footnoteDefinition");
353
+ node.identifier = normalizeIdentifier(
354
+ this.sliceSerialize(token)
355
+ ).toLowerCase();
356
+ node.label = label;
357
+ }
358
+ __name(exitFootnoteDefinitionLabelString, "exitFootnoteDefinitionLabelString");
359
+ function exitFootnoteDefinition(token) {
360
+ this.exit(token);
361
+ }
362
+ __name(exitFootnoteDefinition, "exitFootnoteDefinition");
363
+ function footnoteReferencePeek() {
364
+ return "[";
365
+ }
366
+ __name(footnoteReferencePeek, "footnoteReferencePeek");
367
+ function footnoteReference(node, _, state, info) {
368
+ const tracker = state.createTracker(info);
369
+ let value = tracker.move("[^");
370
+ const exit2 = state.enter("footnoteReference");
371
+ const subexit = state.enter("reference");
372
+ value += tracker.move(
373
+ state.safe(state.associationId(node), { after: "]", before: value })
374
+ );
375
+ subexit();
376
+ exit2();
377
+ value += tracker.move("]");
378
+ return value;
379
+ }
380
+ __name(footnoteReference, "footnoteReference");
381
+ function gfmFootnoteFromMarkdown() {
382
+ return {
383
+ enter: {
384
+ gfmFootnoteCallString: enterFootnoteCallString,
385
+ gfmFootnoteCall: enterFootnoteCall,
386
+ gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,
387
+ gfmFootnoteDefinition: enterFootnoteDefinition
388
+ },
389
+ exit: {
390
+ gfmFootnoteCallString: exitFootnoteCallString,
391
+ gfmFootnoteCall: exitFootnoteCall,
392
+ gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,
393
+ gfmFootnoteDefinition: exitFootnoteDefinition
394
+ }
395
+ };
396
+ }
397
+ __name(gfmFootnoteFromMarkdown, "gfmFootnoteFromMarkdown");
398
+ function gfmFootnoteToMarkdown(options) {
399
+ let firstLineBlank = false;
400
+ if (options && options.firstLineBlank) {
401
+ firstLineBlank = true;
402
+ }
403
+ return {
404
+ handlers: { footnoteDefinition, footnoteReference },
405
+ // This is on by default already.
406
+ unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
407
+ };
408
+ function footnoteDefinition(node, _, state, info) {
409
+ const tracker = state.createTracker(info);
410
+ let value = tracker.move("[^");
411
+ const exit2 = state.enter("footnoteDefinition");
412
+ const subexit = state.enter("label");
413
+ value += tracker.move(
414
+ state.safe(state.associationId(node), { before: value, after: "]" })
415
+ );
416
+ subexit();
417
+ value += tracker.move("]:");
418
+ if (node.children && node.children.length > 0) {
419
+ tracker.shift(4);
420
+ value += tracker.move(
421
+ (firstLineBlank ? "\n" : " ") + state.indentLines(
422
+ state.containerFlow(node, tracker.current()),
423
+ firstLineBlank ? mapAll : mapExceptFirst
424
+ )
425
+ );
426
+ }
427
+ exit2();
428
+ return value;
429
+ }
430
+ __name(footnoteDefinition, "footnoteDefinition");
431
+ }
432
+ __name(gfmFootnoteToMarkdown, "gfmFootnoteToMarkdown");
433
+ function mapExceptFirst(line, index, blank) {
434
+ return index === 0 ? line : mapAll(line, index, blank);
435
+ }
436
+ __name(mapExceptFirst, "mapExceptFirst");
437
+ function mapAll(line, index, blank) {
438
+ return (blank ? "" : " ") + line;
439
+ }
440
+ __name(mapAll, "mapAll");
441
+
442
+ // node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.1/node_modules/mdast-util-gfm-strikethrough/lib/index.js
443
+ var constructsWithoutStrikethrough = [
444
+ "autolink",
445
+ "destinationLiteral",
446
+ "destinationRaw",
447
+ "reference",
448
+ "titleQuote",
449
+ "titleApostrophe"
450
+ ];
451
+ handleDelete.attention = attentionDelete;
452
+ handleDelete.peek = peekDelete;
453
+ function gfmStrikethroughFromMarkdown() {
454
+ return {
455
+ canContainEols: ["delete"],
456
+ enter: { strikethrough: enterStrikethrough },
457
+ exit: { strikethrough: exitStrikethrough }
458
+ };
459
+ }
460
+ __name(gfmStrikethroughFromMarkdown, "gfmStrikethroughFromMarkdown");
461
+ function gfmStrikethroughToMarkdown() {
462
+ return {
463
+ handlers: { delete: handleDelete },
464
+ unsafe: [
465
+ {
466
+ character: "~",
467
+ inConstruct: "phrasing",
468
+ notInConstruct: constructsWithoutStrikethrough
469
+ }
470
+ ]
471
+ };
472
+ }
473
+ __name(gfmStrikethroughToMarkdown, "gfmStrikethroughToMarkdown");
474
+ function enterStrikethrough(token) {
475
+ this.enter({ type: "delete", children: [], position: void 0 }, token);
476
+ }
477
+ __name(enterStrikethrough, "enterStrikethrough");
478
+ function exitStrikethrough(token) {
479
+ this.exit(token);
480
+ }
481
+ __name(exitStrikethrough, "exitStrikethrough");
482
+ function handleDelete(node, _, state, info) {
483
+ const tracker = state.createTracker(info);
484
+ const sequence = state.stack.includes("strikethrough") ? "~" : "~~";
485
+ const exit2 = state.enter("strikethrough");
486
+ let value = tracker.move(sequence);
487
+ value += state.containerPhrasing(node, {
488
+ ...tracker.current(),
489
+ before: value,
490
+ after: "~"
491
+ });
492
+ value += tracker.move(sequence);
493
+ exit2();
494
+ return value;
495
+ }
496
+ __name(handleDelete, "handleDelete");
497
+ function attentionDelete() {
498
+ return { construct: "strikethrough", markers: ["~"], sizes: [2, 1] };
499
+ }
500
+ __name(attentionDelete, "attentionDelete");
501
+ function peekDelete() {
502
+ return "~";
503
+ }
504
+ __name(peekDelete, "peekDelete");
505
+
506
+ // node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
507
+ function defaultStringLength(value) {
508
+ return value.length;
509
+ }
510
+ __name(defaultStringLength, "defaultStringLength");
511
+ function markdownTable(table, options) {
512
+ const settings = options || {};
513
+ const align = (settings.align || []).concat();
514
+ const stringLength = settings.stringLength || defaultStringLength;
515
+ const alignments = [];
516
+ const cellMatrix = [];
517
+ const sizeMatrix = [];
518
+ const longestCellByColumn = [];
519
+ let mostCellsPerRow = 0;
520
+ let rowIndex = -1;
521
+ while (++rowIndex < table.length) {
522
+ const row2 = [];
523
+ const sizes2 = [];
524
+ let columnIndex2 = -1;
525
+ if (table[rowIndex].length > mostCellsPerRow) {
526
+ mostCellsPerRow = table[rowIndex].length;
527
+ }
528
+ while (++columnIndex2 < table[rowIndex].length) {
529
+ const cell = serialize(table[rowIndex][columnIndex2]);
530
+ if (settings.alignDelimiters !== false) {
531
+ const size = stringLength(cell);
532
+ sizes2[columnIndex2] = size;
533
+ if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
534
+ longestCellByColumn[columnIndex2] = size;
535
+ }
536
+ }
537
+ row2.push(cell);
538
+ }
539
+ cellMatrix[rowIndex] = row2;
540
+ sizeMatrix[rowIndex] = sizes2;
541
+ }
542
+ let columnIndex = -1;
543
+ if (typeof align === "object" && "length" in align) {
544
+ while (++columnIndex < mostCellsPerRow) {
545
+ alignments[columnIndex] = toAlignment(align[columnIndex]);
546
+ }
547
+ } else {
548
+ const code = toAlignment(align);
549
+ while (++columnIndex < mostCellsPerRow) {
550
+ alignments[columnIndex] = code;
551
+ }
552
+ }
553
+ columnIndex = -1;
554
+ const row = [];
555
+ const sizes = [];
556
+ while (++columnIndex < mostCellsPerRow) {
557
+ const code = alignments[columnIndex];
558
+ let before = "";
559
+ let after = "";
560
+ if (code === 99) {
561
+ before = ":";
562
+ after = ":";
563
+ } else if (code === 108) {
564
+ before = ":";
565
+ } else if (code === 114) {
566
+ after = ":";
567
+ }
568
+ let size = settings.alignDelimiters === false ? 1 : Math.max(
569
+ 1,
570
+ longestCellByColumn[columnIndex] - before.length - after.length
571
+ );
572
+ const cell = before + "-".repeat(size) + after;
573
+ if (settings.alignDelimiters !== false) {
574
+ size = before.length + size + after.length;
575
+ if (size > longestCellByColumn[columnIndex]) {
576
+ longestCellByColumn[columnIndex] = size;
577
+ }
578
+ sizes[columnIndex] = size;
579
+ }
580
+ row[columnIndex] = cell;
581
+ }
582
+ cellMatrix.splice(1, 0, row);
583
+ sizeMatrix.splice(1, 0, sizes);
584
+ rowIndex = -1;
585
+ const lines = [];
586
+ while (++rowIndex < cellMatrix.length) {
587
+ const row2 = cellMatrix[rowIndex];
588
+ const sizes2 = sizeMatrix[rowIndex];
589
+ columnIndex = -1;
590
+ const line = [];
591
+ while (++columnIndex < mostCellsPerRow) {
592
+ const cell = row2[columnIndex] || "";
593
+ let before = "";
594
+ let after = "";
595
+ if (settings.alignDelimiters !== false) {
596
+ const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);
597
+ const code = alignments[columnIndex];
598
+ if (code === 114) {
599
+ before = " ".repeat(size);
600
+ } else if (code === 99) {
601
+ if (size % 2) {
602
+ before = " ".repeat(size / 2 + 0.5);
603
+ after = " ".repeat(size / 2 - 0.5);
604
+ } else {
605
+ before = " ".repeat(size / 2);
606
+ after = before;
607
+ }
608
+ } else {
609
+ after = " ".repeat(size);
610
+ }
611
+ }
612
+ if (settings.delimiterStart !== false && !columnIndex) {
613
+ line.push("|");
614
+ }
615
+ if (settings.padding !== false && // Don’t add the opening space if we’re not aligning and the cell is
616
+ // empty: there will be a closing space.
617
+ !(settings.alignDelimiters === false && cell === "") && (settings.delimiterStart !== false || columnIndex)) {
618
+ line.push(" ");
619
+ }
620
+ if (settings.alignDelimiters !== false) {
621
+ line.push(before);
622
+ }
623
+ line.push(cell);
624
+ if (settings.alignDelimiters !== false) {
625
+ line.push(after);
626
+ }
627
+ if (settings.padding !== false) {
628
+ line.push(" ");
629
+ }
630
+ if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
631
+ line.push("|");
632
+ }
633
+ }
634
+ lines.push(
635
+ settings.delimiterEnd === false ? line.join("").replace(/ +$/, "") : line.join("")
636
+ );
637
+ }
638
+ return lines.join("\n");
639
+ }
640
+ __name(markdownTable, "markdownTable");
641
+ function serialize(value) {
642
+ return value === null || value === void 0 ? "" : String(value);
643
+ }
644
+ __name(serialize, "serialize");
645
+ function toAlignment(value) {
646
+ const code = typeof value === "string" ? value.codePointAt(0) : 0;
647
+ return code === 67 || code === 99 ? 99 : code === 76 || code === 108 ? 108 : code === 82 || code === 114 ? 114 : 0;
648
+ }
649
+ __name(toAlignment, "toAlignment");
650
+
651
+ // node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
652
+ function gfmTableFromMarkdown() {
653
+ return {
654
+ enter: {
655
+ table: enterTable,
656
+ tableData: enterCell,
657
+ tableHeader: enterCell,
658
+ tableRow: enterRow
659
+ },
660
+ exit: {
661
+ codeText: exitCodeText,
662
+ table: exitTable,
663
+ tableData: exit,
664
+ tableHeader: exit,
665
+ tableRow: exit
666
+ }
667
+ };
668
+ }
669
+ __name(gfmTableFromMarkdown, "gfmTableFromMarkdown");
670
+ function enterTable(token) {
671
+ const align = token._align;
672
+ ok(align, "expected `_align` on table");
673
+ this.enter(
674
+ {
675
+ type: "table",
676
+ align: align.map(function(d) {
677
+ return d === "none" ? null : d;
678
+ }),
679
+ children: []
680
+ },
681
+ token
682
+ );
683
+ this.data.inTable = true;
684
+ }
685
+ __name(enterTable, "enterTable");
686
+ function exitTable(token) {
687
+ this.exit(token);
688
+ this.data.inTable = void 0;
689
+ }
690
+ __name(exitTable, "exitTable");
691
+ function enterRow(token) {
692
+ this.enter({ type: "tableRow", children: [] }, token);
693
+ }
694
+ __name(enterRow, "enterRow");
695
+ function exit(token) {
696
+ this.exit(token);
697
+ }
698
+ __name(exit, "exit");
699
+ function enterCell(token) {
700
+ this.enter({ type: "tableCell", children: [] }, token);
701
+ }
702
+ __name(enterCell, "enterCell");
703
+ function exitCodeText(token) {
704
+ let value = this.resume();
705
+ if (this.data.inTable) {
706
+ value = value.replace(/\\([\\|])/g, replace);
707
+ }
708
+ const node = this.stack[this.stack.length - 1];
709
+ ok(node.type === "inlineCode");
710
+ node.value = value;
711
+ this.exit(token);
712
+ }
713
+ __name(exitCodeText, "exitCodeText");
714
+ function replace($0, $1) {
715
+ return $1 === "|" ? $1 : $0;
716
+ }
717
+ __name(replace, "replace");
718
+ function gfmTableToMarkdown(options) {
719
+ const settings = options || {};
720
+ const padding = settings.tableCellPadding;
721
+ const alignDelimiters = settings.tablePipeAlign;
722
+ const stringLength = settings.stringLength;
723
+ const around = padding ? " " : "|";
724
+ return {
725
+ unsafe: [
726
+ { character: "\r", inConstruct: "tableCell" },
727
+ { character: "\n", inConstruct: "tableCell" },
728
+ // A pipe, when followed by a tab or space (padding), or a dash or colon
729
+ // (unpadded delimiter row), could result in a table.
730
+ { atBreak: true, character: "|", after: "[ :-]" },
731
+ // A pipe in a cell must be encoded.
732
+ { character: "|", inConstruct: "tableCell" },
733
+ // A colon must be followed by a dash, in which case it could start a
734
+ // delimiter row.
735
+ { atBreak: true, character: ":", after: "-" },
736
+ // A delimiter row can also start with a dash, when followed by more
737
+ // dashes, a colon, or a pipe.
738
+ // This is a stricter version than the built in check for lists, thematic
739
+ // breaks, and setex heading underlines though:
740
+ // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>
741
+ { atBreak: true, character: "-", after: "[:|-]" }
742
+ ],
743
+ handlers: {
744
+ inlineCode: inlineCodeWithTable,
745
+ table: handleTable,
746
+ tableCell: handleTableCell,
747
+ tableRow: handleTableRow
748
+ }
749
+ };
750
+ function handleTable(node, _, state, info) {
751
+ return serializeData(handleTableAsData(node, state, info), node.align);
752
+ }
753
+ __name(handleTable, "handleTable");
754
+ function handleTableRow(node, _, state, info) {
755
+ const row = handleTableRowAsData(node, state, info);
756
+ const value = serializeData([row]);
757
+ return value.slice(0, value.indexOf("\n"));
758
+ }
759
+ __name(handleTableRow, "handleTableRow");
760
+ function handleTableCell(node, _, state, info) {
761
+ const exit2 = state.enter("tableCell");
762
+ const subexit = state.enter("phrasing");
763
+ const value = state.containerPhrasing(node, {
764
+ ...info,
765
+ before: around,
766
+ after: around
767
+ });
768
+ subexit();
769
+ exit2();
770
+ return value;
771
+ }
772
+ __name(handleTableCell, "handleTableCell");
773
+ function serializeData(matrix, align) {
774
+ return markdownTable(matrix, {
775
+ align,
776
+ // @ts-expect-error: `markdown-table` types should support `null`.
777
+ alignDelimiters,
778
+ // @ts-expect-error: `markdown-table` types should support `null`.
779
+ padding,
780
+ // @ts-expect-error: `markdown-table` types should support `null`.
781
+ stringLength
782
+ });
783
+ }
784
+ __name(serializeData, "serializeData");
785
+ function handleTableAsData(node, state, info) {
786
+ const children = node.children;
787
+ let index = -1;
788
+ const result = [];
789
+ const subexit = state.enter("table");
790
+ while (++index < children.length) {
791
+ result[index] = handleTableRowAsData(children[index], state, info);
792
+ }
793
+ subexit();
794
+ return result;
795
+ }
796
+ __name(handleTableAsData, "handleTableAsData");
797
+ function handleTableRowAsData(node, state, info) {
798
+ const children = node.children;
799
+ let index = -1;
800
+ const result = [];
801
+ const subexit = state.enter("tableRow");
802
+ while (++index < children.length) {
803
+ result[index] = handleTableCell(children[index], node, state, info);
804
+ }
805
+ subexit();
806
+ return result;
807
+ }
808
+ __name(handleTableRowAsData, "handleTableRowAsData");
809
+ function inlineCodeWithTable(node, parent, state) {
810
+ let value = handle.inlineCode(node, parent, state);
811
+ if (state.stack.includes("tableCell")) {
812
+ value = value.replace(/\|/g, "\\$&");
813
+ }
814
+ return value;
815
+ }
816
+ __name(inlineCodeWithTable, "inlineCodeWithTable");
817
+ }
818
+ __name(gfmTableToMarkdown, "gfmTableToMarkdown");
819
+
820
+ // node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
821
+ function gfmTaskListItemFromMarkdown() {
822
+ return {
823
+ exit: {
824
+ taskListCheckValueChecked: exitCheck,
825
+ taskListCheckValueUnchecked: exitCheck,
826
+ paragraph: exitParagraphWithTaskListItem
827
+ }
828
+ };
829
+ }
830
+ __name(gfmTaskListItemFromMarkdown, "gfmTaskListItemFromMarkdown");
831
+ function gfmTaskListItemToMarkdown() {
832
+ return {
833
+ unsafe: [{ atBreak: true, character: "-", after: "[:|-]" }],
834
+ handlers: { listItem: listItemWithTaskListItem }
835
+ };
836
+ }
837
+ __name(gfmTaskListItemToMarkdown, "gfmTaskListItemToMarkdown");
838
+ function exitCheck(token) {
839
+ const node = this.stack[this.stack.length - 2];
840
+ ok(node.type === "listItem");
841
+ node.checked = token.type === "taskListCheckValueChecked";
842
+ }
843
+ __name(exitCheck, "exitCheck");
844
+ function exitParagraphWithTaskListItem(token) {
845
+ const parent = this.stack[this.stack.length - 2];
846
+ if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
847
+ const node = this.stack[this.stack.length - 1];
848
+ ok(node.type === "paragraph");
849
+ const head = node.children[0];
850
+ if (head && head.type === "text") {
851
+ const siblings = parent.children;
852
+ let index = -1;
853
+ let firstParaghraph;
854
+ while (++index < siblings.length) {
855
+ const sibling = siblings[index];
856
+ if (sibling.type === "paragraph") {
857
+ firstParaghraph = sibling;
858
+ break;
859
+ }
860
+ }
861
+ if (firstParaghraph === node) {
862
+ head.value = head.value.slice(1);
863
+ if (head.value.length === 0) {
864
+ node.children.shift();
865
+ } else if (node.position && head.position && typeof head.position.start.offset === "number") {
866
+ head.position.start.column++;
867
+ head.position.start.offset++;
868
+ node.position.start = Object.assign({}, head.position.start);
869
+ }
870
+ }
871
+ }
872
+ }
873
+ this.exit(token);
874
+ }
875
+ __name(exitParagraphWithTaskListItem, "exitParagraphWithTaskListItem");
876
+ function listItemWithTaskListItem(node, parent, state, info) {
877
+ const head = node.children[0];
878
+ const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
879
+ const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
880
+ const tracker = state.createTracker(info);
881
+ if (checkable) {
882
+ tracker.move(checkbox);
883
+ }
884
+ let value = handle.listItem(node, parent, state, {
885
+ ...info,
886
+ ...tracker.current()
887
+ });
888
+ if (checkable) {
889
+ value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
890
+ }
891
+ return value;
892
+ function check($0) {
893
+ return $0 + checkbox;
894
+ }
895
+ __name(check, "check");
896
+ }
897
+ __name(listItemWithTaskListItem, "listItemWithTaskListItem");
898
+
899
+ // node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
900
+ function gfmFromMarkdown() {
901
+ return [
902
+ gfmAutolinkLiteralFromMarkdown(),
903
+ gfmFootnoteFromMarkdown(),
904
+ gfmStrikethroughFromMarkdown(),
905
+ gfmTableFromMarkdown(),
906
+ gfmTaskListItemFromMarkdown()
907
+ ];
908
+ }
909
+ __name(gfmFromMarkdown, "gfmFromMarkdown");
910
+ function gfmToMarkdown(options) {
911
+ return {
912
+ extensions: [
913
+ gfmAutolinkLiteralToMarkdown(),
914
+ gfmFootnoteToMarkdown(options),
915
+ gfmStrikethroughToMarkdown(),
916
+ gfmTableToMarkdown(options),
917
+ gfmTaskListItemToMarkdown()
918
+ ]
919
+ };
920
+ }
921
+ __name(gfmToMarkdown, "gfmToMarkdown");
922
+ export {
923
+ gfmFromMarkdown,
924
+ gfmToMarkdown
925
+ };