markdown-flow-ui 0.3.6 → 0.3.7

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 (322) hide show
  1. package/dist/_virtual/index8.cjs +1 -1
  2. package/dist/_virtual/index8.es.js +2 -2
  3. package/dist/_virtual/index9.cjs +1 -1
  4. package/dist/_virtual/index9.es.js +2 -2
  5. package/dist/assets/markdown-flow-ui.css +1 -1
  6. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
  7. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
  8. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +145 -143
  9. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  10. package/dist/markdown-flow-ui-lib.css +1 -1
  11. package/dist/markdown-flow-ui.css +1 -1
  12. package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
  13. package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  14. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
  15. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -0
  16. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
  17. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  18. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +92 -89
  19. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
  20. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
  21. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
  22. package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-popper → react-popper}/dist/index.es.js +5 -5
  23. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -0
  24. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  25. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  26. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +50 -47
  27. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  28. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
  29. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
  30. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +9 -9
  31. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +1 -1
  32. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
  33. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +10 -7
  34. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -1
  35. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  36. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
  37. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +1 -1
  38. package/dist/node_modules/classnames/index.cjs +1 -1
  39. package/dist/node_modules/classnames/index.es.js +1 -1
  40. package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
  41. package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
  42. package/dist/node_modules/i18next/dist/esm/i18next.es.js +809 -900
  43. package/dist/node_modules/i18next/dist/esm/i18next.es.js.map +1 -1
  44. package/dist/node_modules/katex/dist/katex.cjs +14 -14
  45. package/dist/node_modules/katex/dist/katex.cjs.map +1 -1
  46. package/dist/node_modules/katex/dist/katex.es.js +1302 -1192
  47. package/dist/node_modules/katex/dist/katex.es.js.map +1 -1
  48. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +1 -1
  49. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
  50. package/dist/node_modules/lucide-react/dist/esm/Icon.es.js +52 -29
  51. package/dist/node_modules/lucide-react/dist/esm/Icon.es.js.map +1 -1
  52. package/dist/node_modules/lucide-react/dist/esm/context.cjs +2 -0
  53. package/dist/node_modules/lucide-react/dist/esm/context.cjs.map +1 -0
  54. package/dist/node_modules/lucide-react/dist/esm/context.es.js +6 -0
  55. package/dist/node_modules/lucide-react/dist/esm/context.es.js.map +1 -0
  56. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +1 -1
  57. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
  58. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js +13 -16
  59. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js.map +1 -1
  60. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs +1 -1
  61. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.map +1 -1
  62. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js +16 -10
  63. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js.map +1 -1
  64. package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs +1 -1
  65. package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs.map +1 -1
  66. package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js +13 -6
  67. package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js.map +1 -1
  68. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +1 -1
  69. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
  70. package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js +8 -2
  71. package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js.map +1 -1
  72. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +1 -1
  73. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs.map +1 -1
  74. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js +10 -4
  75. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js.map +1 -1
  76. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs +1 -1
  77. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -1
  78. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js +12 -6
  79. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -1
  80. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs +1 -1
  81. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs.map +1 -1
  82. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js +14 -7
  83. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js.map +1 -1
  84. package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs +1 -1
  85. package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs.map +1 -1
  86. package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js +11 -5
  87. package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js.map +1 -1
  88. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs +1 -1
  89. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs.map +1 -1
  90. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js +13 -6
  91. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js.map +1 -1
  92. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs +1 -1
  93. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs.map +1 -1
  94. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js +22 -7
  95. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js.map +1 -1
  96. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs +1 -1
  97. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs.map +1 -1
  98. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js +20 -8
  99. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js.map +1 -1
  100. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs +1 -1
  101. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs.map +1 -1
  102. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js +17 -11
  103. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js.map +1 -1
  104. package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs +1 -1
  105. package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs.map +1 -1
  106. package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js +14 -8
  107. package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js.map +1 -1
  108. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs +1 -1
  109. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs.map +1 -1
  110. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js +11 -4
  111. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js.map +1 -1
  112. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs +1 -1
  113. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs.map +1 -1
  114. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js +15 -9
  115. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js.map +1 -1
  116. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs +1 -1
  117. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs.map +1 -1
  118. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js +25 -7
  119. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js.map +1 -1
  120. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs +1 -1
  121. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs.map +1 -1
  122. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js +16 -10
  123. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js.map +1 -1
  124. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs +1 -1
  125. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs.map +1 -1
  126. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js +19 -7
  127. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js.map +1 -1
  128. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs +1 -1
  129. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs.map +1 -1
  130. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js +19 -7
  131. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js.map +1 -1
  132. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs +1 -1
  133. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs.map +1 -1
  134. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js +14 -7
  135. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js.map +1 -1
  136. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs +1 -1
  137. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs.map +1 -1
  138. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js +19 -6
  139. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js.map +1 -1
  140. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs +1 -1
  141. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs.map +1 -1
  142. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js +15 -9
  143. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js.map +1 -1
  144. package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs +1 -1
  145. package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs.map +1 -1
  146. package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js +13 -7
  147. package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js.map +1 -1
  148. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs +1 -1
  149. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs.map +1 -1
  150. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js +19 -13
  151. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js.map +1 -1
  152. package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs +1 -1
  153. package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs.map +1 -1
  154. package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js +13 -7
  155. package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js.map +1 -1
  156. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.cjs +2 -0
  157. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.cjs.map +1 -0
  158. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.es.js +18 -0
  159. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.es.js.map +1 -0
  160. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.cjs +2 -0
  161. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.cjs.map +1 -0
  162. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.es.js +44 -0
  163. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.es.js.map +1 -0
  164. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.cjs +2 -0
  165. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.cjs.map +1 -0
  166. package/dist/node_modules/lucide-react/dist/esm/{defaultAttributes.es.js → shared/src/build/defaultAttributes.es.js} +4 -4
  167. package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.es.js.map +1 -0
  168. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.cjs +2 -0
  169. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.cjs.map +1 -0
  170. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.es.js +10 -0
  171. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.es.js.map +1 -0
  172. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.cjs +2 -0
  173. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.cjs.map +1 -0
  174. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.es.js +5 -0
  175. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.es.js.map +1 -0
  176. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.cjs +2 -0
  177. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.cjs.map +1 -0
  178. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.es.js +15 -0
  179. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.es.js.map +1 -0
  180. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.cjs +2 -0
  181. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.cjs.map +1 -0
  182. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.es.js +5 -0
  183. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.es.js.map +1 -0
  184. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.cjs +2 -0
  185. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.cjs.map +1 -0
  186. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.es.js +15 -0
  187. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.es.js.map +1 -0
  188. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.cjs +2 -0
  189. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.cjs.map +1 -0
  190. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.es.js +9 -0
  191. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.es.js.map +1 -0
  192. package/dist/node_modules/micromark/lib/create-tokenizer.cjs +3 -3
  193. package/dist/node_modules/micromark/lib/create-tokenizer.cjs.map +1 -1
  194. package/dist/node_modules/micromark/lib/create-tokenizer.es.js +78 -76
  195. package/dist/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -1
  196. package/dist/node_modules/micromark/lib/initialize/document.cjs +1 -1
  197. package/dist/node_modules/micromark/lib/initialize/document.cjs.map +1 -1
  198. package/dist/node_modules/micromark/lib/initialize/document.es.js +77 -75
  199. package/dist/node_modules/micromark/lib/initialize/document.es.js.map +1 -1
  200. package/dist/node_modules/micromark/lib/initialize/text.cjs +1 -1
  201. package/dist/node_modules/micromark/lib/initialize/text.cjs.map +1 -1
  202. package/dist/node_modules/micromark/lib/initialize/text.es.js +67 -64
  203. package/dist/node_modules/micromark/lib/initialize/text.es.js.map +1 -1
  204. package/dist/node_modules/micromark/lib/preprocess.cjs +1 -1
  205. package/dist/node_modules/micromark/lib/preprocess.cjs.map +1 -1
  206. package/dist/node_modules/micromark/lib/preprocess.es.js +19 -14
  207. package/dist/node_modules/micromark/lib/preprocess.es.js.map +1 -1
  208. package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs +1 -1
  209. package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs.map +1 -1
  210. package/dist/node_modules/micromark-core-commonmark/lib/attention.es.js +36 -32
  211. package/dist/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -1
  212. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs +1 -1
  213. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +1 -1
  214. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +49 -61
  215. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -1
  216. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs +1 -1
  217. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +1 -1
  218. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.es.js +21 -27
  219. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -1
  220. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs +1 -1
  221. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +1 -1
  222. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +18 -14
  223. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -1
  224. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs +1 -1
  225. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +1 -1
  226. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.es.js +59 -71
  227. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -1
  228. package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs +1 -1
  229. package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs.map +1 -1
  230. package/dist/node_modules/micromark-core-commonmark/lib/label-end.es.js +87 -85
  231. package/dist/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -1
  232. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs +1 -1
  233. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +1 -1
  234. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +11 -10
  235. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.es.js.map +1 -1
  236. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs +1 -1
  237. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +1 -1
  238. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +12 -11
  239. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.es.js.map +1 -1
  240. package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.cjs +2 -0
  241. package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.cjs.map +1 -0
  242. package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.es.js +18 -0
  243. package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.es.js.map +1 -0
  244. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs +1 -1
  245. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +1 -1
  246. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +35 -33
  247. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -1
  248. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.cjs +1 -1
  249. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.cjs.map +1 -1
  250. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js +32 -28
  251. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js.map +1 -1
  252. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.cjs +1 -1
  253. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.cjs.map +1 -1
  254. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +18 -14
  255. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.es.js.map +1 -1
  256. package/dist/node_modules/micromark-factory-space/index.cjs +1 -1
  257. package/dist/node_modules/micromark-factory-space/index.cjs.map +1 -1
  258. package/dist/node_modules/micromark-factory-space/index.es.js +24 -10
  259. package/dist/node_modules/micromark-factory-space/index.es.js.map +1 -1
  260. package/dist/node_modules/micromark-util-edit-map/index.cjs +2 -0
  261. package/dist/node_modules/micromark-util-edit-map/index.cjs.map +1 -0
  262. package/dist/node_modules/micromark-util-edit-map/index.es.js +83 -0
  263. package/dist/node_modules/micromark-util-edit-map/index.es.js.map +1 -0
  264. package/package.json +24 -17
  265. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs +0 -2
  266. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs.map +0 -1
  267. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js +0 -50
  268. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js.map +0 -1
  269. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +0 -1
  270. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +0 -1
  271. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs +0 -2
  272. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs.map +0 -1
  273. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js +0 -82
  274. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js.map +0 -1
  275. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -2
  276. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +0 -1
  277. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +0 -216
  278. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +0 -1
  279. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +0 -2
  280. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +0 -1
  281. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +0 -105
  282. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +0 -1
  283. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs +0 -2
  284. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs.map +0 -1
  285. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.es.js.map +0 -1
  286. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs +0 -2
  287. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs.map +0 -1
  288. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js +0 -18
  289. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js.map +0 -1
  290. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
  291. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
  292. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js +0 -39
  293. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
  294. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
  295. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
  296. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -99
  297. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
  298. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -2
  299. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +0 -1
  300. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +0 -16
  301. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +0 -1
  302. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -2
  303. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +0 -1
  304. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +0 -70
  305. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +0 -1
  306. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
  307. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
  308. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js +0 -39
  309. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
  310. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
  311. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
  312. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -99
  313. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
  314. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +0 -2
  315. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +0 -1
  316. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js.map +0 -1
  317. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +0 -2
  318. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +0 -1
  319. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js +0 -19
  320. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js.map +0 -1
  321. /package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-arrow → react-arrow}/dist/index.cjs +0 -0
  322. /package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-arrow → react-arrow}/dist/index.es.js +0 -0
@@ -3,148 +3,150 @@ import { factoryLabel as h } from "../../micromark-factory-label/index.es.js";
3
3
  import { factoryTitle as M } from "../../micromark-factory-title/index.es.js";
4
4
  import { factoryWhitespace as k } from "../../micromark-factory-whitespace/index.es.js";
5
5
  import { markdownLineEndingOrSpace as m } from "../../micromark-util-character/index.es.js";
6
- import { push as b, splice as y } from "../../micromark-util-chunked/index.es.js";
7
- import { normalizeIdentifier as g } from "../../micromark-util-normalize-identifier/index.es.js";
6
+ import { push as b, splice as g } from "../../micromark-util-chunked/index.es.js";
7
+ import { normalizeIdentifier as y } from "../../micromark-util-normalize-identifier/index.es.js";
8
8
  import { resolveAll as E } from "../../micromark-util-resolve-all/index.es.js";
9
9
  const j = {
10
10
  name: "labelEnd",
11
- resolveAll: S,
11
+ resolveAll: x,
12
12
  resolveTo: w,
13
13
  tokenize: D
14
14
  }, L = {
15
15
  tokenize: T
16
- }, z = {
16
+ }, S = {
17
17
  tokenize: C
18
- }, x = {
19
- tokenize: A
18
+ }, z = {
19
+ tokenize: _
20
20
  };
21
- function S(e) {
22
- let u = -1;
21
+ function x(e) {
22
+ let o = -1;
23
23
  const a = [];
24
- for (; ++u < e.length; ) {
25
- const n = e[u][1];
26
- if (a.push(e[u]), n.type === "labelImage" || n.type === "labelLink" || n.type === "labelEnd") {
27
- const i = n.type === "labelImage" ? 4 : 2;
28
- n.type = "data", u += i;
24
+ for (; ++o < e.length; ) {
25
+ const t = e[o][1];
26
+ if (a.push(e[o]), t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") {
27
+ const n = t.type === "labelImage" ? 4 : 2;
28
+ t.type = "data", o += n;
29
29
  }
30
30
  }
31
- return e.length !== a.length && y(e, 0, e.length, a), e;
31
+ return e.length !== a.length && g(e, 0, e.length, a), e;
32
32
  }
33
- function w(e, u) {
34
- let a = e.length, n = 0, i, t, o, l;
35
- for (; a--; )
36
- if (i = e[a][1], t) {
37
- if (i.type === "link" || i.type === "labelLink" && i._inactive)
33
+ function w(e, o) {
34
+ let a = e.length, t = 0, n, i, l;
35
+ for (; a--; ) {
36
+ const u = e[a][1];
37
+ if (n) {
38
+ if (u.type === "link" || u.type === "labelLink" && u._inactive)
38
39
  break;
39
- e[a][0] === "enter" && i.type === "labelLink" && (i._inactive = !0);
40
- } else if (o) {
41
- if (e[a][0] === "enter" && (i.type === "labelImage" || i.type === "labelLink") && !i._balanced && (t = a, i.type !== "labelLink")) {
42
- n = 2;
40
+ e[a][0] === "enter" && u.type === "labelLink" && (u._inactive = !0);
41
+ } else if (i) {
42
+ if (e[a][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (n = a, u.type !== "labelLink")) {
43
+ t = 2;
43
44
  break;
44
45
  }
45
- } else i.type === "labelEnd" && (o = a);
46
- const p = {
47
- type: e[t][1].type === "labelLink" ? "link" : "image",
46
+ } else u.type === "labelEnd" && (i = a);
47
+ }
48
+ const s = {
49
+ type: e[n][1].type === "labelLink" ? "link" : "image",
48
50
  start: {
49
- ...e[t][1].start
51
+ ...e[n][1].start
50
52
  },
51
53
  end: {
52
54
  ...e[e.length - 1][1].end
53
55
  }
54
- }, f = {
56
+ }, p = {
55
57
  type: "label",
56
58
  start: {
57
- ...e[t][1].start
59
+ ...e[n][1].start
58
60
  },
59
61
  end: {
60
- ...e[o][1].end
62
+ ...e[i][1].end
61
63
  }
62
- }, c = {
64
+ }, f = {
63
65
  type: "labelText",
64
66
  start: {
65
- ...e[t + n + 2][1].end
67
+ ...e[n + t + 2][1].end
66
68
  },
67
69
  end: {
68
- ...e[o - 2][1].start
70
+ ...e[i - 2][1].start
69
71
  }
70
72
  };
71
- return l = [["enter", p, u], ["enter", f, u]], l = b(l, e.slice(t + 1, t + n + 3)), l = b(l, [["enter", c, u]]), l = b(l, E(u.parser.constructs.insideSpan.null, e.slice(t + n + 4, o - 3), u)), l = b(l, [["exit", c, u], e[o - 2], e[o - 1], ["exit", f, u]]), l = b(l, e.slice(o + 1)), l = b(l, [["exit", p, u]]), y(e, t, e.length, l), e;
73
+ return l = [["enter", s, o], ["enter", p, o]], l = b(l, e.slice(n + 1, n + t + 3)), l = b(l, [["enter", f, o]]), l = b(l, E(o.parser.constructs.insideSpan.null, e.slice(n + t + 4, i - 3), o)), l = b(l, [["exit", f, o], e[i - 2], e[i - 1], ["exit", p, o]]), l = b(l, e.slice(i + 1)), l = b(l, [["exit", s, o]]), g(e, n, e.length, l), e;
72
74
  }
73
- function D(e, u, a) {
74
- const n = this;
75
- let i = n.events.length, t, o;
76
- for (; i--; )
77
- if ((n.events[i][1].type === "labelImage" || n.events[i][1].type === "labelLink") && !n.events[i][1]._balanced) {
78
- t = n.events[i][1];
79
- break;
80
- }
81
- return l;
82
- function l(s) {
83
- return t ? t._inactive ? r(s) : (o = n.parser.defined.includes(g(n.sliceSerialize({
84
- start: t.end,
85
- end: n.now()
86
- }))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(s), e.exit("labelMarker"), e.exit("labelEnd"), p) : a(s);
75
+ function D(e, o, a) {
76
+ const t = this, n = t._labelStarts;
77
+ let i, l;
78
+ if (n) {
79
+ for (; n.length > 0 && n[n.length - 1]._balanced; )
80
+ n.pop();
81
+ i = n[n.length - 1];
87
82
  }
88
- function p(s) {
89
- return s === 40 ? e.attempt(L, c, o ? c : r)(s) : s === 91 ? e.attempt(z, c, o ? f : r)(s) : o ? c(s) : r(s);
83
+ return s;
84
+ function s(c) {
85
+ return i ? i._inactive ? r(c) : (l = t.parser.defined.includes(y(t.sliceSerialize({
86
+ start: i.end,
87
+ end: t.now()
88
+ }))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(c), e.exit("labelMarker"), e.exit("labelEnd"), p) : a(c);
90
89
  }
91
- function f(s) {
92
- return e.attempt(x, c, r)(s);
90
+ function p(c) {
91
+ return c === 40 ? e.attempt(L, u, l ? u : r)(c) : c === 91 ? e.attempt(S, u, l ? f : r)(c) : l ? u(c) : r(c);
93
92
  }
94
- function c(s) {
95
- return u(s);
93
+ function f(c) {
94
+ return e.attempt(z, u, r)(c);
96
95
  }
97
- function r(s) {
98
- return t._balanced = !0, a(s);
96
+ function u(c) {
97
+ return n.pop(), o(c);
98
+ }
99
+ function r(c) {
100
+ return i._balanced = !0, a(c);
99
101
  }
100
102
  }
101
- function T(e, u, a) {
102
- return n;
103
+ function T(e, o, a) {
104
+ return t;
105
+ function t(r) {
106
+ return e.enter("resource"), e.enter("resourceMarker"), e.consume(r), e.exit("resourceMarker"), n;
107
+ }
103
108
  function n(r) {
104
- return e.enter("resource"), e.enter("resourceMarker"), e.consume(r), e.exit("resourceMarker"), i;
109
+ return m(r) ? k(e, i)(r) : i(r);
105
110
  }
106
111
  function i(r) {
107
- return m(r) ? k(e, t)(r) : t(r);
108
- }
109
- function t(r) {
110
- return r === 41 ? c(r) : d(e, o, l, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(r);
111
- }
112
- function o(r) {
113
- return m(r) ? k(e, p)(r) : c(r);
112
+ return r === 41 ? u(r) : d(e, l, s, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(r);
114
113
  }
115
114
  function l(r) {
115
+ return m(r) ? k(e, p)(r) : u(r);
116
+ }
117
+ function s(r) {
116
118
  return a(r);
117
119
  }
118
120
  function p(r) {
119
- return r === 34 || r === 39 || r === 40 ? M(e, f, a, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(r) : c(r);
121
+ return r === 34 || r === 39 || r === 40 ? M(e, f, a, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(r) : u(r);
120
122
  }
121
123
  function f(r) {
122
- return m(r) ? k(e, c)(r) : c(r);
124
+ return m(r) ? k(e, u)(r) : u(r);
123
125
  }
124
- function c(r) {
125
- return r === 41 ? (e.enter("resourceMarker"), e.consume(r), e.exit("resourceMarker"), e.exit("resource"), u) : a(r);
126
+ function u(r) {
127
+ return r === 41 ? (e.enter("resourceMarker"), e.consume(r), e.exit("resourceMarker"), e.exit("resource"), o) : a(r);
126
128
  }
127
129
  }
128
- function C(e, u, a) {
129
- const n = this;
130
- return i;
131
- function i(l) {
132
- return h.call(n, e, t, o, "reference", "referenceMarker", "referenceString")(l);
130
+ function C(e, o, a) {
131
+ const t = this;
132
+ return n;
133
+ function n(s) {
134
+ return h.call(t, e, i, l, "reference", "referenceMarker", "referenceString")(s);
133
135
  }
134
- function t(l) {
135
- return n.parser.defined.includes(g(n.sliceSerialize(n.events[n.events.length - 1][1]).slice(1, -1))) ? u(l) : a(l);
136
+ function i(s) {
137
+ return t.parser.defined.includes(y(t.sliceSerialize(t.events[t.events.length - 1][1]).slice(1, -1))) ? o(s) : a(s);
136
138
  }
137
- function o(l) {
138
- return a(l);
139
+ function l(s) {
140
+ return a(s);
139
141
  }
140
142
  }
141
- function A(e, u, a) {
142
- return n;
143
- function n(t) {
144
- return e.enter("reference"), e.enter("referenceMarker"), e.consume(t), e.exit("referenceMarker"), i;
143
+ function _(e, o, a) {
144
+ return t;
145
+ function t(i) {
146
+ return e.enter("reference"), e.enter("referenceMarker"), e.consume(i), e.exit("referenceMarker"), n;
145
147
  }
146
- function i(t) {
147
- return t === 93 ? (e.enter("referenceMarker"), e.consume(t), e.exit("referenceMarker"), e.exit("reference"), u) : a(t);
148
+ function n(i) {
149
+ return i === 93 ? (e.enter("referenceMarker"), e.consume(i), e.exit("referenceMarker"), e.exit("reference"), o) : a(i);
148
150
  }
149
151
  }
150
152
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"label-end.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-end.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * Event,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n resolveAll: resolveAllLabelEnd,\n resolveTo: resolveToLabelEnd,\n tokenize: tokenizeLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n /** @type {Array<Event>} */\n const newEvents = [];\n while (++index < events.length) {\n const token = events[index][1];\n newEvents.push(events[index]);\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n const offset = token.type === \"labelImage\" ? 4 : 2;\n token.type = \"data\";\n index += offset;\n }\n }\n\n // If the events are equal, we don't have to copy newEvents to events\n if (events.length !== newEvents.length) {\n splice(events, 0, events.length, newEvents);\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {Token} */\n let token;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array<Event>} */\n let media;\n\n // Find an opening.\n while (index--) {\n token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n const label = {\n type: \"label\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[close][1].end\n }\n };\n const text = {\n type: \"labelText\",\n start: {\n ...events[open + offset + 2][1].end\n },\n end: {\n ...events[close - 2][1].start\n }\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n\n // Find an opening.\n while (index--) {\n if ((self.events[index][1].type === \"labelImage\" || self.events[index][1].type === \"labelLink\") && !self.events[index][1]._balanced) {\n labelStart = self.events[index][1];\n break;\n }\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}"],"names":["labelEnd","resolveAllLabelEnd","resolveToLabelEnd","tokenizeLabelEnd","resourceConstruct","tokenizeResource","referenceFullConstruct","tokenizeReferenceFull","referenceCollapsedConstruct","tokenizeReferenceCollapsed","events","index","newEvents","token","offset","splice","context","open","close","media","group","label","text","push","resolveAll","effects","ok","nok","self","labelStart","defined","start","code","labelEndNok","normalizeIdentifier","after","labelEndOk","referenceNotFull","resourceStart","resourceBefore","markdownLineEndingOrSpace","factoryWhitespace","resourceOpen","resourceEnd","factoryDestination","resourceDestinationAfter","resourceDestinationMissing","resourceBetween","factoryTitle","resourceTitleAfter","referenceFull","factoryLabel","referenceFullAfter","referenceFull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pBP,EAAQ,KAAK,iBAAiB,GAC9BA,EAAQ,KAAK,WAAW,GACjBC,KAEFC,EAAIK,CAAI;AAAA,EACjB;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"label-end.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-end.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * Event,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n resolveAll: resolveAllLabelEnd,\n resolveTo: resolveToLabelEnd,\n tokenize: tokenizeLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n /** @type {Array<Event>} */\n const newEvents = [];\n while (++index < events.length) {\n const token = events[index][1];\n newEvents.push(events[index]);\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n const offset = token.type === \"labelImage\" ? 4 : 2;\n token.type = \"data\";\n index += offset;\n }\n }\n\n // If the events are equal, we don't have to copy newEvents to events\n if (events.length !== newEvents.length) {\n splice(events, 0, events.length, newEvents);\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array<Event>} */\n let media;\n\n // Find an opening.\n while (index--) {\n const token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n const label = {\n type: \"label\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[close][1].end\n }\n };\n const text = {\n type: \"labelText\",\n start: {\n ...events[open + offset + 2][1].end\n },\n end: {\n ...events[close - 2][1].start\n }\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n const labelStarts = self._labelStarts;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n if (labelStarts) {\n // Discard ones that failed to close,\n // they’re not needed anymore.\n while (labelStarts.length > 0 && labelStarts[labelStarts.length - 1]._balanced) {\n labelStarts.pop();\n }\n labelStart = labelStarts[labelStarts.length - 1];\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n // This label start is now used up: discard it so it’s never found again.\n\n labelStarts.pop();\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}"],"names":["labelEnd","resolveAllLabelEnd","resolveToLabelEnd","tokenizeLabelEnd","resourceConstruct","tokenizeResource","referenceFullConstruct","tokenizeReferenceFull","referenceCollapsedConstruct","tokenizeReferenceCollapsed","events","index","newEvents","token","offset","splice","context","open","close","media","group","label","text","push","resolveAll","effects","ok","nok","self","labelStarts","labelStart","defined","start","code","labelEndNok","normalizeIdentifier","after","labelEndOk","referenceNotFull","resourceStart","resourceBefore","markdownLineEndingOrSpace","factoryWhitespace","resourceOpen","resourceEnd","factoryDestination","resourceDestinationAfter","resourceDestinationMissing","resourceBetween","factoryTitle","resourceTitleAfter","referenceFull","factoryLabel","referenceFullA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W,GACjBC,KAEFC,EAAIM,CAAI;AAAA,EACjB;AACF;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./label-end.cjs"),b={name:"labelStartImage",resolveAll:u.labelEnd.resolveAll,tokenize:m};function m(r,a,t){const l=this;return n;function n(e){return r.enter("labelImage"),r.enter("labelImageMarker"),r.consume(e),r.exit("labelImageMarker"),o}function o(e){return e===91?(r.enter("labelMarker"),r.consume(e),r.exit("labelMarker"),r.exit("labelImage"),i):t(e)}function i(e){return e===94&&"_hiddenFootnoteSupport"in l.parser.constructs?t(e):a(e)}}exports.labelStartImage=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./label-end.cjs"),m={name:"labelStartImage",resolveAll:o.labelEnd.resolveAll,tokenize:s};function s(r,n,a){const t=this;let l;return u;function u(e){return r.enter("labelImage"),r.enter("labelImageMarker"),r.consume(e),r.exit("labelImageMarker"),b}function b(e){return e===91?(r.enter("labelMarker"),r.consume(e),r.exit("labelMarker"),l=r.exit("labelImage"),i):a(e)}function i(e){return e===94&&"_hiddenFootnoteSupport"in t.parser.constructs?a(e):(t._labelStarts=t._labelStarts||[],t._labelStarts.push(l),n(e))}}exports.labelStartImage=m;
2
2
  //# sourceMappingURL=label-start-image.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-start-image.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-image.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}"],"names":["labelStartImage","labelEnd","tokenizeLabelStartImage","effects","ok","nok","self","start","code","open","after"],"mappings":"mHAYaA,EAAkB,CAC7B,KAAM,kBACN,WAAYC,EAAAA,SAAS,WACrB,SAAUC,CACZ,EAOA,SAASA,EAAwBC,EAASC,EAAIC,EAAK,CACjD,MAAMC,EAAO,KACb,OAAOC,EAYP,SAASA,EAAMC,EAAM,CACnB,OAAAL,EAAQ,MAAM,YAAY,EAC1BA,EAAQ,MAAM,kBAAkB,EAChCA,EAAQ,QAAQK,CAAI,EACpBL,EAAQ,KAAK,kBAAkB,EACxBM,CACT,CAYA,SAASA,EAAKD,EAAM,CAClB,OAAIA,IAAS,IACXL,EAAQ,MAAM,aAAa,EAC3BA,EAAQ,QAAQK,CAAI,EACpBL,EAAQ,KAAK,aAAa,EAC1BA,EAAQ,KAAK,YAAY,EAClBO,GAEFL,EAAIG,CAAI,CACjB,CA6BA,SAASE,EAAMF,EAAM,CAMnB,OAAOA,IAAS,IAAM,2BAA4BF,EAAK,OAAO,WAAaD,EAAIG,CAAI,EAAIJ,EAAGI,CAAI,CAChG,CACF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"label-start-image.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-image.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * Token,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n /** @type {Token} */\n let labelImage;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n labelImage = effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 6 */\n if (code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs) {\n return nok(code);\n }\n self._labelStarts = self._labelStarts || [];\n self._labelStarts.push(labelImage);\n return ok(code);\n }\n}"],"names":["labelStartImage","labelEnd","tokenizeLabelStartImage","effects","ok","nok","self","labelImage","start","code","open","after"],"mappings":"mHAaaA,EAAkB,CAC7B,KAAM,kBACN,WAAYC,EAAAA,SAAS,WACrB,SAAUC,CACZ,EAOA,SAASA,EAAwBC,EAASC,EAAIC,EAAK,CACjD,MAAMC,EAAO,KAEb,IAAIC,EACJ,OAAOC,EAYP,SAASA,EAAMC,EAAM,CACnB,OAAAN,EAAQ,MAAM,YAAY,EAC1BA,EAAQ,MAAM,kBAAkB,EAChCA,EAAQ,QAAQM,CAAI,EACpBN,EAAQ,KAAK,kBAAkB,EACxBO,CACT,CAYA,SAASA,EAAKD,EAAM,CAClB,OAAIA,IAAS,IACXN,EAAQ,MAAM,aAAa,EAC3BA,EAAQ,QAAQM,CAAI,EACpBN,EAAQ,KAAK,aAAa,EAC1BI,EAAaJ,EAAQ,KAAK,YAAY,EAC/BQ,GAEFN,EAAII,CAAI,CACjB,CA6BA,SAASE,EAAMF,EAAM,CAMnB,OAAIA,IAAS,IAAM,2BAA4BH,EAAK,OAAO,WAClDD,EAAII,CAAI,GAEjBH,EAAK,aAAeA,EAAK,cAAgB,CAAA,EACzCA,EAAK,aAAa,KAAKC,CAAU,EAC1BH,EAAGK,CAAI,EAChB,CACF","x_google_ignoreList":[0]}
@@ -1,20 +1,21 @@
1
- import { labelEnd as u } from "./label-end.es.js";
1
+ import { labelEnd as b } from "./label-end.es.js";
2
2
  const g = {
3
3
  name: "labelStartImage",
4
- resolveAll: u.resolveAll,
4
+ resolveAll: b.resolveAll,
5
5
  tokenize: m
6
6
  };
7
- function m(r, a, t) {
8
- const n = this;
9
- return l;
10
- function l(e) {
11
- return r.enter("labelImage"), r.enter("labelImageMarker"), r.consume(e), r.exit("labelImageMarker"), o;
12
- }
7
+ function m(r, n, a) {
8
+ const t = this;
9
+ let l;
10
+ return o;
13
11
  function o(e) {
14
- return e === 91 ? (r.enter("labelMarker"), r.consume(e), r.exit("labelMarker"), r.exit("labelImage"), i) : t(e);
12
+ return r.enter("labelImage"), r.enter("labelImageMarker"), r.consume(e), r.exit("labelImageMarker"), i;
15
13
  }
16
14
  function i(e) {
17
- return e === 94 && "_hiddenFootnoteSupport" in n.parser.constructs ? t(e) : a(e);
15
+ return e === 91 ? (r.enter("labelMarker"), r.consume(e), r.exit("labelMarker"), l = r.exit("labelImage"), u) : a(e);
16
+ }
17
+ function u(e) {
18
+ return e === 94 && "_hiddenFootnoteSupport" in t.parser.constructs ? a(e) : (t._labelStarts = t._labelStarts || [], t._labelStarts.push(l), n(e));
18
19
  }
19
20
  }
20
21
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"label-start-image.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-image.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}"],"names":["labelStartImage","labelEnd","tokenizeLabelStartImage","effects","ok","nok","self","start","code","open","after"],"mappings":";AAYY,MAACA,IAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAYC,EAAS;AAAA,EACrB,UAAUC;AACZ;AAOA,SAASA,EAAwBC,GAASC,GAAIC,GAAK;AACjD,QAAMC,IAAO;AACb,SAAOC;AAYP,WAASA,EAAMC,GAAM;AACnB,WAAAL,EAAQ,MAAM,YAAY,GAC1BA,EAAQ,MAAM,kBAAkB,GAChCA,EAAQ,QAAQK,CAAI,GACpBL,EAAQ,KAAK,kBAAkB,GACxBM;AAAA,EACT;AAYA,WAASA,EAAKD,GAAM;AAClB,WAAIA,MAAS,MACXL,EAAQ,MAAM,aAAa,GAC3BA,EAAQ,QAAQK,CAAI,GACpBL,EAAQ,KAAK,aAAa,GAC1BA,EAAQ,KAAK,YAAY,GAClBO,KAEFL,EAAIG,CAAI;AAAA,EACjB;AA6BA,WAASE,EAAMF,GAAM;AAMnB,WAAOA,MAAS,MAAM,4BAA4BF,EAAK,OAAO,aAAaD,EAAIG,CAAI,IAAIJ,EAAGI,CAAI;AAAA,EAChG;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"label-start-image.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-image.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * Token,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n /** @type {Token} */\n let labelImage;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n labelImage = effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 6 */\n if (code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs) {\n return nok(code);\n }\n self._labelStarts = self._labelStarts || [];\n self._labelStarts.push(labelImage);\n return ok(code);\n }\n}"],"names":["labelStartImage","labelEnd","tokenizeLabelStartImage","effects","ok","nok","self","labelImage","start","code","open","after"],"mappings":";AAaY,MAACA,IAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAYC,EAAS;AAAA,EACrB,UAAUC;AACZ;AAOA,SAASA,EAAwBC,GAASC,GAAIC,GAAK;AACjD,QAAMC,IAAO;AAEb,MAAIC;AACJ,SAAOC;AAYP,WAASA,EAAMC,GAAM;AACnB,WAAAN,EAAQ,MAAM,YAAY,GAC1BA,EAAQ,MAAM,kBAAkB,GAChCA,EAAQ,QAAQM,CAAI,GACpBN,EAAQ,KAAK,kBAAkB,GACxBO;AAAA,EACT;AAYA,WAASA,EAAKD,GAAM;AAClB,WAAIA,MAAS,MACXN,EAAQ,MAAM,aAAa,GAC3BA,EAAQ,QAAQM,CAAI,GACpBN,EAAQ,KAAK,aAAa,GAC1BI,IAAaJ,EAAQ,KAAK,YAAY,GAC/BQ,KAEFN,EAAII,CAAI;AAAA,EACjB;AA6BA,WAASE,EAAMF,GAAM;AAMnB,WAAIA,MAAS,MAAM,4BAA4BH,EAAK,OAAO,aAClDD,EAAII,CAAI,KAEjBH,EAAK,eAAeA,EAAK,gBAAgB,CAAA,GACzCA,EAAK,aAAa,KAAKC,CAAU,GAC1BH,EAAGK,CAAI;AAAA,EAChB;AACF;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./label-end.cjs"),u={name:"labelStartLink",resolveAll:o.labelEnd.resolveAll,tokenize:b};function b(e,n,r){const l=this;return a;function a(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i}function i(t){return t===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(t):n(t)}}exports.labelStartLink=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./label-end.cjs"),u={name:"labelStartLink",resolveAll:b.labelEnd.resolveAll,tokenize:s};function s(t,n,a){const l=this;let r;return i;function i(e){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),r=t.exit("labelLink"),o}function o(e){return e===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(e):(l._labelStarts=l._labelStarts||[],l._labelStarts.push(r),n(e))}}exports.labelStartLink=u;
2
2
  //# sourceMappingURL=label-start-link.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-start-link.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-link.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}"],"names":["labelStartLink","labelEnd","tokenizeLabelStartLink","effects","ok","nok","self","start","code","after"],"mappings":"mHAYaA,EAAiB,CAC5B,KAAM,iBACN,WAAYC,EAAAA,SAAS,WACrB,SAAUC,CACZ,EAOA,SAASA,EAAuBC,EAASC,EAAIC,EAAK,CAChD,MAAMC,EAAO,KACb,OAAOC,EAYP,SAASA,EAAMC,EAAM,CACnB,OAAAL,EAAQ,MAAM,WAAW,EACzBA,EAAQ,MAAM,aAAa,EAC3BA,EAAQ,QAAQK,CAAI,EACpBL,EAAQ,KAAK,aAAa,EAC1BA,EAAQ,KAAK,WAAW,EACjBM,CACT,CAGA,SAASA,EAAMD,EAAM,CAKnB,OAAOA,IAAS,IAAM,2BAA4BF,EAAK,OAAO,WAAaD,EAAIG,CAAI,EAAIJ,EAAGI,CAAI,CAChG,CACF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"label-start-link.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-link.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * Token,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n /** @type {Token} */\n let labelLink;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n labelLink = effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 6 */\n if (code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs) {\n return nok(code);\n }\n self._labelStarts = self._labelStarts || [];\n self._labelStarts.push(labelLink);\n return ok(code);\n }\n}"],"names":["labelStartLink","labelEnd","tokenizeLabelStartLink","effects","ok","nok","self","labelLink","start","code","after"],"mappings":"mHAaaA,EAAiB,CAC5B,KAAM,iBACN,WAAYC,EAAAA,SAAS,WACrB,SAAUC,CACZ,EAOA,SAASA,EAAuBC,EAASC,EAAIC,EAAK,CAChD,MAAMC,EAAO,KAEb,IAAIC,EACJ,OAAOC,EAYP,SAASA,EAAMC,EAAM,CACnB,OAAAN,EAAQ,MAAM,WAAW,EACzBA,EAAQ,MAAM,aAAa,EAC3BA,EAAQ,QAAQM,CAAI,EACpBN,EAAQ,KAAK,aAAa,EAC1BI,EAAYJ,EAAQ,KAAK,WAAW,EAC7BO,CACT,CAGA,SAASA,EAAMD,EAAM,CAKnB,OAAIA,IAAS,IAAM,2BAA4BH,EAAK,OAAO,WAClDD,EAAII,CAAI,GAEjBH,EAAK,aAAeA,EAAK,cAAgB,CAAA,EACzCA,EAAK,aAAa,KAAKC,CAAS,EACzBH,EAAGK,CAAI,EAChB,CACF","x_google_ignoreList":[0]}
@@ -1,20 +1,21 @@
1
- import { labelEnd as o } from "./label-end.es.js";
2
- const b = {
1
+ import { labelEnd as b } from "./label-end.es.js";
2
+ const k = {
3
3
  name: "labelStartLink",
4
- resolveAll: o.resolveAll,
5
- tokenize: k
4
+ resolveAll: b.resolveAll,
5
+ tokenize: s
6
6
  };
7
- function k(n, r, e) {
7
+ function s(t, n, a) {
8
8
  const l = this;
9
- return a;
10
- function a(t) {
11
- return n.enter("labelLink"), n.enter("labelMarker"), n.consume(t), n.exit("labelMarker"), n.exit("labelLink"), i;
9
+ let r;
10
+ return i;
11
+ function i(e) {
12
+ return t.enter("labelLink"), t.enter("labelMarker"), t.consume(e), t.exit("labelMarker"), r = t.exit("labelLink"), o;
12
13
  }
13
- function i(t) {
14
- return t === 94 && "_hiddenFootnoteSupport" in l.parser.constructs ? e(t) : r(t);
14
+ function o(e) {
15
+ return e === 94 && "_hiddenFootnoteSupport" in l.parser.constructs ? a(e) : (l._labelStarts = l._labelStarts || [], l._labelStarts.push(r), n(e));
15
16
  }
16
17
  }
17
18
  export {
18
- b as labelStartLink
19
+ k as labelStartLink
19
20
  };
20
21
  //# sourceMappingURL=label-start-link.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-start-link.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-link.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}"],"names":["labelStartLink","labelEnd","tokenizeLabelStartLink","effects","ok","nok","self","start","code","after"],"mappings":";AAYY,MAACA,IAAiB;AAAA,EAC5B,MAAM;AAAA,EACN,YAAYC,EAAS;AAAA,EACrB,UAAUC;AACZ;AAOA,SAASA,EAAuBC,GAASC,GAAIC,GAAK;AAChD,QAAMC,IAAO;AACb,SAAOC;AAYP,WAASA,EAAMC,GAAM;AACnB,WAAAL,EAAQ,MAAM,WAAW,GACzBA,EAAQ,MAAM,aAAa,GAC3BA,EAAQ,QAAQK,CAAI,GACpBL,EAAQ,KAAK,aAAa,GAC1BA,EAAQ,KAAK,WAAW,GACjBM;AAAA,EACT;AAGA,WAASA,EAAMD,GAAM;AAKnB,WAAOA,MAAS,MAAM,4BAA4BF,EAAK,OAAO,aAAaD,EAAIG,CAAI,IAAIJ,EAAGI,CAAI;AAAA,EAChG;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"label-start-link.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-link.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * Token,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n /** @type {Token} */\n let labelLink;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n labelLink = effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 6 */\n if (code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs) {\n return nok(code);\n }\n self._labelStarts = self._labelStarts || [];\n self._labelStarts.push(labelLink);\n return ok(code);\n }\n}"],"names":["labelStartLink","labelEnd","tokenizeLabelStartLink","effects","ok","nok","self","labelLink","start","code","after"],"mappings":";AAaY,MAACA,IAAiB;AAAA,EAC5B,MAAM;AAAA,EACN,YAAYC,EAAS;AAAA,EACrB,UAAUC;AACZ;AAOA,SAASA,EAAuBC,GAASC,GAAIC,GAAK;AAChD,QAAMC,IAAO;AAEb,MAAIC;AACJ,SAAOC;AAYP,WAASA,EAAMC,GAAM;AACnB,WAAAN,EAAQ,MAAM,WAAW,GACzBA,EAAQ,MAAM,aAAa,GAC3BA,EAAQ,QAAQM,CAAI,GACpBN,EAAQ,KAAK,aAAa,GAC1BI,IAAYJ,EAAQ,KAAK,WAAW,GAC7BO;AAAA,EACT;AAGA,WAASA,EAAMD,GAAM;AAKnB,WAAIA,MAAS,MAAM,4BAA4BH,EAAK,OAAO,aAClDD,EAAII,CAAI,KAEjBH,EAAK,eAAeA,EAAK,gBAAgB,CAAA,GACzCA,EAAK,aAAa,KAAKC,CAAS,GACzBH,EAAGK,CAAI;AAAA,EAChB;AACF;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={partial:!0,tokenize:l};function l(t,r,i){const e=this;return o;function o(n){return n===null?i(n):(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),u)}function u(n){return e.parser.lazy[e.now().line]?i(n):r(n)}}exports.nonLazyContinuation=a;
2
+ //# sourceMappingURL=partial-non-lazy-continuation.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partial-non-lazy-continuation.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const nonLazyContinuation = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code);\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return after;\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}"],"names":["nonLazyContinuation","tokenizeNonLazyContinuation","effects","ok","nok","self","start","code","after"],"mappings":"gFAWY,MAACA,EAAsB,CACjC,QAAS,GACT,SAAUC,CACZ,EAOA,SAASA,EAA4BC,EAASC,EAAIC,EAAK,CACrD,MAAMC,EAAO,KACb,OAAOC,EAaP,SAASA,EAAMC,EAAM,CACnB,OAAIA,IAAS,KACJH,EAAIG,CAAI,GAEjBL,EAAQ,MAAM,YAAY,EAC1BA,EAAQ,QAAQK,CAAI,EACpBL,EAAQ,KAAK,YAAY,EAClBM,EACT,CAaA,SAASA,EAAMD,EAAM,CACnB,OAAOF,EAAK,OAAO,KAAKA,EAAK,IAAG,EAAG,IAAI,EAAID,EAAIG,CAAI,EAAIJ,EAAGI,CAAI,CAChE,CACF","x_google_ignoreList":[0]}
@@ -0,0 +1,18 @@
1
+ const l = {
2
+ partial: !0,
3
+ tokenize: a
4
+ };
5
+ function a(t, e, i) {
6
+ const r = this;
7
+ return o;
8
+ function o(n) {
9
+ return n === null ? i(n) : (t.enter("lineEnding"), t.consume(n), t.exit("lineEnding"), u);
10
+ }
11
+ function u(n) {
12
+ return r.parser.lazy[r.now().line] ? i(n) : e(n);
13
+ }
14
+ }
15
+ export {
16
+ l as nonLazyContinuation
17
+ };
18
+ //# sourceMappingURL=partial-non-lazy-continuation.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partial-non-lazy-continuation.es.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const nonLazyContinuation = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code);\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return after;\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}"],"names":["nonLazyContinuation","tokenizeNonLazyContinuation","effects","ok","nok","self","start","code","after"],"mappings":"AAWY,MAACA,IAAsB;AAAA,EACjC,SAAS;AAAA,EACT,UAAUC;AACZ;AAOA,SAASA,EAA4BC,GAASC,GAAIC,GAAK;AACrD,QAAMC,IAAO;AACb,SAAOC;AAaP,WAASA,EAAMC,GAAM;AACnB,WAAIA,MAAS,OACJH,EAAIG,CAAI,KAEjBL,EAAQ,MAAM,YAAY,GAC1BA,EAAQ,QAAQK,CAAI,GACpBL,EAAQ,KAAK,YAAY,GAClBM;AAAA,EACT;AAaA,WAASA,EAAMD,GAAM;AACnB,WAAOF,EAAK,OAAO,KAAKA,EAAK,IAAG,EAAG,IAAI,IAAID,EAAIG,CAAI,IAAIJ,EAAGI,CAAI;AAAA,EAChE;AACF;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../micromark-factory-space/index.cjs"),g=require("../../micromark-util-character/index.cjs"),s={name:"setextUnderline",resolveTo:y,tokenize:h};function y(e,a){let i=e.length,t,l,r;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){t=i;break}e[i][1].type==="paragraph"&&(l=i)}else e[i][1].type==="content"&&e.splice(i,1),!r&&e[i][1].type==="definition"&&(r=i);const u={type:"setextHeading",start:{...e[t][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",r?(e.splice(l,0,["enter",u,a]),e.splice(r+1,0,["exit",e[t][1],a]),e[t][1].end={...e[r][1].end}):e[t][1]=u,e.push(["exit",u,a]),e}function h(e,a,i){const t=this;let l;return r;function r(n){let p=t.events.length,d;for(;p--;)if(t.events[p][1].type!=="lineEnding"&&t.events[p][1].type!=="linePrefix"&&t.events[p][1].type!=="content"){d=t.events[p][1].type==="paragraph";break}return!t.parser.lazy[t.now().line]&&(t.interrupt||d)?(e.enter("setextHeadingLine"),l=n,u(n)):i(n)}function u(n){return e.enter("setextHeadingLineSequence"),o(n)}function o(n){return n===l?(e.consume(n),o):(e.exit("setextHeadingLineSequence"),g.markdownSpace(n)?f.factorySpace(e,x,"lineSuffix")(n):x(n))}function x(n){return n===null||g.markdownLineEnding(n)?(e.exit("setextHeadingLine"),a(n)):i(n)}}exports.setextUnderline=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../micromark-factory-space/index.cjs"),g=require("../../micromark-util-character/index.cjs"),s=require("../../micromark-util-edit-map/index.cjs"),y={name:"setextUnderline",resolveTo:h,tokenize:c};function h(e,d){const i=new s.EditMap;let n=e.length,r,u,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(u=n)}else e[n][1].type==="content"&&i.add(n,1,[]),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[u][1].type="setextHeadingText",a?(i.add(u,0,[["enter",l,d]]),i.add(a+1,0,[["exit",e[r][1],d]]),e[r][1].end={...e[a][1].end}):e[r][1]=l,i.add(e.length,0,[["exit",l,d]]),i.consume(e),e}function c(e,d,i){const n=this;let r;return u;function u(t){let o=n.events.length,x;for(;o--;)if(n.events[o][1].type!=="lineEnding"&&n.events[o][1].type!=="linePrefix"&&n.events[o][1].type!=="content"){x=n.events[o][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||x)?(e.enter("setextHeadingLine"),r=t,a(t)):i(t)}function a(t){return e.enter("setextHeadingLineSequence"),l(t)}function l(t){return t===r?(e.consume(t),l):(e.exit("setextHeadingLineSequence"),g.markdownSpace(t)?f.factorySpace(e,p,"lineSuffix")(t):p(t))}function p(t){return t===null||g.markdownLineEnding(t)?(e.exit("setextHeadingLine"),d(t)):i(t)}}exports.setextUnderline=y;
2
2
  //# sourceMappingURL=setext-underline.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"setext-underline.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/setext-underline.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n resolveTo: resolveToSetextUnderline,\n tokenize: tokenizeSetextUnderline\n};\n\n/** @type {Resolver} */\nfunction resolveToSetextUnderline(events, context) {\n // To do: resolve like `markdown-rs`.\n let index = events.length;\n /** @type {number | undefined} */\n let content;\n /** @type {number | undefined} */\n let text;\n /** @type {number | undefined} */\n let definition;\n\n // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === \"content\") {\n content = index;\n break;\n }\n if (events[index][1].type === \"paragraph\") {\n text = index;\n }\n }\n // Exit\n else {\n if (events[index][1].type === \"content\") {\n // Remove the content end (if needed we’ll add it later)\n events.splice(index, 1);\n }\n if (!definition && events[index][1].type === \"definition\") {\n definition = index;\n }\n }\n }\n const heading = {\n type: \"setextHeading\",\n start: {\n ...events[content][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n\n // Change the paragraph to setext heading text.\n events[text][1].type = \"setextHeadingText\";\n\n // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n if (definition) {\n events.splice(text, 0, ['enter', heading, context]);\n events.splice(definition + 1, 0, ['exit', events[content][1], context]);\n events[content][1].end = {\n ...events[definition][1].end\n };\n } else {\n events[content][1] = heading;\n }\n\n // Add the heading exit at the end.\n events.push(['exit', heading, context]);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * At start of heading (setext) underline.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n let index = self.events.length;\n /** @type {boolean | undefined} */\n let paragraph;\n // Find an opening.\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (self.events[index][1].type !== \"lineEnding\" && self.events[index][1].type !== \"linePrefix\" && self.events[index][1].type !== \"content\") {\n paragraph = self.events[index][1].type === \"paragraph\";\n break;\n }\n }\n\n // To do: handle lazy/pierce like `markdown-rs`.\n // To do: parse indent like `markdown-rs`.\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter(\"setextHeadingLine\");\n marker = code;\n return before(code);\n }\n return nok(code);\n }\n\n /**\n * After optional whitespace, at `-` or `=`.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"setextHeadingLineSequence\");\n return inside(code);\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n effects.exit(\"setextHeadingLineSequence\");\n return markdownSpace(code) ? factorySpace(effects, after, \"lineSuffix\")(code) : after(code);\n }\n\n /**\n * After sequence, after optional whitespace.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"setextHeadingLine\");\n return ok(code);\n }\n return nok(code);\n }\n}"],"names":["setextUnderline","resolveToSetextUnderline","tokenizeSetextUnderline","events","context","index","content","text","definition","heading","effects","ok","nok","self","marker","start","code","paragraph","before","inside","markdownSpace","factorySpace","after","markdownLineEnding"],"mappings":"iMAcaA,EAAkB,CAC7B,KAAM,kBACN,UAAWC,EACX,SAAUC,CACZ,EAGA,SAASD,EAAyBE,EAAQC,EAAS,CAEjD,IAAIC,EAAQF,EAAO,OAEfG,EAEAC,EAEAC,EAIJ,KAAOH,KACL,GAAIF,EAAOE,CAAK,EAAE,CAAC,IAAM,QAAS,CAChC,GAAIF,EAAOE,CAAK,EAAE,CAAC,EAAE,OAAS,UAAW,CACvCC,EAAUD,EACV,KACF,CACIF,EAAOE,CAAK,EAAE,CAAC,EAAE,OAAS,cAC5BE,EAAOF,EAEX,MAGMF,EAAOE,CAAK,EAAE,CAAC,EAAE,OAAS,WAE5BF,EAAO,OAAOE,EAAO,CAAC,EAEpB,CAACG,GAAcL,EAAOE,CAAK,EAAE,CAAC,EAAE,OAAS,eAC3CG,EAAaH,GAInB,MAAMI,EAAU,CACd,KAAM,gBACN,MAAO,CACL,GAAGN,EAAOG,CAAO,EAAE,CAAC,EAAE,KAC5B,EACI,IAAK,CACH,GAAGH,EAAOA,EAAO,OAAS,CAAC,EAAE,CAAC,EAAE,GACtC,CACA,EAGE,OAAAA,EAAOI,CAAI,EAAE,CAAC,EAAE,KAAO,oBAInBC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CAaA,SAASM,EAAMN,EAAM,CACnB,OAAIA,IAAS,MAAQO,EAAAA,mBAAmBP,CAAI,GAC1CN,EAAQ,KAAK,mBAAmB,EACzBC,EAAGK,CAAI,GAETJ,EAAII,CAAI,CACjB,CACF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"setext-underline.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/setext-underline.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { EditMap } from 'micromark-util-edit-map';\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n resolveTo: resolveToSetextUnderline,\n tokenize: tokenizeSetextUnderline\n};\n\n/** @type {Resolver} */\nfunction resolveToSetextUnderline(events, context) {\n const editMap = new EditMap();\n let index = events.length;\n /** @type {number | undefined} */\n let content;\n /** @type {number | undefined} */\n let text;\n /** @type {number | undefined} */\n let definition;\n\n // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === \"content\") {\n content = index;\n break;\n }\n if (events[index][1].type === \"paragraph\") {\n text = index;\n }\n }\n // Exit\n else {\n if (events[index][1].type === \"content\") {\n // Remove the content end (if needed we’ll add it later)\n editMap.add(index, 1, []);\n }\n if (!definition && events[index][1].type === \"definition\") {\n definition = index;\n }\n }\n }\n const heading = {\n type: \"setextHeading\",\n start: {\n ...events[content][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n\n // Change the paragraph to setext heading text.\n events[text][1].type = \"setextHeadingText\";\n\n // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n if (definition) {\n editMap.add(text, 0, [['enter', heading, context]]);\n editMap.add(definition + 1, 0, [['exit', events[content][1], context]]);\n events[content][1].end = {\n ...events[definition][1].end\n };\n } else {\n events[content][1] = heading;\n }\n\n // Add the heading exit at the end.\n editMap.add(events.length, 0, [['exit', heading, context]]);\n editMap.consume(events);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * At start of heading (setext) underline.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n let index = self.events.length;\n /** @type {boolean | undefined} */\n let paragraph;\n // Find an opening.\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (self.events[index][1].type !== \"lineEnding\" && self.events[index][1].type !== \"linePrefix\" && self.events[index][1].type !== \"content\") {\n paragraph = self.events[index][1].type === \"paragraph\";\n break;\n }\n }\n\n // To do: handle lazy/pierce like `markdown-rs`.\n // To do: parse indent like `markdown-rs`.\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter(\"setextHeadingLine\");\n marker = code;\n return before(code);\n }\n return nok(code);\n }\n\n /**\n * After optional whitespace, at `-` or `=`.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"setextHeadingLineSequence\");\n return inside(code);\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n effects.exit(\"setextHeadingLineSequence\");\n return markdownSpace(code) ? factorySpace(effects, after, \"lineSuffix\")(code) : after(code);\n }\n\n /**\n * After sequence, after optional whitespace.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"setextHeadingLine\");\n return ok(code);\n }\n return nok(code);\n }\n}"],"names":["setextUnderline","resolveToSetextUnderline","tokenizeSetextUnderline","events","context","editMap","EditMap","index","content","text","definition","heading","effects","ok","nok","self","marker","start","code","paragraph","before","inside","markdownSpace","factorySpace","after","markdownLineEnding"],"mappings":"sPAeaA,EAAkB,CAC7B,KAAM,kBACN,UAAWC,EACX,SAAUC,CACZ,EAGA,SAASD,EAAyBE,EAAQC,EAAS,CACjD,MAAMC,EAAU,IAAIC,UACpB,IAAIC,EAAQJ,EAAO,OAEfK,EAEAC,EAEAC,EAIJ,KAAOH,KACL,GAAIJ,EAAOI,CAAK,EAAE,CAAC,IAAM,QAAS,CAChC,GAAIJ,EAAOI,CAAK,EAAE,CAAC,EAAE,OAAS,UAAW,CACvCC,EAAUD,EACV,KACF,CACIJ,EAAOI,CAAK,EAAE,CAAC,EAAE,OAAS,cAC5BE,EAAOF,EAEX,MAGMJ,EAAOI,CAAK,EAAE,CAAC,EAAE,OAAS,WAE5BF,EAAQ,IAAIE,EAAO,EAAG,CAAA,CAAE,EAEtB,CAACG,GAAcP,EAAOI,CAAK,EAAE,CAAC,EAAE,OAAS,eAC3CG,EAAaH,GAInB,MAAMI,EAAU,CACd,KAAM,gBACN,MAAO,CACL,GAAGR,EAAOK,CAAO,EAAE,CAAC,EAAE,KAC5B,EACI,IAAK,CACH,GAAGL,EAAOA,EAAO,OAAS,CAAC,EAAE,CAAC,EAAE,GACtC,CACA,EAGE,OAAAA,EAAOM,CAAI,EAAE,CAAC,EAAE,KAAO,oBAInBC,GACFL,EAAQ,IAAII,EAAM,EAAG,CAAC,CAAC,QAASE,EAASP,CAAO,CAAC,CAAC,EAClDC,EAAQ,IAAIK,EAAa,EAAG,EAAG,CAAC,CAAC,OAAQP,EAAOK,CAAO,EAAE,CAAC,EAAGJ,CAAO,CAAC,CAAC,EACtED,EAAOK,CAAO,EAAE,CAAC,EAAE,IAAM,CACvB,GAAGL,EAAOO,CAAU,EAAE,CAAC,EAAE,GAC/B,GAEIP,EAAOK,CAAO,EAAE,CAA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