@e-llm-studio/citation 0.0.92 → 0.0.93

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 (267) hide show
  1. package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js +2 -0
  2. package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js.map +1 -0
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/cjs/node_modules/ccount/index.js +2 -0
  5. package/dist/cjs/node_modules/ccount/index.js.map +1 -0
  6. package/dist/cjs/node_modules/longest-streak/index.js +2 -0
  7. package/dist/cjs/node_modules/longest-streak/index.js.map +1 -0
  8. package/dist/cjs/node_modules/markdown-table/index.js +2 -0
  9. package/dist/cjs/node_modules/markdown-table/index.js.map +1 -0
  10. package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js +2 -0
  11. package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js.map +1 -0
  12. package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +2 -0
  13. package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -0
  14. package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js +2 -0
  15. package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -0
  16. package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js +2 -0
  17. package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -0
  18. package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js +2 -0
  19. package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -0
  20. package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js +2 -0
  21. package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -0
  22. package/dist/cjs/node_modules/mdast-util-phrasing/lib/index.js +2 -0
  23. package/dist/cjs/node_modules/mdast-util-phrasing/lib/index.js.map +1 -0
  24. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +2 -0
  25. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +1 -0
  26. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/break.js +2 -0
  27. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +1 -0
  28. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/code.js +2 -0
  29. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +1 -0
  30. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/definition.js +2 -0
  31. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +1 -0
  32. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +2 -0
  33. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +1 -0
  34. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/heading.js +2 -0
  35. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +1 -0
  36. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/html.js +2 -0
  37. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +1 -0
  38. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +2 -0
  39. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +1 -0
  40. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image.js +2 -0
  41. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +1 -0
  42. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/index.js +2 -0
  43. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +1 -0
  44. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +2 -0
  45. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -0
  46. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +2 -0
  47. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +1 -0
  48. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link.js +2 -0
  49. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +1 -0
  50. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +2 -0
  51. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -0
  52. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list.js +2 -0
  53. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +1 -0
  54. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -0
  55. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +1 -0
  56. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/root.js +2 -0
  57. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +1 -0
  58. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/strong.js +2 -0
  59. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +1 -0
  60. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -0
  61. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +1 -0
  62. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +2 -0
  63. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +1 -0
  64. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -0
  65. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +1 -0
  66. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +2 -0
  67. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +1 -0
  68. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -0
  69. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -0
  70. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -0
  71. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +1 -0
  72. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -0
  73. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +1 -0
  74. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -0
  75. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -0
  76. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -0
  77. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +1 -0
  78. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -0
  79. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +1 -0
  80. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -0
  81. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +1 -0
  82. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -0
  83. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +1 -0
  84. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -0
  85. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +1 -0
  86. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +2 -0
  87. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +1 -0
  88. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -0
  89. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +1 -0
  90. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +2 -0
  91. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +1 -0
  92. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +2 -0
  93. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +1 -0
  94. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +2 -0
  95. package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -0
  96. package/dist/cjs/node_modules/mdast-util-to-string/lib/index.js +2 -0
  97. package/dist/cjs/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
  98. package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js +2 -0
  99. package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
  100. package/dist/cjs/node_modules/micromark-extension-gfm/index.js +2 -0
  101. package/dist/cjs/node_modules/micromark-extension-gfm/index.js.map +1 -0
  102. package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +2 -0
  103. package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -0
  104. package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +2 -0
  105. package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -0
  106. package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +2 -0
  107. package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -0
  108. package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js +2 -0
  109. package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -0
  110. package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -0
  111. package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -0
  112. package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js +2 -0
  113. package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -0
  114. package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +2 -0
  115. package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -0
  116. package/dist/cjs/node_modules/micromark-factory-space/index.js +2 -0
  117. package/dist/cjs/node_modules/micromark-factory-space/index.js.map +1 -0
  118. package/dist/cjs/node_modules/micromark-util-character/index.js +2 -0
  119. package/dist/cjs/node_modules/micromark-util-character/index.js.map +1 -0
  120. package/dist/cjs/node_modules/micromark-util-chunked/index.js +2 -0
  121. package/dist/cjs/node_modules/micromark-util-chunked/index.js.map +1 -0
  122. package/dist/cjs/node_modules/micromark-util-classify-character/index.js +2 -0
  123. package/dist/cjs/node_modules/micromark-util-classify-character/index.js.map +1 -0
  124. package/dist/cjs/node_modules/micromark-util-combine-extensions/index.js +2 -0
  125. package/dist/cjs/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
  126. package/dist/cjs/node_modules/micromark-util-normalize-identifier/index.js +2 -0
  127. package/dist/cjs/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
  128. package/dist/cjs/node_modules/micromark-util-resolve-all/index.js +2 -0
  129. package/dist/cjs/node_modules/micromark-util-resolve-all/index.js.map +1 -0
  130. package/dist/cjs/node_modules/remark-gfm/lib/index.js +2 -0
  131. package/dist/cjs/node_modules/remark-gfm/lib/index.js.map +1 -0
  132. package/dist/features/CitationRenderer/MarkdownRenderer.js +2 -0
  133. package/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -0
  134. package/dist/index.js +1 -1
  135. package/dist/node_modules/ccount/index.js +2 -0
  136. package/dist/node_modules/ccount/index.js.map +1 -0
  137. package/dist/node_modules/longest-streak/index.js +2 -0
  138. package/dist/node_modules/longest-streak/index.js.map +1 -0
  139. package/dist/node_modules/markdown-table/index.js +2 -0
  140. package/dist/node_modules/markdown-table/index.js.map +1 -0
  141. package/dist/node_modules/mdast-util-gfm/lib/index.js +2 -0
  142. package/dist/node_modules/mdast-util-gfm/lib/index.js.map +1 -0
  143. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +2 -0
  144. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -0
  145. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +2 -0
  146. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -0
  147. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +2 -0
  148. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -0
  149. package/dist/node_modules/mdast-util-gfm-table/lib/index.js +2 -0
  150. package/dist/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -0
  151. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +2 -0
  152. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -0
  153. package/dist/node_modules/mdast-util-phrasing/lib/index.js +2 -0
  154. package/dist/node_modules/mdast-util-phrasing/lib/index.js.map +1 -0
  155. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +2 -0
  156. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +1 -0
  157. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +2 -0
  158. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +1 -0
  159. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +2 -0
  160. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +1 -0
  161. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +2 -0
  162. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +1 -0
  163. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +2 -0
  164. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +1 -0
  165. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +2 -0
  166. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +1 -0
  167. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +2 -0
  168. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +1 -0
  169. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +2 -0
  170. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +1 -0
  171. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +2 -0
  172. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +1 -0
  173. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +2 -0
  174. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +1 -0
  175. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +2 -0
  176. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -0
  177. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +2 -0
  178. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +1 -0
  179. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +2 -0
  180. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +1 -0
  181. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +2 -0
  182. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -0
  183. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +2 -0
  184. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +1 -0
  185. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -0
  186. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +1 -0
  187. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +2 -0
  188. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +1 -0
  189. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +2 -0
  190. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +1 -0
  191. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -0
  192. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +1 -0
  193. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +2 -0
  194. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +1 -0
  195. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -0
  196. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +1 -0
  197. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +2 -0
  198. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +1 -0
  199. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -0
  200. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -0
  201. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -0
  202. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +1 -0
  203. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -0
  204. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +1 -0
  205. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -0
  206. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -0
  207. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -0
  208. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +1 -0
  209. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -0
  210. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +1 -0
  211. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -0
  212. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +1 -0
  213. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -0
  214. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +1 -0
  215. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -0
  216. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +1 -0
  217. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +2 -0
  218. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +1 -0
  219. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -0
  220. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +1 -0
  221. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +2 -0
  222. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +1 -0
  223. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +2 -0
  224. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +1 -0
  225. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +2 -0
  226. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -0
  227. package/dist/node_modules/mdast-util-to-string/lib/index.js +2 -0
  228. package/dist/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
  229. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +2 -0
  230. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
  231. package/dist/node_modules/micromark-extension-gfm/index.js +2 -0
  232. package/dist/node_modules/micromark-extension-gfm/index.js.map +1 -0
  233. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +2 -0
  234. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -0
  235. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +2 -0
  236. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -0
  237. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +2 -0
  238. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -0
  239. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +2 -0
  240. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -0
  241. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -0
  242. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -0
  243. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +2 -0
  244. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -0
  245. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +2 -0
  246. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -0
  247. package/dist/node_modules/micromark-factory-space/index.js +2 -0
  248. package/dist/node_modules/micromark-factory-space/index.js.map +1 -0
  249. package/dist/node_modules/micromark-util-character/index.js +2 -0
  250. package/dist/node_modules/micromark-util-character/index.js.map +1 -0
  251. package/dist/node_modules/micromark-util-chunked/index.js +2 -0
  252. package/dist/node_modules/micromark-util-chunked/index.js.map +1 -0
  253. package/dist/node_modules/micromark-util-classify-character/index.js +2 -0
  254. package/dist/node_modules/micromark-util-classify-character/index.js.map +1 -0
  255. package/dist/node_modules/micromark-util-combine-extensions/index.js +2 -0
  256. package/dist/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
  257. package/dist/node_modules/micromark-util-normalize-identifier/index.js +2 -0
  258. package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
  259. package/dist/node_modules/micromark-util-resolve-all/index.js +2 -0
  260. package/dist/node_modules/micromark-util-resolve-all/index.js.map +1 -0
  261. package/dist/node_modules/remark-gfm/lib/index.js +2 -0
  262. package/dist/node_modules/remark-gfm/lib/index.js.map +1 -0
  263. package/dist/types/src/features/CitationRenderer/MarkdownRenderer.d.ts +9 -0
  264. package/dist/types/src/features/CitationRenderer/MarkdownRenderer.d.ts.map +1 -0
  265. package/dist/types/src/index.d.ts +1 -0
  266. package/dist/types/src/index.d.ts.map +1 -1
  267. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("../../node_modules/react-markdown/lib/react-markdown.js"),i=require("../../node_modules/rehype-raw/lib/index.js"),a=require("../../node_modules/remark-gfm/lib/index.js"),o=require("../../node_modules/unist-util-visit/lib/index.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(t);function d(){return function(n){o.visit(n,"text",(function(n,t,r){var i;if(r&&"string"==typeof n.value&&n.value.includes("✓")){for(var a=n.value.split("✓"),o=[],s=0;s<a.length;s++){var l=a[s];l&&o.push({type:"text",value:l}),s<a.length-1&&o.push({type:"element",tagName:"span",properties:{className:["text-green-600","font-medium","inline-block","mr-1","align-middle"]},children:[{type:"text",value:"✓"}]})}return(i=r.children).splice.apply(i,e.__spreadArray([t,1],o,!1)),t+o.length}}))}}var p=function(t,r){if(!r)return t;var i=new RegExp(r.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),"gi"),a=t.split(i),o=t.match(i);if(!o)return t;var s=[];return a.forEach((function(t,r){s.push(t),o[r]&&s.push(n.jsx("span",e.__assign({className:"rounded bg-yellow-200 px-1 py-0.5 text-gray-700"},{children:o[r]}),r))})),s};function u(){return function(e){o.visit(e,"element",(function(e,n,t){if(t&&"p"===e.tagName)return e.children&&1===e.children.length&&"element"===e.children[0].type&&"details"===e.children[0].tagName?(t.children.splice(n,1,e.children[0]),n):void 0}))}}var c=function(e){var n;return"text"===(null==e?void 0:e.type)&&/^\s*$/.test(null!==(n=e.value)&&void 0!==n?n:"")};function m(){return function(e){o.visit(e,"element",(function(e){var n,t;if("details"===e.tagName&&"data-target"in(e.properties||{})){var r=e.children||[],i=0;"element"===(null===(n=r[0])||void 0===n?void 0:n.type)&&"summary"===(null===(t=r[0])||void 0===t?void 0:t.tagName)&&(i=1);var a=r.slice(i),o=a.filter((function(e){return!c(e)}));if((1!==o.length||"element"!==o[0].type||!o[0].properties||!("data-popup"in o[0].properties)&&void 0===o[0].properties["data-popup"])&&!o.some((function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])}))){var s={type:"element",tagName:"div",properties:{"data-popup":""},children:a};e.children=r.slice(0,i).concat([s])}}}))}}function g(){return function(e){o.visit(e,"element",(function(e){var n,t;if("details"===e.tagName){var r=e.properties||{};if(!("data-inline"in r)&&!("data-target"in r)){var i=e.children||[],a=0;"element"===(null===(n=i[0])||void 0===n?void 0:n.type)&&"summary"===(null===(t=i[0])||void 0===t?void 0:t.tagName)&&(a=1);var o=i.slice(a),s=o.filter((function(e){return!c(e)}));if((1!==s.length||"element"!==s[0].type||!s[0].properties||!("data-popup"in s[0].properties)&&void 0===s[0].properties["data-popup"])&&!s.some((function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])}))){var l={type:"element",tagName:"div",properties:{"data-popup":""},children:o};e.children=i.slice(0,a).concat([l])}}}}))}}exports.default=function(o){var s=o.value,c=o.highlightedText,f=l.default.useRef(null),v=l.default.useRef(null);t.useEffect((function(){if(c){var e=setTimeout((function(){if(v.current){var e=v.current.querySelector("span.bg-yellow-200");e&&e.scrollIntoView({behavior:"smooth",block:"center"})}}),100);return function(){return clearTimeout(e)}}}),[c]);return n.jsxs("div",e.__assign({ref:v,className:"flex h-[42vh] gap-4"},{children:[n.jsx("div",e.__assign({className:"h-[42vh] flex-1 rounded-xl border border-gray-200 bg-white p-5 shadow-sm"},{children:n.jsx("div",e.__assign({className:"h-full overflow-y-auto pr-2"},{children:n.jsx(r.ReactMarkdown,e.__assign({remarkPlugins:[a.default],rehypePlugins:[i.default,u,d,m,g],components:{details:function(t){t.node;var r=e.__rest(t,["node"]),i=!!r["data-inline"],a=!!r["data-target"];return i?n.jsx("details",e.__assign({},r,{className:"md-details md-details--inline relative my-1 inline-block rounded-[8px] align-middle",onToggle:function(e){e.stopPropagation(),function(e){var n=e.currentTarget,t=n.getAttribute("data-inline");if(t&&f.current){var r=f.current.querySelector('details[data-target="'.concat(t,'"]'));r&&(r.open=n.open)}}(e)}},{children:r.children})):a?n.jsxs("details",e.__assign({},r,{className:"md-details md-details--target my-2 block",onToggle:function(e){return e.stopPropagation()}},{children:[n.jsx("summary",{className:"md-target-dummy-summary","aria-hidden":"true"}),r.children]})):n.jsx("details",e.__assign({},r,{className:"md-details md-details--block relative my-1 w-full rounded-[8px] align-middle",onToggle:function(e){return e.stopPropagation()}},{children:r.children}))},summary:function(t){t.node;var r=e.__rest(t,["node"]);return n.jsx("div",e.__assign({className:"mt-0"},{children:n.jsx("summary",e.__assign({className:"md-summary inline-flex cursor-pointer select-none items-center gap-1 py-1 font-medium hover:opacity-90",style:{color:"#19213D",fontWeight:500},onClick:function(e){return e.stopPropagation()}},r,{children:n.jsx("span",e.__assign({className:"whitespace-nowrap align-middle"},{children:r.children}))}))}))},ul:function(t){t.node;var r=e.__rest(t,["node"]);return n.jsx("ol",e.__assign({className:"md-ol my-1 list-decimal pl-5"},r))},ol:function(t){t.node;var r=e.__rest(t,["node"]);return n.jsx("ol",e.__assign({className:"md-ol my-1 list-decimal pl-5"},r))},div:function(t){var r,i=t.node,a=e.__rest(t,["node"]);return(null==i?void 0:i.properties)&&("data-popup"in i.properties||void 0!==(null===(r=i.properties)||void 0===r?void 0:r["data-popup"]))?n.jsx("div",e.__assign({},a,{className:(a.className?a.className+" ":"")+"md-popup",role:"region"})):n.jsx("div",e.__assign({},a))},p:function(e){var t=e.children,r=Array.isArray(t)?t:[t];return n.jsx("p",{children:r.map((function(e,t){return"string"==typeof e?p(e,c):n.jsx(l.default.Fragment,{children:e},t)}))})},li:function(e){var t=e.children;return n.jsx("li",{children:t.map((function(e){return"string"==typeof e?p(e,c):e}))})},code:function(t){var r=t.children,i=e.__rest(t,["children"]);return n.jsx("code",e.__assign({},i,{children:r.map((function(e){return"string"==typeof e?p(e,c):e}))}))}}},{children:s}))}))})),n.jsx("style",{children:"\n .md-root strong { color: #19213D !important; }\n .md-check-green { color: #16A34A !important; font-weight: 500; }\n details > summary::-webkit-details-marker { display: none; }\n .md-summary span { white-space: nowrap; }\n\n .md-target-dummy-summary { display: none !important; }\n\n /* Chevron animation */\n .md-details[open] > summary .md-chevron { transform: rotate(180deg); transition: transform .25s cubic-bezier(.2,.8,.2,1); }\n .md-details > summary .md-chevron { transition: transform .25s cubic-bezier(.2,.8,.2,1); }\n\n /* Normal details open look */\n .md-details--block[open] {\n \n padding: 8px 10px;\n border-radius: 8px;\n }\n\n /* Inline trigger never reveals inner content */\n .md-details--inline > :not(summary) { display: none !important; }\n\n /* Target popups (animated) */\n .md-details--target .md-popup,\n .md-details--target [data-popup] {\n display: block;\n margin-top: 6px;\n border: 1px solid #6D28D9;\n color: #6D28D9;\n border-radius: 10px;\n padding: 12px;\n box-shadow: 0 8px 24px rgba(0,0,0,.06);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity .2s ease, transform .2s ease;\n font-size: 12px;\n line-height: 1.35;\n background: #6D28D91A;\n }\n .md-details--target[open] .md-popup,\n .md-details--target[open] [data-popup] {\n opacity: 1;\n transform: translateY(0);\n }\n\n /* Popup body for normal details (✓ items) */\n .md-details--block[open] .md-popup,\n .md-details--block[open] [data-popup] {\n display: block;\n border: 1px solid #6D28D9;\n color: #6D28D9;\n border-radius: 10px;\n padding: 12px; \n font-size: 12px;\n line-height: 1.35;\n font-weight: 500;\n background: #6D28D91A;\n }\n\n /* ---- NESTED POPUP GUARD: if a popup is inside a popup, neutralize the inner one ---- */\n .md-popup .md-popup,\n .md-popup [data-popup] {\n border: none !important;\n background: transparent !important;\n padding: 0 !important;\n box-shadow: none !important;\n color: inherit !important;\n }\n "})]}))};
2
+ //# sourceMappingURL=MarkdownRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),o=require("./features/BookCitation/BookCitation.js"),r=require("./features/Bookemon/Bookemon.js"),i=require("./features/PdfEditorCitation/PdfEditorCitation.js"),a=require("./features/CitationRenderer/CitationRenderer.js"),n=require("./features/CodeCitation/_components/CodeEditor.js"),d=require("./features/PaginatedTable/PaginatedTable.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=o.default,exports.Bookemon=r.default,exports.PdfCitation=i.PdfEditorCitation,exports.CitationRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return n.DiagnosticSeverity}}),exports.PaginatedTable=d.default;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),r=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),i=require("./features/PdfEditorCitation/PdfEditorCitation.js"),a=require("./features/CitationRenderer/CitationRenderer.js"),n=require("./features/CitationRenderer/MarkdownRenderer.js"),d=require("./features/CodeCitation/_components/CodeEditor.js"),s=require("./features/PaginatedTable/PaginatedTable.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=r.default,exports.Bookemon=o.default,exports.PdfCitation=i.PdfEditorCitation,exports.CitationRenderer=a.default,exports.MarkdownRenderer=n.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return d.DiagnosticSeverity}}),exports.PaginatedTable=s.default;
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ccount=function(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;-1!==o;)n++,o=r.indexOf(t,o+t.length);return n};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/ccount/index.js"],"sourcesContent":["/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n"],"names":["value","character","source","String","TypeError","count","index","indexOf","length"],"mappings":"mFAUO,SAAgBA,EAAOC,GAC5B,MAAMC,EAASC,OAAOH,GAEtB,GAAyB,iBAAdC,EACT,MAAM,IAAIG,UAAU,sBAGtB,IAAIC,EAAQ,EACRC,EAAQJ,EAAOK,QAAQN,GAE3B,MAAkB,IAAXK,GACLD,IACAC,EAAQJ,EAAOK,QAAQN,EAAWK,EAAQL,EAAUO,QAGtD,OAAOH,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.longestStreak=function(e,t){const r=String(e);let n=r.indexOf(t),o=n,s=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==n;)n===o?++s>i&&(i=s):s=1,o=n+t.length,n=r.indexOf(t,o);return i};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/longest-streak/index.js"],"sourcesContent":["/**\n * Get the count of the longest repeating streak of `substring` in `value`.\n *\n * @param {string} value\n * Content to search in.\n * @param {string} substring\n * Substring to look for, typically one character.\n * @returns {number}\n * Count of most frequent adjacent `substring`s in `value`.\n */\nexport function longestStreak(value, substring) {\n const source = String(value)\n let index = source.indexOf(substring)\n let expected = index\n let count = 0\n let max = 0\n\n if (typeof substring !== 'string') {\n throw new TypeError('Expected substring')\n }\n\n while (index !== -1) {\n if (index === expected) {\n if (++count > max) {\n max = count\n }\n } else {\n count = 1\n }\n\n expected = index + substring.length\n index = source.indexOf(substring, expected)\n }\n\n return max\n}\n"],"names":["value","substring","source","String","index","indexOf","expected","count","max","TypeError","length"],"mappings":"0FAUO,SAAuBA,EAAOC,GACnC,MAAMC,EAASC,OAAOH,GACtB,IAAII,EAAQF,EAAOG,QAAQJ,GACvBK,EAAWF,EACXG,EAAQ,EACRC,EAAM,EAEV,GAAyB,iBAAdP,EACT,MAAM,IAAIQ,UAAU,sBAGtB,MAAkB,IAAXL,GACDA,IAAUE,IACNC,EAAQC,IACZA,EAAMD,GAGRA,EAAQ,EAGVD,EAAWF,EAAQH,EAAUS,OAC7BN,EAAQF,EAAOG,QAAQJ,EAAWK,GAGpC,OAAOE,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e){return e.length}function t(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.markdownTable=function(n,i){const l=i||{},r=(l.align||[]).concat(),s=l.stringLength||e,o=[],a=[],c=[],g=[];let p=0,h=-1;for(;++h<n.length;){const e=[],t=[];let i=-1;for(n[h].length>p&&(p=n[h].length);++i<n[h].length;){const r=null==(u=n[h][i])?"":String(u);if(!1!==l.alignDelimiters){const e=s(r);t[i]=e,(void 0===g[i]||e>g[i])&&(g[i]=e)}e.push(r)}a[h]=e,c[h]=t}var u;let f=-1;if("object"==typeof r&&"length"in r)for(;++f<p;)o[f]=t(r[f]);else{const e=t(r);for(;++f<p;)o[f]=e}f=-1;const d=[],m=[];for(;++f<p;){const e=o[f];let t="",n="";99===e?(t=":",n=":"):108===e?t=":":114===e&&(n=":");let i=!1===l.alignDelimiters?1:Math.max(1,g[f]-t.length-n.length);const r=t+"-".repeat(i)+n;!1!==l.alignDelimiters&&(i=t.length+i+n.length,i>g[f]&&(g[f]=i),m[f]=i),d[f]=r}a.splice(1,0,d),c.splice(1,0,m),h=-1;const D=[];for(;++h<a.length;){const e=a[h],t=c[h];f=-1;const n=[];for(;++f<p;){const i=e[f]||"";let r="",s="";if(!1!==l.alignDelimiters){const e=g[f]-(t[f]||0),n=o[f];114===n?r=" ".repeat(e):99===n?e%2?(r=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(r=" ".repeat(e/2),s=r):s=" ".repeat(e)}!1===l.delimiterStart||f||n.push("|"),!1===l.padding||!1===l.alignDelimiters&&""===i||!1===l.delimiterStart&&!f||n.push(" "),!1!==l.alignDelimiters&&n.push(r),n.push(i),!1!==l.alignDelimiters&&n.push(s),!1!==l.padding&&n.push(" "),!1===l.delimiterEnd&&f===p-1||n.push("|")}D.push(!1===l.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return D.join("\n")};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/markdown-table/index.js"],"sourcesContent":["// To do: next major: remove.\n/**\n * @typedef {Options} MarkdownTableOptions\n * Configuration.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [alignDelimiters=true]\n * Whether to align the delimiters (default: `true`);\n * they are aligned by default:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * Pass `false` to make them staggered:\n *\n * ```markdown\n * | Alpha | B |\n * | - | - |\n * | C | Delta |\n * ```\n * @property {ReadonlyArray<string | null | undefined> | string | null | undefined} [align]\n * How to align columns (default: `''`);\n * one style for all columns or styles for their respective columns;\n * each style is either `'l'` (left), `'r'` (right), or `'c'` (center);\n * other values are treated as `''`, which doesn’t place the colon in the\n * alignment row but does align left;\n * *only the lowercased first character is used, so `Right` is fine.*\n * @property {boolean | null | undefined} [delimiterEnd=true]\n * Whether to end each row with the delimiter (default: `true`).\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are ending delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no ending delimiters:\n *\n * ```markdown\n * | Alpha | B\n * | ----- | -----\n * | C | Delta\n * ```\n * @property {boolean | null | undefined} [delimiterStart=true]\n * Whether to begin each row with the delimiter (default: `true`).\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are starting delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no starting delimiters:\n *\n * ```markdown\n * Alpha | B |\n * ----- | ----- |\n * C | Delta |\n * ```\n * @property {boolean | null | undefined} [padding=true]\n * Whether to add a space of padding between delimiters and cells\n * (default: `true`).\n *\n * When `true`, there is padding:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there is no padding:\n *\n * ```markdown\n * |Alpha|B |\n * |-----|-----|\n * |C |Delta|\n * ```\n * @property {((value: string) => number) | null | undefined} [stringLength]\n * Function to detect the length of table cell content (optional);\n * this is used when aligning the delimiters (`|`) between table cells;\n * full-width characters and emoji mess up delimiter alignment when viewing\n * the markdown source;\n * to fix this, you can pass this function,\n * which receives the cell content and returns its “visible” size;\n * note that what is and isn’t visible depends on where the text is displayed.\n *\n * Without such a function, the following:\n *\n * ```js\n * markdownTable([\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ])\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | - | - |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n *\n * With [`string-width`](https://github.com/sindresorhus/string-width):\n *\n * ```js\n * import stringWidth from 'string-width'\n *\n * markdownTable(\n * [\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ],\n * {stringLength: stringWidth}\n * )\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | ----- | ------- |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n */\n\n/**\n * @param {string} value\n * Cell value.\n * @returns {number}\n * Cell size.\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * Generate a markdown\n * ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables))\n * table.\n *\n * @param {ReadonlyArray<ReadonlyArray<string | null | undefined>>} table\n * Table data (matrix of strings).\n * @param {Readonly<Options> | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Result.\n */\nexport function markdownTable(table, options) {\n const settings = options || {}\n // To do: next major: change to spread.\n const align = (settings.align || []).concat()\n const stringLength = settings.stringLength || defaultStringLength\n /** @type {Array<number>} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array<Array<string>>} Cells per row. */\n const cellMatrix = []\n /** @type {Array<Array<number>>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array<number>} */\n const longestCellByColumn = []\n let mostCellsPerRow = 0\n let rowIndex = -1\n\n // This is a superfluous loop if we don’t align delimiters, but otherwise we’d\n // do superfluous work when aligning, so optimize for aligning.\n while (++rowIndex < table.length) {\n /** @type {Array<string>} */\n const row = []\n /** @type {Array<number>} */\n const sizes = []\n let columnIndex = -1\n\n if (table[rowIndex].length > mostCellsPerRow) {\n mostCellsPerRow = table[rowIndex].length\n }\n\n while (++columnIndex < table[rowIndex].length) {\n const cell = serialize(table[rowIndex][columnIndex])\n\n if (settings.alignDelimiters !== false) {\n const size = stringLength(cell)\n sizes[columnIndex] = size\n\n if (\n longestCellByColumn[columnIndex] === undefined ||\n size > longestCellByColumn[columnIndex]\n ) {\n longestCellByColumn[columnIndex] = size\n }\n }\n\n row.push(cell)\n }\n\n cellMatrix[rowIndex] = row\n sizeMatrix[rowIndex] = sizes\n }\n\n // Figure out which alignments to use.\n let columnIndex = -1\n\n if (typeof align === 'object' && 'length' in align) {\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = toAlignment(align[columnIndex])\n }\n } else {\n const code = toAlignment(align)\n\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = code\n }\n }\n\n // Inject the alignment row.\n columnIndex = -1\n /** @type {Array<string>} */\n const row = []\n /** @type {Array<number>} */\n const sizes = []\n\n while (++columnIndex < mostCellsPerRow) {\n const code = alignments[columnIndex]\n let before = ''\n let after = ''\n\n if (code === 99 /* `c` */) {\n before = ':'\n after = ':'\n } else if (code === 108 /* `l` */) {\n before = ':'\n } else if (code === 114 /* `r` */) {\n after = ':'\n }\n\n // There *must* be at least one hyphen-minus in each alignment cell.\n let size =\n settings.alignDelimiters === false\n ? 1\n : Math.max(\n 1,\n longestCellByColumn[columnIndex] - before.length - after.length\n )\n\n const cell = before + '-'.repeat(size) + after\n\n if (settings.alignDelimiters !== false) {\n size = before.length + size + after.length\n\n if (size > longestCellByColumn[columnIndex]) {\n longestCellByColumn[columnIndex] = size\n }\n\n sizes[columnIndex] = size\n }\n\n row[columnIndex] = cell\n }\n\n // Inject the alignment row.\n cellMatrix.splice(1, 0, row)\n sizeMatrix.splice(1, 0, sizes)\n\n rowIndex = -1\n /** @type {Array<string>} */\n const lines = []\n\n while (++rowIndex < cellMatrix.length) {\n const row = cellMatrix[rowIndex]\n const sizes = sizeMatrix[rowIndex]\n columnIndex = -1\n /** @type {Array<string>} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (settings.alignDelimiters !== false) {\n const size =\n longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)\n const code = alignments[columnIndex]\n\n if (code === 114 /* `r` */) {\n before = ' '.repeat(size)\n } else if (code === 99 /* `c` */) {\n if (size % 2) {\n before = ' '.repeat(size / 2 + 0.5)\n after = ' '.repeat(size / 2 - 0.5)\n } else {\n before = ' '.repeat(size / 2)\n after = before\n }\n } else {\n after = ' '.repeat(size)\n }\n }\n\n if (settings.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n settings.padding !== false &&\n // Don’t add the opening space if we’re not aligning and the cell is\n // empty: there will be a closing space.\n !(settings.alignDelimiters === false && cell === '') &&\n (settings.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (settings.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (settings.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (settings.padding !== false) {\n line.push(' ')\n }\n\n if (\n settings.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n settings.delimiterEnd === false\n ? line.join('').replace(/ +$/, '')\n : line.join('')\n )\n }\n\n return lines.join('\\n')\n}\n\n/**\n * @param {string | null | undefined} [value]\n * Value to serialize.\n * @returns {string}\n * Result.\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string | null | undefined} value\n * Value.\n * @returns {number}\n * Alignment.\n */\nfunction toAlignment(value) {\n const code = typeof value === 'string' ? value.codePointAt(0) : 0\n\n return code === 67 /* `C` */ || code === 99 /* `c` */\n ? 99 /* `c` */\n : code === 76 /* `L` */ || code === 108 /* `l` */\n ? 108 /* `l` */\n : code === 82 /* `R` */ || code === 114 /* `r` */\n ? 114 /* `r` */\n : 0\n}\n"],"names":["defaultStringLength","value","length","toAlignment","code","codePointAt","table","options","settings","align","concat","stringLength","alignments","cellMatrix","sizeMatrix","longestCellByColumn","mostCellsPerRow","rowIndex","row","sizes","columnIndex","cell","String","alignDelimiters","size","undefined","push","before","after","Math","max","repeat","splice","lines","line","delimiterStart","padding","delimiterEnd","join","replace"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../mdast-util-gfm-autolink-literal/lib/index.js"),t=require("../../mdast-util-gfm-footnote/lib/index.js"),o=require("../../mdast-util-gfm-strikethrough/lib/index.js"),e=require("../../mdast-util-gfm-table/lib/index.js"),i=require("../../mdast-util-gfm-task-list-item/lib/index.js");exports.gfmFromMarkdown=function(){return[r.gfmAutolinkLiteralFromMarkdown(),t.gfmFootnoteFromMarkdown(),o.gfmStrikethroughFromMarkdown(),e.gfmTableFromMarkdown(),i.gfmTaskListItemFromMarkdown()]},exports.gfmToMarkdown=function(n){return{extensions:[r.gfmAutolinkLiteralToMarkdown(),t.gfmFootnoteToMarkdown(n),o.gfmStrikethroughToMarkdown(),e.gfmTableToMarkdown(n),i.gfmTaskListItemToMarkdown()]}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm/lib/index.js"],"sourcesContent":["/**\n * @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'\n * @import {Options} from 'mdast-util-gfm'\n * @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @returns {Array<FromMarkdownExtension>}\n * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown(),\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown(),\n gfmTableFromMarkdown(),\n gfmTaskListItemFromMarkdown()\n ]\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown(),\n gfmFootnoteToMarkdown(options),\n gfmStrikethroughToMarkdown(),\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown()\n ]\n }\n}\n"],"names":["gfmAutolinkLiteralFromMarkdown","gfmFootnoteFromMarkdown","gfmStrikethroughFromMarkdown","gfmTableFromMarkdown","gfmTaskListItemFromMarkdown","options","extensions","gfmAutolinkLiteralToMarkdown","gfmFootnoteToMarkdown","gfmStrikethroughToMarkdown","gfmTableToMarkdown","gfmTaskListItemToMarkdown"],"mappings":"wYAgCO,WACL,MAAO,CACLA,mCACAC,4BACAC,iCACAC,yBACAC,gCAEJ,wBAYO,SAAuBC,GAC5B,MAAO,CACLC,WAAY,CACVC,iCACAC,EAAAA,sBAAsBH,GACtBI,+BACAC,EAAAA,mBAAmBL,GACnBM,+BAGN"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../ccount/index.js"),e=require("../../devlop/lib/default.js"),n=require("../../micromark-util-character/index.js"),i=require("../../mdast-util-find-and-replace/lib/index.js");const l="phrasing",r=["autolink","link","image","label"];function o(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function u(t){this.config.enter.autolinkProtocol.call(this,t)}function c(t){this.config.exit.autolinkProtocol.call(this,t)}function a(t){this.config.exit.data.call(this,t);const n=this.stack[this.stack.length-1];e.ok("link"===n.type),n.url="http://"+this.sliceSerialize(t)}function s(t){this.config.exit.autolinkEmail.call(this,t)}function f(t){this.exit(t)}function h(t){i.findAndReplace(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,d],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,k]],{ignore:["link","linkReference"]})}function d(e,n,i,l,r){let o="";if(!p(r))return!1;if(/^w/i.test(n)&&(i=n+i,n="",o="http://"),!function(t){const e=t.split(".");if(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))return!1;return!0}(i))return!1;const u=function(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],l=i.indexOf(")");const r=t.ccount(e,"(");let o=t.ccount(e,")");for(;-1!==l&&r>o;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),o++;return[e,i]}(i+l);if(!u[0])return!1;const c={type:"link",title:null,url:o+n+u[0],children:[{type:"text",value:n+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function k(t,e,n,i){return!(!p(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function p(t,e){const i=t.input.charCodeAt(t.index-1);return(0===t.index||n.unicodeWhitespace(i)||n.unicodePunctuation(i))&&(!e||47!==i)}exports.gfmAutolinkLiteralFromMarkdown=function(){return{transforms:[h],enter:{literalAutolink:o,literalAutolinkEmail:u,literalAutolinkHttp:u,literalAutolinkWww:u},exit:{literalAutolink:f,literalAutolinkEmail:s,literalAutolinkHttp:c,literalAutolinkWww:a}}},exports.gfmAutolinkLiteralToMarkdown=function(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:r},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:r},{character:":",before:"[ps]",after:"\\/",inConstruct:l,notInConstruct:r}]}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm-autolink-literal/lib/index.js"],"sourcesContent":["/**\n * @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'\n * @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'\n * @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n * @import {Link, PhrasingContent} from 'mdast'\n */\n\nimport {ccount} from 'ccount'\nimport {ok as assert} from 'devlop'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array<ConstructName>} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralFromMarkdown() {\n return {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralToMarkdown() {\n return {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: ':',\n before: '[ps]',\n after: '\\\\/',\n inConstruct,\n notInConstruct\n }\n ]\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'link')\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/gu, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Array<PhrasingContent> | Link | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n // If it’s an email, the previous character should not be a slash.\n (!email || code !== 47)\n )\n}\n"],"names":["inConstruct","notInConstruct","enterLiteralAutolink","token","this","enter","type","title","url","children","enterLiteralAutolinkValue","config","autolinkProtocol","call","exitLiteralAutolinkHttp","exit","exitLiteralAutolinkWww","data","node","stack","length","assert","sliceSerialize","exitLiteralAutolinkEmail","autolinkEmail","exitLiteralAutolink","transformGfmAutolinkLiterals","tree","findAndReplace","findUrl","findEmail","ignore","_","protocol","domain","path","match","prefix","previous","test","parts","split","isCorrectDomain","trailExec","exec","undefined","slice","index","trail","closingParenIndex","indexOf","openingParens","ccount","closingParens","splitUrl","result","value","atext","label","email","code","input","charCodeAt","unicodeWhitespace","unicodePunctuation","transforms","literalAutolink","literalAutolinkEmail","literalAutolinkHttp","literalAutolinkWww","unsafe","character","before","after"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../devlop/lib/default.js"),t=require("../../micromark-util-normalize-identifier/index.js");function n(){this.buffer()}function o(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function i(){this.buffer()}function r(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function f(n){const o=this.resume(),i=this.stack[this.stack.length-1];e.ok("footnoteReference"===i.type),i.identifier=t.normalizeIdentifier(this.sliceSerialize(n)).toLowerCase(),i.label=o}function s(e){this.exit(e)}function c(n){const o=this.resume(),i=this.stack[this.stack.length-1];e.ok("footnoteDefinition"===i.type),i.identifier=t.normalizeIdentifier(this.sliceSerialize(n)).toLowerCase(),i.label=o}function a(e){this.exit(e)}function l(e,t,n,o){const i=n.createTracker(o);let r=i.move("[^");const f=n.enter("footnoteReference"),s=n.enter("reference");return r+=i.move(n.safe(n.associationId(e),{after:"]",before:r})),s(),f(),r+=i.move("]"),r}function u(e,t,n){return 0===t?e:m(e,t,n)}function m(e,t,n){return(n?"":" ")+e}l.peek=function(){return"["},exports.gfmFootnoteFromMarkdown=function(){return{enter:{gfmFootnoteCallString:n,gfmFootnoteCall:o,gfmFootnoteDefinitionLabelString:i,gfmFootnoteDefinition:r},exit:{gfmFootnoteCallString:f,gfmFootnoteCall:s,gfmFootnoteDefinitionLabelString:c,gfmFootnoteDefinition:a}}},exports.gfmFootnoteToMarkdown=function(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,o,i){const r=o.createTracker(i);let f=r.move("[^");const s=o.enter("footnoteDefinition"),c=o.enter("label");f+=r.move(o.safe(o.associationId(e),{before:f,after:"]"})),c(),f+=r.move("]:"),e.children&&e.children.length>0&&(r.shift(4),f+=r.move((t?"\n":" ")+o.indentLines(o.containerFlow(e,r.current()),t?m:u)));return s(),f},footnoteReference:l},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm-footnote/lib/index.js"],"sourcesContent":["/**\n * @import {\n * CompileContext,\n * Extension as FromMarkdownExtension,\n * Handle as FromMarkdownHandle\n * } from 'mdast-util-from-markdown'\n * @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'\n * @import {\n * Handle as ToMarkdownHandle,\n * Map,\n * Options as ToMarkdownExtension\n * } from 'mdast-util-to-markdown'\n * @import {FootnoteDefinition, FootnoteReference} from 'mdast'\n */\n\nimport {ok as assert} from 'devlop'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n\nfootnoteReference.peek = footnoteReferencePeek\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCallString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinitionLabelString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCallString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteReference')\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n node.label = label\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteDefinition')\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n node.label = label\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\nfunction footnoteReference(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteReference')\n const subexit = state.enter('reference')\n value += tracker.move(\n state.safe(state.associationId(node), {after: ']', before: value})\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteCallString: enterFootnoteCallString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteDefinition: enterFootnoteDefinition\n },\n exit: {\n gfmFootnoteCallString: exitFootnoteCallString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteDefinition: exitFootnoteDefinition\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @param {ToMarkdownOptions | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown(options) {\n // To do: next major: change default.\n let firstLineBlank = false\n\n if (options && options.firstLineBlank) {\n firstLineBlank = true\n }\n\n return {\n handlers: {footnoteDefinition, footnoteReference},\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['label', 'phrasing', 'reference']}]\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\n function footnoteDefinition(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteDefinition')\n const subexit = state.enter('label')\n value += tracker.move(\n state.safe(state.associationId(node), {before: value, after: ']'})\n )\n subexit()\n\n value += tracker.move(']:')\n\n if (node.children && node.children.length > 0) {\n tracker.shift(4)\n\n value += tracker.move(\n (firstLineBlank ? '\\n' : ' ') +\n state.indentLines(\n state.containerFlow(node, tracker.current()),\n firstLineBlank ? mapAll : mapExceptFirst\n )\n )\n }\n\n exit()\n\n return value\n }\n}\n\n/** @type {Map} */\nfunction mapExceptFirst(line, index, blank) {\n return index === 0 ? line : mapAll(line, index, blank)\n}\n\n/** @type {Map} */\nfunction mapAll(line, index, blank) {\n return (blank ? '' : ' ') + line\n}\n"],"names":["enterFootnoteCallString","this","buffer","enterFootnoteCall","token","enter","type","identifier","label","enterFootnoteDefinitionLabelString","enterFootnoteDefinition","children","exitFootnoteCallString","resume","node","stack","length","assert","normalizeIdentifier","sliceSerialize","toLowerCase","exitFootnoteCall","exit","exitFootnoteDefinitionLabelString","exitFootnoteDefinition","footnoteReference","_","state","info","tracker","createTracker","value","move","subexit","safe","associationId","after","before","mapExceptFirst","line","index","blank","mapAll","peek","gfmFootnoteCallString","gfmFootnoteCall","gfmFootnoteDefinitionLabelString","gfmFootnoteDefinition","options","firstLineBlank","handlers","footnoteDefinition","shift","indentLines","containerFlow","current","unsafe","character","inConstruct"],"mappings":"iLAwBA,SAASA,IACPC,KAAKC,QACP,CAMA,SAASC,EAAkBC,GACzBH,KAAKI,MAAM,CAACC,KAAM,oBAAqBC,WAAY,GAAIC,MAAO,IAAKJ,EACrE,CAMA,SAASK,IACPR,KAAKC,QACP,CAMA,SAASQ,EAAwBN,GAC/BH,KAAKI,MACH,CAACC,KAAM,qBAAsBC,WAAY,GAAIC,MAAO,GAAIG,SAAU,IAClEP,EAEJ,CAMA,SAASQ,EAAuBR,GAC9B,MAAMI,EAAQP,KAAKY,SACbC,EAAOb,KAAKc,MAAMd,KAAKc,MAAMC,OAAS,GAC5CC,KAAqB,sBAAdH,EAAKR,MACZQ,EAAKP,WAAaW,EAAmBA,oBACnCjB,KAAKkB,eAAef,IACpBgB,cACFN,EAAKN,MAAQA,CACf,CAMA,SAASa,EAAiBjB,GACxBH,KAAKqB,KAAKlB,EACZ,CAMA,SAASmB,EAAkCnB,GACzC,MAAMI,EAAQP,KAAKY,SACbC,EAAOb,KAAKc,MAAMd,KAAKc,MAAMC,OAAS,GAC5CC,KAAqB,uBAAdH,EAAKR,MACZQ,EAAKP,WAAaW,EAAmBA,oBACnCjB,KAAKkB,eAAef,IACpBgB,cACFN,EAAKN,MAAQA,CACf,CAMA,SAASgB,EAAuBpB,GAC9BH,KAAKqB,KAAKlB,EACZ,CAWA,SAASqB,EAAkBX,EAAMY,EAAGC,EAAOC,GACzC,MAAMC,EAAUF,EAAMG,cAAcF,GACpC,IAAIG,EAAQF,EAAQG,KAAK,MACzB,MAAMV,EAAOK,EAAMtB,MAAM,qBACnB4B,EAAUN,EAAMtB,MAAM,aAO5B,OANA0B,GAASF,EAAQG,KACfL,EAAMO,KAAKP,EAAMQ,cAAcrB,GAAO,CAACsB,MAAO,IAAKC,OAAQN,KAE7DE,IACAX,IACAS,GAASF,EAAQG,KAAK,KACfD,CACT,CAoFA,SAASO,EAAeC,EAAMC,EAAOC,GACnC,OAAiB,IAAVD,EAAcD,EAAOG,EAAOH,EAAMC,EAAOC,EAClD,CAGA,SAASC,EAAOH,EAAMC,EAAOC,GAC3B,OAAQA,EAAQ,GAAK,QAAUF,CACjC,CAjMAd,EAAkBkB,KAkFlB,WACE,MAAO,GACT,kCA2BO,WACL,MAAO,CACLtC,MAAO,CACLuC,sBAAuB5C,EACvB6C,gBAAiB1C,EACjB2C,iCAAkCrC,EAClCsC,sBAAuBrC,GAEzBY,KAAM,CACJsB,sBAAuBhC,EACvBiC,gBAAiBxB,EACjByB,iCAAkCvB,EAClCwB,sBAAuBvB,GAG7B,gCAWO,SAA+BwB,GAEpC,IAAIC,GAAiB,EAMrB,OAJID,GAAWA,EAAQC,iBACrBA,GAAiB,GAGZ,CACLC,SAAU,CAACC,mBASb,SAA4BrC,EAAMY,EAAGC,EAAOC,GAC1C,MAAMC,EAAUF,EAAMG,cAAcF,GACpC,IAAIG,EAAQF,EAAQG,KAAK,MACzB,MAAMV,EAAOK,EAAMtB,MAAM,sBACnB4B,EAAUN,EAAMtB,MAAM,SAC5B0B,GAASF,EAAQG,KACfL,EAAMO,KAAKP,EAAMQ,cAAcrB,GAAO,CAACuB,OAAQN,EAAOK,MAAO,OAE/DH,IAEAF,GAASF,EAAQG,KAAK,MAElBlB,EAAKH,UAAYG,EAAKH,SAASK,OAAS,IAC1Ca,EAAQuB,MAAM,GAEdrB,GAASF,EAAQG,MACdiB,EAAiB,KAAO,KACvBtB,EAAM0B,YACJ1B,EAAM2B,cAAcxC,EAAMe,EAAQ0B,WAClCN,EAAiBP,EAASJ,KAOlC,OAFAhB,IAEOS,CACR,EApCgCN,qBAE/B+B,OAAQ,CAAC,CAACC,UAAW,IAAKC,YAAa,CAAC,QAAS,WAAY,eAmCjE"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function t(e){this.enter({type:"delete",children:[]},e)}function r(e){this.exit(e)}function n(e,t,r,n){const o=r.createTracker(n),i=r.enter("strikethrough");let u=o.move("~~");return u+=r.containerPhrasing(e,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),i(),u}n.peek=function(){return"~"},exports.gfmStrikethroughFromMarkdown=function(){return{canContainEols:["delete"],enter:{strikethrough:t},exit:{strikethrough:r}}},exports.gfmStrikethroughToMarkdown=function(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:e}],handlers:{delete:n}}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm-strikethrough/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>\n *\n * @type {Array<ConstructName>}\n */\nconst constructsWithoutStrikethrough = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\nhandleDelete.peek = peekDelete\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughFromMarkdown() {\n return {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughToMarkdown() {\n return {\n unsafe: [\n {\n character: '~',\n inConstruct: 'phrasing',\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {delete: handleDelete}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, state, info) {\n const tracker = state.createTracker(info)\n const exit = state.enter('strikethrough')\n let value = tracker.move('~~')\n value += state.containerPhrasing(node, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n"],"names":["constructsWithoutStrikethrough","enterStrikethrough","token","this","enter","type","children","exitStrikethrough","exit","handleDelete","node","_","state","info","tracker","createTracker","value","move","containerPhrasing","current","before","after","peek","canContainEols","strikethrough","unsafe","character","inConstruct","notInConstruct","handlers","delete"],"mappings":"oEAsBA,MAAMA,EAAiC,CACrC,WACA,qBACA,iBACA,YACA,aACA,mBA4CF,SAASC,EAAmBC,GAC1BC,KAAKC,MAAM,CAACC,KAAM,SAAUC,SAAU,IAAKJ,EAC7C,CAMA,SAASK,EAAkBL,GACzBC,KAAKK,KAAKN,EACZ,CAMA,SAASO,EAAaC,EAAMC,EAAGC,EAAOC,GACpC,MAAMC,EAAUF,EAAMG,cAAcF,GAC9BL,EAAOI,EAAMR,MAAM,iBACzB,IAAIY,EAAQF,EAAQG,KAAK,MAQzB,OAPAD,GAASJ,EAAMM,kBAAkBR,EAAM,IAClCI,EAAQK,UACXC,OAAQJ,EACRK,MAAO,MAETL,GAASF,EAAQG,KAAK,MACtBT,IACOQ,CACT,CArEAP,EAAaa,KAwEb,WACE,MAAO,GACT,uCAjEO,WACL,MAAO,CACLC,eAAgB,CAAC,UACjBnB,MAAO,CAACoB,cAAevB,GACvBO,KAAM,CAACgB,cAAejB,GAE1B,qCASO,WACL,MAAO,CACLkB,OAAQ,CACN,CACEC,UAAW,IACXC,YAAa,WACbC,eAAgB5B,IAGpB6B,SAAU,CAACC,OAAQrB,GAEvB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../devlop/lib/default.js"),t=require("../../markdown-table/index.js"),n=require("../../mdast-util-to-markdown/lib/handle/index.js");function r(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function a(e){this.exit(e),this.data.inTable=void 0}function l(e){this.enter({type:"tableRow",children:[]},e)}function i(e){this.exit(e)}function c(e){this.enter({type:"tableCell",children:[]},e)}function o(t){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,s));const r=this.stack[this.stack.length-1];e.ok("inlineCode"===r.type),r.value=n,this.exit(t)}function s(e,t){return"|"===t?t:e}require("../../decode-named-character-reference/index.dom.js"),exports.gfmTableFromMarkdown=function(){return{enter:{table:r,tableData:c,tableHeader:c,tableRow:l},exit:{codeText:o,table:a,tableData:i,tableHeader:i,tableRow:i}}},exports.gfmTableToMarkdown=function(e){const r=e||{},a=r.tableCellPadding,l=r.tablePipeAlign,i=r.stringLength,c=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,r){let a=n.handle.inlineCode(e,t,r);r.stack.includes("tableCell")&&(a=a.replace(/\|/g,"\\$&"));return a},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const l=[],i=t.enter("table");for(;++a<r.length;)l[a]=u(r[a],t,n);return i(),l}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){const a=s([u(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function o(e,t,n,r){const a=n.enter("tableCell"),l=n.enter("phrasing"),i=n.containerPhrasing(e,{...r,before:c,after:c});return l(),a(),i}function s(e,n){return t.markdownTable(e,{align:n,alignDelimiters:l,padding:a,stringLength:i})}function u(e,t,n){const r=e.children;let a=-1;const l=[],i=t.enter("tableRow");for(;++a<r.length;)l[a]=o(r[a],0,t,n);return i(),l}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm-table/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').TableRow} TableRow\n *\n * @typedef {import('markdown-table').Options} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').State} State\n * @typedef {import('mdast-util-to-markdown').Info} Info\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells (default:\n * `true`).\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters (default: `true`).\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells (optional).\n */\n\nimport {ok as assert} from 'devlop'\nimport {markdownTable} from 'markdown-table'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM tables in\n * markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n */\nexport function gfmTableFromMarkdown() {\n return {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n const align = token._align\n assert(align, 'expected `_align` on table')\n this.enter(\n {\n type: 'table',\n align: align.map(function (d) {\n return d === 'none' ? null : d\n }),\n children: []\n },\n token\n )\n this.data.inTable = true\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.data.inTable = undefined\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.data.inTable) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'inlineCode')\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>\n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n inlineCode: inlineCodeWithTable,\n table: handleTable,\n tableCell: handleTableCell,\n tableRow: handleTableRow\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, state, info) {\n return serializeData(handleTableAsData(node, state, info), node.align)\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, state, info) {\n const row = handleTableRowAsData(node, state, info)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, state, info) {\n const exit = state.enter('tableCell')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...info,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array<Array<string>>} matrix\n * @param {Array<string | null | undefined> | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<Array<string>>} */\n const result = []\n const subexit = state.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(children[index], state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableRowAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<string>} */\n const result = []\n const subexit = state.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(children[index], node, state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, state) {\n let value = defaultHandlers.inlineCode(node, parent, state)\n\n if (state.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n"],"names":["enterTable","token","align","_align","this","enter","type","map","d","children","data","inTable","exitTable","exit","undefined","enterRow","enterCell","exitCodeText","value","resume","replace","node","stack","length","assert","$0","$1","table","tableData","tableHeader","tableRow","codeText","options","settings","padding","tableCellPadding","alignDelimiters","tablePipeAlign","stringLength","around","unsafe","character","inConstruct","atBreak","after","handlers","inlineCode","parent","state","defaultHandlers","includes","_","info","serializeData","index","result","subexit","handleTableRowAsData","handleTableAsData","tableCell","handleTableCell","slice","indexOf","containerPhrasing","before","matrix","markdownTable"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../devlop/lib/default.js"),t=require("../../mdast-util-to-markdown/lib/handle/index.js");function s(t){const s=this.stack[this.stack.length-2];e.ok("listItem"===s.type),s.checked="taskListCheckValueChecked"===t.type}function r(t){const s=this.stack[this.stack.length-2];if(s&&"listItem"===s.type&&"boolean"==typeof s.checked){const t=this.stack[this.stack.length-1];e.ok("paragraph"===t.type);const r=t.children[0];if(r&&"text"===r.type){const e=s.children;let a,n=-1;for(;++n<e.length;){const t=e[n];if("paragraph"===t.type){a=t;break}}a===t&&(r.value=r.value.slice(1),0===r.value.length?t.children.shift():t.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function a(e,s,r,a){const n=e.children[0],i="boolean"==typeof e.checked&&n&&"paragraph"===n.type,o="["+(e.checked?"x":" ")+"] ",c=r.createTracker(a);i&&c.move(o);let h=t.handle.listItem(e,s,r,{...a,...c.current()});return i&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+o}))),h}require("../../decode-named-character-reference/index.dom.js"),exports.gfmTaskListItemFromMarkdown=function(){return{exit:{taskListCheckValueChecked:s,taskListCheckValueUnchecked:s,paragraph:r}}},exports.gfmTaskListItemToMarkdown=function(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:a}}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm-task-list-item/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {ok as assert} from 'devlop'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM task\n * list items in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemFromMarkdown() {\n return {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM task list\n * items in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemToMarkdown() {\n return {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCheck(token) {\n // We’re always in a paragraph, in a list item.\n const node = this.stack[this.stack.length - 2]\n assert(node.type === 'listItem')\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = this.stack[this.stack.length - 2]\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean'\n ) {\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'paragraph')\n const head = node.children[0]\n\n if (head && head.type === 'text') {\n const siblings = parent.children\n let index = -1\n /** @type {Paragraph | undefined} */\n let firstParaghraph\n\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, state, info) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = state.createTracker(info)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = defaultHandlers.listItem(node, parent, state, {\n ...info,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n"],"names":["exitCheck","token","node","this","stack","length","assert","type","checked","exitParagraphWithTaskListItem","parent","head","children","siblings","firstParaghraph","index","sibling","value","slice","shift","position","start","offset","column","Object","assign","exit","listItemWithTaskListItem","state","info","checkable","checkbox","tracker","createTracker","move","defaultHandlers","listItem","current","replace","$0","taskListCheckValueChecked","taskListCheckValueUnchecked","paragraph","unsafe","atBreak","character","after","handlers"],"mappings":"+KAgDA,SAASA,EAAUC,GAEjB,MAAMC,EAAOC,KAAKC,MAAMD,KAAKC,MAAMC,OAAS,GAC5CC,KAAqB,aAAdJ,EAAKK,MACZL,EAAKM,QAAyB,8BAAfP,EAAMM,IACvB,CAMA,SAASE,EAA8BR,GACrC,MAAMS,EAASP,KAAKC,MAAMD,KAAKC,MAAMC,OAAS,GAE9C,GACEK,GACgB,aAAhBA,EAAOH,MACmB,kBAAnBG,EAAOF,QACd,CACA,MAAMN,EAAOC,KAAKC,MAAMD,KAAKC,MAAMC,OAAS,GAC5CC,KAAqB,cAAdJ,EAAKK,MACZ,MAAMI,EAAOT,EAAKU,SAAS,GAE3B,GAAID,GAAsB,SAAdA,EAAKJ,KAAiB,CAChC,MAAMM,EAAWH,EAAOE,SACxB,IAEIE,EAFAC,GAAS,EAIb,OAASA,EAAQF,EAASR,QAAQ,CAChC,MAAMW,EAAUH,EAASE,GACzB,GAAqB,cAAjBC,EAAQT,KAAsB,CAChCO,EAAkBE,EAClB,KACD,CACF,CAEGF,IAAoBZ,IAEtBS,EAAKM,MAAQN,EAAKM,MAAMC,MAAM,GAEJ,IAAtBP,EAAKM,MAAMZ,OACbH,EAAKU,SAASO,QAEdjB,EAAKkB,UACLT,EAAKS,UACiC,iBAA/BT,EAAKS,SAASC,MAAMC,SAE3BX,EAAKS,SAASC,MAAME,SACpBZ,EAAKS,SAASC,MAAMC,SACpBpB,EAAKkB,SAASC,MAAQG,OAAOC,OAAO,GAAId,EAAKS,SAASC,QAG3D,CACF,CAEDlB,KAAKuB,KAAKzB,EACZ,CAMA,SAAS0B,EAAyBzB,EAAMQ,EAAQkB,EAAOC,GACrD,MAAMlB,EAAOT,EAAKU,SAAS,GACrBkB,EACoB,kBAAjB5B,EAAKM,SAAyBG,GAAsB,cAAdA,EAAKJ,KAC9CwB,EAAW,KAAO7B,EAAKM,QAAU,IAAM,KAAO,KAC9CwB,EAAUJ,EAAMK,cAAcJ,GAEhCC,GACFE,EAAQE,KAAKH,GAGf,IAAId,EAAQkB,EAAAA,OAAgBC,SAASlC,EAAMQ,EAAQkB,EAAO,IACrDC,KACAG,EAAQK,YAOb,OAJIP,IACFb,EAAQA,EAAMqB,QAAQ,mCASxB,SAAeC,GACb,OAAOA,EAAKR,CACb,KARMd,CAST,oGAxHO,WACL,MAAO,CACLS,KAAM,CACJc,0BAA2BxC,EAC3ByC,4BAA6BzC,EAC7B0C,UAAWjC,GAGjB,oCASO,WACL,MAAO,CACLkC,OAAQ,CAAC,CAACC,SAAS,EAAMC,UAAW,IAAKC,MAAO,UAChDC,SAAU,CAACX,SAAUT,GAEzB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=require("../../unist-util-is/lib/index.js").convert(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);exports.phrasing=e;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-phrasing/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Html} Html\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n */\n\nimport {convert} from 'unist-util-is'\n\n/**\n * Check if the given value is *phrasing content*.\n *\n * > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @returns\n * Whether `value` is phrasing content.\n */\n\nexport const phrasing =\n /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */\n (\n convert([\n 'break',\n 'delete',\n 'emphasis',\n // To do: next major: removed since footnotes were added to GFM.\n 'footnote',\n 'footnoteReference',\n 'image',\n 'imageReference',\n 'inlineCode',\n // Enabled by `mdast-util-math`:\n 'inlineMath',\n 'link',\n 'linkReference',\n // Enabled by `mdast-util-mdx`:\n 'mdxJsxTextElement',\n // Enabled by `mdast-util-mdx`:\n 'mdxTextExpression',\n 'strong',\n 'text',\n // Enabled by `mdast-util-directive`:\n 'textDirective'\n ])\n )\n"],"names":["phrasing"],"mappings":"oEAkBY,MAACA,sDAGD,CACN,QACA,SACA,WAEA,WACA,oBACA,QACA,iBACA,aAEA,aACA,OACA,gBAEA,oBAEA,oBACA,SACA,OAEA"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e,t,n){return">"+(n?"":" ")+e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.blockquote=function(t,n,r,o){const c=r.enter("blockquote"),u=r.createTracker(o);u.move("> "),u.shift(2);const s=r.indentLines(r.containerFlow(t,u.current()),e);return c(),s};
2
+ //# sourceMappingURL=blockquote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockquote.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js"],"sourcesContent":["/**\n * @import {Blockquote, Parents} from 'mdast'\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Blockquote} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function blockquote(node, _, state, info) {\n const exit = state.enter('blockquote')\n const tracker = state.createTracker(info)\n tracker.move('> ')\n tracker.shift(2)\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return '>' + (blank ? '' : ' ') + line\n}\n"],"names":["map","line","_","blank","node","state","info","exit","enter","tracker","createTracker","move","shift","value","indentLines","containerFlow","current"],"mappings":"aA0BA,SAASA,EAAIC,EAAMC,EAAGC,GACpB,MAAO,KAAOA,EAAQ,GAAK,KAAOF,CACpC,2EAhBO,SAAoBG,EAAMF,EAAGG,EAAOC,GACzC,MAAMC,EAAOF,EAAMG,MAAM,cACnBC,EAAUJ,EAAMK,cAAcJ,GACpCG,EAAQE,KAAK,MACbF,EAAQG,MAAM,GACd,MAAMC,EAAQR,EAAMS,YAClBT,EAAMU,cAAcX,EAAMK,EAAQO,WAClChB,GAGF,OADAO,IACOM,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/pattern-in-scope.js");exports.hardBreak=function(t,r,n,a){let s=-1;for(;++s<n.unsafe.length;)if("\n"===n.unsafe[s].character&&e.patternInScope(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return"\\\n"};
2
+ //# sourceMappingURL=break.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"break.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/break.js"],"sourcesContent":["/**\n * @import {Break, Parents} from 'mdast'\n * @import {Info, State} from 'mdast-util-to-markdown'\n */\n\nimport {patternInScope} from '../util/pattern-in-scope.js'\n\n/**\n * @param {Break} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function hardBreak(_, _1, state, info) {\n let index = -1\n\n while (++index < state.unsafe.length) {\n // If we can’t put eols in this construct (setext headings, tables), use a\n // space instead.\n if (\n state.unsafe[index].character === '\\n' &&\n patternInScope(state.stack, state.unsafe[index])\n ) {\n return /[ \\t]/.test(info.before) ? '' : ' '\n }\n }\n\n return '\\\\\\n'\n}\n"],"names":["_","_1","state","info","index","unsafe","length","character","patternInScope","stack","test","before"],"mappings":"mIAcO,SAAmBA,EAAGC,EAAIC,EAAOC,GACtC,IAAIC,GAAS,EAEb,OAASA,EAAQF,EAAMG,OAAOC,QAG5B,GACoC,OAAlCJ,EAAMG,OAAOD,GAAOG,WACpBC,EAAcA,eAACN,EAAMO,MAAOP,EAAMG,OAAOD,IAEzC,MAAO,QAAQM,KAAKP,EAAKQ,QAAU,GAAK,IAI5C,MAAO,MACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../longest-streak/index.js"),n=require("../util/format-code-as-indented.js"),t=require("../util/check-fence.js");function r(e,n,t){return(t?"":" ")+e}exports.code=function(o,c,a,d){const s=t.checkFence(a),i=o.value||"",u="`"===s?"GraveAccent":"Tilde";if(n.formatCodeAsIndented(o,a)){const e=a.enter("codeIndented"),n=a.indentLines(i,r);return e(),n}const f=a.createTracker(d),l=s.repeat(Math.max(e.longestStreak(i,s)+1,3)),m=a.enter("codeFenced");let v=f.move(l);if(o.lang){const e=a.enter(`codeFencedLang${u}`);v+=f.move(a.safe(o.lang,{before:v,after:" ",encode:["`"],...f.current()})),e()}if(o.lang&&o.meta){const e=a.enter(`codeFencedMeta${u}`);v+=f.move(" "),v+=f.move(a.safe(o.meta,{before:v,after:"\n",encode:["`"],...f.current()})),e()}return v+=f.move("\n"),i&&(v+=f.move(i+"\n")),v+=f.move(l),m(),v};
2
+ //# sourceMappingURL=code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/code.js"],"sourcesContent":["/**\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n * @import {Code, Parents} from 'mdast'\n */\n\nimport {longestStreak} from 'longest-streak'\nimport {formatCodeAsIndented} from '../util/format-code-as-indented.js'\nimport {checkFence} from '../util/check-fence.js'\n\n/**\n * @param {Code} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function code(node, _, state, info) {\n const marker = checkFence(state)\n const raw = node.value || ''\n const suffix = marker === '`' ? 'GraveAccent' : 'Tilde'\n\n if (formatCodeAsIndented(node, state)) {\n const exit = state.enter('codeIndented')\n const value = state.indentLines(raw, map)\n exit()\n return value\n }\n\n const tracker = state.createTracker(info)\n const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3))\n const exit = state.enter('codeFenced')\n let value = tracker.move(sequence)\n\n if (node.lang) {\n const subexit = state.enter(`codeFencedLang${suffix}`)\n value += tracker.move(\n state.safe(node.lang, {\n before: value,\n after: ' ',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n if (node.lang && node.meta) {\n const subexit = state.enter(`codeFencedMeta${suffix}`)\n value += tracker.move(' ')\n value += tracker.move(\n state.safe(node.meta, {\n before: value,\n after: '\\n',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n value += tracker.move('\\n')\n\n if (raw) {\n value += tracker.move(raw + '\\n')\n }\n\n value += tracker.move(sequence)\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return (blank ? '' : ' ') + line\n}\n"],"names":["map","line","_","blank","node","state","info","marker","checkFence","raw","value","suffix","formatCodeAsIndented","exit","enter","indentLines","tracker","createTracker","sequence","repeat","Math","max","longestStreak","move","lang","subexit","safe","before","after","encode","current","meta"],"mappings":"0MAwEA,SAASA,EAAIC,EAAMC,EAAGC,GACpB,OAAQA,EAAQ,GAAK,QAAUF,CACjC,cA1DO,SAAcG,EAAMF,EAAGG,EAAOC,GACnC,MAAMC,EAASC,EAAUA,WAACH,GACpBI,EAAML,EAAKM,OAAS,GACpBC,EAAoB,MAAXJ,EAAiB,cAAgB,QAEhD,GAAIK,EAAoBA,qBAACR,EAAMC,GAAQ,CACrC,MAAMQ,EAAOR,EAAMS,MAAM,gBACnBJ,EAAQL,EAAMU,YAAYN,EAAKT,GAErC,OADAa,IACOH,CACR,CAED,MAAMM,EAAUX,EAAMY,cAAcX,GAC9BY,EAAWX,EAAOY,OAAOC,KAAKC,IAAIC,gBAAcb,EAAKF,GAAU,EAAG,IAClEM,EAAOR,EAAMS,MAAM,cACzB,IAAIJ,EAAQM,EAAQO,KAAKL,GAEzB,GAAId,EAAKoB,KAAM,CACb,MAAMC,EAAUpB,EAAMS,MAAM,iBAAiBH,KAC7CD,GAASM,EAAQO,KACflB,EAAMqB,KAAKtB,EAAKoB,KAAM,CACpBG,OAAQjB,EACRkB,MAAO,IACPC,OAAQ,CAAC,QACNb,EAAQc,aAGfL,GACD,CAED,GAAIrB,EAAKoB,MAAQpB,EAAK2B,KAAM,CAC1B,MAAMN,EAAUpB,EAAMS,MAAM,iBAAiBH,KAC7CD,GAASM,EAAQO,KAAK,KACtBb,GAASM,EAAQO,KACflB,EAAMqB,KAAKtB,EAAK2B,KAAM,CACpBJ,OAAQjB,EACRkB,MAAO,KACPC,OAAQ,CAAC,QACNb,EAAQc,aAGfL,GACD,CAUD,OARAf,GAASM,EAAQO,KAAK,MAElBd,IACFC,GAASM,EAAQO,KAAKd,EAAM,OAG9BC,GAASM,EAAQO,KAAKL,GACtBL,IACOH,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-quote.js");exports.definition=function(t,r,o,n){const i=e.checkQuote(o),a='"'===i?"Quote":"Apostrophe",u=o.enter("definition");let s=o.enter("label");const c=o.createTracker(n);let f=c.move("[");return f+=c.move(o.safe(o.associationId(t),{before:f,after:"]",...c.current()})),f+=c.move("]: "),s(),!t.url||/[\0- \u007F]/.test(t.url)?(s=o.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(o.safe(t.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(s=o.enter("destinationRaw"),f+=c.move(o.safe(t.url,{before:f,after:t.title?" ":"\n",...c.current()}))),s(),t.title&&(s=o.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(o.safe(t.title,{before:f,after:i,...c.current()})),f+=c.move(i),s()),u(),f};
2
+ //# sourceMappingURL=definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/definition.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Definition, Parents} from 'mdast'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\n/**\n * @param {Definition} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function definition(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('definition')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n value += tracker.move(\n state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n )\n value += tracker.move(']: ')\n\n subexit()\n\n if (\n // If there’s no url, or…\n !node.url ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : '\\n',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n exit()\n\n return value\n}\n"],"names":["node","_","state","info","quote","checkQuote","suffix","exit","enter","subexit","tracker","createTracker","value","move","safe","associationId","before","after","current","url","test","title"],"mappings":"+HAcO,SAAoBA,EAAMC,EAAGC,EAAOC,GACzC,MAAMC,EAAQC,EAAUA,WAACH,GACnBI,EAAmB,MAAVF,EAAgB,QAAU,aACnCG,EAAOL,EAAMM,MAAM,cACzB,IAAIC,EAAUP,EAAMM,MAAM,SAC1B,MAAME,EAAUR,EAAMS,cAAcR,GACpC,IAAIS,EAAQF,EAAQG,KAAK,KAsDzB,OArDAD,GAASF,EAAQG,KACfX,EAAMY,KAAKZ,EAAMa,cAAcf,GAAO,CACpCgB,OAAQJ,EACRK,MAAO,OACJP,EAAQQ,aAGfN,GAASF,EAAQG,KAAK,OAEtBJ,KAIGT,EAAKmB,KAEN,eAAeC,KAAKpB,EAAKmB,MAEzBV,EAAUP,EAAMM,MAAM,sBACtBI,GAASF,EAAQG,KAAK,KACtBD,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKmB,IAAK,CAACH,OAAQJ,EAAOK,MAAO,OAAQP,EAAQQ,aAE9DN,GAASF,EAAQG,KAAK,OAGtBJ,EAAUP,EAAMM,MAAM,kBACtBI,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKmB,IAAK,CACnBH,OAAQJ,EACRK,MAAOjB,EAAKqB,MAAQ,IAAM,QACvBX,EAAQQ,cAKjBT,IAEIT,EAAKqB,QACPZ,EAAUP,EAAMM,MAAM,QAAQF,KAC9BM,GAASF,EAAQG,KAAK,IAAMT,GAC5BQ,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKqB,MAAO,CACrBL,OAAQJ,EACRK,MAAOb,KACJM,EAAQQ,aAGfN,GAASF,EAAQG,KAAKT,GACtBK,KAGFF,IAEOK,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-emphasis.js"),r=require("../util/encode-character-reference.js"),t=require("../util/encode-info.js");function n(n,o,c,s){const i=e.checkEmphasis(c),a=c.enter("emphasis"),d=c.createTracker(s),u=d.move(i);let f=d.move(c.containerPhrasing(n,{after:i,before:u,...d.current()}));const h=f.charCodeAt(0),l=t.encodeInfo(s.before.charCodeAt(s.before.length-1),h,i);l.inside&&(f=r.encodeCharacterReference(h)+f.slice(1));const p=f.charCodeAt(f.length-1),m=t.encodeInfo(s.after.charCodeAt(0),p,i);m.inside&&(f=f.slice(0,-1)+r.encodeCharacterReference(p));const C=d.move(i);return a(),c.attentionEncodeSurroundingInfo={after:m.outside,before:l.outside},u+f+C}n.peek=function(e,r,t){return t.options.emphasis||"*"},exports.emphasis=n;
2
+ //# sourceMappingURL=emphasis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emphasis.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/emphasis.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Emphasis, Parents} from 'mdast'\n */\n\nimport {checkEmphasis} from '../util/check-emphasis.js'\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {encodeInfo} from '../util/encode-info.js'\n\nemphasis.peek = emphasisPeek\n\n/**\n * @param {Emphasis} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function emphasis(node, _, state, info) {\n const marker = checkEmphasis(state)\n const exit = state.enter('emphasis')\n const tracker = state.createTracker(info)\n const before = tracker.move(marker)\n\n let between = tracker.move(\n state.containerPhrasing(node, {\n after: marker,\n before,\n ...tracker.current()\n })\n )\n const betweenHead = between.charCodeAt(0)\n const open = encodeInfo(\n info.before.charCodeAt(info.before.length - 1),\n betweenHead,\n marker\n )\n\n if (open.inside) {\n between = encodeCharacterReference(betweenHead) + between.slice(1)\n }\n\n const betweenTail = between.charCodeAt(between.length - 1)\n const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker)\n\n if (close.inside) {\n between = between.slice(0, -1) + encodeCharacterReference(betweenTail)\n }\n\n const after = tracker.move(marker)\n\n exit()\n\n state.attentionEncodeSurroundingInfo = {\n after: close.outside,\n before: open.outside\n }\n return before + between + after\n}\n\n/**\n * @param {Emphasis} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction emphasisPeek(_, _1, state) {\n return state.options.emphasis || '*'\n}\n"],"names":["emphasis","node","_","state","info","marker","checkEmphasis","exit","enter","tracker","createTracker","before","move","between","containerPhrasing","after","current","betweenHead","charCodeAt","open","encodeInfo","length","inside","encodeCharacterReference","slice","betweenTail","close","attentionEncodeSurroundingInfo","outside","peek","_1","options"],"mappings":"sMAkBO,SAASA,EAASC,EAAMC,EAAGC,EAAOC,GACvC,MAAMC,EAASC,EAAaA,cAACH,GACvBI,EAAOJ,EAAMK,MAAM,YACnBC,EAAUN,EAAMO,cAAcN,GAC9BO,EAASF,EAAQG,KAAKP,GAE5B,IAAIQ,EAAUJ,EAAQG,KACpBT,EAAMW,kBAAkBb,EAAM,CAC5Bc,MAAOV,EACPM,YACGF,EAAQO,aAGf,MAAMC,EAAcJ,EAAQK,WAAW,GACjCC,EAAOC,EAAUA,WACrBhB,EAAKO,OAAOO,WAAWd,EAAKO,OAAOU,OAAS,GAC5CJ,EACAZ,GAGEc,EAAKG,SACPT,EAAUU,EAAwBA,yBAACN,GAAeJ,EAAQW,MAAM,IAGlE,MAAMC,EAAcZ,EAAQK,WAAWL,EAAQQ,OAAS,GAClDK,EAAQN,EAAUA,WAAChB,EAAKW,MAAMG,WAAW,GAAIO,EAAapB,GAE5DqB,EAAMJ,SACRT,EAAUA,EAAQW,MAAM,GAAI,GAAKD,EAAwBA,yBAACE,IAG5D,MAAMV,EAAQN,EAAQG,KAAKP,GAQ3B,OANAE,IAEAJ,EAAMwB,+BAAiC,CACrCZ,MAAOW,EAAME,QACbjB,OAAQQ,EAAKS,SAERjB,EAASE,EAAUE,CAC5B,CAjDAf,EAAS6B,KAyDT,SAAsB3B,EAAG4B,EAAI3B,GAC3B,OAAOA,EAAM4B,QAAQ/B,UAAY,GACnC"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/encode-character-reference.js"),t=require("../util/format-heading-as-setext.js");exports.heading=function(r,n,a,s){const c=Math.max(Math.min(6,r.depth||1),1),i=a.createTracker(s);if(t.formatHeadingAsSetext(r,a)){const e=a.enter("headingSetext"),t=a.enter("phrasing"),n=a.containerPhrasing(r,{...i.current(),before:"\n",after:"\n"});return t(),e(),n+"\n"+(1===c?"=":"-").repeat(n.length-(Math.max(n.lastIndexOf("\r"),n.lastIndexOf("\n"))+1))}const o="#".repeat(c),h=a.enter("headingAtx"),d=a.enter("phrasing");i.move(o+" ");let f=a.containerPhrasing(r,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(f)&&(f=e.encodeCharacterReference(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,a.options.closeAtx&&(f+=" "+o),d(),h(),f};
2
+ //# sourceMappingURL=heading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/heading.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Heading, Parents} from 'mdast'\n */\n\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {formatHeadingAsSetext} from '../util/format-heading-as-setext.js'\n\n/**\n * @param {Heading} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function heading(node, _, state, info) {\n const rank = Math.max(Math.min(6, node.depth || 1), 1)\n const tracker = state.createTracker(info)\n\n if (formatHeadingAsSetext(node, state)) {\n const exit = state.enter('headingSetext')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...tracker.current(),\n before: '\\n',\n after: '\\n'\n })\n subexit()\n exit()\n\n return (\n value +\n '\\n' +\n (rank === 1 ? '=' : '-').repeat(\n // The whole size…\n value.length -\n // Minus the position of the character after the last EOL (or\n // 0 if there is none)…\n (Math.max(value.lastIndexOf('\\r'), value.lastIndexOf('\\n')) + 1)\n )\n )\n }\n\n const sequence = '#'.repeat(rank)\n const exit = state.enter('headingAtx')\n const subexit = state.enter('phrasing')\n\n // Note: for proper tracking, we should reset the output positions when there\n // is no content returned, because then the space is not output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n tracker.move(sequence + ' ')\n\n let value = state.containerPhrasing(node, {\n before: '# ',\n after: '\\n',\n ...tracker.current()\n })\n\n if (/^[\\t ]/.test(value)) {\n // To do: what effect has the character reference on tracking?\n value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1)\n }\n\n value = value ? sequence + ' ' + value : sequence\n\n if (state.options.closeAtx) {\n value += ' ' + sequence\n }\n\n subexit()\n exit()\n\n return value\n}\n"],"names":["node","_","state","info","rank","Math","max","min","depth","tracker","createTracker","formatHeadingAsSetext","exit","enter","subexit","value","containerPhrasing","current","before","after","repeat","length","lastIndexOf","sequence","move","test","encodeCharacterReference","charCodeAt","slice","options","closeAtx"],"mappings":"4LAeO,SAAiBA,EAAMC,EAAGC,EAAOC,GACtC,MAAMC,EAAOC,KAAKC,IAAID,KAAKE,IAAI,EAAGP,EAAKQ,OAAS,GAAI,GAC9CC,EAAUP,EAAMQ,cAAcP,GAEpC,GAAIQ,EAAqBA,sBAACX,EAAME,GAAQ,CACtC,MAAMU,EAAOV,EAAMW,MAAM,iBACnBC,EAAUZ,EAAMW,MAAM,YACtBE,EAAQb,EAAMc,kBAAkBhB,EAAM,IACvCS,EAAQQ,UACXC,OAAQ,KACRC,MAAO,OAKT,OAHAL,IACAF,IAGEG,EACA,MACU,IAATX,EAAa,IAAM,KAAKgB,OAEvBL,EAAMM,QAGHhB,KAAKC,IAAIS,EAAMO,YAAY,MAAOP,EAAMO,YAAY,OAAS,GAGrE,CAED,MAAMC,EAAW,IAAIH,OAAOhB,GACtBQ,EAAOV,EAAMW,MAAM,cACnBC,EAAUZ,EAAMW,MAAM,YAM5BJ,EAAQe,KAAKD,EAAW,KAExB,IAAIR,EAAQb,EAAMc,kBAAkBhB,EAAM,CACxCkB,OAAQ,KACRC,MAAO,QACJV,EAAQQ,YAiBb,MAdI,SAASQ,KAAKV,KAEhBA,EAAQW,EAAAA,yBAAyBX,EAAMY,WAAW,IAAMZ,EAAMa,MAAM,IAGtEb,EAAQA,EAAQQ,EAAW,IAAMR,EAAQQ,EAErCrB,EAAM2B,QAAQC,WAChBf,GAAS,IAAMQ,GAGjBT,IACAF,IAEOG,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e){return e.value||""}Object.defineProperty(exports,"__esModule",{value:!0}),e.peek=function(){return"<"},exports.html=e;
2
+ //# sourceMappingURL=html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/html.js"],"sourcesContent":["/**\n * @import {Html} from 'mdast'\n */\n\nhtml.peek = htmlPeek\n\n/**\n * @param {Html} node\n * @returns {string}\n */\nexport function html(node) {\n return node.value || ''\n}\n\n/**\n * @returns {string}\n */\nfunction htmlPeek() {\n return '<'\n}\n"],"names":["html","node","value","peek"],"mappings":"aAUO,SAASA,EAAKC,GACnB,OAAOA,EAAKC,OAAS,EACvB,wDARAF,EAAKG,KAaL,WACE,MAAO,GACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e,t,r,c){const n=e.referenceType,o=r.enter("imageReference");let s=r.enter("label");const a=r.createTracker(c);let f=a.move("![");const u=r.safe(e.alt,{before:f,after:"]",...a.current()});f+=a.move(u+"]["),s();const l=r.stack;r.stack=[],s=r.enter("reference");const i=r.safe(r.associationId(e),{before:f,after:"]",...a.current()});return s(),r.stack=l,o(),"full"!==n&&u&&u===i?"shortcut"===n?f=f.slice(0,-1):f+=a.move("]"):f+=a.move(i+"]"),f}Object.defineProperty(exports,"__esModule",{value:!0}),e.peek=function(){return"!"},exports.imageReference=e;
2
+ //# sourceMappingURL=image-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-reference.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/image-reference.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {ImageReference, Parents} from 'mdast'\n */\n\nimageReference.peek = imageReferencePeek\n\n/**\n * @param {ImageReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function imageReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('imageReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n const alt = state.safe(node.alt, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(alt + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !alt || alt !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imageReferencePeek() {\n return '!'\n}\n"],"names":["imageReference","node","_","state","info","type","referenceType","exit","enter","subexit","tracker","createTracker","value","move","alt","safe","before","after","current","stack","reference","associationId","slice","peek"],"mappings":"aAcO,SAASA,EAAeC,EAAMC,EAAGC,EAAOC,GAC7C,MAAMC,EAAOJ,EAAKK,cACZC,EAAOJ,EAAMK,MAAM,kBACzB,IAAIC,EAAUN,EAAMK,MAAM,SAC1B,MAAME,EAAUP,EAAMQ,cAAcP,GACpC,IAAIQ,EAAQF,EAAQG,KAAK,MACzB,MAAMC,EAAMX,EAAMY,KAAKd,EAAKa,IAAK,CAC/BE,OAAQJ,EACRK,MAAO,OACJP,EAAQQ,YAEbN,GAASF,EAAQG,KAAKC,EAAM,MAE5BL,IAEA,MAAMU,EAAQhB,EAAMgB,MACpBhB,EAAMgB,MAAQ,GACdV,EAAUN,EAAMK,MAAM,aAKtB,MAAMY,EAAYjB,EAAMY,KAAKZ,EAAMkB,cAAcpB,GAAO,CACtDe,OAAQJ,EACRK,MAAO,OACJP,EAAQQ,YAeb,OAbAT,IACAN,EAAMgB,MAAQA,EACdZ,IAEa,SAATF,GAAoBS,GAAOA,IAAQM,EAEnB,aAATf,EAETO,EAAQA,EAAMU,MAAM,GAAI,GAExBV,GAASF,EAAQG,KAAK,KALtBD,GAASF,EAAQG,KAAKO,EAAY,KAQ7BR,CACT,wDAlDAZ,EAAeuB,KAuDf,WACE,MAAO,GACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-quote.js");function t(t,r,o,n){const u=e.checkQuote(o),a='"'===u?"Quote":"Apostrophe",i=o.enter("image");let l=o.enter("label");const c=o.createTracker(n);let s=c.move("![");return s+=c.move(o.safe(t.alt,{before:s,after:"]",...c.current()})),s+=c.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=o.enter("destinationLiteral"),s+=c.move("<"),s+=c.move(o.safe(t.url,{before:s,after:">",...c.current()})),s+=c.move(">")):(l=o.enter("destinationRaw"),s+=c.move(o.safe(t.url,{before:s,after:t.title?" ":")",...c.current()}))),l(),t.title&&(l=o.enter(`title${a}`),s+=c.move(" "+u),s+=c.move(o.safe(t.title,{before:s,after:u,...c.current()})),s+=c.move(u),l()),s+=c.move(")"),i(),s}t.peek=function(){return"!"},exports.image=t;
2
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/image.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Image, Parents} from 'mdast'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\nimage.peek = imagePeek\n\n/**\n * @param {Image} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function image(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('image')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n value += tracker.move(\n state.safe(node.alt, {before: value, after: ']', ...tracker.current()})\n )\n value += tracker.move('](')\n\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n exit()\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imagePeek() {\n return '!'\n}\n"],"names":["image","node","_","state","info","quote","checkQuote","suffix","exit","enter","subexit","tracker","createTracker","value","move","safe","alt","before","after","current","url","title","test","peek"],"mappings":"4GAgBO,SAASA,EAAMC,EAAMC,EAAGC,EAAOC,GACpC,MAAMC,EAAQC,EAAUA,WAACH,GACnBI,EAAmB,MAAVF,EAAgB,QAAU,aACnCG,EAAOL,EAAMM,MAAM,SACzB,IAAIC,EAAUP,EAAMM,MAAM,SAC1B,MAAME,EAAUR,EAAMS,cAAcR,GACpC,IAAIS,EAAQF,EAAQG,KAAK,MAmDzB,OAlDAD,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKe,IAAK,CAACC,OAAQJ,EAAOK,MAAO,OAAQP,EAAQQ,aAE9DN,GAASF,EAAQG,KAAK,MAEtBJ,KAIIT,EAAKmB,KAAOnB,EAAKoB,OAEnB,eAAeC,KAAKrB,EAAKmB,MAEzBV,EAAUP,EAAMM,MAAM,sBACtBI,GAASF,EAAQG,KAAK,KACtBD,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKmB,IAAK,CAACH,OAAQJ,EAAOK,MAAO,OAAQP,EAAQQ,aAE9DN,GAASF,EAAQG,KAAK,OAGtBJ,EAAUP,EAAMM,MAAM,kBACtBI,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKmB,IAAK,CACnBH,OAAQJ,EACRK,MAAOjB,EAAKoB,MAAQ,IAAM,OACvBV,EAAQQ,cAKjBT,IAEIT,EAAKoB,QACPX,EAAUP,EAAMM,MAAM,QAAQF,KAC9BM,GAASF,EAAQG,KAAK,IAAMT,GAC5BQ,GAASF,EAAQG,KACfX,EAAMY,KAAKd,EAAKoB,MAAO,CACrBJ,OAAQJ,EACRK,MAAOb,KACJM,EAAQQ,aAGfN,GAASF,EAAQG,KAAKT,GACtBK,KAGFG,GAASF,EAAQG,KAAK,KACtBN,IAEOK,CACT,CAnEAb,EAAMuB,KAwEN,WACE,MAAO,GACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./blockquote.js"),r=require("./break.js"),i=require("./code.js"),t=require("./definition.js"),s=require("./emphasis.js"),a=require("./heading.js"),n=require("./html.js"),o=require("./image.js"),u=require("./image-reference.js"),l=require("./inline-code.js"),q=require("./link.js"),j=require("./link-reference.js"),c=require("./list.js"),h=require("./list-item.js"),d=require("./paragraph.js"),m=require("./root.js"),k=require("./strong.js"),g=require("./text.js"),p=require("./thematic-break.js");const f={blockquote:e.blockquote,break:r.hardBreak,code:i.code,definition:t.definition,emphasis:s.emphasis,hardBreak:r.hardBreak,heading:a.heading,html:n.html,image:o.image,imageReference:u.imageReference,inlineCode:l.inlineCode,link:q.link,linkReference:j.linkReference,list:c.list,listItem:h.listItem,paragraph:d.paragraph,root:m.root,strong:k.strong,text:g.text,thematicBreak:p.thematicBreak};exports.handle=f;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/index.js"],"sourcesContent":["import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {definition} from './definition.js'\nimport {emphasis} from './emphasis.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {image} from './image.js'\nimport {imageReference} from './image-reference.js'\nimport {inlineCode} from './inline-code.js'\nimport {link} from './link.js'\nimport {linkReference} from './link-reference.js'\nimport {list} from './list.js'\nimport {listItem} from './list-item.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default (CommonMark) handlers.\n */\nexport const handle = {\n blockquote,\n break: hardBreak,\n code,\n definition,\n emphasis,\n hardBreak,\n heading,\n html,\n image,\n imageReference,\n inlineCode,\n link,\n linkReference,\n list,\n listItem,\n paragraph,\n root,\n strong,\n text,\n thematicBreak\n}\n"],"names":["handle","blockquote","break","hardBreak","code","definition","emphasis","heading","html","image","imageReference","inlineCode","link","linkReference","list","listItem","paragraph","root","strong","text","thematicBreak"],"mappings":"okBAuBY,MAACA,EAAS,CACtBC,WAAEA,EAAUA,WACVC,MAAOC,EAASA,UAClBC,KAAEA,EAAIA,KACNC,WAAEA,EAAUA,WACZC,SAAEA,EAAQA,SACVH,UAAEA,EAASA,UACXI,QAAEA,EAAOA,QACTC,KAAEA,EAAIA,KACNC,MAAEA,EAAKA,MACPC,eAAEA,EAAcA,eAChBC,WAAEA,EAAUA,WACZC,KAAEA,EAAIA,KACNC,cAAEA,EAAaA,cACfC,KAAEA,EAAIA,KACNC,SAAEA,EAAQA,SACVC,UAAEA,EAASA,UACXC,KAAEA,EAAIA,KACNC,OAAEA,EAAMA,OACRC,KAAEA,EAAIA,KACNC,cAAEA,EAAaA"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e,t,n){let r=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let s;if(e.atBreak)for(;s=t.exec(r);){let e=s.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(s.index+1)}}return s+r+s}Object.defineProperty(exports,"__esModule",{value:!0}),e.peek=function(){return"`"},exports.inlineCode=e;
2
+ //# sourceMappingURL=inline-code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-code.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {InlineCode, Parents} from 'mdast'\n */\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @param {InlineCode} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nexport function inlineCode(node, _, state) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n const expression = state.compilePattern(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @returns {string}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n"],"names":["inlineCode","node","_","state","value","sequence","index","RegExp","test","unsafe","length","pattern","expression","compilePattern","match","atBreak","exec","position","charCodeAt","slice","peek"],"mappings":"aAaO,SAASA,EAAWC,EAAMC,EAAGC,GAClC,IAAIC,EAAQH,EAAKG,OAAS,GACtBC,EAAW,IACXC,GAAS,EAKb,KAAO,IAAIC,OAAO,WAAaF,EAAW,YAAYG,KAAKJ,IACzDC,GAAY,IAmBd,IAbE,WAAWG,KAAKJ,KACd,WAAWI,KAAKJ,IAAU,WAAWI,KAAKJ,IAAW,QAAQI,KAAKJ,MAEpEA,EAAQ,IAAMA,EAAQ,OAUfE,EAAQH,EAAMM,OAAOC,QAAQ,CACpC,MAAMC,EAAUR,EAAMM,OAAOH,GACvBM,EAAaT,EAAMU,eAAeF,GAExC,IAAIG,EAKJ,GAAKH,EAAQI,QAEb,KAAQD,EAAQF,EAAWI,KAAKZ,IAAS,CACvC,IAAIa,EAAWH,EAAMR,MAIY,KAA/BF,EAAMc,WAAWD,IACkB,KAAnCb,EAAMc,WAAWD,EAAW,IAE5BA,IAGFb,EAAQA,EAAMe,MAAM,EAAGF,GAAY,IAAMb,EAAMe,MAAML,EAAMR,MAAQ,EACpE,CACF,CAED,OAAOD,EAAWD,EAAQC,CAC5B,wDA/DAL,EAAWoB,KAoEX,WACE,MAAO,GACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e,r,t,n){const c=e.referenceType,o=t.enter("linkReference");let s=t.enter("label");const a=t.createTracker(n);let f=a.move("[");const i=t.containerPhrasing(e,{before:f,after:"]",...a.current()});f+=a.move(i+"]["),s();const l=t.stack;t.stack=[],s=t.enter("reference");const u=t.safe(t.associationId(e),{before:f,after:"]",...a.current()});return s(),t.stack=l,o(),"full"!==c&&i&&i===u?"shortcut"===c?f=f.slice(0,-1):f+=a.move("]"):f+=a.move(u+"]"),f}Object.defineProperty(exports,"__esModule",{value:!0}),e.peek=function(){return"["},exports.linkReference=e;
2
+ //# sourceMappingURL=link-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-reference.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/link-reference.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {LinkReference, Parents} from 'mdast'\n */\n\nlinkReference.peek = linkReferencePeek\n\n/**\n * @param {LinkReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function linkReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('linkReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n const text = state.containerPhrasing(node, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(text + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !text || text !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction linkReferencePeek() {\n return '['\n}\n"],"names":["linkReference","node","_","state","info","type","referenceType","exit","enter","subexit","tracker","createTracker","value","move","text","containerPhrasing","before","after","current","stack","reference","safe","associationId","slice","peek"],"mappings":"aAcO,SAASA,EAAcC,EAAMC,EAAGC,EAAOC,GAC5C,MAAMC,EAAOJ,EAAKK,cACZC,EAAOJ,EAAMK,MAAM,iBACzB,IAAIC,EAAUN,EAAMK,MAAM,SAC1B,MAAME,EAAUP,EAAMQ,cAAcP,GACpC,IAAIQ,EAAQF,EAAQG,KAAK,KACzB,MAAMC,EAAOX,EAAMY,kBAAkBd,EAAM,CACzCe,OAAQJ,EACRK,MAAO,OACJP,EAAQQ,YAEbN,GAASF,EAAQG,KAAKC,EAAO,MAE7BL,IAEA,MAAMU,EAAQhB,EAAMgB,MACpBhB,EAAMgB,MAAQ,GACdV,EAAUN,EAAMK,MAAM,aAKtB,MAAMY,EAAYjB,EAAMkB,KAAKlB,EAAMmB,cAAcrB,GAAO,CACtDe,OAAQJ,EACRK,MAAO,OACJP,EAAQQ,YAeb,OAbAT,IACAN,EAAMgB,MAAQA,EACdZ,IAEa,SAATF,GAAoBS,GAAQA,IAASM,EAErB,aAATf,EAETO,EAAQA,EAAMW,MAAM,GAAI,GAExBX,GAASF,EAAQG,KAAK,KALtBD,GAASF,EAAQG,KAAKO,EAAY,KAQ7BR,CACT,wDAlDAZ,EAAcwB,KAuDd,WACE,MAAO,GACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-quote.js"),t=require("../util/format-link-as-autolink.js");function r(r,o,n,i){const a=e.checkQuote(n),u='"'===a?"Quote":"Apostrophe",l=n.createTracker(i);let s,c;if(t.formatLinkAsAutolink(r,n)){const e=n.stack;n.stack=[],s=n.enter("autolink");let t=l.move("<");return t+=l.move(n.containerPhrasing(r,{before:t,after:">",...l.current()})),t+=l.move(">"),s(),n.stack=e,t}s=n.enter("link"),c=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(r,{before:f,after:"](",...l.current()})),f+=l.move("]("),c(),!r.url&&r.title||/[\0- \u007F]/.test(r.url)?(c=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(r.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(c=n.enter("destinationRaw"),f+=l.move(n.safe(r.url,{before:f,after:r.title?" ":")",...l.current()}))),c(),r.title&&(c=n.enter(`title${u}`),f+=l.move(" "+a),f+=l.move(n.safe(r.title,{before:f,after:a,...l.current()})),f+=l.move(a),c()),f+=l.move(")"),s(),f}r.peek=function(e,r,o){return t.formatLinkAsAutolink(e,o)?"<":"["},exports.link=r;
2
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/link.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Link, Parents} from 'mdast'\n * @import {Exit} from '../types.js'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\nimport {formatLinkAsAutolink} from '../util/format-link-as-autolink.js'\n\nlink.peek = linkPeek\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function link(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const tracker = state.createTracker(info)\n /** @type {Exit} */\n let exit\n /** @type {Exit} */\n let subexit\n\n if (formatLinkAsAutolink(node, state)) {\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n exit = state.enter('autolink')\n let value = tracker.move('<')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '>',\n ...tracker.current()\n })\n )\n value += tracker.move('>')\n exit()\n state.stack = stack\n return value\n }\n\n exit = state.enter('link')\n subexit = state.enter('label')\n let value = tracker.move('[')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '](',\n ...tracker.current()\n })\n )\n value += tracker.move('](')\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n\n exit()\n return value\n}\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nfunction linkPeek(node, _, state) {\n return formatLinkAsAutolink(node, state) ? '<' : '['\n}\n"],"names":["link","node","_","state","info","quote","checkQuote","suffix","tracker","createTracker","exit","subexit","formatLinkAsAutolink","stack","enter","value","move","containerPhrasing","before","after","current","url","title","test","safe","peek"],"mappings":"4JAkBO,SAASA,EAAKC,EAAMC,EAAGC,EAAOC,GACnC,MAAMC,EAAQC,EAAUA,WAACH,GACnBI,EAAmB,MAAVF,EAAgB,QAAU,aACnCG,EAAUL,EAAMM,cAAcL,GAEpC,IAAIM,EAEAC,EAEJ,GAAIC,EAAoBA,qBAACX,EAAME,GAAQ,CAErC,MAAMU,EAAQV,EAAMU,MACpBV,EAAMU,MAAQ,GACdH,EAAOP,EAAMW,MAAM,YACnB,IAAIC,EAAQP,EAAQQ,KAAK,KAWzB,OAVAD,GAASP,EAAQQ,KACfb,EAAMc,kBAAkBhB,EAAM,CAC5BiB,OAAQH,EACRI,MAAO,OACJX,EAAQY,aAGfL,GAASP,EAAQQ,KAAK,KACtBN,IACAP,EAAMU,MAAQA,EACPE,CACR,CAEDL,EAAOP,EAAMW,MAAM,QACnBH,EAAUR,EAAMW,MAAM,SACtB,IAAIC,EAAQP,EAAQQ,KAAK,KAsDzB,OArDAD,GAASP,EAAQQ,KACfb,EAAMc,kBAAkBhB,EAAM,CAC5BiB,OAAQH,EACRI,MAAO,QACJX,EAAQY,aAGfL,GAASP,EAAQQ,KAAK,MACtBL,KAIIV,EAAKoB,KAAOpB,EAAKqB,OAEnB,eAAeC,KAAKtB,EAAKoB,MAEzBV,EAAUR,EAAMW,MAAM,sBACtBC,GAASP,EAAQQ,KAAK,KACtBD,GAASP,EAAQQ,KACfb,EAAMqB,KAAKvB,EAAKoB,IAAK,CAACH,OAAQH,EAAOI,MAAO,OAAQX,EAAQY,aAE9DL,GAASP,EAAQQ,KAAK,OAGtBL,EAAUR,EAAMW,MAAM,kBACtBC,GAASP,EAAQQ,KACfb,EAAMqB,KAAKvB,EAAKoB,IAAK,CACnBH,OAAQH,EACRI,MAAOlB,EAAKqB,MAAQ,IAAM,OACvBd,EAAQY,cAKjBT,IAEIV,EAAKqB,QACPX,EAAUR,EAAMW,MAAM,QAAQP,KAC9BQ,GAASP,EAAQQ,KAAK,IAAMX,GAC5BU,GAASP,EAAQQ,KACfb,EAAMqB,KAAKvB,EAAKqB,MAAO,CACrBJ,OAAQH,EACRI,MAAOd,KACJG,EAAQY,aAGfL,GAASP,EAAQQ,KAAKX,GACtBM,KAGFI,GAASP,EAAQQ,KAAK,KAEtBN,IACOK,CACT,CA9FAf,EAAKyB,KAsGL,SAAkBxB,EAAMC,EAAGC,GACzB,OAAOS,EAAoBA,qBAACX,EAAME,GAAS,IAAM,GACnD"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-bullet.js"),t=require("../util/check-list-item-indent.js");exports.listItem=function(r,n,i,s){const l=t.checkListItemIndent(i);let c=i.bulletCurrent||e.checkBullet(i);n&&"list"===n.type&&n.ordered&&(c=("number"==typeof n.start&&n.start>-1?n.start:1)+(!1===i.options.incrementListMarker?0:n.children.indexOf(r))+c);let u=c.length+1;("tab"===l||"mixed"===l&&(n&&"list"===n.type&&n.spread||r.spread))&&(u=4*Math.ceil(u/4));const a=i.createTracker(s);a.move(c+" ".repeat(u-c.length)),a.shift(u);const o=i.enter("listItem"),d=i.indentLines(i.containerFlow(r,a.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(u))+e;return(r?c:c+" ".repeat(u-c.length))+e}));return o(),d};
2
+ //# sourceMappingURL=list-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/list-item.js"],"sourcesContent":["/**\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n * @import {ListItem, Parents} from 'mdast'\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\n\n/**\n * @param {ListItem} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function listItem(node, parent, state, info) {\n const listItemIndent = checkListItemIndent(state)\n let bullet = state.bulletCurrent || checkBullet(state)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (state.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = state.createTracker(info)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = state.enter('listItem')\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n"],"names":["node","parent","state","info","listItemIndent","checkListItemIndent","bullet","bulletCurrent","checkBullet","type","ordered","start","options","incrementListMarker","children","indexOf","size","length","spread","Math","ceil","tracker","createTracker","move","repeat","shift","exit","enter","value","indentLines","containerFlow","current","line","index","blank"],"mappings":"6KAeO,SAAkBA,EAAMC,EAAQC,EAAOC,GAC5C,MAAMC,EAAiBC,EAAmBA,oBAACH,GAC3C,IAAII,EAASJ,EAAMK,eAAiBC,EAAAA,YAAYN,GAG5CD,GAA0B,SAAhBA,EAAOQ,MAAmBR,EAAOS,UAC7CJ,GAC2B,iBAAjBL,EAAOU,OAAsBV,EAAOU,OAAS,EACjDV,EAAOU,MACP,KACmC,IAAtCT,EAAMU,QAAQC,oBACX,EACAZ,EAAOa,SAASC,QAAQf,IAC5BM,GAGJ,IAAIU,EAAOV,EAAOW,OAAS,GAGN,QAAnBb,GACoB,UAAnBA,IACGH,GAA0B,SAAhBA,EAAOQ,MAAmBR,EAAOiB,QAAWlB,EAAKkB,WAE/DF,EAA6B,EAAtBG,KAAKC,KAAKJ,EAAO,IAG1B,MAAMK,EAAUnB,EAAMoB,cAAcnB,GACpCkB,EAAQE,KAAKjB,EAAS,IAAIkB,OAAOR,EAAOV,EAAOW,SAC/CI,EAAQI,MAAMT,GACd,MAAMU,EAAOxB,EAAMyB,MAAM,YACnBC,EAAQ1B,EAAM2B,YAClB3B,EAAM4B,cAAc9B,EAAMqB,EAAQU,YAQpC,SAAaC,EAAMC,EAAOC,GACxB,GAAID,EACF,OAAQC,EAAQ,GAAK,IAAIV,OAAOR,IAASgB,EAG3C,OAAQE,EAAQ5B,EAASA,EAAS,IAAIkB,OAAOR,EAAOV,EAAOW,SAAWe,CACvE,IATD,OAFAN,IAEOE,CAUT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-bullet.js"),t=require("../util/check-bullet-other.js"),l=require("../util/check-bullet-ordered.js"),c=require("../util/check-rule.js");exports.list=function(r,i,n,s){const d=n.enter("list"),u=n.bulletCurrent;let h=r.ordered?l.checkBulletOrdered(n):e.checkBullet(n);const k=r.ordered?"."===h?")":".":t.checkBulletOther(n);let a=!(!i||!n.bulletLastUsed)&&h===n.bulletLastUsed;if(!r.ordered){const e=r.children?r.children[0]:void 0;if("*"!==h&&"-"!==h||!e||e.children&&e.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(a=!0),c.checkRule(n)===h&&e){let e=-1;for(;++e<r.children.length;){const t=r.children[e];if(t&&"listItem"===t.type&&t.children&&t.children[0]&&"thematicBreak"===t.children[0].type){a=!0;break}}}}a&&(h=k),n.bulletCurrent=h;const o=n.containerFlow(r,s);return n.bulletLastUsed=h,n.bulletCurrent=u,d(),o};
2
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/list.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {List, Parents} from 'mdast'\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkBulletOther} from '../util/check-bullet-other.js'\nimport {checkBulletOrdered} from '../util/check-bullet-ordered.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {List} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function list(node, parent, state, info) {\n const exit = state.enter('list')\n const bulletCurrent = state.bulletCurrent\n /** @type {string} */\n let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state)\n /** @type {string} */\n const bulletOther = node.ordered\n ? bullet === '.'\n ? ')'\n : '.'\n : checkBulletOther(state)\n let useDifferentMarker =\n parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false\n\n if (!node.ordered) {\n const firstListItem = node.children ? node.children[0] : undefined\n\n // If there’s an empty first list item directly in two list items,\n // we have to use a different bullet:\n //\n // ```markdown\n // * - *\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (\n // Bullet could be used as a thematic break marker:\n (bullet === '*' || bullet === '-') &&\n // Empty first list item:\n firstListItem &&\n (!firstListItem.children || !firstListItem.children[0]) &&\n // Directly in two other list items:\n state.stack[state.stack.length - 1] === 'list' &&\n state.stack[state.stack.length - 2] === 'listItem' &&\n state.stack[state.stack.length - 3] === 'list' &&\n state.stack[state.stack.length - 4] === 'listItem' &&\n // That are each the first child.\n state.indexStack[state.indexStack.length - 1] === 0 &&\n state.indexStack[state.indexStack.length - 2] === 0 &&\n state.indexStack[state.indexStack.length - 3] === 0\n ) {\n useDifferentMarker = true\n }\n\n // If there’s a thematic break at the start of the first list item,\n // we have to use a different bullet:\n //\n // ```markdown\n // * ---\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (checkRule(state) === bullet && firstListItem) {\n let index = -1\n\n while (++index < node.children.length) {\n const item = node.children[index]\n\n if (\n item &&\n item.type === 'listItem' &&\n item.children &&\n item.children[0] &&\n item.children[0].type === 'thematicBreak'\n ) {\n useDifferentMarker = true\n break\n }\n }\n }\n }\n\n if (useDifferentMarker) {\n bullet = bulletOther\n }\n\n state.bulletCurrent = bullet\n const value = state.containerFlow(node, info)\n state.bulletLastUsed = bullet\n state.bulletCurrent = bulletCurrent\n exit()\n return value\n}\n"],"names":["node","parent","state","info","exit","enter","bulletCurrent","bullet","ordered","checkBulletOrdered","checkBullet","bulletOther","checkBulletOther","useDifferentMarker","bulletLastUsed","firstListItem","children","undefined","stack","length","indexStack","checkRule","index","item","type","value","containerFlow"],"mappings":"qPAiBO,SAAcA,EAAMC,EAAQC,EAAOC,GACxC,MAAMC,EAAOF,EAAMG,MAAM,QACnBC,EAAgBJ,EAAMI,cAE5B,IAAIC,EAASP,EAAKQ,QAAUC,EAAkBA,mBAACP,GAASQ,EAAWA,YAACR,GAEpE,MAAMS,EAAcX,EAAKQ,QACV,MAAXD,EACE,IACA,IACFK,EAAAA,iBAAiBV,GACrB,IAAIW,KACFZ,IAAUC,EAAMY,iBAAiBP,IAAWL,EAAMY,eAEpD,IAAKd,EAAKQ,QAAS,CACjB,MAAMO,EAAgBf,EAAKgB,SAAWhB,EAAKgB,SAAS,QAAKC,EAqCzD,GAzBc,MAAXV,GAA6B,MAAXA,IAEnBQ,GACEA,EAAcC,UAAaD,EAAcC,SAAS,IAEZ,SAAxCd,EAAMgB,MAAMhB,EAAMgB,MAAMC,OAAS,IACO,aAAxCjB,EAAMgB,MAAMhB,EAAMgB,MAAMC,OAAS,IACO,SAAxCjB,EAAMgB,MAAMhB,EAAMgB,MAAMC,OAAS,IACO,aAAxCjB,EAAMgB,MAAMhB,EAAMgB,MAAMC,OAAS,IAEiB,IAAlDjB,EAAMkB,WAAWlB,EAAMkB,WAAWD,OAAS,IACO,IAAlDjB,EAAMkB,WAAWlB,EAAMkB,WAAWD,OAAS,IACO,IAAlDjB,EAAMkB,WAAWlB,EAAMkB,WAAWD,OAAS,KAE3CN,GAAqB,GAWnBQ,YAAUnB,KAAWK,GAAUQ,EAAe,CAChD,IAAIO,GAAS,EAEb,OAASA,EAAQtB,EAAKgB,SAASG,QAAQ,CACrC,MAAMI,EAAOvB,EAAKgB,SAASM,GAE3B,GACEC,GACc,aAAdA,EAAKC,MACLD,EAAKP,UACLO,EAAKP,SAAS,IACY,kBAA1BO,EAAKP,SAAS,GAAGQ,KACjB,CACAX,GAAqB,EACrB,KACD,CACF,CACF,CACF,CAEGA,IACFN,EAASI,GAGXT,EAAMI,cAAgBC,EACtB,MAAMkB,EAAQvB,EAAMwB,cAAc1B,EAAMG,GAIxC,OAHAD,EAAMY,eAAiBP,EACvBL,EAAMI,cAAgBA,EACtBF,IACOqB,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.paragraph=function(e,r,t,n){const a=t.enter("paragraph"),p=t.enter("phrasing"),s=t.containerPhrasing(e,n);return p(),a(),s};
2
+ //# sourceMappingURL=paragraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/paragraph.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Paragraph, Parents} from 'mdast'\n */\n\n/**\n * @param {Paragraph} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function paragraph(node, _, state, info) {\n const exit = state.enter('paragraph')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, info)\n subexit()\n exit()\n return value\n}\n"],"names":["node","_","state","info","exit","enter","subexit","value","containerPhrasing"],"mappings":"sFAYO,SAAmBA,EAAMC,EAAGC,EAAOC,GACxC,MAAMC,EAAOF,EAAMG,MAAM,aACnBC,EAAUJ,EAAMG,MAAM,YACtBE,EAAQL,EAAMM,kBAAkBR,EAAMG,GAG5C,OAFAG,IACAF,IACOG,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../mdast-util-phrasing/lib/index.js");exports.root=function(r,n,t,i){return(r.children.some((function(r){return e.phrasing(r)}))?t.containerPhrasing:t.containerFlow).call(t,r,i)};
2
+ //# sourceMappingURL=root.js.map