@fangzhongya/vue-archive 0.0.2-8 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (506) hide show
  1. package/dist/es/_virtual/_commonjsHelpers.js +28 -26
  2. package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -6
  3. package/dist/es/_virtual/emphasis.js +2 -2
  4. package/dist/es/_virtual/entities.js +7 -6
  5. package/dist/es/_virtual/html_re.js +2 -2
  6. package/dist/es/_virtual/index.js +7 -6
  7. package/dist/es/_virtual/index2.js +2 -2
  8. package/dist/es/_virtual/index3.js +2 -2
  9. package/dist/es/_virtual/index4.js +2 -2
  10. package/dist/es/_virtual/parser-html.js +7 -6
  11. package/dist/es/_virtual/parser-typescript.js +7 -6
  12. package/dist/es/_virtual/punycode.es6.js +4 -4
  13. package/dist/es/_virtual/standalone.js +7 -6
  14. package/dist/es/_virtual/strikethrough.js +2 -2
  15. package/dist/es/_virtual/utils.js +2 -2
  16. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +3 -3
  17. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +3 -3
  18. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +16 -8
  19. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +18 -12
  20. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +40 -27
  21. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +9 -6
  22. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +8 -5
  23. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +14 -11
  24. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +12 -7
  25. package/dist/es/node_modules/.pnpm/@highlightjs_vue-plugin@2.1.0_jsvakxz56e7tk77soxhxnrhzhm/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +27 -28
  26. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.js +6 -6
  27. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/block-parser.js +21 -12
  28. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/index.js +33 -29
  29. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/source-parser.js +38 -17
  30. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/spec-parser.js +11 -9
  31. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/description.js +28 -17
  32. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/name.js +69 -38
  33. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/tag.js +19 -10
  34. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/type.js +51 -26
  35. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/primitives.js +8 -5
  36. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/align.js +12 -1
  37. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/crlf.js +12 -1
  38. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/indent.js +12 -1
  39. package/dist/es/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/util.js +20 -20
  40. package/dist/es/node_modules/.pnpm/entities@3.0.1/node_modules/entities/lib/maps/entities.json.js +6373 -4251
  41. package/dist/es/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js +38 -40
  42. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/es/common.js +3 -3
  43. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/es/core.js +3 -3
  44. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/common.js +79 -79
  45. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/core.js +1157 -648
  46. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/bash.js +75 -57
  47. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/c.js +157 -137
  48. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/cpp.js +118 -93
  49. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/csharp.js +112 -92
  50. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/css.js +92 -77
  51. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/diff.js +13 -11
  52. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/go.js +98 -92
  53. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/graphql.js +20 -17
  54. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/ini.js +51 -39
  55. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/java.js +132 -114
  56. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/javascript.js +237 -192
  57. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/json.js +26 -21
  58. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/kotlin.js +98 -82
  59. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/less.js +161 -134
  60. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/lua.js +34 -29
  61. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/makefile.js +33 -26
  62. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/markdown.js +95 -77
  63. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/objectivec.js +188 -179
  64. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/perl.js +78 -61
  65. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/php-template.js +17 -15
  66. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/php.js +157 -121
  67. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/plaintext.js +11 -9
  68. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/python-repl.js +10 -8
  69. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/python.js +191 -172
  70. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/r.js +39 -33
  71. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/ruby.js +159 -131
  72. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/rust.js +45 -37
  73. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/scss.js +94 -79
  74. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/shell.js +10 -8
  75. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/sql.js +78 -49
  76. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/swift.js +292 -219
  77. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/typescript.js +284 -223
  78. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/vbnet.js +51 -37
  79. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/wasm.js +49 -39
  80. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/xml.js +55 -45
  81. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/yaml.js +66 -46
  82. package/dist/es/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/styles/stackoverflow-light.css.js +2 -2
  83. package/dist/es/node_modules/.pnpm/linkify-it@4.0.1/node_modules/linkify-it/index.js +304 -138
  84. package/dist/es/node_modules/.pnpm/linkify-it@4.0.1/node_modules/linkify-it/lib/re.js +49 -16
  85. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/index.js +8 -8
  86. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/entities.js +5 -5
  87. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/html_blocks.js +2 -2
  88. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/html_re.js +18 -5
  89. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/utils.js +153 -77
  90. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/index.js +8 -8
  91. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/parse_link_destination.js +61 -26
  92. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/parse_link_label.js +27 -13
  93. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/parse_link_title.js +37 -14
  94. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/index.js +156 -83
  95. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/parser_block.js +69 -42
  96. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/parser_core.js +32 -28
  97. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/parser_inline.js +96 -66
  98. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/presets/commonmark.js +7 -7
  99. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/presets/default.js +7 -7
  100. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/presets/zero.js +7 -7
  101. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/renderer.js +132 -64
  102. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/ruler.js +122 -74
  103. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/blockquote.js +147 -27
  104. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/code.js +18 -12
  105. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/fence.js +63 -11
  106. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/heading.js +40 -9
  107. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/hr.js +32 -11
  108. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/html_block.js +56 -26
  109. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/lheading.js +53 -18
  110. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/list.js +196 -53
  111. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/paragraph.js +32 -12
  112. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/reference.js +142 -44
  113. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/state_block.js +150 -60
  114. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/table.js +174 -44
  115. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/block.js +12 -4
  116. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/inline.js +9 -5
  117. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/linkify.js +90 -20
  118. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/normalize.js +8 -5
  119. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/replacements.js +53 -17
  120. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/smartquotes.js +143 -50
  121. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/state_core.js +11 -7
  122. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/text_join.js +26 -10
  123. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/autolink.js +57 -10
  124. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/backticks.js +42 -16
  125. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +59 -16
  126. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/emphasis.js +64 -24
  127. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/entity.js +45 -13
  128. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/escape.js +51 -16
  129. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/fragments_join.js +21 -6
  130. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/html_inline.js +37 -13
  131. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/image.js +107 -32
  132. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/link.js +100 -26
  133. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/linkify.js +44 -4
  134. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/newline.js +32 -19
  135. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/state_inline.js +91 -23
  136. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/strikethrough.js +79 -25
  137. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/text.js +18 -9
  138. package/dist/es/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/token.js +52 -21
  139. package/dist/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js +74 -32
  140. package/dist/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js +54 -29
  141. package/dist/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js +16 -4
  142. package/dist/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js +10 -10
  143. package/dist/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js +158 -60
  144. package/dist/es/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/parser-html.js +2375 -2274
  145. package/dist/es/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/parser-typescript.js +23493 -23223
  146. package/dist/es/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/standalone.js +8281 -8174
  147. package/dist/es/node_modules/.pnpm/punycode@2.3.0/node_modules/punycode/punycode.es6.js +208 -107
  148. package/dist/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js +9 -4
  149. package/dist/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js +9 -4
  150. package/dist/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js +2 -2
  151. package/dist/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js +9 -4
  152. package/dist/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js +18 -10
  153. package/dist/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js +9 -4
  154. package/dist/es/packages/components/aside/index.vue.js +109 -79
  155. package/dist/es/packages/components/aside/index.vue2.js +2 -2
  156. package/dist/es/packages/components/boxurl/index.vue.js +55 -34
  157. package/dist/es/packages/components/boxurl/index.vue2.js +2 -2
  158. package/dist/es/packages/components/choice/choice.vue.js +43 -35
  159. package/dist/es/packages/components/choice/choice.vue2.js +2 -2
  160. package/dist/es/packages/components/choice/index.vue.js +69 -48
  161. package/dist/es/packages/components/choice/index.vue2.js +2 -2
  162. package/dist/es/packages/components/code/highlight.vue.js +11 -12
  163. package/dist/es/packages/components/code/highlight.vue2.js +4 -4
  164. package/dist/es/packages/components/code/index.vue.js +91 -74
  165. package/dist/es/packages/components/code/index.vue2.js +2 -2
  166. package/dist/es/packages/components/compo/ftable.vue.js +46 -32
  167. package/dist/es/packages/components/compo/ftable.vue2.js +2 -2
  168. package/dist/es/packages/components/compo/index.js +207 -135
  169. package/dist/es/packages/components/compo/index.vue.js +151 -121
  170. package/dist/es/packages/components/compo/index.vue2.js +2 -2
  171. package/dist/es/packages/components/compo/info.vue.js +43 -32
  172. package/dist/es/packages/components/compo/info.vue2.js +2 -2
  173. package/dist/es/packages/components/compo/top.js +114 -85
  174. package/dist/es/packages/components/header/index.vue.js +7 -8
  175. package/dist/es/packages/components/main/index.vue.js +59 -45
  176. package/dist/es/packages/components/main/index.vue2.js +2 -2
  177. package/dist/es/packages/components/md/index.vue.js +53 -45
  178. package/dist/es/packages/components/md/index.vue2.js +2 -2
  179. package/dist/es/packages/components/test/index.js +99 -70
  180. package/dist/es/packages/components/test/index.vue.js +91 -71
  181. package/dist/es/packages/components/test/index.vue2.js +2 -2
  182. package/dist/es/packages/components/test/top.js +128 -99
  183. package/dist/es/packages/components/use/index.js +109 -84
  184. package/dist/es/packages/components/use/retrie/any/index.vue.js +82 -63
  185. package/dist/es/packages/components/use/retrie/any/index.vue2.js +2 -2
  186. package/dist/es/packages/components/use/retrie/array/index.vue.js +54 -39
  187. package/dist/es/packages/components/use/retrie/array/index.vue2.js +2 -2
  188. package/dist/es/packages/components/use/retrie/boolean/index.vue.js +61 -43
  189. package/dist/es/packages/components/use/retrie/boolean/index.vue2.js +2 -2
  190. package/dist/es/packages/components/use/retrie/choice/index.vue.js +154 -96
  191. package/dist/es/packages/components/use/retrie/choice/index.vue2.js +2 -2
  192. package/dist/es/packages/components/use/retrie/choice/index.vue3.js +2 -2
  193. package/dist/es/packages/components/use/retrie/expose/index.vue.js +65 -47
  194. package/dist/es/packages/components/use/retrie/expose/index.vue2.js +2 -2
  195. package/dist/es/packages/components/use/retrie/form/index.vue.js +104 -96
  196. package/dist/es/packages/components/use/retrie/form/index.vue2.js +2 -2
  197. package/dist/es/packages/components/use/retrie/function/index.vue.js +60 -47
  198. package/dist/es/packages/components/use/retrie/function/index.vue2.js +2 -2
  199. package/dist/es/packages/components/use/retrie/index.vue.js +56 -47
  200. package/dist/es/packages/components/use/retrie/index.vue2.js +2 -2
  201. package/dist/es/packages/components/use/retrie/number/index.vue.js +41 -33
  202. package/dist/es/packages/components/use/retrie/number/index.vue2.js +2 -2
  203. package/dist/es/packages/components/use/retrie/object/index.vue.js +54 -39
  204. package/dist/es/packages/components/use/retrie/object/index.vue2.js +2 -2
  205. package/dist/es/packages/components/use/retrie/other/index.vue.js +54 -37
  206. package/dist/es/packages/components/use/retrie/other/index.vue2.js +2 -2
  207. package/dist/es/packages/components/use/retrie/select/index.vue.js +112 -79
  208. package/dist/es/packages/components/use/retrie/select/index.vue2.js +2 -2
  209. package/dist/es/packages/components/use/retrie/select/index.vue3.js +2 -2
  210. package/dist/es/packages/components/use/retrie/slot/index.vue.js +41 -33
  211. package/dist/es/packages/components/use/retrie/slot/index.vue2.js +2 -2
  212. package/dist/es/packages/components/use/retrie/string/index.vue.js +36 -27
  213. package/dist/es/packages/components/use/retrie/string/index.vue2.js +2 -2
  214. package/dist/es/packages/components/use/set-code.vue.js +148 -104
  215. package/dist/es/packages/components/use/set-code.vue2.js +2 -2
  216. package/dist/es/packages/components/use/set-emit.vue.js +46 -34
  217. package/dist/es/packages/components/use/set-emit.vue2.js +2 -2
  218. package/dist/es/packages/components/use/set-expose.vue.js +37 -30
  219. package/dist/es/packages/components/use/set-expose.vue2.js +2 -2
  220. package/dist/es/packages/components/use/set-props.vue.js +104 -66
  221. package/dist/es/packages/components/use/set-props.vue2.js +2 -2
  222. package/dist/es/packages/components/use/set-slot.vue.js +39 -34
  223. package/dist/es/packages/components/use/set-slot.vue2.js +2 -2
  224. package/dist/es/packages/components/use/util.js +156 -74
  225. package/dist/es/packages/config.d.ts +3 -3
  226. package/dist/es/packages/config.js +8 -8
  227. package/dist/es/packages/index/index.vue.js +10 -10
  228. package/dist/es/packages/index/index.vue2.js +2 -2
  229. package/dist/es/packages/index.js +9 -9
  230. package/dist/es/packages/page/compon/index.vue.js +2 -2
  231. package/dist/es/packages/page/compon/index.vue2.js +19 -17
  232. package/dist/es/packages/page/develop/index.vue.js +2 -2
  233. package/dist/es/packages/page/develop/index.vue2.js +19 -17
  234. package/dist/es/packages/page/index/index.vue.js +2 -2
  235. package/dist/es/packages/page/index/index.vue2.js +50 -38
  236. package/dist/es/packages/page/single/index.vue.js +2 -2
  237. package/dist/es/packages/page/single/index.vue2.js +75 -61
  238. package/dist/es/packages/page/tests/index.vue.js +2 -2
  239. package/dist/es/packages/page/tests/index.vue2.js +74 -49
  240. package/dist/es/packages/router/index.js +99 -62
  241. package/dist/es/packages/utils/common.js +138 -80
  242. package/dist/es/packages/utils/glob.js +480 -306
  243. package/dist/es/packages/utils/index.js +14 -13
  244. package/dist/es/packages/utils/props.js +171 -66
  245. package/dist/es/packages/utils/storage.js +27 -19
  246. package/dist/es/style.css +367 -2
  247. package/dist/lib/_virtual/_commonjsHelpers.js +38 -1
  248. package/dist/lib/_virtual/_plugin-vue_export-helper.js +9 -1
  249. package/dist/lib/_virtual/emphasis.js +4 -1
  250. package/dist/lib/_virtual/entities.js +12 -1
  251. package/dist/lib/_virtual/html_re.js +4 -1
  252. package/dist/lib/_virtual/index.js +12 -1
  253. package/dist/lib/_virtual/index2.js +4 -1
  254. package/dist/lib/_virtual/index3.js +4 -1
  255. package/dist/lib/_virtual/index4.js +4 -1
  256. package/dist/lib/_virtual/parser-html.js +12 -1
  257. package/dist/lib/_virtual/parser-typescript.js +12 -1
  258. package/dist/lib/_virtual/punycode.es6.js +5 -1
  259. package/dist/lib/_virtual/standalone.js +12 -1
  260. package/dist/lib/_virtual/strikethrough.js +4 -1
  261. package/dist/lib/_virtual/utils.js +4 -1
  262. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +6 -1
  263. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +6 -1
  264. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +20 -1
  265. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +23 -1
  266. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +44 -1
  267. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +12 -1
  268. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +11 -1
  269. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +21 -1
  270. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-10/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +16 -1
  271. package/dist/lib/node_modules/.pnpm/@highlightjs_vue-plugin@2.1.0_jsvakxz56e7tk77soxhxnrhzhm/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +34 -1
  272. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.js +15 -1
  273. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/block-parser.js +25 -1
  274. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/index.js +41 -1
  275. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/source-parser.js +44 -1
  276. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/spec-parser.js +15 -1
  277. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/description.js +35 -2
  278. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/name.js +83 -1
  279. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/tag.js +22 -1
  280. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/type.js +60 -2
  281. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/primitives.js +9 -1
  282. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/align.js +14 -1
  283. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/crlf.js +13 -1
  284. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/indent.js +13 -1
  285. package/dist/lib/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/util.js +28 -1
  286. package/dist/lib/node_modules/.pnpm/entities@3.0.1/node_modules/entities/lib/maps/entities.json.js +6376 -2
  287. package/dist/lib/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js +50 -3
  288. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/es/common.js +5 -1
  289. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/es/core.js +5 -1
  290. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/common.js +80 -1
  291. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/core.js +1573 -2
  292. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/bash.js +381 -1
  293. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/c.js +289 -1
  294. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/cpp.js +544 -1
  295. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/csharp.js +398 -1
  296. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/css.js +741 -1
  297. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/diff.js +63 -1
  298. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/go.js +144 -1
  299. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/graphql.js +80 -1
  300. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/ini.js +126 -1
  301. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/java.js +263 -1
  302. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/javascript.js +691 -1
  303. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/json.js +49 -1
  304. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/kotlin.js +265 -2
  305. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/less.js +822 -1
  306. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/lua.js +70 -1
  307. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/makefile.js +77 -1
  308. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/markdown.js +236 -1
  309. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/objectivec.js +253 -1
  310. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/perl.js +461 -1
  311. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/php-template.js +56 -1
  312. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/php.js +586 -2
  313. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/plaintext.js +22 -1
  314. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/python-repl.js +35 -1
  315. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/python.js +423 -1
  316. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/r.js +220 -1
  317. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/ruby.js +423 -1
  318. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/rust.js +305 -1
  319. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/scss.js +726 -1
  320. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/shell.js +34 -1
  321. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/sql.js +648 -1
  322. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/swift.js +785 -1
  323. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/typescript.js +779 -1
  324. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/vbnet.js +143 -1
  325. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/wasm.js +131 -1
  326. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/xml.js +236 -1
  327. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/lib/languages/yaml.js +194 -1
  328. package/dist/lib/node_modules/.pnpm/highlight.js@11.7.0/node_modules/highlight.js/styles/stackoverflow-light.css.js +3 -1
  329. package/dist/lib/node_modules/.pnpm/linkify-it@4.0.1/node_modules/linkify-it/index.js +354 -1
  330. package/dist/lib/node_modules/.pnpm/linkify-it@4.0.1/node_modules/linkify-it/lib/re.js +54 -1
  331. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/index.js +9 -1
  332. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/entities.js +6 -1
  333. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/html_blocks.js +66 -1
  334. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/html_re.js +19 -1
  335. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/common/utils.js +226 -1
  336. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/index.js +9 -1
  337. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/parse_link_destination.js +78 -1
  338. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/parse_link_label.js +32 -1
  339. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/helpers/parse_link_title.js +45 -1
  340. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/index.js +181 -1
  341. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/parser_block.js +79 -1
  342. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/parser_core.js +38 -1
  343. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/parser_inline.js +112 -1
  344. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/presets/commonmark.js +77 -1
  345. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/presets/default.js +39 -1
  346. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/presets/zero.js +58 -1
  347. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/renderer.js +150 -13
  348. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/ruler.js +143 -1
  349. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/blockquote.js +160 -1
  350. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/code.js +26 -2
  351. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/fence.js +67 -1
  352. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/heading.js +43 -1
  353. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/hr.js +36 -1
  354. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/html_block.js +62 -1
  355. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/lheading.js +59 -1
  356. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/list.js +220 -1
  357. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/paragraph.js +36 -1
  358. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/reference.js +152 -1
  359. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/state_block.js +167 -1
  360. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_block/table.js +184 -1
  361. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/block.js +14 -1
  362. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/inline.js +11 -1
  363. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/linkify.js +100 -1
  364. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/normalize.js +10 -2
  365. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/replacements.js +62 -1
  366. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/smartquotes.js +157 -1
  367. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/state_core.js +13 -1
  368. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/text_join.js +29 -1
  369. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/autolink.js +61 -1
  370. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/backticks.js +45 -1
  371. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +65 -1
  372. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/emphasis.js +82 -1
  373. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/entity.js +49 -1
  374. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/escape.js +56 -1
  375. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/fragments_join.js +23 -1
  376. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/html_inline.js +43 -1
  377. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/image.js +112 -1
  378. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/link.js +105 -1
  379. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/linkify.js +46 -1
  380. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/newline.js +35 -1
  381. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/state_inline.js +98 -1
  382. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/strikethrough.js +88 -1
  383. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_inline/text.js +46 -1
  384. package/dist/lib/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/token.js +61 -1
  385. package/dist/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js +84 -1
  386. package/dist/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js +64 -1
  387. package/dist/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js +18 -1
  388. package/dist/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js +11 -1
  389. package/dist/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js +171 -2
  390. package/dist/lib/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/parser-html.js +3149 -20
  391. package/dist/lib/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/parser-typescript.js +33275 -78
  392. package/dist/lib/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/standalone.js +11383 -88
  393. package/dist/lib/node_modules/.pnpm/punycode@2.3.0/node_modules/punycode/punycode.es6.js +240 -1
  394. package/dist/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js +12 -1
  395. package/dist/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js +12 -1
  396. package/dist/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js +3 -1
  397. package/dist/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js +12 -1
  398. package/dist/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js +21 -1
  399. package/dist/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js +12 -1
  400. package/dist/lib/packages/components/aside/index.vue.js +133 -1
  401. package/dist/lib/packages/components/aside/index.vue2.js +3 -1
  402. package/dist/lib/packages/components/boxurl/index.vue.js +78 -1
  403. package/dist/lib/packages/components/boxurl/index.vue2.js +3 -1
  404. package/dist/lib/packages/components/choice/choice.vue.js +58 -1
  405. package/dist/lib/packages/components/choice/choice.vue2.js +3 -1
  406. package/dist/lib/packages/components/choice/index.vue.js +99 -1
  407. package/dist/lib/packages/components/choice/index.vue2.js +3 -1
  408. package/dist/lib/packages/components/code/highlight.vue.js +15 -1
  409. package/dist/lib/packages/components/code/highlight.vue2.js +17 -1
  410. package/dist/lib/packages/components/code/index.vue.js +131 -1
  411. package/dist/lib/packages/components/code/index.vue2.js +3 -1
  412. package/dist/lib/packages/components/compo/ftable.vue.js +77 -1
  413. package/dist/lib/packages/components/compo/ftable.vue2.js +3 -1
  414. package/dist/lib/packages/components/compo/index.js +290 -1
  415. package/dist/lib/packages/components/compo/index.vue.js +226 -1
  416. package/dist/lib/packages/components/compo/index.vue2.js +3 -1
  417. package/dist/lib/packages/components/compo/info.vue.js +56 -1
  418. package/dist/lib/packages/components/compo/info.vue2.js +3 -1
  419. package/dist/lib/packages/components/compo/top.js +151 -1
  420. package/dist/lib/packages/components/header/index.vue.js +9 -1
  421. package/dist/lib/packages/components/main/index.vue.js +71 -1
  422. package/dist/lib/packages/components/main/index.vue2.js +3 -1
  423. package/dist/lib/packages/components/md/index.vue.js +70 -1
  424. package/dist/lib/packages/components/md/index.vue2.js +3 -1
  425. package/dist/lib/packages/components/test/index.js +129 -1
  426. package/dist/lib/packages/components/test/index.vue.js +108 -1
  427. package/dist/lib/packages/components/test/index.vue2.js +3 -1
  428. package/dist/lib/packages/components/test/top.js +187 -1
  429. package/dist/lib/packages/components/use/index.js +202 -1
  430. package/dist/lib/packages/components/use/retrie/any/index.vue.js +153 -1
  431. package/dist/lib/packages/components/use/retrie/any/index.vue2.js +3 -1
  432. package/dist/lib/packages/components/use/retrie/array/index.vue.js +79 -5
  433. package/dist/lib/packages/components/use/retrie/array/index.vue2.js +3 -1
  434. package/dist/lib/packages/components/use/retrie/boolean/index.vue.js +90 -1
  435. package/dist/lib/packages/components/use/retrie/boolean/index.vue2.js +3 -1
  436. package/dist/lib/packages/components/use/retrie/choice/index.vue.js +207 -3
  437. package/dist/lib/packages/components/use/retrie/choice/index.vue2.js +3 -1
  438. package/dist/lib/packages/components/use/retrie/choice/index.vue3.js +4 -1
  439. package/dist/lib/packages/components/use/retrie/expose/index.vue.js +89 -1
  440. package/dist/lib/packages/components/use/retrie/expose/index.vue2.js +3 -1
  441. package/dist/lib/packages/components/use/retrie/form/index.vue.js +159 -1
  442. package/dist/lib/packages/components/use/retrie/form/index.vue2.js +3 -1
  443. package/dist/lib/packages/components/use/retrie/function/index.vue.js +94 -3
  444. package/dist/lib/packages/components/use/retrie/function/index.vue2.js +3 -1
  445. package/dist/lib/packages/components/use/retrie/index.vue.js +112 -1
  446. package/dist/lib/packages/components/use/retrie/index.vue2.js +3 -1
  447. package/dist/lib/packages/components/use/retrie/number/index.vue.js +58 -1
  448. package/dist/lib/packages/components/use/retrie/number/index.vue2.js +3 -1
  449. package/dist/lib/packages/components/use/retrie/object/index.vue.js +79 -5
  450. package/dist/lib/packages/components/use/retrie/object/index.vue2.js +3 -1
  451. package/dist/lib/packages/components/use/retrie/other/index.vue.js +93 -3
  452. package/dist/lib/packages/components/use/retrie/other/index.vue2.js +3 -1
  453. package/dist/lib/packages/components/use/retrie/select/index.vue.js +160 -1
  454. package/dist/lib/packages/components/use/retrie/select/index.vue2.js +3 -1
  455. package/dist/lib/packages/components/use/retrie/select/index.vue3.js +4 -1
  456. package/dist/lib/packages/components/use/retrie/slot/index.vue.js +57 -1
  457. package/dist/lib/packages/components/use/retrie/slot/index.vue2.js +3 -1
  458. package/dist/lib/packages/components/use/retrie/string/index.vue.js +62 -1
  459. package/dist/lib/packages/components/use/retrie/string/index.vue2.js +3 -1
  460. package/dist/lib/packages/components/use/set-code.vue.js +182 -12
  461. package/dist/lib/packages/components/use/set-code.vue2.js +3 -1
  462. package/dist/lib/packages/components/use/set-emit.vue.js +63 -1
  463. package/dist/lib/packages/components/use/set-emit.vue2.js +3 -1
  464. package/dist/lib/packages/components/use/set-expose.vue.js +52 -1
  465. package/dist/lib/packages/components/use/set-expose.vue2.js +3 -1
  466. package/dist/lib/packages/components/use/set-props.vue.js +131 -1
  467. package/dist/lib/packages/components/use/set-props.vue2.js +3 -1
  468. package/dist/lib/packages/components/use/set-slot.vue.js +52 -1
  469. package/dist/lib/packages/components/use/set-slot.vue2.js +3 -1
  470. package/dist/lib/packages/components/use/util.js +181 -4
  471. package/dist/lib/packages/config.d.ts +3 -3
  472. package/dist/lib/packages/config.js +14 -1
  473. package/dist/lib/packages/index/index.vue.js +14 -1
  474. package/dist/lib/packages/index/index.vue2.js +3 -1
  475. package/dist/lib/packages/index.js +14 -1
  476. package/dist/lib/packages/page/compon/index.vue.js +3 -1
  477. package/dist/lib/packages/page/compon/index.vue2.js +23 -1
  478. package/dist/lib/packages/page/develop/index.vue.js +3 -1
  479. package/dist/lib/packages/page/develop/index.vue2.js +23 -1
  480. package/dist/lib/packages/page/index/index.vue.js +3 -1
  481. package/dist/lib/packages/page/index/index.vue2.js +62 -1
  482. package/dist/lib/packages/page/single/index.vue.js +3 -1
  483. package/dist/lib/packages/page/single/index.vue2.js +86 -1
  484. package/dist/lib/packages/page/tests/index.vue.js +3 -1
  485. package/dist/lib/packages/page/tests/index.vue2.js +94 -1
  486. package/dist/lib/packages/router/index.js +173 -1
  487. package/dist/lib/packages/utils/common.js +166 -1
  488. package/dist/lib/packages/utils/glob.js +561 -2
  489. package/dist/lib/packages/utils/index.js +19 -1
  490. package/dist/lib/packages/utils/props.js +197 -1
  491. package/dist/lib/packages/utils/storage.js +42 -1
  492. package/package.json +9 -10
  493. package/dist/es/node_modules/.pnpm/@vue_compiler-core@3.2.47/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +0 -2881
  494. package/dist/es/node_modules/.pnpm/@vue_compiler-dom@3.2.47/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +0 -408
  495. package/dist/es/node_modules/.pnpm/@vue_reactivity@3.2.47/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -700
  496. package/dist/es/node_modules/.pnpm/@vue_runtime-core@3.2.47/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -3908
  497. package/dist/es/node_modules/.pnpm/@vue_runtime-dom@3.2.47/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1023
  498. package/dist/es/node_modules/.pnpm/@vue_shared@3.2.47/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -280
  499. package/dist/es/node_modules/.pnpm/vue@3.2.47/node_modules/vue/dist/vue.esm-bundler.js +0 -163
  500. package/dist/lib/node_modules/.pnpm/@vue_compiler-core@3.2.47/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +0 -9
  501. package/dist/lib/node_modules/.pnpm/@vue_compiler-dom@3.2.47/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +0 -1
  502. package/dist/lib/node_modules/.pnpm/@vue_reactivity@3.2.47/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -1
  503. package/dist/lib/node_modules/.pnpm/@vue_runtime-core@3.2.47/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -14
  504. package/dist/lib/node_modules/.pnpm/@vue_runtime-dom@3.2.47/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1
  505. package/dist/lib/node_modules/.pnpm/@vue_shared@3.2.47/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -2
  506. package/dist/lib/node_modules/.pnpm/vue@3.2.47/node_modules/vue/dist/vue.esm-bundler.js +0 -2
@@ -1,83 +1,113 @@
1
- var te = { exports: {} };
2
- function ne(e) {
3
- return e instanceof Map ? e.clear = e.delete = e.set = function() {
4
- throw new Error("map is read-only");
5
- } : e instanceof Set && (e.add = e.clear = e.delete = function() {
6
- throw new Error("set is read-only");
7
- }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(function(t) {
8
- var i = e[t];
9
- typeof i == "object" && !Object.isFrozen(i) && ne(i);
10
- }), e;
1
+ var deepFreezeEs6 = { exports: {} };
2
+ function deepFreeze(obj) {
3
+ if (obj instanceof Map) {
4
+ obj.clear = obj.delete = obj.set = function() {
5
+ throw new Error("map is read-only");
6
+ };
7
+ } else if (obj instanceof Set) {
8
+ obj.add = obj.clear = obj.delete = function() {
9
+ throw new Error("set is read-only");
10
+ };
11
+ }
12
+ Object.freeze(obj);
13
+ Object.getOwnPropertyNames(obj).forEach(function(name) {
14
+ var prop = obj[name];
15
+ if (typeof prop == "object" && !Object.isFrozen(prop)) {
16
+ deepFreeze(prop);
17
+ }
18
+ });
19
+ return obj;
11
20
  }
12
- te.exports = ne;
13
- te.exports.default = ne;
14
- class de {
21
+ deepFreezeEs6.exports = deepFreeze;
22
+ deepFreezeEs6.exports.default = deepFreeze;
23
+ class Response {
15
24
  /**
16
25
  * @param {CompiledMode} mode
17
26
  */
18
- constructor(t) {
19
- t.data === void 0 && (t.data = {}), this.data = t.data, this.isMatchIgnored = !1;
27
+ constructor(mode) {
28
+ if (mode.data === void 0)
29
+ mode.data = {};
30
+ this.data = mode.data;
31
+ this.isMatchIgnored = false;
20
32
  }
21
33
  ignoreMatch() {
22
- this.isMatchIgnored = !0;
34
+ this.isMatchIgnored = true;
23
35
  }
24
36
  }
25
- function xe(e) {
26
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
37
+ function escapeHTML(value) {
38
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
27
39
  }
28
- function v(e, ...t) {
29
- const i = /* @__PURE__ */ Object.create(null);
30
- for (const f in e)
31
- i[f] = e[f];
32
- return t.forEach(function(f) {
33
- for (const b in f)
34
- i[b] = f[b];
35
- }), /** @type {T} */
36
- i;
40
+ function inherit$1(original, ...objects) {
41
+ const result = /* @__PURE__ */ Object.create(null);
42
+ for (const key in original) {
43
+ result[key] = original[key];
44
+ }
45
+ objects.forEach(function(obj) {
46
+ for (const key in obj) {
47
+ result[key] = obj[key];
48
+ }
49
+ });
50
+ return (
51
+ /** @type {T} */
52
+ result
53
+ );
37
54
  }
38
- const Je = "</span>", pe = (e) => !!e.scope || e.sublanguage && e.language, Ve = (e, { prefix: t }) => {
39
- if (e.includes(".")) {
40
- const i = e.split(".");
55
+ const SPAN_CLOSE = "</span>";
56
+ const emitsWrappingTags = (node) => {
57
+ return !!node.scope || node.sublanguage && node.language;
58
+ };
59
+ const scopeToCSSClass = (name, { prefix }) => {
60
+ if (name.includes(".")) {
61
+ const pieces = name.split(".");
41
62
  return [
42
- `${t}${i.shift()}`,
43
- ...i.map((f, b) => `${f}${"_".repeat(b + 1)}`)
63
+ `${prefix}${pieces.shift()}`,
64
+ ...pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`)
44
65
  ].join(" ");
45
66
  }
46
- return `${t}${e}`;
67
+ return `${prefix}${name}`;
47
68
  };
48
- class qe {
69
+ class HTMLRenderer {
49
70
  /**
50
71
  * Creates a new HTMLRenderer
51
72
  *
52
73
  * @param {Tree} parseTree - the parse tree (must support `walk` API)
53
74
  * @param {{classPrefix: string}} options
54
75
  */
55
- constructor(t, i) {
56
- this.buffer = "", this.classPrefix = i.classPrefix, t.walk(this);
76
+ constructor(parseTree, options) {
77
+ this.buffer = "";
78
+ this.classPrefix = options.classPrefix;
79
+ parseTree.walk(this);
57
80
  }
58
81
  /**
59
82
  * Adds texts to the output stream
60
83
  *
61
84
  * @param {string} text */
62
- addText(t) {
63
- this.buffer += xe(t);
85
+ addText(text) {
86
+ this.buffer += escapeHTML(text);
64
87
  }
65
88
  /**
66
89
  * Adds a node open to the output stream (if needed)
67
90
  *
68
91
  * @param {Node} node */
69
- openNode(t) {
70
- if (!pe(t))
92
+ openNode(node) {
93
+ if (!emitsWrappingTags(node))
71
94
  return;
72
- let i = "";
73
- t.sublanguage ? i = `language-${t.language}` : i = Ve(t.scope, { prefix: this.classPrefix }), this.span(i);
95
+ let className = "";
96
+ if (node.sublanguage) {
97
+ className = `language-${node.language}`;
98
+ } else {
99
+ className = scopeToCSSClass(node.scope, { prefix: this.classPrefix });
100
+ }
101
+ this.span(className);
74
102
  }
75
103
  /**
76
104
  * Adds a node close to the output stream (if needed)
77
105
  *
78
106
  * @param {Node} node */
79
- closeNode(t) {
80
- pe(t) && (this.buffer += Je);
107
+ closeNode(node) {
108
+ if (!emitsWrappingTags(node))
109
+ return;
110
+ this.buffer += SPAN_CLOSE;
81
111
  }
82
112
  /**
83
113
  * returns the accumulated buffer
@@ -90,17 +120,19 @@ class qe {
90
120
  * Builds a span element
91
121
  *
92
122
  * @param {string} className */
93
- span(t) {
94
- this.buffer += `<span class="${t}">`;
123
+ span(className) {
124
+ this.buffer += `<span class="${className}">`;
95
125
  }
96
126
  }
97
- const Ee = (e = {}) => {
98
- const t = { children: [] };
99
- return Object.assign(t, e), t;
127
+ const newNode = (opts = {}) => {
128
+ const result = { children: [] };
129
+ Object.assign(result, opts);
130
+ return result;
100
131
  };
101
- class ie {
132
+ class TokenTree {
102
133
  constructor() {
103
- this.rootNode = Ee(), this.stack = [this.rootNode];
134
+ this.rootNode = newNode();
135
+ this.stack = [this.rootNode];
104
136
  }
105
137
  get top() {
106
138
  return this.stack[this.stack.length - 1];
@@ -109,20 +141,23 @@ class ie {
109
141
  return this.rootNode;
110
142
  }
111
143
  /** @param {Node} node */
112
- add(t) {
113
- this.top.children.push(t);
144
+ add(node) {
145
+ this.top.children.push(node);
114
146
  }
115
147
  /** @param {string} scope */
116
- openNode(t) {
117
- const i = Ee({ scope: t });
118
- this.add(i), this.stack.push(i);
148
+ openNode(scope) {
149
+ const node = newNode({ scope });
150
+ this.add(node);
151
+ this.stack.push(node);
119
152
  }
120
153
  closeNode() {
121
- if (this.stack.length > 1)
154
+ if (this.stack.length > 1) {
122
155
  return this.stack.pop();
156
+ }
157
+ return void 0;
123
158
  }
124
159
  closeAllNodes() {
125
- for (; this.closeNode(); )
160
+ while (this.closeNode())
126
161
  ;
127
162
  }
128
163
  toJSON() {
@@ -132,161 +167,226 @@ class ie {
132
167
  * @typedef { import("./html_renderer").Renderer } Renderer
133
168
  * @param {Renderer} builder
134
169
  */
135
- walk(t) {
136
- return this.constructor._walk(t, this.rootNode);
170
+ walk(builder) {
171
+ return this.constructor._walk(builder, this.rootNode);
137
172
  }
138
173
  /**
139
174
  * @param {Renderer} builder
140
175
  * @param {Node} node
141
176
  */
142
- static _walk(t, i) {
143
- return typeof i == "string" ? t.addText(i) : i.children && (t.openNode(i), i.children.forEach((f) => this._walk(t, f)), t.closeNode(i)), t;
177
+ static _walk(builder, node) {
178
+ if (typeof node === "string") {
179
+ builder.addText(node);
180
+ } else if (node.children) {
181
+ builder.openNode(node);
182
+ node.children.forEach((child) => this._walk(builder, child));
183
+ builder.closeNode(node);
184
+ }
185
+ return builder;
144
186
  }
145
187
  /**
146
188
  * @param {Node} node
147
189
  */
148
- static _collapse(t) {
149
- typeof t != "string" && t.children && (t.children.every((i) => typeof i == "string") ? t.children = [t.children.join("")] : t.children.forEach((i) => {
150
- ie._collapse(i);
151
- }));
190
+ static _collapse(node) {
191
+ if (typeof node === "string")
192
+ return;
193
+ if (!node.children)
194
+ return;
195
+ if (node.children.every((el) => typeof el === "string")) {
196
+ node.children = [node.children.join("")];
197
+ } else {
198
+ node.children.forEach((child) => {
199
+ TokenTree._collapse(child);
200
+ });
201
+ }
152
202
  }
153
203
  }
154
- class Qe extends ie {
204
+ class TokenTreeEmitter extends TokenTree {
155
205
  /**
156
206
  * @param {*} options
157
207
  */
158
- constructor(t) {
159
- super(), this.options = t;
208
+ constructor(options) {
209
+ super();
210
+ this.options = options;
160
211
  }
161
212
  /**
162
213
  * @param {string} text
163
214
  * @param {string} scope
164
215
  */
165
- addKeyword(t, i) {
166
- t !== "" && (this.openNode(i), this.addText(t), this.closeNode());
216
+ addKeyword(text, scope) {
217
+ if (text === "") {
218
+ return;
219
+ }
220
+ this.openNode(scope);
221
+ this.addText(text);
222
+ this.closeNode();
167
223
  }
168
224
  /**
169
225
  * @param {string} text
170
226
  */
171
- addText(t) {
172
- t !== "" && this.add(t);
227
+ addText(text) {
228
+ if (text === "") {
229
+ return;
230
+ }
231
+ this.add(text);
173
232
  }
174
233
  /**
175
234
  * @param {Emitter & {root: DataNode}} emitter
176
235
  * @param {string} name
177
236
  */
178
- addSublanguage(t, i) {
179
- const f = t.root;
180
- f.sublanguage = !0, f.language = i, this.add(f);
237
+ addSublanguage(emitter, name) {
238
+ const node = emitter.root;
239
+ node.sublanguage = true;
240
+ node.language = name;
241
+ this.add(node);
181
242
  }
182
243
  toHTML() {
183
- return new qe(this, this.options).value();
244
+ const renderer = new HTMLRenderer(this, this.options);
245
+ return renderer.value();
184
246
  }
185
247
  finalize() {
186
- return !0;
248
+ return true;
187
249
  }
188
250
  }
189
- function j(e) {
190
- return e ? typeof e == "string" ? e : e.source : null;
251
+ function source(re) {
252
+ if (!re)
253
+ return null;
254
+ if (typeof re === "string")
255
+ return re;
256
+ return re.source;
191
257
  }
192
- function Oe(e) {
193
- return L("(?=", e, ")");
258
+ function lookahead(re) {
259
+ return concat("(?=", re, ")");
194
260
  }
195
- function me(e) {
196
- return L("(?:", e, ")*");
261
+ function anyNumberOfTimes(re) {
262
+ return concat("(?:", re, ")*");
197
263
  }
198
- function et(e) {
199
- return L("(?:", e, ")?");
264
+ function optional(re) {
265
+ return concat("(?:", re, ")?");
200
266
  }
201
- function L(...e) {
202
- return e.map((i) => j(i)).join("");
267
+ function concat(...args) {
268
+ const joined = args.map((x) => source(x)).join("");
269
+ return joined;
203
270
  }
204
- function tt(e) {
205
- const t = e[e.length - 1];
206
- return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
271
+ function stripOptionsFromArgs(args) {
272
+ const opts = args[args.length - 1];
273
+ if (typeof opts === "object" && opts.constructor === Object) {
274
+ args.splice(args.length - 1, 1);
275
+ return opts;
276
+ } else {
277
+ return {};
278
+ }
207
279
  }
208
- function se(...e) {
209
- return "(" + (tt(e).capture ? "" : "?:") + e.map((f) => j(f)).join("|") + ")";
280
+ function either(...args) {
281
+ const opts = stripOptionsFromArgs(args);
282
+ const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")";
283
+ return joined;
210
284
  }
211
- function ye(e) {
212
- return new RegExp(e.toString() + "|").exec("").length - 1;
285
+ function countMatchGroups(re) {
286
+ return new RegExp(re.toString() + "|").exec("").length - 1;
213
287
  }
214
- function nt(e, t) {
215
- const i = e && e.exec(t);
216
- return i && i.index === 0;
288
+ function startsWith(re, lexeme) {
289
+ const match = re && re.exec(lexeme);
290
+ return match && match.index === 0;
217
291
  }
218
- const it = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
219
- function re(e, { joinWith: t }) {
220
- let i = 0;
221
- return e.map((f) => {
222
- i += 1;
223
- const b = i;
224
- let _ = j(f), c = "";
225
- for (; _.length > 0; ) {
226
- const r = it.exec(_);
227
- if (!r) {
228
- c += _;
292
+ const BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
293
+ function _rewriteBackreferences(regexps, { joinWith }) {
294
+ let numCaptures = 0;
295
+ return regexps.map((regex) => {
296
+ numCaptures += 1;
297
+ const offset = numCaptures;
298
+ let re = source(regex);
299
+ let out = "";
300
+ while (re.length > 0) {
301
+ const match = BACKREF_RE.exec(re);
302
+ if (!match) {
303
+ out += re;
229
304
  break;
230
305
  }
231
- c += _.substring(0, r.index), _ = _.substring(r.index + r[0].length), r[0][0] === "\\" && r[1] ? c += "\\" + String(Number(r[1]) + b) : (c += r[0], r[0] === "(" && i++);
306
+ out += re.substring(0, match.index);
307
+ re = re.substring(match.index + match[0].length);
308
+ if (match[0][0] === "\\" && match[1]) {
309
+ out += "\\" + String(Number(match[1]) + offset);
310
+ } else {
311
+ out += match[0];
312
+ if (match[0] === "(") {
313
+ numCaptures++;
314
+ }
315
+ }
232
316
  }
233
- return c;
234
- }).map((f) => `(${f})`).join(t);
317
+ return out;
318
+ }).map((re) => `(${re})`).join(joinWith);
235
319
  }
236
- const st = /\b\B/, Re = "[a-zA-Z]\\w*", ce = "[a-zA-Z_]\\w*", Se = "\\b\\d+(\\.\\d+)?", Ne = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Ae = "\\b(0b[01]+)", rt = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ct = (e = {}) => {
237
- const t = /^#![ ]*\//;
238
- return e.binary && (e.begin = L(
239
- t,
240
- /.*\b/,
241
- e.binary,
242
- /\b.*/
243
- )), v({
320
+ const MATCH_NOTHING_RE = /\b\B/;
321
+ const IDENT_RE = "[a-zA-Z]\\w*";
322
+ const UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*";
323
+ const NUMBER_RE = "\\b\\d+(\\.\\d+)?";
324
+ const C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";
325
+ const BINARY_NUMBER_RE = "\\b(0b[01]+)";
326
+ const RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";
327
+ const SHEBANG = (opts = {}) => {
328
+ const beginShebang = /^#![ ]*\//;
329
+ if (opts.binary) {
330
+ opts.begin = concat(
331
+ beginShebang,
332
+ /.*\b/,
333
+ opts.binary,
334
+ /\b.*/
335
+ );
336
+ }
337
+ return inherit$1({
244
338
  scope: "meta",
245
- begin: t,
339
+ begin: beginShebang,
246
340
  end: /$/,
247
341
  relevance: 0,
248
342
  /** @type {ModeCallback} */
249
- "on:begin": (i, f) => {
250
- i.index !== 0 && f.ignoreMatch();
343
+ "on:begin": (m, resp) => {
344
+ if (m.index !== 0)
345
+ resp.ignoreMatch();
251
346
  }
252
- }, e);
253
- }, P = {
347
+ }, opts);
348
+ };
349
+ const BACKSLASH_ESCAPE = {
254
350
  begin: "\\\\[\\s\\S]",
255
351
  relevance: 0
256
- }, ot = {
352
+ };
353
+ const APOS_STRING_MODE = {
257
354
  scope: "string",
258
355
  begin: "'",
259
356
  end: "'",
260
357
  illegal: "\\n",
261
- contains: [P]
262
- }, at = {
358
+ contains: [BACKSLASH_ESCAPE]
359
+ };
360
+ const QUOTE_STRING_MODE = {
263
361
  scope: "string",
264
362
  begin: '"',
265
363
  end: '"',
266
364
  illegal: "\\n",
267
- contains: [P]
268
- }, lt = {
365
+ contains: [BACKSLASH_ESCAPE]
366
+ };
367
+ const PHRASAL_WORDS_MODE = {
269
368
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
270
- }, Y = function(e, t, i = {}) {
271
- const f = v(
369
+ };
370
+ const COMMENT = function(begin, end, modeOptions = {}) {
371
+ const mode = inherit$1(
272
372
  {
273
373
  scope: "comment",
274
- begin: e,
275
- end: t,
374
+ begin,
375
+ end,
276
376
  contains: []
277
377
  },
278
- i
378
+ modeOptions
279
379
  );
280
- f.contains.push({
380
+ mode.contains.push({
281
381
  scope: "doctag",
282
382
  // hack to avoid the space from being included. the space is necessary to
283
383
  // match here to prevent the plain text rule below from gobbling up doctags
284
384
  begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
285
385
  end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
286
- excludeBegin: !0,
386
+ excludeBegin: true,
287
387
  relevance: 0
288
388
  });
289
- const b = se(
389
+ const ENGLISH_WORD = either(
290
390
  // list of common 1 and 2 letter words in English
291
391
  "I",
292
392
  "a",
@@ -307,7 +407,7 @@ const st = /\b\B/, Re = "[a-zA-Z]\\w*", ce = "[a-zA-Z_]\\w*", Se = "\\b\\d+(\\.\
307
407
  /[A-Za-z][a-z]{2,}/
308
408
  // allow capitalized words at beginning of sentences
309
409
  );
310
- return f.contains.push(
410
+ mode.contains.push(
311
411
  {
312
412
  // TODO: how to include ", (, ) without breaking grammars that use these for
313
413
  // comment delimiters?
@@ -322,30 +422,38 @@ const st = /\b\B/, Re = "[a-zA-Z]\\w*", ce = "[a-zA-Z_]\\w*", Se = "\\b\\d+(\\.\
322
422
  //
323
423
  // for a visual example please see:
324
424
  // https://github.com/highlightjs/highlight.js/issues/2827
325
- begin: L(
425
+ begin: concat(
326
426
  /[ ]+/,
327
427
  // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
328
428
  "(",
329
- b,
429
+ ENGLISH_WORD,
330
430
  /[.]?[:]?([.][ ]|[ ])/,
331
431
  "){3}"
332
432
  )
333
433
  // look for 3 words in a row
334
434
  }
335
- ), f;
336
- }, ut = Y("//", "$"), ft = Y("/\\*", "\\*/"), gt = Y("#", "$"), ht = {
435
+ );
436
+ return mode;
437
+ };
438
+ const C_LINE_COMMENT_MODE = COMMENT("//", "$");
439
+ const C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/");
440
+ const HASH_COMMENT_MODE = COMMENT("#", "$");
441
+ const NUMBER_MODE = {
337
442
  scope: "number",
338
- begin: Se,
443
+ begin: NUMBER_RE,
339
444
  relevance: 0
340
- }, dt = {
445
+ };
446
+ const C_NUMBER_MODE = {
341
447
  scope: "number",
342
- begin: Ne,
448
+ begin: C_NUMBER_RE,
343
449
  relevance: 0
344
- }, pt = {
450
+ };
451
+ const BINARY_NUMBER_MODE = {
345
452
  scope: "number",
346
- begin: Ae,
453
+ begin: BINARY_NUMBER_RE,
347
454
  relevance: 0
348
- }, Et = {
455
+ };
456
+ const REGEXP_MODE = {
349
457
  // this outer rule makes sure we actually have a WHOLE regex and not simply
350
458
  // an expression such as:
351
459
  //
@@ -359,106 +467,136 @@ const st = /\b\B/, Re = "[a-zA-Z]\\w*", ce = "[a-zA-Z_]\\w*", Se = "\\b\\d+(\\.\
359
467
  end: /\/[gimuy]*/,
360
468
  illegal: /\n/,
361
469
  contains: [
362
- P,
470
+ BACKSLASH_ESCAPE,
363
471
  {
364
472
  begin: /\[/,
365
473
  end: /\]/,
366
474
  relevance: 0,
367
- contains: [P]
475
+ contains: [BACKSLASH_ESCAPE]
368
476
  }
369
477
  ]
370
478
  }]
371
- }, bt = {
479
+ };
480
+ const TITLE_MODE = {
372
481
  scope: "title",
373
- begin: Re,
482
+ begin: IDENT_RE,
374
483
  relevance: 0
375
- }, _t = {
484
+ };
485
+ const UNDERSCORE_TITLE_MODE = {
376
486
  scope: "title",
377
- begin: ce,
487
+ begin: UNDERSCORE_IDENT_RE,
378
488
  relevance: 0
379
- }, wt = {
489
+ };
490
+ const METHOD_GUARD = {
380
491
  // excludes method names from keyword processing
381
- begin: "\\.\\s*" + ce,
492
+ begin: "\\.\\s*" + UNDERSCORE_IDENT_RE,
382
493
  relevance: 0
383
- }, Mt = function(e) {
494
+ };
495
+ const END_SAME_AS_BEGIN = function(mode) {
384
496
  return Object.assign(
385
- e,
497
+ mode,
386
498
  {
387
499
  /** @type {ModeCallback} */
388
- "on:begin": (t, i) => {
389
- i.data._beginMatch = t[1];
500
+ "on:begin": (m, resp) => {
501
+ resp.data._beginMatch = m[1];
390
502
  },
391
503
  /** @type {ModeCallback} */
392
- "on:end": (t, i) => {
393
- i.data._beginMatch !== t[1] && i.ignoreMatch();
504
+ "on:end": (m, resp) => {
505
+ if (resp.data._beginMatch !== m[1])
506
+ resp.ignoreMatch();
394
507
  }
395
508
  }
396
509
  );
397
510
  };
398
- var F = /* @__PURE__ */ Object.freeze({
511
+ var MODES = /* @__PURE__ */ Object.freeze({
399
512
  __proto__: null,
400
- MATCH_NOTHING_RE: st,
401
- IDENT_RE: Re,
402
- UNDERSCORE_IDENT_RE: ce,
403
- NUMBER_RE: Se,
404
- C_NUMBER_RE: Ne,
405
- BINARY_NUMBER_RE: Ae,
406
- RE_STARTERS_RE: rt,
407
- SHEBANG: ct,
408
- BACKSLASH_ESCAPE: P,
409
- APOS_STRING_MODE: ot,
410
- QUOTE_STRING_MODE: at,
411
- PHRASAL_WORDS_MODE: lt,
412
- COMMENT: Y,
413
- C_LINE_COMMENT_MODE: ut,
414
- C_BLOCK_COMMENT_MODE: ft,
415
- HASH_COMMENT_MODE: gt,
416
- NUMBER_MODE: ht,
417
- C_NUMBER_MODE: dt,
418
- BINARY_NUMBER_MODE: pt,
419
- REGEXP_MODE: Et,
420
- TITLE_MODE: bt,
421
- UNDERSCORE_TITLE_MODE: _t,
422
- METHOD_GUARD: wt,
423
- END_SAME_AS_BEGIN: Mt
513
+ MATCH_NOTHING_RE,
514
+ IDENT_RE,
515
+ UNDERSCORE_IDENT_RE,
516
+ NUMBER_RE,
517
+ C_NUMBER_RE,
518
+ BINARY_NUMBER_RE,
519
+ RE_STARTERS_RE,
520
+ SHEBANG,
521
+ BACKSLASH_ESCAPE,
522
+ APOS_STRING_MODE,
523
+ QUOTE_STRING_MODE,
524
+ PHRASAL_WORDS_MODE,
525
+ COMMENT,
526
+ C_LINE_COMMENT_MODE,
527
+ C_BLOCK_COMMENT_MODE,
528
+ HASH_COMMENT_MODE,
529
+ NUMBER_MODE,
530
+ C_NUMBER_MODE,
531
+ BINARY_NUMBER_MODE,
532
+ REGEXP_MODE,
533
+ TITLE_MODE,
534
+ UNDERSCORE_TITLE_MODE,
535
+ METHOD_GUARD,
536
+ END_SAME_AS_BEGIN
424
537
  });
425
- function xt(e, t) {
426
- e.input[e.index - 1] === "." && t.ignoreMatch();
538
+ function skipIfHasPrecedingDot(match, response) {
539
+ const before = match.input[match.index - 1];
540
+ if (before === ".") {
541
+ response.ignoreMatch();
542
+ }
427
543
  }
428
- function Ot(e, t) {
429
- e.className !== void 0 && (e.scope = e.className, delete e.className);
544
+ function scopeClassName(mode, _parent) {
545
+ if (mode.className !== void 0) {
546
+ mode.scope = mode.className;
547
+ delete mode.className;
548
+ }
430
549
  }
431
- function yt(e, t) {
432
- t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = xt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
550
+ function beginKeywords(mode, parent) {
551
+ if (!parent)
552
+ return;
553
+ if (!mode.beginKeywords)
554
+ return;
555
+ mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)";
556
+ mode.__beforeBegin = skipIfHasPrecedingDot;
557
+ mode.keywords = mode.keywords || mode.beginKeywords;
558
+ delete mode.beginKeywords;
559
+ if (mode.relevance === void 0)
560
+ mode.relevance = 0;
433
561
  }
434
- function Rt(e, t) {
435
- Array.isArray(e.illegal) && (e.illegal = se(...e.illegal));
562
+ function compileIllegal(mode, _parent) {
563
+ if (!Array.isArray(mode.illegal))
564
+ return;
565
+ mode.illegal = either(...mode.illegal);
436
566
  }
437
- function St(e, t) {
438
- if (e.match) {
439
- if (e.begin || e.end)
440
- throw new Error("begin & end are not supported with match");
441
- e.begin = e.match, delete e.match;
442
- }
567
+ function compileMatch(mode, _parent) {
568
+ if (!mode.match)
569
+ return;
570
+ if (mode.begin || mode.end)
571
+ throw new Error("begin & end are not supported with match");
572
+ mode.begin = mode.match;
573
+ delete mode.match;
443
574
  }
444
- function Nt(e, t) {
445
- e.relevance === void 0 && (e.relevance = 1);
575
+ function compileRelevance(mode, _parent) {
576
+ if (mode.relevance === void 0)
577
+ mode.relevance = 1;
446
578
  }
447
- const At = (e, t) => {
448
- if (!e.beforeMatch)
579
+ const beforeMatchExt = (mode, parent) => {
580
+ if (!mode.beforeMatch)
449
581
  return;
450
- if (e.starts)
582
+ if (mode.starts)
451
583
  throw new Error("beforeMatch cannot be used with starts");
452
- const i = Object.assign({}, e);
453
- Object.keys(e).forEach((f) => {
454
- delete e[f];
455
- }), e.keywords = i.keywords, e.begin = L(i.beforeMatch, Oe(i.begin)), e.starts = {
584
+ const originalMode = Object.assign({}, mode);
585
+ Object.keys(mode).forEach((key) => {
586
+ delete mode[key];
587
+ });
588
+ mode.keywords = originalMode.keywords;
589
+ mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin));
590
+ mode.starts = {
456
591
  relevance: 0,
457
592
  contains: [
458
- Object.assign(i, { endsParent: !0 })
593
+ Object.assign(originalMode, { endsParent: true })
459
594
  ]
460
- }, e.relevance = 0, delete i.beforeMatch;
461
- }, kt = [
595
+ };
596
+ mode.relevance = 0;
597
+ delete originalMode.beforeMatch;
598
+ };
599
+ const COMMON_KEYWORDS = [
462
600
  "of",
463
601
  "and",
464
602
  "for",
@@ -473,106 +611,174 @@ const At = (e, t) => {
473
611
  // common variable name
474
612
  "value"
475
613
  // common variable name
476
- ], Tt = "keyword";
477
- function ke(e, t, i = Tt) {
478
- const f = /* @__PURE__ */ Object.create(null);
479
- return typeof e == "string" ? b(i, e.split(" ")) : Array.isArray(e) ? b(i, e) : Object.keys(e).forEach(function(_) {
480
- Object.assign(
481
- f,
482
- ke(e[_], t, _)
483
- );
484
- }), f;
485
- function b(_, c) {
486
- t && (c = c.map((r) => r.toLowerCase())), c.forEach(function(r) {
487
- const l = r.split("|");
488
- f[l[0]] = [_, It(l[0], l[1])];
614
+ ];
615
+ const DEFAULT_KEYWORD_SCOPE = "keyword";
616
+ function compileKeywords(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE) {
617
+ const compiledKeywords = /* @__PURE__ */ Object.create(null);
618
+ if (typeof rawKeywords === "string") {
619
+ compileList(scopeName, rawKeywords.split(" "));
620
+ } else if (Array.isArray(rawKeywords)) {
621
+ compileList(scopeName, rawKeywords);
622
+ } else {
623
+ Object.keys(rawKeywords).forEach(function(scopeName2) {
624
+ Object.assign(
625
+ compiledKeywords,
626
+ compileKeywords(rawKeywords[scopeName2], caseInsensitive, scopeName2)
627
+ );
628
+ });
629
+ }
630
+ return compiledKeywords;
631
+ function compileList(scopeName2, keywordList) {
632
+ if (caseInsensitive) {
633
+ keywordList = keywordList.map((x) => x.toLowerCase());
634
+ }
635
+ keywordList.forEach(function(keyword) {
636
+ const pair = keyword.split("|");
637
+ compiledKeywords[pair[0]] = [scopeName2, scoreForKeyword(pair[0], pair[1])];
489
638
  });
490
639
  }
491
640
  }
492
- function It(e, t) {
493
- return t ? Number(t) : vt(e) ? 0 : 1;
641
+ function scoreForKeyword(keyword, providedScore) {
642
+ if (providedScore) {
643
+ return Number(providedScore);
644
+ }
645
+ return commonKeyword(keyword) ? 0 : 1;
494
646
  }
495
- function vt(e) {
496
- return kt.includes(e.toLowerCase());
647
+ function commonKeyword(keyword) {
648
+ return COMMON_KEYWORDS.includes(keyword.toLowerCase());
497
649
  }
498
- const be = {}, D = (e) => {
499
- console.error(e);
500
- }, _e = (e, ...t) => {
501
- console.log(`WARN: ${e}`, ...t);
502
- }, C = (e, t) => {
503
- be[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), be[`${e}/${t}`] = !0);
504
- }, X = new Error();
505
- function Te(e, t, { key: i }) {
506
- let f = 0;
507
- const b = e[i], _ = {}, c = {};
508
- for (let r = 1; r <= t.length; r++)
509
- c[r + f] = b[r], _[r + f] = !0, f += ye(t[r - 1]);
510
- e[i] = c, e[i]._emit = _, e[i]._multi = !0;
650
+ const seenDeprecations = {};
651
+ const error = (message) => {
652
+ console.error(message);
653
+ };
654
+ const warn = (message, ...args) => {
655
+ console.log(`WARN: ${message}`, ...args);
656
+ };
657
+ const deprecated = (version2, message) => {
658
+ if (seenDeprecations[`${version2}/${message}`])
659
+ return;
660
+ console.log(`Deprecated as of ${version2}. ${message}`);
661
+ seenDeprecations[`${version2}/${message}`] = true;
662
+ };
663
+ const MultiClassError = new Error();
664
+ function remapScopeNames(mode, regexes, { key }) {
665
+ let offset = 0;
666
+ const scopeNames = mode[key];
667
+ const emit = {};
668
+ const positions = {};
669
+ for (let i = 1; i <= regexes.length; i++) {
670
+ positions[i + offset] = scopeNames[i];
671
+ emit[i + offset] = true;
672
+ offset += countMatchGroups(regexes[i - 1]);
673
+ }
674
+ mode[key] = positions;
675
+ mode[key]._emit = emit;
676
+ mode[key]._multi = true;
511
677
  }
512
- function Bt(e) {
513
- if (Array.isArray(e.begin)) {
514
- if (e.skip || e.excludeBegin || e.returnBegin)
515
- throw D("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), X;
516
- if (typeof e.beginScope != "object" || e.beginScope === null)
517
- throw D("beginScope must be object"), X;
518
- Te(e, e.begin, { key: "beginScope" }), e.begin = re(e.begin, { joinWith: "" });
678
+ function beginMultiClass(mode) {
679
+ if (!Array.isArray(mode.begin))
680
+ return;
681
+ if (mode.skip || mode.excludeBegin || mode.returnBegin) {
682
+ error("skip, excludeBegin, returnBegin not compatible with beginScope: {}");
683
+ throw MultiClassError;
684
+ }
685
+ if (typeof mode.beginScope !== "object" || mode.beginScope === null) {
686
+ error("beginScope must be object");
687
+ throw MultiClassError;
519
688
  }
689
+ remapScopeNames(mode, mode.begin, { key: "beginScope" });
690
+ mode.begin = _rewriteBackreferences(mode.begin, { joinWith: "" });
520
691
  }
521
- function Dt(e) {
522
- if (Array.isArray(e.end)) {
523
- if (e.skip || e.excludeEnd || e.returnEnd)
524
- throw D("skip, excludeEnd, returnEnd not compatible with endScope: {}"), X;
525
- if (typeof e.endScope != "object" || e.endScope === null)
526
- throw D("endScope must be object"), X;
527
- Te(e, e.end, { key: "endScope" }), e.end = re(e.end, { joinWith: "" });
692
+ function endMultiClass(mode) {
693
+ if (!Array.isArray(mode.end))
694
+ return;
695
+ if (mode.skip || mode.excludeEnd || mode.returnEnd) {
696
+ error("skip, excludeEnd, returnEnd not compatible with endScope: {}");
697
+ throw MultiClassError;
698
+ }
699
+ if (typeof mode.endScope !== "object" || mode.endScope === null) {
700
+ error("endScope must be object");
701
+ throw MultiClassError;
528
702
  }
703
+ remapScopeNames(mode, mode.end, { key: "endScope" });
704
+ mode.end = _rewriteBackreferences(mode.end, { joinWith: "" });
529
705
  }
530
- function Lt(e) {
531
- e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
706
+ function scopeSugar(mode) {
707
+ if (mode.scope && typeof mode.scope === "object" && mode.scope !== null) {
708
+ mode.beginScope = mode.scope;
709
+ delete mode.scope;
710
+ }
532
711
  }
533
- function Ct(e) {
534
- Lt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Bt(e), Dt(e);
712
+ function MultiClass(mode) {
713
+ scopeSugar(mode);
714
+ if (typeof mode.beginScope === "string") {
715
+ mode.beginScope = { _wrap: mode.beginScope };
716
+ }
717
+ if (typeof mode.endScope === "string") {
718
+ mode.endScope = { _wrap: mode.endScope };
719
+ }
720
+ beginMultiClass(mode);
721
+ endMultiClass(mode);
535
722
  }
536
- function Ht(e) {
537
- function t(c, r) {
723
+ function compileLanguage(language) {
724
+ function langRe(value, global) {
538
725
  return new RegExp(
539
- j(c),
540
- "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : "")
726
+ source(value),
727
+ "m" + (language.case_insensitive ? "i" : "") + (language.unicodeRegex ? "u" : "") + (global ? "g" : "")
541
728
  );
542
729
  }
543
- class i {
730
+ class MultiRegex {
544
731
  constructor() {
545
- this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
732
+ this.matchIndexes = {};
733
+ this.regexes = [];
734
+ this.matchAt = 1;
735
+ this.position = 0;
546
736
  }
547
737
  // @ts-ignore
548
- addRule(r, l) {
549
- l.position = this.position++, this.matchIndexes[this.matchAt] = l, this.regexes.push([l, r]), this.matchAt += ye(r) + 1;
738
+ addRule(re, opts) {
739
+ opts.position = this.position++;
740
+ this.matchIndexes[this.matchAt] = opts;
741
+ this.regexes.push([opts, re]);
742
+ this.matchAt += countMatchGroups(re) + 1;
550
743
  }
551
744
  compile() {
552
- this.regexes.length === 0 && (this.exec = () => null);
553
- const r = this.regexes.map((l) => l[1]);
554
- this.matcherRe = t(re(r, { joinWith: "|" }), !0), this.lastIndex = 0;
745
+ if (this.regexes.length === 0) {
746
+ this.exec = () => null;
747
+ }
748
+ const terminators = this.regexes.map((el) => el[1]);
749
+ this.matcherRe = langRe(_rewriteBackreferences(terminators, { joinWith: "|" }), true);
750
+ this.lastIndex = 0;
555
751
  }
556
752
  /** @param {string} s */
557
- exec(r) {
753
+ exec(s) {
558
754
  this.matcherRe.lastIndex = this.lastIndex;
559
- const l = this.matcherRe.exec(r);
560
- if (!l)
755
+ const match = this.matcherRe.exec(s);
756
+ if (!match) {
561
757
  return null;
562
- const x = l.findIndex((H, Z) => Z > 0 && H !== void 0), w = this.matchIndexes[x];
563
- return l.splice(0, x), Object.assign(l, w);
758
+ }
759
+ const i = match.findIndex((el, i2) => i2 > 0 && el !== void 0);
760
+ const matchData = this.matchIndexes[i];
761
+ match.splice(0, i);
762
+ return Object.assign(match, matchData);
564
763
  }
565
764
  }
566
- class f {
765
+ class ResumableMultiRegex {
567
766
  constructor() {
568
- this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
767
+ this.rules = [];
768
+ this.multiRegexes = [];
769
+ this.count = 0;
770
+ this.lastIndex = 0;
771
+ this.regexIndex = 0;
569
772
  }
570
773
  // @ts-ignore
571
- getMatcher(r) {
572
- if (this.multiRegexes[r])
573
- return this.multiRegexes[r];
574
- const l = new i();
575
- return this.rules.slice(r).forEach(([x, w]) => l.addRule(x, w)), l.compile(), this.multiRegexes[r] = l, l;
774
+ getMatcher(index) {
775
+ if (this.multiRegexes[index])
776
+ return this.multiRegexes[index];
777
+ const matcher = new MultiRegex();
778
+ this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
779
+ matcher.compile();
780
+ this.multiRegexes[index] = matcher;
781
+ return matcher;
576
782
  }
577
783
  resumingScanAtSamePosition() {
578
784
  return this.regexIndex !== 0;
@@ -581,89 +787,173 @@ function Ht(e) {
581
787
  this.regexIndex = 0;
582
788
  }
583
789
  // @ts-ignore
584
- addRule(r, l) {
585
- this.rules.push([r, l]), l.type === "begin" && this.count++;
790
+ addRule(re, opts) {
791
+ this.rules.push([re, opts]);
792
+ if (opts.type === "begin")
793
+ this.count++;
586
794
  }
587
795
  /** @param {string} s */
588
- exec(r) {
589
- const l = this.getMatcher(this.regexIndex);
590
- l.lastIndex = this.lastIndex;
591
- let x = l.exec(r);
592
- if (this.resumingScanAtSamePosition() && !(x && x.index === this.lastIndex)) {
593
- const w = this.getMatcher(0);
594
- w.lastIndex = this.lastIndex + 1, x = w.exec(r);
796
+ exec(s) {
797
+ const m = this.getMatcher(this.regexIndex);
798
+ m.lastIndex = this.lastIndex;
799
+ let result = m.exec(s);
800
+ if (this.resumingScanAtSamePosition()) {
801
+ if (result && result.index === this.lastIndex)
802
+ ;
803
+ else {
804
+ const m2 = this.getMatcher(0);
805
+ m2.lastIndex = this.lastIndex + 1;
806
+ result = m2.exec(s);
807
+ }
595
808
  }
596
- return x && (this.regexIndex += x.position + 1, this.regexIndex === this.count && this.considerAll()), x;
809
+ if (result) {
810
+ this.regexIndex += result.position + 1;
811
+ if (this.regexIndex === this.count) {
812
+ this.considerAll();
813
+ }
814
+ }
815
+ return result;
597
816
  }
598
817
  }
599
- function b(c) {
600
- const r = new f();
601
- return c.contains.forEach((l) => r.addRule(l.begin, { rule: l, type: "begin" })), c.terminatorEnd && r.addRule(c.terminatorEnd, { type: "end" }), c.illegal && r.addRule(c.illegal, { type: "illegal" }), r;
818
+ function buildModeRegex(mode) {
819
+ const mm = new ResumableMultiRegex();
820
+ mode.contains.forEach((term) => mm.addRule(term.begin, { rule: term, type: "begin" }));
821
+ if (mode.terminatorEnd) {
822
+ mm.addRule(mode.terminatorEnd, { type: "end" });
823
+ }
824
+ if (mode.illegal) {
825
+ mm.addRule(mode.illegal, { type: "illegal" });
826
+ }
827
+ return mm;
602
828
  }
603
- function _(c, r) {
604
- const l = (
829
+ function compileMode(mode, parent) {
830
+ const cmode = (
605
831
  /** @type CompiledMode */
606
- c
832
+ mode
607
833
  );
608
- if (c.isCompiled)
609
- return l;
834
+ if (mode.isCompiled)
835
+ return cmode;
610
836
  [
611
- Ot,
837
+ scopeClassName,
612
838
  // do this early so compiler extensions generally don't have to worry about
613
839
  // the distinction between match/begin
614
- St,
615
- Ct,
616
- At
617
- ].forEach((w) => w(c, r)), e.compilerExtensions.forEach((w) => w(c, r)), c.__beforeBegin = null, [
618
- yt,
840
+ compileMatch,
841
+ MultiClass,
842
+ beforeMatchExt
843
+ ].forEach((ext) => ext(mode, parent));
844
+ language.compilerExtensions.forEach((ext) => ext(mode, parent));
845
+ mode.__beforeBegin = null;
846
+ [
847
+ beginKeywords,
619
848
  // do this later so compiler extensions that come earlier have access to the
620
849
  // raw array if they wanted to perhaps manipulate it, etc.
621
- Rt,
850
+ compileIllegal,
622
851
  // default to 1 relevance if not specified
623
- Nt
624
- ].forEach((w) => w(c, r)), c.isCompiled = !0;
625
- let x = null;
626
- return typeof c.keywords == "object" && c.keywords.$pattern && (c.keywords = Object.assign({}, c.keywords), x = c.keywords.$pattern, delete c.keywords.$pattern), x = x || /\w+/, c.keywords && (c.keywords = ke(c.keywords, e.case_insensitive)), l.keywordPatternRe = t(x, !0), r && (c.begin || (c.begin = /\B|\b/), l.beginRe = t(l.begin), !c.end && !c.endsWithParent && (c.end = /\B|\b/), c.end && (l.endRe = t(l.end)), l.terminatorEnd = j(l.end) || "", c.endsWithParent && r.terminatorEnd && (l.terminatorEnd += (c.end ? "|" : "") + r.terminatorEnd)), c.illegal && (l.illegalRe = t(
627
- /** @type {RegExp | string} */
628
- c.illegal
629
- )), c.contains || (c.contains = []), c.contains = [].concat(...c.contains.map(function(w) {
630
- return jt(w === "self" ? c : w);
631
- })), c.contains.forEach(function(w) {
632
- _(
852
+ compileRelevance
853
+ ].forEach((ext) => ext(mode, parent));
854
+ mode.isCompiled = true;
855
+ let keywordPattern = null;
856
+ if (typeof mode.keywords === "object" && mode.keywords.$pattern) {
857
+ mode.keywords = Object.assign({}, mode.keywords);
858
+ keywordPattern = mode.keywords.$pattern;
859
+ delete mode.keywords.$pattern;
860
+ }
861
+ keywordPattern = keywordPattern || /\w+/;
862
+ if (mode.keywords) {
863
+ mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
864
+ }
865
+ cmode.keywordPatternRe = langRe(keywordPattern, true);
866
+ if (parent) {
867
+ if (!mode.begin)
868
+ mode.begin = /\B|\b/;
869
+ cmode.beginRe = langRe(cmode.begin);
870
+ if (!mode.end && !mode.endsWithParent)
871
+ mode.end = /\B|\b/;
872
+ if (mode.end)
873
+ cmode.endRe = langRe(cmode.end);
874
+ cmode.terminatorEnd = source(cmode.end) || "";
875
+ if (mode.endsWithParent && parent.terminatorEnd) {
876
+ cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd;
877
+ }
878
+ }
879
+ if (mode.illegal)
880
+ cmode.illegalRe = langRe(
881
+ /** @type {RegExp | string} */
882
+ mode.illegal
883
+ );
884
+ if (!mode.contains)
885
+ mode.contains = [];
886
+ mode.contains = [].concat(...mode.contains.map(function(c) {
887
+ return expandOrCloneMode(c === "self" ? mode : c);
888
+ }));
889
+ mode.contains.forEach(function(c) {
890
+ compileMode(
633
891
  /** @type Mode */
634
- w,
635
- l
892
+ c,
893
+ cmode
636
894
  );
637
- }), c.starts && _(c.starts, r), l.matcher = b(l), l;
895
+ });
896
+ if (mode.starts) {
897
+ compileMode(mode.starts, parent);
898
+ }
899
+ cmode.matcher = buildModeRegex(cmode);
900
+ return cmode;
638
901
  }
639
- if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
902
+ if (!language.compilerExtensions)
903
+ language.compilerExtensions = [];
904
+ if (language.contains && language.contains.includes("self")) {
640
905
  throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
641
- return e.classNameAliases = v(e.classNameAliases || {}), _(
906
+ }
907
+ language.classNameAliases = inherit$1(language.classNameAliases || {});
908
+ return compileMode(
642
909
  /** @type Mode */
643
- e
910
+ language
644
911
  );
645
912
  }
646
- function Ie(e) {
647
- return e ? e.endsWithParent || Ie(e.starts) : !1;
913
+ function dependencyOnParent(mode) {
914
+ if (!mode)
915
+ return false;
916
+ return mode.endsWithParent || dependencyOnParent(mode.starts);
648
917
  }
649
- function jt(e) {
650
- return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
651
- return v(e, { variants: null }, t);
652
- })), e.cachedVariants ? e.cachedVariants : Ie(e) ? v(e, { starts: e.starts ? v(e.starts) : null }) : Object.isFrozen(e) ? v(e) : e;
918
+ function expandOrCloneMode(mode) {
919
+ if (mode.variants && !mode.cachedVariants) {
920
+ mode.cachedVariants = mode.variants.map(function(variant) {
921
+ return inherit$1(mode, { variants: null }, variant);
922
+ });
923
+ }
924
+ if (mode.cachedVariants) {
925
+ return mode.cachedVariants;
926
+ }
927
+ if (dependencyOnParent(mode)) {
928
+ return inherit$1(mode, { starts: mode.starts ? inherit$1(mode.starts) : null });
929
+ }
930
+ if (Object.isFrozen(mode)) {
931
+ return inherit$1(mode);
932
+ }
933
+ return mode;
653
934
  }
654
- var Pt = "11.7.0";
655
- class Ut extends Error {
656
- constructor(t, i) {
657
- super(t), this.name = "HTMLInjectionError", this.html = i;
935
+ var version = "11.7.0";
936
+ class HTMLInjectionError extends Error {
937
+ constructor(reason, html) {
938
+ super(reason);
939
+ this.name = "HTMLInjectionError";
940
+ this.html = html;
658
941
  }
659
942
  }
660
- const ee = xe, we = v, Me = Symbol("nomatch"), $t = 7, Gt = function(e) {
661
- const t = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null), f = [];
662
- let b = !0;
663
- const _ = "Could not find the language '{}', did you forget to load/include a language module?", c = { disableAutodetect: !0, name: "Plain text", contains: [] };
664
- let r = {
665
- ignoreUnescapedHTML: !1,
666
- throwUnescapedHTML: !1,
943
+ const escape = escapeHTML;
944
+ const inherit = inherit$1;
945
+ const NO_MATCH = Symbol("nomatch");
946
+ const MAX_KEYWORD_HITS = 7;
947
+ const HLJS = function(hljs) {
948
+ const languages = /* @__PURE__ */ Object.create(null);
949
+ const aliases = /* @__PURE__ */ Object.create(null);
950
+ const plugins = [];
951
+ let SAFE_MODE = true;
952
+ const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
953
+ const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] };
954
+ let options = {
955
+ ignoreUnescapedHTML: false,
956
+ throwUnescapedHTML: false,
667
957
  noHighlightRe: /^(no-?highlight)$/i,
668
958
  languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
669
959
  classPrefix: "hljs-",
@@ -671,394 +961,613 @@ const ee = xe, we = v, Me = Symbol("nomatch"), $t = 7, Gt = function(e) {
671
961
  languages: null,
672
962
  // beta configuration options, subject to change, welcome to discuss
673
963
  // https://github.com/highlightjs/highlight.js/issues/1086
674
- __emitter: Qe
964
+ __emitter: TokenTreeEmitter
675
965
  };
676
- function l(n) {
677
- return r.noHighlightRe.test(n);
678
- }
679
- function x(n) {
680
- let a = n.className + " ";
681
- a += n.parentNode ? n.parentNode.className : "";
682
- const h = r.languageDetectRe.exec(a);
683
- if (h) {
684
- const p = A(h[1]);
685
- return p || (_e(_.replace("{}", h[1])), _e("Falling back to no-highlight mode for this block.", n)), p ? h[1] : "no-highlight";
966
+ function shouldNotHighlight(languageName) {
967
+ return options.noHighlightRe.test(languageName);
968
+ }
969
+ function blockLanguage(block) {
970
+ let classes = block.className + " ";
971
+ classes += block.parentNode ? block.parentNode.className : "";
972
+ const match = options.languageDetectRe.exec(classes);
973
+ if (match) {
974
+ const language = getLanguage(match[1]);
975
+ if (!language) {
976
+ warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
977
+ warn("Falling back to no-highlight mode for this block.", block);
978
+ }
979
+ return language ? match[1] : "no-highlight";
980
+ }
981
+ return classes.split(/\s+/).find((_class) => shouldNotHighlight(_class) || getLanguage(_class));
982
+ }
983
+ function highlight2(codeOrLanguageName, optionsOrCode, ignoreIllegals) {
984
+ let code = "";
985
+ let languageName = "";
986
+ if (typeof optionsOrCode === "object") {
987
+ code = codeOrLanguageName;
988
+ ignoreIllegals = optionsOrCode.ignoreIllegals;
989
+ languageName = optionsOrCode.language;
990
+ } else {
991
+ deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
992
+ deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
993
+ languageName = codeOrLanguageName;
994
+ code = optionsOrCode;
995
+ }
996
+ if (ignoreIllegals === void 0) {
997
+ ignoreIllegals = true;
686
998
  }
687
- return a.split(/\s+/).find((p) => l(p) || A(p));
688
- }
689
- function w(n, a, h) {
690
- let p = "", M = "";
691
- typeof a == "object" ? (p = n, h = a.ignoreIllegals, M = a.language) : (C("10.7.0", "highlight(lang, code, ...args) has been deprecated."), C("10.7.0", `Please use highlight(code, options) instead.
692
- https://github.com/highlightjs/highlight.js/issues/2277`), M = n, p = a), h === void 0 && (h = !0);
693
- const S = {
694
- code: p,
695
- language: M
999
+ const context = {
1000
+ code,
1001
+ language: languageName
696
1002
  };
697
- G("before:highlight", S);
698
- const k = S.result ? S.result : H(S.language, S.code, h);
699
- return k.code = S.code, G("after:highlight", k), k;
700
- }
701
- function H(n, a, h, p) {
702
- const M = /* @__PURE__ */ Object.create(null);
703
- function S(s, o) {
704
- return s.keywords[o];
1003
+ fire("before:highlight", context);
1004
+ const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals);
1005
+ result.code = context.code;
1006
+ fire("after:highlight", result);
1007
+ return result;
1008
+ }
1009
+ function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
1010
+ const keywordHits = /* @__PURE__ */ Object.create(null);
1011
+ function keywordData(mode, matchText) {
1012
+ return mode.keywords[matchText];
705
1013
  }
706
- function k() {
707
- if (!u.keywords) {
708
- O.addText(E);
1014
+ function processKeywords() {
1015
+ if (!top.keywords) {
1016
+ emitter.addText(modeBuffer);
709
1017
  return;
710
1018
  }
711
- let s = 0;
712
- u.keywordPatternRe.lastIndex = 0;
713
- let o = u.keywordPatternRe.exec(E), g = "";
714
- for (; o; ) {
715
- g += E.substring(s, o.index);
716
- const d = I.case_insensitive ? o[0].toLowerCase() : o[0], y = S(u, d);
717
- if (y) {
718
- const [N, Ye] = y;
719
- if (O.addText(g), g = "", M[d] = (M[d] || 0) + 1, M[d] <= $t && (z += Ye), N.startsWith("_"))
720
- g += o[0];
721
- else {
722
- const Ze = I.classNameAliases[N] || N;
723
- O.addKeyword(o[0], Ze);
1019
+ let lastIndex = 0;
1020
+ top.keywordPatternRe.lastIndex = 0;
1021
+ let match = top.keywordPatternRe.exec(modeBuffer);
1022
+ let buf = "";
1023
+ while (match) {
1024
+ buf += modeBuffer.substring(lastIndex, match.index);
1025
+ const word = language.case_insensitive ? match[0].toLowerCase() : match[0];
1026
+ const data = keywordData(top, word);
1027
+ if (data) {
1028
+ const [kind, keywordRelevance] = data;
1029
+ emitter.addText(buf);
1030
+ buf = "";
1031
+ keywordHits[word] = (keywordHits[word] || 0) + 1;
1032
+ if (keywordHits[word] <= MAX_KEYWORD_HITS)
1033
+ relevance += keywordRelevance;
1034
+ if (kind.startsWith("_")) {
1035
+ buf += match[0];
1036
+ } else {
1037
+ const cssClass = language.classNameAliases[kind] || kind;
1038
+ emitter.addKeyword(match[0], cssClass);
724
1039
  }
725
- } else
726
- g += o[0];
727
- s = u.keywordPatternRe.lastIndex, o = u.keywordPatternRe.exec(E);
1040
+ } else {
1041
+ buf += match[0];
1042
+ }
1043
+ lastIndex = top.keywordPatternRe.lastIndex;
1044
+ match = top.keywordPatternRe.exec(modeBuffer);
728
1045
  }
729
- g += E.substring(s), O.addText(g);
1046
+ buf += modeBuffer.substring(lastIndex);
1047
+ emitter.addText(buf);
730
1048
  }
731
- function K() {
732
- if (E === "")
1049
+ function processSubLanguage() {
1050
+ if (modeBuffer === "")
733
1051
  return;
734
- let s = null;
735
- if (typeof u.subLanguage == "string") {
736
- if (!t[u.subLanguage]) {
737
- O.addText(E);
1052
+ let result2 = null;
1053
+ if (typeof top.subLanguage === "string") {
1054
+ if (!languages[top.subLanguage]) {
1055
+ emitter.addText(modeBuffer);
738
1056
  return;
739
1057
  }
740
- s = H(u.subLanguage, E, !0, he[u.subLanguage]), he[u.subLanguage] = /** @type {CompiledMode} */
741
- s._top;
742
- } else
743
- s = J(E, u.subLanguage.length ? u.subLanguage : null);
744
- u.relevance > 0 && (z += s.relevance), O.addSublanguage(s._emitter, s.language);
1058
+ result2 = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
1059
+ continuations[top.subLanguage] = /** @type {CompiledMode} */
1060
+ result2._top;
1061
+ } else {
1062
+ result2 = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
1063
+ }
1064
+ if (top.relevance > 0) {
1065
+ relevance += result2.relevance;
1066
+ }
1067
+ emitter.addSublanguage(result2._emitter, result2.language);
745
1068
  }
746
- function R() {
747
- u.subLanguage != null ? K() : k(), E = "";
1069
+ function processBuffer() {
1070
+ if (top.subLanguage != null) {
1071
+ processSubLanguage();
1072
+ } else {
1073
+ processKeywords();
1074
+ }
1075
+ modeBuffer = "";
748
1076
  }
749
- function T(s, o) {
750
- let g = 1;
751
- const d = o.length - 1;
752
- for (; g <= d; ) {
753
- if (!s._emit[g]) {
754
- g++;
1077
+ function emitMultiClass(scope, match) {
1078
+ let i = 1;
1079
+ const max = match.length - 1;
1080
+ while (i <= max) {
1081
+ if (!scope._emit[i]) {
1082
+ i++;
755
1083
  continue;
756
1084
  }
757
- const y = I.classNameAliases[s[g]] || s[g], N = o[g];
758
- y ? O.addKeyword(N, y) : (E = N, k(), E = ""), g++;
1085
+ const klass = language.classNameAliases[scope[i]] || scope[i];
1086
+ const text = match[i];
1087
+ if (klass) {
1088
+ emitter.addKeyword(text, klass);
1089
+ } else {
1090
+ modeBuffer = text;
1091
+ processKeywords();
1092
+ modeBuffer = "";
1093
+ }
1094
+ i++;
759
1095
  }
760
1096
  }
761
- function ue(s, o) {
762
- return s.scope && typeof s.scope == "string" && O.openNode(I.classNameAliases[s.scope] || s.scope), s.beginScope && (s.beginScope._wrap ? (O.addKeyword(E, I.classNameAliases[s.beginScope._wrap] || s.beginScope._wrap), E = "") : s.beginScope._multi && (T(s.beginScope, o), E = "")), u = Object.create(s, { parent: { value: u } }), u;
1097
+ function startNewMode(mode, match) {
1098
+ if (mode.scope && typeof mode.scope === "string") {
1099
+ emitter.openNode(language.classNameAliases[mode.scope] || mode.scope);
1100
+ }
1101
+ if (mode.beginScope) {
1102
+ if (mode.beginScope._wrap) {
1103
+ emitter.addKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap);
1104
+ modeBuffer = "";
1105
+ } else if (mode.beginScope._multi) {
1106
+ emitMultiClass(mode.beginScope, match);
1107
+ modeBuffer = "";
1108
+ }
1109
+ }
1110
+ top = Object.create(mode, { parent: { value: top } });
1111
+ return top;
763
1112
  }
764
- function fe(s, o, g) {
765
- let d = nt(s.endRe, g);
766
- if (d) {
767
- if (s["on:end"]) {
768
- const y = new de(s);
769
- s["on:end"](o, y), y.isMatchIgnored && (d = !1);
1113
+ function endOfMode(mode, match, matchPlusRemainder) {
1114
+ let matched = startsWith(mode.endRe, matchPlusRemainder);
1115
+ if (matched) {
1116
+ if (mode["on:end"]) {
1117
+ const resp = new Response(mode);
1118
+ mode["on:end"](match, resp);
1119
+ if (resp.isMatchIgnored)
1120
+ matched = false;
770
1121
  }
771
- if (d) {
772
- for (; s.endsParent && s.parent; )
773
- s = s.parent;
774
- return s;
1122
+ if (matched) {
1123
+ while (mode.endsParent && mode.parent) {
1124
+ mode = mode.parent;
1125
+ }
1126
+ return mode;
775
1127
  }
776
1128
  }
777
- if (s.endsWithParent)
778
- return fe(s.parent, o, g);
1129
+ if (mode.endsWithParent) {
1130
+ return endOfMode(mode.parent, match, matchPlusRemainder);
1131
+ }
779
1132
  }
780
- function Ke(s) {
781
- return u.matcher.regexIndex === 0 ? (E += s[0], 1) : (m = !0, 0);
1133
+ function doIgnore(lexeme) {
1134
+ if (top.matcher.regexIndex === 0) {
1135
+ modeBuffer += lexeme[0];
1136
+ return 1;
1137
+ } else {
1138
+ resumeScanAtSamePosition = true;
1139
+ return 0;
1140
+ }
782
1141
  }
783
- function We(s) {
784
- const o = s[0], g = s.rule, d = new de(g), y = [g.__beforeBegin, g["on:begin"]];
785
- for (const N of y)
786
- if (N && (N(s, d), d.isMatchIgnored))
787
- return Ke(o);
788
- return g.skip ? E += o : (g.excludeBegin && (E += o), R(), !g.returnBegin && !g.excludeBegin && (E = o)), ue(g, s), g.returnBegin ? 0 : o.length;
1142
+ function doBeginMatch(match) {
1143
+ const lexeme = match[0];
1144
+ const newMode = match.rule;
1145
+ const resp = new Response(newMode);
1146
+ const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
1147
+ for (const cb of beforeCallbacks) {
1148
+ if (!cb)
1149
+ continue;
1150
+ cb(match, resp);
1151
+ if (resp.isMatchIgnored)
1152
+ return doIgnore(lexeme);
1153
+ }
1154
+ if (newMode.skip) {
1155
+ modeBuffer += lexeme;
1156
+ } else {
1157
+ if (newMode.excludeBegin) {
1158
+ modeBuffer += lexeme;
1159
+ }
1160
+ processBuffer();
1161
+ if (!newMode.returnBegin && !newMode.excludeBegin) {
1162
+ modeBuffer = lexeme;
1163
+ }
1164
+ }
1165
+ startNewMode(newMode, match);
1166
+ return newMode.returnBegin ? 0 : lexeme.length;
789
1167
  }
790
- function ze(s) {
791
- const o = s[0], g = a.substring(s.index), d = fe(u, s, g);
792
- if (!d)
793
- return Me;
794
- const y = u;
795
- u.endScope && u.endScope._wrap ? (R(), O.addKeyword(o, u.endScope._wrap)) : u.endScope && u.endScope._multi ? (R(), T(u.endScope, s)) : y.skip ? E += o : (y.returnEnd || y.excludeEnd || (E += o), R(), y.excludeEnd && (E = o));
796
- do
797
- u.scope && O.closeNode(), !u.skip && !u.subLanguage && (z += u.relevance), u = u.parent;
798
- while (u !== d.parent);
799
- return d.starts && ue(d.starts, s), y.returnEnd ? 0 : o.length;
1168
+ function doEndMatch(match) {
1169
+ const lexeme = match[0];
1170
+ const matchPlusRemainder = codeToHighlight.substring(match.index);
1171
+ const endMode = endOfMode(top, match, matchPlusRemainder);
1172
+ if (!endMode) {
1173
+ return NO_MATCH;
1174
+ }
1175
+ const origin = top;
1176
+ if (top.endScope && top.endScope._wrap) {
1177
+ processBuffer();
1178
+ emitter.addKeyword(lexeme, top.endScope._wrap);
1179
+ } else if (top.endScope && top.endScope._multi) {
1180
+ processBuffer();
1181
+ emitMultiClass(top.endScope, match);
1182
+ } else if (origin.skip) {
1183
+ modeBuffer += lexeme;
1184
+ } else {
1185
+ if (!(origin.returnEnd || origin.excludeEnd)) {
1186
+ modeBuffer += lexeme;
1187
+ }
1188
+ processBuffer();
1189
+ if (origin.excludeEnd) {
1190
+ modeBuffer = lexeme;
1191
+ }
1192
+ }
1193
+ do {
1194
+ if (top.scope) {
1195
+ emitter.closeNode();
1196
+ }
1197
+ if (!top.skip && !top.subLanguage) {
1198
+ relevance += top.relevance;
1199
+ }
1200
+ top = top.parent;
1201
+ } while (top !== endMode.parent);
1202
+ if (endMode.starts) {
1203
+ startNewMode(endMode.starts, match);
1204
+ }
1205
+ return origin.returnEnd ? 0 : lexeme.length;
800
1206
  }
801
- function Fe() {
802
- const s = [];
803
- for (let o = u; o !== I; o = o.parent)
804
- o.scope && s.unshift(o.scope);
805
- s.forEach((o) => O.openNode(o));
1207
+ function processContinuations() {
1208
+ const list = [];
1209
+ for (let current = top; current !== language; current = current.parent) {
1210
+ if (current.scope) {
1211
+ list.unshift(current.scope);
1212
+ }
1213
+ }
1214
+ list.forEach((item) => emitter.openNode(item));
806
1215
  }
807
- let W = {};
808
- function ge(s, o) {
809
- const g = o && o[0];
810
- if (E += s, g == null)
811
- return R(), 0;
812
- if (W.type === "begin" && o.type === "end" && W.index === o.index && g === "") {
813
- if (E += a.slice(o.index, o.index + 1), !b) {
814
- const d = new Error(`0 width match regex (${n})`);
815
- throw d.languageName = n, d.badRule = W.rule, d;
1216
+ let lastMatch = {};
1217
+ function processLexeme(textBeforeMatch, match) {
1218
+ const lexeme = match && match[0];
1219
+ modeBuffer += textBeforeMatch;
1220
+ if (lexeme == null) {
1221
+ processBuffer();
1222
+ return 0;
1223
+ }
1224
+ if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
1225
+ modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
1226
+ if (!SAFE_MODE) {
1227
+ const err = new Error(`0 width match regex (${languageName})`);
1228
+ err.languageName = languageName;
1229
+ err.badRule = lastMatch.rule;
1230
+ throw err;
816
1231
  }
817
1232
  return 1;
818
1233
  }
819
- if (W = o, o.type === "begin")
820
- return We(o);
821
- if (o.type === "illegal" && !h) {
822
- const d = new Error('Illegal lexeme "' + g + '" for mode "' + (u.scope || "<unnamed>") + '"');
823
- throw d.mode = u, d;
824
- } else if (o.type === "end") {
825
- const d = ze(o);
826
- if (d !== Me)
827
- return d;
1234
+ lastMatch = match;
1235
+ if (match.type === "begin") {
1236
+ return doBeginMatch(match);
1237
+ } else if (match.type === "illegal" && !ignoreIllegals) {
1238
+ const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.scope || "<unnamed>") + '"');
1239
+ err.mode = top;
1240
+ throw err;
1241
+ } else if (match.type === "end") {
1242
+ const processed = doEndMatch(match);
1243
+ if (processed !== NO_MATCH) {
1244
+ return processed;
1245
+ }
828
1246
  }
829
- if (o.type === "illegal" && g === "")
1247
+ if (match.type === "illegal" && lexeme === "") {
830
1248
  return 1;
831
- if (Q > 1e5 && Q > o.index * 3)
832
- throw new Error("potential infinite loop, way more iterations than matches");
833
- return E += g, g.length;
1249
+ }
1250
+ if (iterations > 1e5 && iterations > match.index * 3) {
1251
+ const err = new Error("potential infinite loop, way more iterations than matches");
1252
+ throw err;
1253
+ }
1254
+ modeBuffer += lexeme;
1255
+ return lexeme.length;
1256
+ }
1257
+ const language = getLanguage(languageName);
1258
+ if (!language) {
1259
+ error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
1260
+ throw new Error('Unknown language: "' + languageName + '"');
834
1261
  }
835
- const I = A(n);
836
- if (!I)
837
- throw D(_.replace("{}", n)), new Error('Unknown language: "' + n + '"');
838
- const Xe = Ht(I);
839
- let q = "", u = p || Xe;
840
- const he = {}, O = new r.__emitter(r);
841
- Fe();
842
- let E = "", z = 0, B = 0, Q = 0, m = !1;
1262
+ const md = compileLanguage(language);
1263
+ let result = "";
1264
+ let top = continuation || md;
1265
+ const continuations = {};
1266
+ const emitter = new options.__emitter(options);
1267
+ processContinuations();
1268
+ let modeBuffer = "";
1269
+ let relevance = 0;
1270
+ let index = 0;
1271
+ let iterations = 0;
1272
+ let resumeScanAtSamePosition = false;
843
1273
  try {
844
- for (u.matcher.considerAll(); ; ) {
845
- Q++, m ? m = !1 : u.matcher.considerAll(), u.matcher.lastIndex = B;
846
- const s = u.matcher.exec(a);
847
- if (!s)
1274
+ top.matcher.considerAll();
1275
+ for (; ; ) {
1276
+ iterations++;
1277
+ if (resumeScanAtSamePosition) {
1278
+ resumeScanAtSamePosition = false;
1279
+ } else {
1280
+ top.matcher.considerAll();
1281
+ }
1282
+ top.matcher.lastIndex = index;
1283
+ const match = top.matcher.exec(codeToHighlight);
1284
+ if (!match)
848
1285
  break;
849
- const o = a.substring(B, s.index), g = ge(o, s);
850
- B = s.index + g;
1286
+ const beforeMatch = codeToHighlight.substring(index, match.index);
1287
+ const processedCount = processLexeme(beforeMatch, match);
1288
+ index = match.index + processedCount;
851
1289
  }
852
- return ge(a.substring(B)), O.closeAllNodes(), O.finalize(), q = O.toHTML(), {
853
- language: n,
854
- value: q,
855
- relevance: z,
856
- illegal: !1,
857
- _emitter: O,
858
- _top: u
1290
+ processLexeme(codeToHighlight.substring(index));
1291
+ emitter.closeAllNodes();
1292
+ emitter.finalize();
1293
+ result = emitter.toHTML();
1294
+ return {
1295
+ language: languageName,
1296
+ value: result,
1297
+ relevance,
1298
+ illegal: false,
1299
+ _emitter: emitter,
1300
+ _top: top
859
1301
  };
860
- } catch (s) {
861
- if (s.message && s.message.includes("Illegal"))
1302
+ } catch (err) {
1303
+ if (err.message && err.message.includes("Illegal")) {
862
1304
  return {
863
- language: n,
864
- value: ee(a),
865
- illegal: !0,
1305
+ language: languageName,
1306
+ value: escape(codeToHighlight),
1307
+ illegal: true,
866
1308
  relevance: 0,
867
1309
  _illegalBy: {
868
- message: s.message,
869
- index: B,
870
- context: a.slice(B - 100, B + 100),
871
- mode: s.mode,
872
- resultSoFar: q
1310
+ message: err.message,
1311
+ index,
1312
+ context: codeToHighlight.slice(index - 100, index + 100),
1313
+ mode: err.mode,
1314
+ resultSoFar: result
873
1315
  },
874
- _emitter: O
1316
+ _emitter: emitter
875
1317
  };
876
- if (b)
1318
+ } else if (SAFE_MODE) {
877
1319
  return {
878
- language: n,
879
- value: ee(a),
880
- illegal: !1,
1320
+ language: languageName,
1321
+ value: escape(codeToHighlight),
1322
+ illegal: false,
881
1323
  relevance: 0,
882
- errorRaised: s,
883
- _emitter: O,
884
- _top: u
1324
+ errorRaised: err,
1325
+ _emitter: emitter,
1326
+ _top: top
885
1327
  };
886
- throw s;
1328
+ } else {
1329
+ throw err;
1330
+ }
887
1331
  }
888
1332
  }
889
- function Z(n) {
890
- const a = {
891
- value: ee(n),
892
- illegal: !1,
1333
+ function justTextHighlightResult(code) {
1334
+ const result = {
1335
+ value: escape(code),
1336
+ illegal: false,
893
1337
  relevance: 0,
894
- _top: c,
895
- _emitter: new r.__emitter(r)
1338
+ _top: PLAINTEXT_LANGUAGE,
1339
+ _emitter: new options.__emitter(options)
896
1340
  };
897
- return a._emitter.addText(n), a;
1341
+ result._emitter.addText(code);
1342
+ return result;
898
1343
  }
899
- function J(n, a) {
900
- a = a || r.languages || Object.keys(t);
901
- const h = Z(n), p = a.filter(A).filter(le).map(
902
- (R) => H(R, n, !1)
1344
+ function highlightAuto(code, languageSubset) {
1345
+ languageSubset = languageSubset || options.languages || Object.keys(languages);
1346
+ const plaintext = justTextHighlightResult(code);
1347
+ const results = languageSubset.filter(getLanguage).filter(autoDetection).map(
1348
+ (name) => _highlight(name, code, false)
903
1349
  );
904
- p.unshift(h);
905
- const M = p.sort((R, T) => {
906
- if (R.relevance !== T.relevance)
907
- return T.relevance - R.relevance;
908
- if (R.language && T.language) {
909
- if (A(R.language).supersetOf === T.language)
1350
+ results.unshift(plaintext);
1351
+ const sorted = results.sort((a, b) => {
1352
+ if (a.relevance !== b.relevance)
1353
+ return b.relevance - a.relevance;
1354
+ if (a.language && b.language) {
1355
+ if (getLanguage(a.language).supersetOf === b.language) {
910
1356
  return 1;
911
- if (A(T.language).supersetOf === R.language)
1357
+ } else if (getLanguage(b.language).supersetOf === a.language) {
912
1358
  return -1;
1359
+ }
913
1360
  }
914
1361
  return 0;
915
- }), [S, k] = M, K = S;
916
- return K.secondBest = k, K;
1362
+ });
1363
+ const [best, secondBest] = sorted;
1364
+ const result = best;
1365
+ result.secondBest = secondBest;
1366
+ return result;
917
1367
  }
918
- function ve(n, a, h) {
919
- const p = a && i[a] || h;
920
- n.classList.add("hljs"), n.classList.add(`language-${p}`);
1368
+ function updateClassName(element, currentLang, resultLang) {
1369
+ const language = currentLang && aliases[currentLang] || resultLang;
1370
+ element.classList.add("hljs");
1371
+ element.classList.add(`language-${language}`);
921
1372
  }
922
- function V(n) {
923
- let a = null;
924
- const h = x(n);
925
- if (l(h))
1373
+ function highlightElement(element) {
1374
+ let node = null;
1375
+ const language = blockLanguage(element);
1376
+ if (shouldNotHighlight(language))
926
1377
  return;
927
- if (G(
1378
+ fire(
928
1379
  "before:highlightElement",
929
- { el: n, language: h }
930
- ), n.children.length > 0 && (r.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(n)), r.throwUnescapedHTML))
931
- throw new Ut(
932
- "One of your code blocks includes unescaped HTML.",
933
- n.innerHTML
934
- );
935
- a = n;
936
- const p = a.textContent, M = h ? w(p, { language: h, ignoreIllegals: !0 }) : J(p);
937
- n.innerHTML = M.value, ve(n, h, M.language), n.result = {
938
- language: M.language,
1380
+ { el: element, language }
1381
+ );
1382
+ if (element.children.length > 0) {
1383
+ if (!options.ignoreUnescapedHTML) {
1384
+ console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk.");
1385
+ console.warn("https://github.com/highlightjs/highlight.js/wiki/security");
1386
+ console.warn("The element with unescaped HTML:");
1387
+ console.warn(element);
1388
+ }
1389
+ if (options.throwUnescapedHTML) {
1390
+ const err = new HTMLInjectionError(
1391
+ "One of your code blocks includes unescaped HTML.",
1392
+ element.innerHTML
1393
+ );
1394
+ throw err;
1395
+ }
1396
+ }
1397
+ node = element;
1398
+ const text = node.textContent;
1399
+ const result = language ? highlight2(text, { language, ignoreIllegals: true }) : highlightAuto(text);
1400
+ element.innerHTML = result.value;
1401
+ updateClassName(element, language, result.language);
1402
+ element.result = {
1403
+ language: result.language,
939
1404
  // TODO: remove with version 11.0
940
- re: M.relevance,
941
- relevance: M.relevance
942
- }, M.secondBest && (n.secondBest = {
943
- language: M.secondBest.language,
944
- relevance: M.secondBest.relevance
945
- }), G("after:highlightElement", { el: n, result: M, text: p });
946
- }
947
- function Be(n) {
948
- r = we(r, n);
949
- }
950
- const De = () => {
951
- $(), C("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
1405
+ re: result.relevance,
1406
+ relevance: result.relevance
1407
+ };
1408
+ if (result.secondBest) {
1409
+ element.secondBest = {
1410
+ language: result.secondBest.language,
1411
+ relevance: result.secondBest.relevance
1412
+ };
1413
+ }
1414
+ fire("after:highlightElement", { el: element, result, text });
1415
+ }
1416
+ function configure(userOptions) {
1417
+ options = inherit(options, userOptions);
1418
+ }
1419
+ const initHighlighting = () => {
1420
+ highlightAll();
1421
+ deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
952
1422
  };
953
- function Le() {
954
- $(), C("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
1423
+ function initHighlightingOnLoad() {
1424
+ highlightAll();
1425
+ deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
955
1426
  }
956
- let oe = !1;
957
- function $() {
1427
+ let wantsHighlight = false;
1428
+ function highlightAll() {
958
1429
  if (document.readyState === "loading") {
959
- oe = !0;
1430
+ wantsHighlight = true;
960
1431
  return;
961
1432
  }
962
- document.querySelectorAll(r.cssSelector).forEach(V);
1433
+ const blocks = document.querySelectorAll(options.cssSelector);
1434
+ blocks.forEach(highlightElement);
1435
+ }
1436
+ function boot() {
1437
+ if (wantsHighlight)
1438
+ highlightAll();
963
1439
  }
964
- function Ce() {
965
- oe && $();
1440
+ if (typeof window !== "undefined" && window.addEventListener) {
1441
+ window.addEventListener("DOMContentLoaded", boot, false);
966
1442
  }
967
- typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", Ce, !1);
968
- function He(n, a) {
969
- let h = null;
1443
+ function registerLanguage(languageName, languageDefinition) {
1444
+ let lang = null;
970
1445
  try {
971
- h = a(e);
972
- } catch (p) {
973
- if (D("Language definition for '{}' could not be registered.".replace("{}", n)), b)
974
- D(p);
975
- else
976
- throw p;
977
- h = c;
1446
+ lang = languageDefinition(hljs);
1447
+ } catch (error$1) {
1448
+ error("Language definition for '{}' could not be registered.".replace("{}", languageName));
1449
+ if (!SAFE_MODE) {
1450
+ throw error$1;
1451
+ } else {
1452
+ error(error$1);
1453
+ }
1454
+ lang = PLAINTEXT_LANGUAGE;
1455
+ }
1456
+ if (!lang.name)
1457
+ lang.name = languageName;
1458
+ languages[languageName] = lang;
1459
+ lang.rawDefinition = languageDefinition.bind(null, hljs);
1460
+ if (lang.aliases) {
1461
+ registerAliases(lang.aliases, { languageName });
978
1462
  }
979
- h.name || (h.name = n), t[n] = h, h.rawDefinition = a.bind(null, e), h.aliases && ae(h.aliases, { languageName: n });
980
1463
  }
981
- function je(n) {
982
- delete t[n];
983
- for (const a of Object.keys(i))
984
- i[a] === n && delete i[a];
1464
+ function unregisterLanguage(languageName) {
1465
+ delete languages[languageName];
1466
+ for (const alias of Object.keys(aliases)) {
1467
+ if (aliases[alias] === languageName) {
1468
+ delete aliases[alias];
1469
+ }
1470
+ }
985
1471
  }
986
- function Pe() {
987
- return Object.keys(t);
1472
+ function listLanguages() {
1473
+ return Object.keys(languages);
988
1474
  }
989
- function A(n) {
990
- return n = (n || "").toLowerCase(), t[n] || t[i[n]];
1475
+ function getLanguage(name) {
1476
+ name = (name || "").toLowerCase();
1477
+ return languages[name] || languages[aliases[name]];
991
1478
  }
992
- function ae(n, { languageName: a }) {
993
- typeof n == "string" && (n = [n]), n.forEach((h) => {
994
- i[h.toLowerCase()] = a;
1479
+ function registerAliases(aliasList, { languageName }) {
1480
+ if (typeof aliasList === "string") {
1481
+ aliasList = [aliasList];
1482
+ }
1483
+ aliasList.forEach((alias) => {
1484
+ aliases[alias.toLowerCase()] = languageName;
995
1485
  });
996
1486
  }
997
- function le(n) {
998
- const a = A(n);
999
- return a && !a.disableAutodetect;
1487
+ function autoDetection(name) {
1488
+ const lang = getLanguage(name);
1489
+ return lang && !lang.disableAutodetect;
1000
1490
  }
1001
- function Ue(n) {
1002
- n["before:highlightBlock"] && !n["before:highlightElement"] && (n["before:highlightElement"] = (a) => {
1003
- n["before:highlightBlock"](
1004
- Object.assign({ block: a.el }, a)
1005
- );
1006
- }), n["after:highlightBlock"] && !n["after:highlightElement"] && (n["after:highlightElement"] = (a) => {
1007
- n["after:highlightBlock"](
1008
- Object.assign({ block: a.el }, a)
1009
- );
1010
- });
1491
+ function upgradePluginAPI(plugin) {
1492
+ if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) {
1493
+ plugin["before:highlightElement"] = (data) => {
1494
+ plugin["before:highlightBlock"](
1495
+ Object.assign({ block: data.el }, data)
1496
+ );
1497
+ };
1498
+ }
1499
+ if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) {
1500
+ plugin["after:highlightElement"] = (data) => {
1501
+ plugin["after:highlightBlock"](
1502
+ Object.assign({ block: data.el }, data)
1503
+ );
1504
+ };
1505
+ }
1011
1506
  }
1012
- function $e(n) {
1013
- Ue(n), f.push(n);
1507
+ function addPlugin(plugin) {
1508
+ upgradePluginAPI(plugin);
1509
+ plugins.push(plugin);
1014
1510
  }
1015
- function G(n, a) {
1016
- const h = n;
1017
- f.forEach(function(p) {
1018
- p[h] && p[h](a);
1511
+ function fire(event, args) {
1512
+ const cb = event;
1513
+ plugins.forEach(function(plugin) {
1514
+ if (plugin[cb]) {
1515
+ plugin[cb](args);
1516
+ }
1019
1517
  });
1020
1518
  }
1021
- function Ge(n) {
1022
- return C("10.7.0", "highlightBlock will be removed entirely in v12.0"), C("10.7.0", "Please use highlightElement now."), V(n);
1519
+ function deprecateHighlightBlock(el) {
1520
+ deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
1521
+ deprecated("10.7.0", "Please use highlightElement now.");
1522
+ return highlightElement(el);
1023
1523
  }
1024
- Object.assign(e, {
1025
- highlight: w,
1026
- highlightAuto: J,
1027
- highlightAll: $,
1028
- highlightElement: V,
1524
+ Object.assign(hljs, {
1525
+ highlight: highlight2,
1526
+ highlightAuto,
1527
+ highlightAll,
1528
+ highlightElement,
1029
1529
  // TODO: Remove with v12 API
1030
- highlightBlock: Ge,
1031
- configure: Be,
1032
- initHighlighting: De,
1033
- initHighlightingOnLoad: Le,
1034
- registerLanguage: He,
1035
- unregisterLanguage: je,
1036
- listLanguages: Pe,
1037
- getLanguage: A,
1038
- registerAliases: ae,
1039
- autoDetection: le,
1040
- inherit: we,
1041
- addPlugin: $e
1042
- }), e.debugMode = function() {
1043
- b = !1;
1044
- }, e.safeMode = function() {
1045
- b = !0;
1046
- }, e.versionString = Pt, e.regex = {
1047
- concat: L,
1048
- lookahead: Oe,
1049
- either: se,
1050
- optional: et,
1051
- anyNumberOfTimes: me
1530
+ highlightBlock: deprecateHighlightBlock,
1531
+ configure,
1532
+ initHighlighting,
1533
+ initHighlightingOnLoad,
1534
+ registerLanguage,
1535
+ unregisterLanguage,
1536
+ listLanguages,
1537
+ getLanguage,
1538
+ registerAliases,
1539
+ autoDetection,
1540
+ inherit,
1541
+ addPlugin
1542
+ });
1543
+ hljs.debugMode = function() {
1544
+ SAFE_MODE = false;
1545
+ };
1546
+ hljs.safeMode = function() {
1547
+ SAFE_MODE = true;
1548
+ };
1549
+ hljs.versionString = version;
1550
+ hljs.regex = {
1551
+ concat,
1552
+ lookahead,
1553
+ either,
1554
+ optional,
1555
+ anyNumberOfTimes
1052
1556
  };
1053
- for (const n in F)
1054
- typeof F[n] == "object" && te.exports(F[n]);
1055
- return Object.assign(e, F), e;
1557
+ for (const key in MODES) {
1558
+ if (typeof MODES[key] === "object") {
1559
+ deepFreezeEs6.exports(MODES[key]);
1560
+ }
1561
+ }
1562
+ Object.assign(hljs, MODES);
1563
+ return hljs;
1056
1564
  };
1057
- var U = Gt({}), Kt = U;
1058
- U.HighlightJS = U;
1059
- U.default = U;
1060
- const Wt = Kt;
1565
+ var highlight = HLJS({});
1566
+ var core = highlight;
1567
+ highlight.HighlightJS = highlight;
1568
+ highlight.default = highlight;
1569
+ const HighlightJS = core;
1061
1570
  export {
1062
- Kt as c,
1063
- Wt as default
1571
+ core as c,
1572
+ HighlightJS as default
1064
1573
  };