@touchvue/chat 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (876) hide show
  1. package/README.md +70 -0
  2. package/es/_virtual/_commonjsHelpers.mjs +6 -0
  3. package/es/_virtual/_commonjsHelpers.mjs.map +1 -0
  4. package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  5. package/es/_virtual/_plugin-vue_export-helper.mjs.map +1 -0
  6. package/es/_virtual/emphasis.mjs +4 -0
  7. package/es/_virtual/emphasis.mjs.map +1 -0
  8. package/es/_virtual/html_re.mjs +4 -0
  9. package/es/_virtual/html_re.mjs.map +1 -0
  10. package/es/_virtual/index.mjs +4 -0
  11. package/es/_virtual/index.mjs.map +1 -0
  12. package/es/_virtual/index2.mjs +4 -0
  13. package/es/_virtual/index2.mjs.map +1 -0
  14. package/es/_virtual/index3.mjs +4 -0
  15. package/es/_virtual/index3.mjs.map +1 -0
  16. package/es/_virtual/strikethrough.mjs +4 -0
  17. package/es/_virtual/strikethrough.mjs.map +1 -0
  18. package/es/_virtual/utils.mjs +4 -0
  19. package/es/_virtual/utils.mjs.map +1 -0
  20. package/es/assets/Avatar-AI-8c9ec26060b39bf7.png +0 -0
  21. package/es/assets/bgimage-ef345ea032b1fc13.png +0 -0
  22. package/es/assets/icon-ac4086674fbfd358.png +0 -0
  23. package/es/assets/link-45d328ddcc34e562.png +0 -0
  24. package/es/index.d.ts +9 -0
  25. package/es/index.mjs +30 -0
  26. package/es/index.mjs.map +1 -0
  27. package/es/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.mjs +4253 -0
  28. package/es/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.mjs.map +1 -0
  29. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.mjs +2524 -0
  30. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.mjs.map +1 -0
  31. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.mjs +120 -0
  32. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.mjs.map +1 -0
  33. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.mjs +201 -0
  34. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.mjs.map +1 -0
  35. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.mjs +176 -0
  36. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.mjs.map +1 -0
  37. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.mjs +508 -0
  38. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.mjs.map +1 -0
  39. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.mjs +316 -0
  40. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.mjs.map +1 -0
  41. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.mjs +471 -0
  42. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.mjs.map +1 -0
  43. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.mjs +448 -0
  44. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.mjs.map +1 -0
  45. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.mjs +615 -0
  46. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.mjs.map +1 -0
  47. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.mjs +278 -0
  48. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.mjs.map +1 -0
  49. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.mjs +206 -0
  50. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.mjs.map +1 -0
  51. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.mjs +133 -0
  52. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.mjs.map +1 -0
  53. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.mjs +93 -0
  54. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.mjs.map +1 -0
  55. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.mjs +206 -0
  56. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.mjs.map +1 -0
  57. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.mjs +166 -0
  58. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.mjs.map +1 -0
  59. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.mjs +93 -0
  60. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.mjs.map +1 -0
  61. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.mjs +81 -0
  62. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.mjs.map +1 -0
  63. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.mjs +181 -0
  64. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.mjs.map +1 -0
  65. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.mjs +331 -0
  66. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.mjs.map +1 -0
  67. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.mjs +180 -0
  68. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.mjs.map +1 -0
  69. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.mjs +359 -0
  70. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.mjs.map +1 -0
  71. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.mjs +180 -0
  72. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.mjs.map +1 -0
  73. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.mjs +188 -0
  74. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.mjs.map +1 -0
  75. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.mjs +70 -0
  76. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.mjs.map +1 -0
  77. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.mjs +57 -0
  78. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.mjs.map +1 -0
  79. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.mjs +423 -0
  80. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.mjs.map +1 -0
  81. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.mjs +291 -0
  82. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.mjs.map +1 -0
  83. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.mjs +118 -0
  84. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.mjs.map +1 -0
  85. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.mjs +89 -0
  86. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.mjs.map +1 -0
  87. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.mjs +113 -0
  88. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.mjs.map +1 -0
  89. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.mjs +128 -0
  90. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.mjs.map +1 -0
  91. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.mjs +522 -0
  92. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.mjs.map +1 -0
  93. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.mjs +211 -0
  94. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.mjs.map +1 -0
  95. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.mjs +338 -0
  96. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.mjs.map +1 -0
  97. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.mjs +109 -0
  98. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.mjs.map +1 -0
  99. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.mjs +453 -0
  100. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.mjs.map +1 -0
  101. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.mjs +238 -0
  102. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.mjs.map +1 -0
  103. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.mjs +394 -0
  104. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.mjs.map +1 -0
  105. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.mjs +153 -0
  106. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.mjs.map +1 -0
  107. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.mjs +140 -0
  108. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.mjs.map +1 -0
  109. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.mjs +147 -0
  110. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.mjs.map +1 -0
  111. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.mjs +214 -0
  112. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.mjs.map +1 -0
  113. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.mjs +37 -0
  114. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.mjs.map +1 -0
  115. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.mjs +706 -0
  116. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.mjs.map +1 -0
  117. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.mjs +880 -0
  118. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.mjs.map +1 -0
  119. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.mjs +704 -0
  120. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.mjs.map +1 -0
  121. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.mjs +31 -0
  122. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.mjs.map +1 -0
  123. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.mjs +116 -0
  124. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.mjs.map +1 -0
  125. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.mjs +638 -0
  126. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.mjs.map +1 -0
  127. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.mjs +196 -0
  128. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.mjs.map +1 -0
  129. package/es/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs +146 -0
  130. package/es/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs.map +1 -0
  131. package/es/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs +142 -0
  132. package/es/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs.map +1 -0
  133. package/es/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs +206 -0
  134. package/es/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs.map +1 -0
  135. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.mjs +24 -0
  136. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.mjs.map +1 -0
  137. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.mjs +1909 -0
  138. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.mjs.map +1 -0
  139. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.mjs +45 -0
  140. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.mjs.map +1 -0
  141. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.mjs +18 -0
  142. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.mjs.map +1 -0
  143. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.mjs +61 -0
  144. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.mjs.map +1 -0
  145. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.mjs +6 -0
  146. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.mjs.map +1 -0
  147. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.mjs +88 -0
  148. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.mjs.map +1 -0
  149. package/es/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs +355 -0
  150. package/es/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs.map +1 -0
  151. package/es/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs +126 -0
  152. package/es/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs.map +1 -0
  153. package/es/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs +126 -0
  154. package/es/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs.map +1 -0
  155. package/es/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs +63 -0
  156. package/es/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs.map +1 -0
  157. package/es/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs +63 -0
  158. package/es/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs.map +1 -0
  159. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.mjs +9 -0
  160. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.mjs.map +1 -0
  161. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.mjs +7 -0
  162. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.mjs.map +1 -0
  163. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.mjs +67 -0
  164. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.mjs.map +1 -0
  165. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.mjs +29 -0
  166. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.mjs.map +1 -0
  167. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.mjs +324 -0
  168. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.mjs.map +1 -0
  169. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.mjs +11 -0
  170. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.mjs.map +1 -0
  171. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +83 -0
  172. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +1 -0
  173. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +44 -0
  174. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +1 -0
  175. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +56 -0
  176. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +1 -0
  177. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.mjs +596 -0
  178. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.mjs.map +1 -0
  179. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.mjs +138 -0
  180. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.mjs.map +1 -0
  181. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.mjs +69 -0
  182. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.mjs.map +1 -0
  183. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
  184. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.mjs.map +1 -0
  185. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.mjs +78 -0
  186. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.mjs.map +1 -0
  187. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.mjs +39 -0
  188. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.mjs.map +1 -0
  189. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.mjs +59 -0
  190. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.mjs.map +1 -0
  191. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.mjs +346 -0
  192. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.mjs.map +1 -0
  193. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.mjs +354 -0
  194. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.mjs.map +1 -0
  195. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.mjs +286 -0
  196. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +1 -0
  197. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.mjs +32 -0
  198. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.mjs.map +1 -0
  199. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.mjs +96 -0
  200. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.mjs.map +1 -0
  201. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.mjs +57 -0
  202. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.mjs.map +1 -0
  203. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.mjs +47 -0
  204. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.mjs.map +1 -0
  205. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.mjs +76 -0
  206. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +1 -0
  207. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.mjs +81 -0
  208. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +1 -0
  209. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.mjs +366 -0
  210. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.mjs.map +1 -0
  211. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.mjs +50 -0
  212. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +1 -0
  213. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.mjs +197 -0
  214. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.mjs.map +1 -0
  215. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.mjs +234 -0
  216. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +1 -0
  217. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.mjs +223 -0
  218. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.mjs.map +1 -0
  219. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.mjs +16 -0
  220. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.mjs.map +1 -0
  221. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.mjs +14 -0
  222. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.mjs.map +1 -0
  223. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.mjs +132 -0
  224. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +1 -0
  225. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.mjs +19 -0
  226. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +1 -0
  227. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.mjs +97 -0
  228. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +1 -0
  229. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +202 -0
  230. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +1 -0
  231. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.mjs +21 -0
  232. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +1 -0
  233. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.mjs +74 -0
  234. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +1 -0
  235. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.mjs +61 -0
  236. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +1 -0
  237. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +128 -0
  238. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +1 -0
  239. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +130 -0
  240. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +1 -0
  241. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.mjs +51 -0
  242. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +1 -0
  243. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.mjs +54 -0
  244. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +1 -0
  245. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +48 -0
  246. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +1 -0
  247. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.mjs +154 -0
  248. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.mjs.map +1 -0
  249. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.mjs +150 -0
  250. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.mjs.map +1 -0
  251. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.mjs +48 -0
  252. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +1 -0
  253. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +156 -0
  254. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +1 -0
  255. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +130 -0
  256. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +1 -0
  257. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.mjs +56 -0
  258. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.mjs.map +1 -0
  259. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.mjs +33 -0
  260. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.mjs.map +1 -0
  261. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.mjs +199 -0
  262. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.mjs.map +1 -0
  263. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.mjs +121 -0
  264. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.mjs.map +1 -0
  265. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.mjs +97 -0
  266. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.mjs.map +1 -0
  267. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.mjs +24 -0
  268. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.mjs.map +1 -0
  269. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.mjs +13 -0
  270. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.mjs.map +1 -0
  271. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.mjs +292 -0
  272. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.mjs.map +1 -0
  273. package/es/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.mjs +136 -0
  274. package/es/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.mjs.map +1 -0
  275. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.mjs +12 -0
  276. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.mjs.map +1 -0
  277. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.mjs +12 -0
  278. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.mjs.map +1 -0
  279. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.mjs +4 -0
  280. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.mjs.map +1 -0
  281. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.mjs +12 -0
  282. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.mjs.map +1 -0
  283. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.mjs +23 -0
  284. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.mjs.map +1 -0
  285. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.mjs +12 -0
  286. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.mjs.map +1 -0
  287. package/es/package.json.css +1 -0
  288. package/es/package.json.mjs +101 -0
  289. package/es/package.json.mjs.map +1 -0
  290. package/es/packages/components/index.mjs +3 -0
  291. package/es/packages/components/index.mjs.map +1 -0
  292. package/es/packages/components/package.json.mjs +36 -0
  293. package/es/packages/components/package.json.mjs.map +1 -0
  294. package/es/packages/components/resolver.mjs +31 -0
  295. package/es/packages/components/resolver.mjs.map +1 -0
  296. package/es/packages/components/touchchat/component/CardView.vue.mjs +7 -0
  297. package/es/packages/components/touchchat/component/CardView.vue.mjs.map +1 -0
  298. package/es/packages/components/touchchat/component/CardView.vue2.mjs +135 -0
  299. package/es/packages/components/touchchat/component/CardView.vue2.mjs.map +1 -0
  300. package/es/packages/components/touchchat/component/FileView.vue.mjs +7 -0
  301. package/es/packages/components/touchchat/component/FileView.vue.mjs.map +1 -0
  302. package/es/packages/components/touchchat/component/FileView.vue2.mjs +62 -0
  303. package/es/packages/components/touchchat/component/FileView.vue2.mjs.map +1 -0
  304. package/es/packages/components/touchchat/component/HelloChat.vue.mjs +7 -0
  305. package/es/packages/components/touchchat/component/HelloChat.vue.mjs.map +1 -0
  306. package/es/packages/components/touchchat/component/HelloChat.vue2.mjs +58 -0
  307. package/es/packages/components/touchchat/component/HelloChat.vue2.mjs.map +1 -0
  308. package/es/packages/components/touchchat/component/ImageView.vue.mjs +7 -0
  309. package/es/packages/components/touchchat/component/ImageView.vue.mjs.map +1 -0
  310. package/es/packages/components/touchchat/component/ImageView.vue2.mjs +31 -0
  311. package/es/packages/components/touchchat/component/ImageView.vue2.mjs.map +1 -0
  312. package/es/packages/components/touchchat/component/LinkView.vue.mjs +7 -0
  313. package/es/packages/components/touchchat/component/LinkView.vue.mjs.map +1 -0
  314. package/es/packages/components/touchchat/component/LinkView.vue2.mjs +75 -0
  315. package/es/packages/components/touchchat/component/LinkView.vue2.mjs.map +1 -0
  316. package/es/packages/components/touchchat/img/AI.png.mjs +4 -0
  317. package/es/packages/components/touchchat/img/AI.png.mjs.map +1 -0
  318. package/es/packages/components/touchchat/img/asir.png.mjs +4 -0
  319. package/es/packages/components/touchchat/img/asir.png.mjs.map +1 -0
  320. package/es/packages/components/touchchat/img/bgimage.png.mjs +4 -0
  321. package/es/packages/components/touchchat/img/bgimage.png.mjs.map +1 -0
  322. package/es/packages/components/touchchat/img/file.png.mjs +4 -0
  323. package/es/packages/components/touchchat/img/file.png.mjs.map +1 -0
  324. package/es/packages/components/touchchat/img/link.png.mjs +4 -0
  325. package/es/packages/components/touchchat/img/link.png.mjs.map +1 -0
  326. package/es/packages/components/touchchat/index.mjs +9 -0
  327. package/es/packages/components/touchchat/index.mjs.map +1 -0
  328. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs +7 -0
  329. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs.map +1 -0
  330. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs +342 -0
  331. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs.map +1 -0
  332. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs +7 -0
  333. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs.map +1 -0
  334. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs +182 -0
  335. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs.map +1 -0
  336. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs +7 -0
  337. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs.map +1 -0
  338. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs +450 -0
  339. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs.map +1 -0
  340. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs +7 -0
  341. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs.map +1 -0
  342. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs +105 -0
  343. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs.map +1 -0
  344. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs +7 -0
  345. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs.map +1 -0
  346. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs +267 -0
  347. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs.map +1 -0
  348. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs +7 -0
  349. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs.map +1 -0
  350. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs +843 -0
  351. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs.map +1 -0
  352. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs +7 -0
  353. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs.map +1 -0
  354. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs +212 -0
  355. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs.map +1 -0
  356. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs +7 -0
  357. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs.map +1 -0
  358. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs +133 -0
  359. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs.map +1 -0
  360. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue.mjs +7 -0
  361. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue.mjs.map +1 -0
  362. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.mjs +632 -0
  363. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.mjs.map +1 -0
  364. package/es/packages/components/touchchat/src/AiRobot/Content.vue.mjs +7 -0
  365. package/es/packages/components/touchchat/src/AiRobot/Content.vue.mjs.map +1 -0
  366. package/es/packages/components/touchchat/src/AiRobot/Content.vue2.mjs +263 -0
  367. package/es/packages/components/touchchat/src/AiRobot/Content.vue2.mjs.map +1 -0
  368. package/es/packages/components/touchchat/src/AiRobot/Header.vue.mjs +7 -0
  369. package/es/packages/components/touchchat/src/AiRobot/Header.vue.mjs.map +1 -0
  370. package/es/packages/components/touchchat/src/AiRobot/Header.vue2.mjs +197 -0
  371. package/es/packages/components/touchchat/src/AiRobot/Header.vue2.mjs.map +1 -0
  372. package/es/packages/components/touchchat/src/AiRobot/Input.vue.mjs +7 -0
  373. package/es/packages/components/touchchat/src/AiRobot/Input.vue.mjs.map +1 -0
  374. package/es/packages/components/touchchat/src/AiRobot/Input.vue2.mjs +67 -0
  375. package/es/packages/components/touchchat/src/AiRobot/Input.vue2.mjs.map +1 -0
  376. package/es/packages/components/touchchat/src/AiRobot/Scene.vue.mjs +7 -0
  377. package/es/packages/components/touchchat/src/AiRobot/Scene.vue.mjs.map +1 -0
  378. package/es/packages/components/touchchat/src/AiRobot/Scene.vue2.mjs +48 -0
  379. package/es/packages/components/touchchat/src/AiRobot/Scene.vue2.mjs.map +1 -0
  380. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.mjs +7 -0
  381. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.mjs.map +1 -0
  382. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.mjs +267 -0
  383. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.mjs.map +1 -0
  384. package/es/packages/components/touchchat/src/AiRobot/component/face.vue.mjs +7 -0
  385. package/es/packages/components/touchchat/src/AiRobot/component/face.vue.mjs.map +1 -0
  386. package/es/packages/components/touchchat/src/AiRobot/component/face.vue2.mjs +89 -0
  387. package/es/packages/components/touchchat/src/AiRobot/component/face.vue2.mjs.map +1 -0
  388. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue.mjs +7 -0
  389. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue.mjs.map +1 -0
  390. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue2.mjs +64 -0
  391. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue2.mjs.map +1 -0
  392. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.mjs +7 -0
  393. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.mjs.map +1 -0
  394. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.mjs +36 -0
  395. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.mjs.map +1 -0
  396. package/es/packages/components/touchchat/src/AiRobot/component/start.vue.mjs +7 -0
  397. package/es/packages/components/touchchat/src/AiRobot/component/start.vue.mjs.map +1 -0
  398. package/es/packages/components/touchchat/src/AiRobot/component/start.vue2.mjs +36 -0
  399. package/es/packages/components/touchchat/src/AiRobot/component/start.vue2.mjs.map +1 -0
  400. package/es/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.mjs +4 -0
  401. package/es/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.mjs.map +1 -0
  402. package/es/packages/components/touchchat/src/AiRobot/img/icon.png.mjs +4 -0
  403. package/es/packages/components/touchchat/src/AiRobot/img/icon.png.mjs.map +1 -0
  404. package/es/packages/components/touchchat/src/AiRobot/index.vue.mjs +7 -0
  405. package/es/packages/components/touchchat/src/AiRobot/index.vue.mjs.map +1 -0
  406. package/es/packages/components/touchchat/src/AiRobot/index.vue2.mjs +81 -0
  407. package/es/packages/components/touchchat/src/AiRobot/index.vue2.mjs.map +1 -0
  408. package/es/packages/components/touchchat/src/index.vue.mjs +7 -0
  409. package/es/packages/components/touchchat/src/index.vue.mjs.map +1 -0
  410. package/es/packages/components/touchchat/src/index.vue2.mjs +147 -0
  411. package/es/packages/components/touchchat/src/index.vue2.mjs.map +1 -0
  412. package/es/packages/components/touchchat/utils/chatRobot.mjs +111 -0
  413. package/es/packages/components/touchchat/utils/chatRobot.mjs.map +1 -0
  414. package/es/packages/components/touchchat/utils/deepCloneDom.mjs +59 -0
  415. package/es/packages/components/touchchat/utils/deepCloneDom.mjs.map +1 -0
  416. package/es/packages/components/touchchat/utils/fetchStream.mjs +103 -0
  417. package/es/packages/components/touchchat/utils/fetchStream.mjs.map +1 -0
  418. package/es/packages/components/touchchat/utils/hight-it.mjs +114 -0
  419. package/es/packages/components/touchchat/utils/hight-it.mjs.map +1 -0
  420. package/es/packages/components/touchchat/utils/markdown.mjs +42 -0
  421. package/es/packages/components/touchchat/utils/markdown.mjs.map +1 -0
  422. package/es/packages/components/touchchat/utils/socket.mjs +196 -0
  423. package/es/packages/components/touchchat/utils/socket.mjs.map +1 -0
  424. package/es/packages/components/touchchat/utils/tools.mjs +74 -0
  425. package/es/packages/components/touchchat/utils/tools.mjs.map +1 -0
  426. package/es/packages/components/touchchat/utils/uuid.mjs +15 -0
  427. package/es/packages/components/touchchat/utils/uuid.mjs.map +1 -0
  428. package/es/packages/utils/config.mjs +18 -0
  429. package/es/packages/utils/config.mjs.map +1 -0
  430. package/es/packages/utils/index.mjs +3 -0
  431. package/es/packages/utils/index.mjs.map +1 -0
  432. package/es/packages/utils/package.json.mjs +36 -0
  433. package/es/packages/utils/package.json.mjs.map +1 -0
  434. package/es/packages/utils/types.mjs +23 -0
  435. package/es/packages/utils/types.mjs.map +1 -0
  436. package/global.d.ts +9 -0
  437. package/lib/_virtual/_commonjsHelpers.js +8 -0
  438. package/lib/_virtual/_commonjsHelpers.js.map +1 -0
  439. package/lib/_virtual/_plugin-vue_export-helper.js +14 -0
  440. package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
  441. package/lib/_virtual/emphasis.js +6 -0
  442. package/lib/_virtual/emphasis.js.map +1 -0
  443. package/lib/_virtual/html_re.js +6 -0
  444. package/lib/_virtual/html_re.js.map +1 -0
  445. package/lib/_virtual/index.js +6 -0
  446. package/lib/_virtual/index.js.map +1 -0
  447. package/lib/_virtual/index2.js +6 -0
  448. package/lib/_virtual/index2.js.map +1 -0
  449. package/lib/_virtual/index3.js +6 -0
  450. package/lib/_virtual/index3.js.map +1 -0
  451. package/lib/_virtual/strikethrough.js +6 -0
  452. package/lib/_virtual/strikethrough.js.map +1 -0
  453. package/lib/_virtual/utils.js +6 -0
  454. package/lib/_virtual/utils.js.map +1 -0
  455. package/lib/assets/Avatar-AI-8c9ec26060b39bf7.png +0 -0
  456. package/lib/assets/bgimage-ef345ea032b1fc13.png +0 -0
  457. package/lib/assets/icon-ac4086674fbfd358.png +0 -0
  458. package/lib/assets/link-45d328ddcc34e562.png +0 -0
  459. package/lib/index.d.ts +9 -0
  460. package/lib/index.js +36 -0
  461. package/lib/index.js.map +1 -0
  462. package/lib/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.js +6380 -0
  463. package/lib/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.js.map +1 -0
  464. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.js +2528 -0
  465. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.js.map +1 -0
  466. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.js +124 -0
  467. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.js.map +1 -0
  468. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.js +205 -0
  469. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.js.map +1 -0
  470. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.js +180 -0
  471. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.js.map +1 -0
  472. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.js +512 -0
  473. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.js.map +1 -0
  474. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.js +320 -0
  475. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.js.map +1 -0
  476. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.js +475 -0
  477. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.js.map +1 -0
  478. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.js +452 -0
  479. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.js.map +1 -0
  480. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.js +619 -0
  481. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.js.map +1 -0
  482. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.js +282 -0
  483. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.js.map +1 -0
  484. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.js +210 -0
  485. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.js.map +1 -0
  486. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.js +137 -0
  487. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.js.map +1 -0
  488. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.js +97 -0
  489. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.js.map +1 -0
  490. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.js +210 -0
  491. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.js.map +1 -0
  492. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.js +170 -0
  493. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.js.map +1 -0
  494. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.js +97 -0
  495. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.js.map +1 -0
  496. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.js +85 -0
  497. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.js.map +1 -0
  498. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.js +185 -0
  499. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.js.map +1 -0
  500. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.js +335 -0
  501. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.js.map +1 -0
  502. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.js +184 -0
  503. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.js.map +1 -0
  504. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.js +363 -0
  505. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.js.map +1 -0
  506. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.js +184 -0
  507. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.js.map +1 -0
  508. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.js +192 -0
  509. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.js.map +1 -0
  510. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.js +74 -0
  511. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.js.map +1 -0
  512. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.js +61 -0
  513. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.js.map +1 -0
  514. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.js +427 -0
  515. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.js.map +1 -0
  516. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.js +295 -0
  517. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.js.map +1 -0
  518. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.js +122 -0
  519. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.js.map +1 -0
  520. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.js +93 -0
  521. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.js.map +1 -0
  522. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.js +117 -0
  523. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.js.map +1 -0
  524. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.js +132 -0
  525. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.js.map +1 -0
  526. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.js +526 -0
  527. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.js.map +1 -0
  528. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.js +215 -0
  529. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.js.map +1 -0
  530. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.js +342 -0
  531. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.js.map +1 -0
  532. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.js +113 -0
  533. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.js.map +1 -0
  534. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.js +457 -0
  535. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.js.map +1 -0
  536. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.js +242 -0
  537. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.js.map +1 -0
  538. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.js +398 -0
  539. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.js.map +1 -0
  540. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.js +157 -0
  541. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.js.map +1 -0
  542. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.js +144 -0
  543. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.js.map +1 -0
  544. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.js +151 -0
  545. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.js.map +1 -0
  546. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.js +218 -0
  547. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.js.map +1 -0
  548. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.js +41 -0
  549. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.js.map +1 -0
  550. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.js +710 -0
  551. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.js.map +1 -0
  552. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.js +884 -0
  553. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.js.map +1 -0
  554. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.js +708 -0
  555. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.js.map +1 -0
  556. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.js +35 -0
  557. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.js.map +1 -0
  558. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.js +120 -0
  559. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.js.map +1 -0
  560. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.js +640 -0
  561. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.js.map +1 -0
  562. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.js +198 -0
  563. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.js.map +1 -0
  564. package/lib/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.js +150 -0
  565. package/lib/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.js.map +1 -0
  566. package/lib/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.js +146 -0
  567. package/lib/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.js.map +1 -0
  568. package/lib/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.js +210 -0
  569. package/lib/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.js.map +1 -0
  570. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.js +28 -0
  571. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.js.map +1 -0
  572. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.js +1913 -0
  573. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.js.map +1 -0
  574. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.js +49 -0
  575. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.js.map +1 -0
  576. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.js +22 -0
  577. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.js.map +1 -0
  578. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.js +65 -0
  579. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.js.map +1 -0
  580. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.js +10 -0
  581. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.js.map +1 -0
  582. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.js +92 -0
  583. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.js.map +1 -0
  584. package/lib/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.js +359 -0
  585. package/lib/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.js.map +1 -0
  586. package/lib/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.js +130 -0
  587. package/lib/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.js.map +1 -0
  588. package/lib/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.js +130 -0
  589. package/lib/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.js.map +1 -0
  590. package/lib/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.js +67 -0
  591. package/lib/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.js.map +1 -0
  592. package/lib/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.js +67 -0
  593. package/lib/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.js.map +1 -0
  594. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.js +13 -0
  595. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.js.map +1 -0
  596. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.js +9 -0
  597. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.js.map +1 -0
  598. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.js +69 -0
  599. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.js.map +1 -0
  600. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.js +33 -0
  601. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.js.map +1 -0
  602. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.js +326 -0
  603. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.js.map +1 -0
  604. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.js +15 -0
  605. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.js.map +1 -0
  606. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.js +85 -0
  607. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.js.map +1 -0
  608. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.js +46 -0
  609. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.js.map +1 -0
  610. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.js +58 -0
  611. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.js.map +1 -0
  612. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.js +598 -0
  613. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.js.map +1 -0
  614. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.js +140 -0
  615. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.js.map +1 -0
  616. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.js +71 -0
  617. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.js.map +1 -0
  618. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.js +199 -0
  619. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.js.map +1 -0
  620. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.js +80 -0
  621. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.js.map +1 -0
  622. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.js +41 -0
  623. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.js.map +1 -0
  624. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.js +61 -0
  625. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.js.map +1 -0
  626. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.js +348 -0
  627. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.js.map +1 -0
  628. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.js +356 -0
  629. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.js.map +1 -0
  630. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.js +288 -0
  631. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.js.map +1 -0
  632. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.js +34 -0
  633. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.js.map +1 -0
  634. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.js +98 -0
  635. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.js.map +1 -0
  636. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.js +59 -0
  637. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.js.map +1 -0
  638. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.js +49 -0
  639. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.js.map +1 -0
  640. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.js +78 -0
  641. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.js.map +1 -0
  642. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.js +83 -0
  643. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.js.map +1 -0
  644. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.js +368 -0
  645. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.js.map +1 -0
  646. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.js +52 -0
  647. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.js.map +1 -0
  648. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.js +199 -0
  649. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.js.map +1 -0
  650. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.js +236 -0
  651. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.js.map +1 -0
  652. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.js +225 -0
  653. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.js.map +1 -0
  654. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.js +18 -0
  655. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.js.map +1 -0
  656. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.js +16 -0
  657. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.js.map +1 -0
  658. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.js +134 -0
  659. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.js.map +1 -0
  660. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.js +21 -0
  661. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.js.map +1 -0
  662. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.js +99 -0
  663. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.js.map +1 -0
  664. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.js +204 -0
  665. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.js.map +1 -0
  666. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.js +23 -0
  667. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.js.map +1 -0
  668. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.js +76 -0
  669. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.js.map +1 -0
  670. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.js +63 -0
  671. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.js.map +1 -0
  672. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +130 -0
  673. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.js.map +1 -0
  674. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.js +134 -0
  675. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.js.map +1 -0
  676. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.js +53 -0
  677. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.js.map +1 -0
  678. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.js +56 -0
  679. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.js.map +1 -0
  680. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.js +50 -0
  681. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.js.map +1 -0
  682. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.js +156 -0
  683. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.js.map +1 -0
  684. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.js +152 -0
  685. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.js.map +1 -0
  686. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.js +50 -0
  687. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.js.map +1 -0
  688. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.js +158 -0
  689. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.js.map +1 -0
  690. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.js +134 -0
  691. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.js.map +1 -0
  692. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.js +58 -0
  693. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.js.map +1 -0
  694. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.js +35 -0
  695. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.js.map +1 -0
  696. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.js +201 -0
  697. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.js.map +1 -0
  698. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js +123 -0
  699. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js.map +1 -0
  700. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js +99 -0
  701. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js.map +1 -0
  702. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js +26 -0
  703. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js.map +1 -0
  704. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js +17 -0
  705. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js.map +1 -0
  706. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js +294 -0
  707. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js.map +1 -0
  708. package/lib/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.js +138 -0
  709. package/lib/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.js.map +1 -0
  710. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js +14 -0
  711. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js.map +1 -0
  712. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js +14 -0
  713. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js.map +1 -0
  714. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js +6 -0
  715. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js.map +1 -0
  716. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js +14 -0
  717. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js.map +1 -0
  718. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js +25 -0
  719. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js.map +1 -0
  720. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js +14 -0
  721. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js.map +1 -0
  722. package/lib/package.json.css +1 -0
  723. package/lib/package.json.js +120 -0
  724. package/lib/package.json.js.map +1 -0
  725. package/lib/packages/components/index.js +11 -0
  726. package/lib/packages/components/index.js.map +1 -0
  727. package/lib/packages/components/package.json.js +47 -0
  728. package/lib/packages/components/package.json.js.map +1 -0
  729. package/lib/packages/components/resolver.js +36 -0
  730. package/lib/packages/components/resolver.js.map +1 -0
  731. package/lib/packages/components/touchchat/component/CardView.vue.js +11 -0
  732. package/lib/packages/components/touchchat/component/CardView.vue.js.map +1 -0
  733. package/lib/packages/components/touchchat/component/CardView.vue2.js +139 -0
  734. package/lib/packages/components/touchchat/component/CardView.vue2.js.map +1 -0
  735. package/lib/packages/components/touchchat/component/FileView.vue.js +11 -0
  736. package/lib/packages/components/touchchat/component/FileView.vue.js.map +1 -0
  737. package/lib/packages/components/touchchat/component/FileView.vue2.js +66 -0
  738. package/lib/packages/components/touchchat/component/FileView.vue2.js.map +1 -0
  739. package/lib/packages/components/touchchat/component/HelloChat.vue.js +11 -0
  740. package/lib/packages/components/touchchat/component/HelloChat.vue.js.map +1 -0
  741. package/lib/packages/components/touchchat/component/HelloChat.vue2.js +62 -0
  742. package/lib/packages/components/touchchat/component/HelloChat.vue2.js.map +1 -0
  743. package/lib/packages/components/touchchat/component/ImageView.vue.js +11 -0
  744. package/lib/packages/components/touchchat/component/ImageView.vue.js.map +1 -0
  745. package/lib/packages/components/touchchat/component/ImageView.vue2.js +35 -0
  746. package/lib/packages/components/touchchat/component/ImageView.vue2.js.map +1 -0
  747. package/lib/packages/components/touchchat/component/LinkView.vue.js +11 -0
  748. package/lib/packages/components/touchchat/component/LinkView.vue.js.map +1 -0
  749. package/lib/packages/components/touchchat/component/LinkView.vue2.js +79 -0
  750. package/lib/packages/components/touchchat/component/LinkView.vue2.js.map +1 -0
  751. package/lib/packages/components/touchchat/img/AI.png.js +8 -0
  752. package/lib/packages/components/touchchat/img/AI.png.js.map +1 -0
  753. package/lib/packages/components/touchchat/img/asir.png.js +8 -0
  754. package/lib/packages/components/touchchat/img/asir.png.js.map +1 -0
  755. package/lib/packages/components/touchchat/img/bgimage.png.js +8 -0
  756. package/lib/packages/components/touchchat/img/bgimage.png.js.map +1 -0
  757. package/lib/packages/components/touchchat/img/file.png.js +8 -0
  758. package/lib/packages/components/touchchat/img/file.png.js.map +1 -0
  759. package/lib/packages/components/touchchat/img/link.png.js +8 -0
  760. package/lib/packages/components/touchchat/img/link.png.js.map +1 -0
  761. package/lib/packages/components/touchchat/index.js +12 -0
  762. package/lib/packages/components/touchchat/index.js.map +1 -0
  763. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js +11 -0
  764. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js.map +1 -0
  765. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js +346 -0
  766. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js.map +1 -0
  767. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js +11 -0
  768. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js.map +1 -0
  769. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js +186 -0
  770. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js.map +1 -0
  771. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js +11 -0
  772. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js.map +1 -0
  773. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js +454 -0
  774. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js.map +1 -0
  775. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js +11 -0
  776. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js.map +1 -0
  777. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js +109 -0
  778. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js.map +1 -0
  779. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js +11 -0
  780. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js.map +1 -0
  781. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js +271 -0
  782. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js.map +1 -0
  783. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js +11 -0
  784. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js.map +1 -0
  785. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js +847 -0
  786. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js.map +1 -0
  787. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js +11 -0
  788. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js.map +1 -0
  789. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js +216 -0
  790. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js.map +1 -0
  791. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js +11 -0
  792. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js.map +1 -0
  793. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js +137 -0
  794. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js.map +1 -0
  795. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue.js +11 -0
  796. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue.js.map +1 -0
  797. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.js +636 -0
  798. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.js.map +1 -0
  799. package/lib/packages/components/touchchat/src/AiRobot/Content.vue.js +11 -0
  800. package/lib/packages/components/touchchat/src/AiRobot/Content.vue.js.map +1 -0
  801. package/lib/packages/components/touchchat/src/AiRobot/Content.vue2.js +267 -0
  802. package/lib/packages/components/touchchat/src/AiRobot/Content.vue2.js.map +1 -0
  803. package/lib/packages/components/touchchat/src/AiRobot/Header.vue.js +11 -0
  804. package/lib/packages/components/touchchat/src/AiRobot/Header.vue.js.map +1 -0
  805. package/lib/packages/components/touchchat/src/AiRobot/Header.vue2.js +201 -0
  806. package/lib/packages/components/touchchat/src/AiRobot/Header.vue2.js.map +1 -0
  807. package/lib/packages/components/touchchat/src/AiRobot/Input.vue.js +11 -0
  808. package/lib/packages/components/touchchat/src/AiRobot/Input.vue.js.map +1 -0
  809. package/lib/packages/components/touchchat/src/AiRobot/Input.vue2.js +71 -0
  810. package/lib/packages/components/touchchat/src/AiRobot/Input.vue2.js.map +1 -0
  811. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue.js +11 -0
  812. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue.js.map +1 -0
  813. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue2.js +52 -0
  814. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue2.js.map +1 -0
  815. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.js +11 -0
  816. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.js.map +1 -0
  817. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.js +271 -0
  818. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.js.map +1 -0
  819. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue.js +11 -0
  820. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue.js.map +1 -0
  821. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue2.js +93 -0
  822. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue2.js.map +1 -0
  823. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue.js +11 -0
  824. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue.js.map +1 -0
  825. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue2.js +68 -0
  826. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue2.js.map +1 -0
  827. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.js +11 -0
  828. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.js.map +1 -0
  829. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.js +40 -0
  830. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.js.map +1 -0
  831. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue.js +11 -0
  832. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue.js.map +1 -0
  833. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue2.js +40 -0
  834. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue2.js.map +1 -0
  835. package/lib/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.js +8 -0
  836. package/lib/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.js.map +1 -0
  837. package/lib/packages/components/touchchat/src/AiRobot/img/icon.png.js +8 -0
  838. package/lib/packages/components/touchchat/src/AiRobot/img/icon.png.js.map +1 -0
  839. package/lib/packages/components/touchchat/src/AiRobot/index.vue.js +11 -0
  840. package/lib/packages/components/touchchat/src/AiRobot/index.vue.js.map +1 -0
  841. package/lib/packages/components/touchchat/src/AiRobot/index.vue2.js +85 -0
  842. package/lib/packages/components/touchchat/src/AiRobot/index.vue2.js.map +1 -0
  843. package/lib/packages/components/touchchat/src/index.vue.js +11 -0
  844. package/lib/packages/components/touchchat/src/index.vue.js.map +1 -0
  845. package/lib/packages/components/touchchat/src/index.vue2.js +151 -0
  846. package/lib/packages/components/touchchat/src/index.vue2.js.map +1 -0
  847. package/lib/packages/components/touchchat/utils/chatRobot.js +113 -0
  848. package/lib/packages/components/touchchat/utils/chatRobot.js.map +1 -0
  849. package/lib/packages/components/touchchat/utils/deepCloneDom.js +61 -0
  850. package/lib/packages/components/touchchat/utils/deepCloneDom.js.map +1 -0
  851. package/lib/packages/components/touchchat/utils/fetchStream.js +105 -0
  852. package/lib/packages/components/touchchat/utils/fetchStream.js.map +1 -0
  853. package/lib/packages/components/touchchat/utils/hight-it.js +118 -0
  854. package/lib/packages/components/touchchat/utils/hight-it.js.map +1 -0
  855. package/lib/packages/components/touchchat/utils/markdown.js +46 -0
  856. package/lib/packages/components/touchchat/utils/markdown.js.map +1 -0
  857. package/lib/packages/components/touchchat/utils/socket.js +199 -0
  858. package/lib/packages/components/touchchat/utils/socket.js.map +1 -0
  859. package/lib/packages/components/touchchat/utils/tools.js +79 -0
  860. package/lib/packages/components/touchchat/utils/tools.js.map +1 -0
  861. package/lib/packages/components/touchchat/utils/uuid.js +19 -0
  862. package/lib/packages/components/touchchat/utils/uuid.js.map +1 -0
  863. package/lib/packages/utils/config.js +21 -0
  864. package/lib/packages/utils/config.js.map +1 -0
  865. package/lib/packages/utils/index.js +12 -0
  866. package/lib/packages/utils/index.js.map +1 -0
  867. package/lib/packages/utils/package.json.js +50 -0
  868. package/lib/packages/utils/package.json.js.map +1 -0
  869. package/lib/packages/utils/types.js +26 -0
  870. package/lib/packages/utils/types.js.map +1 -0
  871. package/package.json +83 -0
  872. package/theme/components/index.css +3 -0
  873. package/theme/img/default.png +0 -0
  874. package/theme/index.css +6 -0
  875. package/theme/skin/default.css +6 -0
  876. package/types/global.d.ts +9 -0
@@ -0,0 +1,2524 @@
1
+ import { getDefaultExportFromCjs } from '../../../../../../_virtual/_commonjsHelpers.mjs';
2
+
3
+ function deepFreeze(obj) {
4
+ if (obj instanceof Map) {
5
+ obj.clear = obj.delete = obj.set = function () {
6
+ throw new Error('map is read-only');
7
+ };
8
+ } else if (obj instanceof Set) {
9
+ obj.add = obj.clear = obj.delete = function () {
10
+ throw new Error('set is read-only');
11
+ };
12
+ }
13
+
14
+ // Freeze self
15
+ Object.freeze(obj);
16
+
17
+ Object.getOwnPropertyNames(obj).forEach(function (name) {
18
+ var prop = obj[name];
19
+
20
+ // Freeze prop if it is an object
21
+ if (typeof prop == 'object' && !Object.isFrozen(prop)) {
22
+ deepFreeze(prop);
23
+ }
24
+ });
25
+
26
+ return obj;
27
+ }
28
+
29
+ var deepFreezeEs6 = deepFreeze;
30
+ var _default = deepFreeze;
31
+ deepFreezeEs6.default = _default;
32
+
33
+ /** @implements CallbackResponse */
34
+ class Response {
35
+ /**
36
+ * @param {CompiledMode} mode
37
+ */
38
+ constructor(mode) {
39
+ // eslint-disable-next-line no-undefined
40
+ if (mode.data === undefined) mode.data = {};
41
+
42
+ this.data = mode.data;
43
+ this.isMatchIgnored = false;
44
+ }
45
+
46
+ ignoreMatch() {
47
+ this.isMatchIgnored = true;
48
+ }
49
+ }
50
+
51
+ /**
52
+ * @param {string} value
53
+ * @returns {string}
54
+ */
55
+ function escapeHTML(value) {
56
+ return value
57
+ .replace(/&/g, '&')
58
+ .replace(/</g, '&lt;')
59
+ .replace(/>/g, '&gt;')
60
+ .replace(/"/g, '&quot;')
61
+ .replace(/'/g, '&#x27;');
62
+ }
63
+
64
+ /**
65
+ * performs a shallow merge of multiple objects into one
66
+ *
67
+ * @template T
68
+ * @param {T} original
69
+ * @param {Record<string,any>[]} objects
70
+ * @returns {T} a single new object
71
+ */
72
+ function inherit(original, ...objects) {
73
+ /** @type Record<string,any> */
74
+ const result = Object.create(null);
75
+
76
+ for (const key in original) {
77
+ result[key] = original[key];
78
+ }
79
+ objects.forEach(function(obj) {
80
+ for (const key in obj) {
81
+ result[key] = obj[key];
82
+ }
83
+ });
84
+ return /** @type {T} */ (result);
85
+ }
86
+
87
+ /**
88
+ * @typedef {object} Renderer
89
+ * @property {(text: string) => void} addText
90
+ * @property {(node: Node) => void} openNode
91
+ * @property {(node: Node) => void} closeNode
92
+ * @property {() => string} value
93
+ */
94
+
95
+ /** @typedef {{kind?: string, sublanguage?: boolean}} Node */
96
+ /** @typedef {{walk: (r: Renderer) => void}} Tree */
97
+ /** */
98
+
99
+ const SPAN_CLOSE = '</span>';
100
+
101
+ /**
102
+ * Determines if a node needs to be wrapped in <span>
103
+ *
104
+ * @param {Node} node */
105
+ const emitsWrappingTags = (node) => {
106
+ return !!node.kind;
107
+ };
108
+
109
+ /** @type {Renderer} */
110
+ class HTMLRenderer {
111
+ /**
112
+ * Creates a new HTMLRenderer
113
+ *
114
+ * @param {Tree} parseTree - the parse tree (must support `walk` API)
115
+ * @param {{classPrefix: string}} options
116
+ */
117
+ constructor(parseTree, options) {
118
+ this.buffer = "";
119
+ this.classPrefix = options.classPrefix;
120
+ parseTree.walk(this);
121
+ }
122
+
123
+ /**
124
+ * Adds texts to the output stream
125
+ *
126
+ * @param {string} text */
127
+ addText(text) {
128
+ this.buffer += escapeHTML(text);
129
+ }
130
+
131
+ /**
132
+ * Adds a node open to the output stream (if needed)
133
+ *
134
+ * @param {Node} node */
135
+ openNode(node) {
136
+ if (!emitsWrappingTags(node)) return;
137
+
138
+ let className = node.kind;
139
+ if (!node.sublanguage) {
140
+ className = `${this.classPrefix}${className}`;
141
+ }
142
+ this.span(className);
143
+ }
144
+
145
+ /**
146
+ * Adds a node close to the output stream (if needed)
147
+ *
148
+ * @param {Node} node */
149
+ closeNode(node) {
150
+ if (!emitsWrappingTags(node)) return;
151
+
152
+ this.buffer += SPAN_CLOSE;
153
+ }
154
+
155
+ /**
156
+ * returns the accumulated buffer
157
+ */
158
+ value() {
159
+ return this.buffer;
160
+ }
161
+
162
+ // helpers
163
+
164
+ /**
165
+ * Builds a span element
166
+ *
167
+ * @param {string} className */
168
+ span(className) {
169
+ this.buffer += `<span class="${className}">`;
170
+ }
171
+ }
172
+
173
+ /** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */
174
+ /** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */
175
+ /** */
176
+
177
+ class TokenTree {
178
+ constructor() {
179
+ /** @type DataNode */
180
+ this.rootNode = { children: [] };
181
+ this.stack = [this.rootNode];
182
+ }
183
+
184
+ get top() {
185
+ return this.stack[this.stack.length - 1];
186
+ }
187
+
188
+ get root() { return this.rootNode; }
189
+
190
+ /** @param {Node} node */
191
+ add(node) {
192
+ this.top.children.push(node);
193
+ }
194
+
195
+ /** @param {string} kind */
196
+ openNode(kind) {
197
+ /** @type Node */
198
+ const node = { kind, children: [] };
199
+ this.add(node);
200
+ this.stack.push(node);
201
+ }
202
+
203
+ closeNode() {
204
+ if (this.stack.length > 1) {
205
+ return this.stack.pop();
206
+ }
207
+ // eslint-disable-next-line no-undefined
208
+ return undefined;
209
+ }
210
+
211
+ closeAllNodes() {
212
+ while (this.closeNode());
213
+ }
214
+
215
+ toJSON() {
216
+ return JSON.stringify(this.rootNode, null, 4);
217
+ }
218
+
219
+ /**
220
+ * @typedef { import("./html_renderer").Renderer } Renderer
221
+ * @param {Renderer} builder
222
+ */
223
+ walk(builder) {
224
+ // this does not
225
+ return this.constructor._walk(builder, this.rootNode);
226
+ // this works
227
+ // return TokenTree._walk(builder, this.rootNode);
228
+ }
229
+
230
+ /**
231
+ * @param {Renderer} builder
232
+ * @param {Node} node
233
+ */
234
+ static _walk(builder, node) {
235
+ if (typeof node === "string") {
236
+ builder.addText(node);
237
+ } else if (node.children) {
238
+ builder.openNode(node);
239
+ node.children.forEach((child) => this._walk(builder, child));
240
+ builder.closeNode(node);
241
+ }
242
+ return builder;
243
+ }
244
+
245
+ /**
246
+ * @param {Node} node
247
+ */
248
+ static _collapse(node) {
249
+ if (typeof node === "string") return;
250
+ if (!node.children) return;
251
+
252
+ if (node.children.every(el => typeof el === "string")) {
253
+ // node.text = node.children.join("");
254
+ // delete node.children;
255
+ node.children = [node.children.join("")];
256
+ } else {
257
+ node.children.forEach((child) => {
258
+ TokenTree._collapse(child);
259
+ });
260
+ }
261
+ }
262
+ }
263
+
264
+ /**
265
+ Currently this is all private API, but this is the minimal API necessary
266
+ that an Emitter must implement to fully support the parser.
267
+
268
+ Minimal interface:
269
+
270
+ - addKeyword(text, kind)
271
+ - addText(text)
272
+ - addSublanguage(emitter, subLanguageName)
273
+ - finalize()
274
+ - openNode(kind)
275
+ - closeNode()
276
+ - closeAllNodes()
277
+ - toHTML()
278
+
279
+ */
280
+
281
+ /**
282
+ * @implements {Emitter}
283
+ */
284
+ class TokenTreeEmitter extends TokenTree {
285
+ /**
286
+ * @param {*} options
287
+ */
288
+ constructor(options) {
289
+ super();
290
+ this.options = options;
291
+ }
292
+
293
+ /**
294
+ * @param {string} text
295
+ * @param {string} kind
296
+ */
297
+ addKeyword(text, kind) {
298
+ if (text === "") { return; }
299
+
300
+ this.openNode(kind);
301
+ this.addText(text);
302
+ this.closeNode();
303
+ }
304
+
305
+ /**
306
+ * @param {string} text
307
+ */
308
+ addText(text) {
309
+ if (text === "") { return; }
310
+
311
+ this.add(text);
312
+ }
313
+
314
+ /**
315
+ * @param {Emitter & {root: DataNode}} emitter
316
+ * @param {string} name
317
+ */
318
+ addSublanguage(emitter, name) {
319
+ /** @type DataNode */
320
+ const node = emitter.root;
321
+ node.kind = name;
322
+ node.sublanguage = true;
323
+ this.add(node);
324
+ }
325
+
326
+ toHTML() {
327
+ const renderer = new HTMLRenderer(this, this.options);
328
+ return renderer.value();
329
+ }
330
+
331
+ finalize() {
332
+ return true;
333
+ }
334
+ }
335
+
336
+ /**
337
+ * @param {string} value
338
+ * @returns {RegExp}
339
+ * */
340
+ function escape(value) {
341
+ return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
342
+ }
343
+
344
+ /**
345
+ * @param {RegExp | string } re
346
+ * @returns {string}
347
+ */
348
+ function source(re) {
349
+ if (!re) return null;
350
+ if (typeof re === "string") return re;
351
+
352
+ return re.source;
353
+ }
354
+
355
+ /**
356
+ * @param {...(RegExp | string) } args
357
+ * @returns {string}
358
+ */
359
+ function concat(...args) {
360
+ const joined = args.map((x) => source(x)).join("");
361
+ return joined;
362
+ }
363
+
364
+ /**
365
+ * Any of the passed expresssions may match
366
+ *
367
+ * Creates a huge this | this | that | that match
368
+ * @param {(RegExp | string)[] } args
369
+ * @returns {string}
370
+ */
371
+ function either(...args) {
372
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
373
+ return joined;
374
+ }
375
+
376
+ /**
377
+ * @param {RegExp} re
378
+ * @returns {number}
379
+ */
380
+ function countMatchGroups(re) {
381
+ return (new RegExp(re.toString() + '|')).exec('').length - 1;
382
+ }
383
+
384
+ /**
385
+ * Does lexeme start with a regular expression match at the beginning
386
+ * @param {RegExp} re
387
+ * @param {string} lexeme
388
+ */
389
+ function startsWith(re, lexeme) {
390
+ const match = re && re.exec(lexeme);
391
+ return match && match.index === 0;
392
+ }
393
+
394
+ // BACKREF_RE matches an open parenthesis or backreference. To avoid
395
+ // an incorrect parse, it additionally matches the following:
396
+ // - [...] elements, where the meaning of parentheses and escapes change
397
+ // - other escape sequences, so we do not misparse escape sequences as
398
+ // interesting elements
399
+ // - non-matching or lookahead parentheses, which do not capture. These
400
+ // follow the '(' with a '?'.
401
+ const BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
402
+
403
+ // join logically computes regexps.join(separator), but fixes the
404
+ // backreferences so they continue to match.
405
+ // it also places each individual regular expression into it's own
406
+ // match group, keeping track of the sequencing of those match groups
407
+ // is currently an exercise for the caller. :-)
408
+ /**
409
+ * @param {(string | RegExp)[]} regexps
410
+ * @param {string} separator
411
+ * @returns {string}
412
+ */
413
+ function join(regexps, separator = "|") {
414
+ let numCaptures = 0;
415
+
416
+ return regexps.map((regex) => {
417
+ numCaptures += 1;
418
+ const offset = numCaptures;
419
+ let re = source(regex);
420
+ let out = '';
421
+
422
+ while (re.length > 0) {
423
+ const match = BACKREF_RE.exec(re);
424
+ if (!match) {
425
+ out += re;
426
+ break;
427
+ }
428
+ out += re.substring(0, match.index);
429
+ re = re.substring(match.index + match[0].length);
430
+ if (match[0][0] === '\\' && match[1]) {
431
+ // Adjust the backreference.
432
+ out += '\\' + String(Number(match[1]) + offset);
433
+ } else {
434
+ out += match[0];
435
+ if (match[0] === '(') {
436
+ numCaptures++;
437
+ }
438
+ }
439
+ }
440
+ return out;
441
+ }).map(re => `(${re})`).join(separator);
442
+ }
443
+
444
+ // Common regexps
445
+ const MATCH_NOTHING_RE = /\b\B/;
446
+ const IDENT_RE = '[a-zA-Z]\\w*';
447
+ const UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
448
+ const NUMBER_RE = '\\b\\d+(\\.\\d+)?';
449
+ const C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
450
+ const BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
451
+ const RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
452
+
453
+ /**
454
+ * @param { Partial<Mode> & {binary?: string | RegExp} } opts
455
+ */
456
+ const SHEBANG = (opts = {}) => {
457
+ const beginShebang = /^#![ ]*\//;
458
+ if (opts.binary) {
459
+ opts.begin = concat(
460
+ beginShebang,
461
+ /.*\b/,
462
+ opts.binary,
463
+ /\b.*/);
464
+ }
465
+ return inherit({
466
+ className: 'meta',
467
+ begin: beginShebang,
468
+ end: /$/,
469
+ relevance: 0,
470
+ /** @type {ModeCallback} */
471
+ "on:begin": (m, resp) => {
472
+ if (m.index !== 0) resp.ignoreMatch();
473
+ }
474
+ }, opts);
475
+ };
476
+
477
+ // Common modes
478
+ const BACKSLASH_ESCAPE = {
479
+ begin: '\\\\[\\s\\S]', relevance: 0
480
+ };
481
+ const APOS_STRING_MODE = {
482
+ className: 'string',
483
+ begin: '\'',
484
+ end: '\'',
485
+ illegal: '\\n',
486
+ contains: [BACKSLASH_ESCAPE]
487
+ };
488
+ const QUOTE_STRING_MODE = {
489
+ className: 'string',
490
+ begin: '"',
491
+ end: '"',
492
+ illegal: '\\n',
493
+ contains: [BACKSLASH_ESCAPE]
494
+ };
495
+ const PHRASAL_WORDS_MODE = {
496
+ 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/
497
+ };
498
+ /**
499
+ * Creates a comment mode
500
+ *
501
+ * @param {string | RegExp} begin
502
+ * @param {string | RegExp} end
503
+ * @param {Mode | {}} [modeOptions]
504
+ * @returns {Partial<Mode>}
505
+ */
506
+ const COMMENT = function(begin, end, modeOptions = {}) {
507
+ const mode = inherit(
508
+ {
509
+ className: 'comment',
510
+ begin,
511
+ end,
512
+ contains: []
513
+ },
514
+ modeOptions
515
+ );
516
+ mode.contains.push(PHRASAL_WORDS_MODE);
517
+ mode.contains.push({
518
+ className: 'doctag',
519
+ begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',
520
+ relevance: 0
521
+ });
522
+ return mode;
523
+ };
524
+ const C_LINE_COMMENT_MODE = COMMENT('//', '$');
525
+ const C_BLOCK_COMMENT_MODE = COMMENT('/\\*', '\\*/');
526
+ const HASH_COMMENT_MODE = COMMENT('#', '$');
527
+ const NUMBER_MODE = {
528
+ className: 'number',
529
+ begin: NUMBER_RE,
530
+ relevance: 0
531
+ };
532
+ const C_NUMBER_MODE = {
533
+ className: 'number',
534
+ begin: C_NUMBER_RE,
535
+ relevance: 0
536
+ };
537
+ const BINARY_NUMBER_MODE = {
538
+ className: 'number',
539
+ begin: BINARY_NUMBER_RE,
540
+ relevance: 0
541
+ };
542
+ const CSS_NUMBER_MODE = {
543
+ className: 'number',
544
+ begin: NUMBER_RE + '(' +
545
+ '%|em|ex|ch|rem' +
546
+ '|vw|vh|vmin|vmax' +
547
+ '|cm|mm|in|pt|pc|px' +
548
+ '|deg|grad|rad|turn' +
549
+ '|s|ms' +
550
+ '|Hz|kHz' +
551
+ '|dpi|dpcm|dppx' +
552
+ ')?',
553
+ relevance: 0
554
+ };
555
+ const REGEXP_MODE = {
556
+ // this outer rule makes sure we actually have a WHOLE regex and not simply
557
+ // an expression such as:
558
+ //
559
+ // 3 / something
560
+ //
561
+ // (which will then blow up when regex's `illegal` sees the newline)
562
+ begin: /(?=\/[^/\n]*\/)/,
563
+ contains: [{
564
+ className: 'regexp',
565
+ begin: /\//,
566
+ end: /\/[gimuy]*/,
567
+ illegal: /\n/,
568
+ contains: [
569
+ BACKSLASH_ESCAPE,
570
+ {
571
+ begin: /\[/,
572
+ end: /\]/,
573
+ relevance: 0,
574
+ contains: [BACKSLASH_ESCAPE]
575
+ }
576
+ ]
577
+ }]
578
+ };
579
+ const TITLE_MODE = {
580
+ className: 'title',
581
+ begin: IDENT_RE,
582
+ relevance: 0
583
+ };
584
+ const UNDERSCORE_TITLE_MODE = {
585
+ className: 'title',
586
+ begin: UNDERSCORE_IDENT_RE,
587
+ relevance: 0
588
+ };
589
+ const METHOD_GUARD = {
590
+ // excludes method names from keyword processing
591
+ begin: '\\.\\s*' + UNDERSCORE_IDENT_RE,
592
+ relevance: 0
593
+ };
594
+
595
+ /**
596
+ * Adds end same as begin mechanics to a mode
597
+ *
598
+ * Your mode must include at least a single () match group as that first match
599
+ * group is what is used for comparison
600
+ * @param {Partial<Mode>} mode
601
+ */
602
+ const END_SAME_AS_BEGIN = function(mode) {
603
+ return Object.assign(mode,
604
+ {
605
+ /** @type {ModeCallback} */
606
+ 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },
607
+ /** @type {ModeCallback} */
608
+ 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }
609
+ });
610
+ };
611
+
612
+ var MODES = /*#__PURE__*/Object.freeze({
613
+ __proto__: null,
614
+ MATCH_NOTHING_RE: MATCH_NOTHING_RE,
615
+ IDENT_RE: IDENT_RE,
616
+ UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,
617
+ NUMBER_RE: NUMBER_RE,
618
+ C_NUMBER_RE: C_NUMBER_RE,
619
+ BINARY_NUMBER_RE: BINARY_NUMBER_RE,
620
+ RE_STARTERS_RE: RE_STARTERS_RE,
621
+ SHEBANG: SHEBANG,
622
+ BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,
623
+ APOS_STRING_MODE: APOS_STRING_MODE,
624
+ QUOTE_STRING_MODE: QUOTE_STRING_MODE,
625
+ PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,
626
+ COMMENT: COMMENT,
627
+ C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,
628
+ C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,
629
+ HASH_COMMENT_MODE: HASH_COMMENT_MODE,
630
+ NUMBER_MODE: NUMBER_MODE,
631
+ C_NUMBER_MODE: C_NUMBER_MODE,
632
+ BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,
633
+ CSS_NUMBER_MODE: CSS_NUMBER_MODE,
634
+ REGEXP_MODE: REGEXP_MODE,
635
+ TITLE_MODE: TITLE_MODE,
636
+ UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,
637
+ METHOD_GUARD: METHOD_GUARD,
638
+ END_SAME_AS_BEGIN: END_SAME_AS_BEGIN
639
+ });
640
+
641
+ // Grammar extensions / plugins
642
+ // See: https://github.com/highlightjs/highlight.js/issues/2833
643
+
644
+ // Grammar extensions allow "syntactic sugar" to be added to the grammar modes
645
+ // without requiring any underlying changes to the compiler internals.
646
+
647
+ // `compileMatch` being the perfect small example of now allowing a grammar
648
+ // author to write `match` when they desire to match a single expression rather
649
+ // than being forced to use `begin`. The extension then just moves `match` into
650
+ // `begin` when it runs. Ie, no features have been added, but we've just made
651
+ // the experience of writing (and reading grammars) a little bit nicer.
652
+
653
+ // ------
654
+
655
+ // TODO: We need negative look-behind support to do this properly
656
+ /**
657
+ * Skip a match if it has a preceding dot
658
+ *
659
+ * This is used for `beginKeywords` to prevent matching expressions such as
660
+ * `bob.keyword.do()`. The mode compiler automatically wires this up as a
661
+ * special _internal_ 'on:begin' callback for modes with `beginKeywords`
662
+ * @param {RegExpMatchArray} match
663
+ * @param {CallbackResponse} response
664
+ */
665
+ function skipIfhasPrecedingDot(match, response) {
666
+ const before = match.input[match.index - 1];
667
+ if (before === ".") {
668
+ response.ignoreMatch();
669
+ }
670
+ }
671
+
672
+
673
+ /**
674
+ * `beginKeywords` syntactic sugar
675
+ * @type {CompilerExt}
676
+ */
677
+ function beginKeywords(mode, parent) {
678
+ if (!parent) return;
679
+ if (!mode.beginKeywords) return;
680
+
681
+ // for languages with keywords that include non-word characters checking for
682
+ // a word boundary is not sufficient, so instead we check for a word boundary
683
+ // or whitespace - this does no harm in any case since our keyword engine
684
+ // doesn't allow spaces in keywords anyways and we still check for the boundary
685
+ // first
686
+ mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\.)(?=\\b|\\s)';
687
+ mode.__beforeBegin = skipIfhasPrecedingDot;
688
+ mode.keywords = mode.keywords || mode.beginKeywords;
689
+ delete mode.beginKeywords;
690
+
691
+ // prevents double relevance, the keywords themselves provide
692
+ // relevance, the mode doesn't need to double it
693
+ // eslint-disable-next-line no-undefined
694
+ if (mode.relevance === undefined) mode.relevance = 0;
695
+ }
696
+
697
+ /**
698
+ * Allow `illegal` to contain an array of illegal values
699
+ * @type {CompilerExt}
700
+ */
701
+ function compileIllegal(mode, _parent) {
702
+ if (!Array.isArray(mode.illegal)) return;
703
+
704
+ mode.illegal = either(...mode.illegal);
705
+ }
706
+
707
+ /**
708
+ * `match` to match a single expression for readability
709
+ * @type {CompilerExt}
710
+ */
711
+ function compileMatch(mode, _parent) {
712
+ if (!mode.match) return;
713
+ if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
714
+
715
+ mode.begin = mode.match;
716
+ delete mode.match;
717
+ }
718
+
719
+ /**
720
+ * provides the default 1 relevance to all modes
721
+ * @type {CompilerExt}
722
+ */
723
+ function compileRelevance(mode, _parent) {
724
+ // eslint-disable-next-line no-undefined
725
+ if (mode.relevance === undefined) mode.relevance = 1;
726
+ }
727
+
728
+ // keywords that should have no default relevance value
729
+ const COMMON_KEYWORDS = [
730
+ 'of',
731
+ 'and',
732
+ 'for',
733
+ 'in',
734
+ 'not',
735
+ 'or',
736
+ 'if',
737
+ 'then',
738
+ 'parent', // common variable name
739
+ 'list', // common variable name
740
+ 'value' // common variable name
741
+ ];
742
+
743
+ const DEFAULT_KEYWORD_CLASSNAME = "keyword";
744
+
745
+ /**
746
+ * Given raw keywords from a language definition, compile them.
747
+ *
748
+ * @param {string | Record<string,string|string[]> | Array<string>} rawKeywords
749
+ * @param {boolean} caseInsensitive
750
+ */
751
+ function compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {
752
+ /** @type KeywordDict */
753
+ const compiledKeywords = {};
754
+
755
+ // input can be a string of keywords, an array of keywords, or a object with
756
+ // named keys representing className (which can then point to a string or array)
757
+ if (typeof rawKeywords === 'string') {
758
+ compileList(className, rawKeywords.split(" "));
759
+ } else if (Array.isArray(rawKeywords)) {
760
+ compileList(className, rawKeywords);
761
+ } else {
762
+ Object.keys(rawKeywords).forEach(function(className) {
763
+ // collapse all our objects back into the parent object
764
+ Object.assign(
765
+ compiledKeywords,
766
+ compileKeywords(rawKeywords[className], caseInsensitive, className)
767
+ );
768
+ });
769
+ }
770
+ return compiledKeywords;
771
+
772
+ // ---
773
+
774
+ /**
775
+ * Compiles an individual list of keywords
776
+ *
777
+ * Ex: "for if when while|5"
778
+ *
779
+ * @param {string} className
780
+ * @param {Array<string>} keywordList
781
+ */
782
+ function compileList(className, keywordList) {
783
+ if (caseInsensitive) {
784
+ keywordList = keywordList.map(x => x.toLowerCase());
785
+ }
786
+ keywordList.forEach(function(keyword) {
787
+ const pair = keyword.split('|');
788
+ compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];
789
+ });
790
+ }
791
+ }
792
+
793
+ /**
794
+ * Returns the proper score for a given keyword
795
+ *
796
+ * Also takes into account comment keywords, which will be scored 0 UNLESS
797
+ * another score has been manually assigned.
798
+ * @param {string} keyword
799
+ * @param {string} [providedScore]
800
+ */
801
+ function scoreForKeyword(keyword, providedScore) {
802
+ // manual scores always win over common keywords
803
+ // so you can force a score of 1 if you really insist
804
+ if (providedScore) {
805
+ return Number(providedScore);
806
+ }
807
+
808
+ return commonKeyword(keyword) ? 0 : 1;
809
+ }
810
+
811
+ /**
812
+ * Determines if a given keyword is common or not
813
+ *
814
+ * @param {string} keyword */
815
+ function commonKeyword(keyword) {
816
+ return COMMON_KEYWORDS.includes(keyword.toLowerCase());
817
+ }
818
+
819
+ // compilation
820
+
821
+ /**
822
+ * Compiles a language definition result
823
+ *
824
+ * Given the raw result of a language definition (Language), compiles this so
825
+ * that it is ready for highlighting code.
826
+ * @param {Language} language
827
+ * @param {{plugins: HLJSPlugin[]}} opts
828
+ * @returns {CompiledLanguage}
829
+ */
830
+ function compileLanguage(language, { plugins }) {
831
+ /**
832
+ * Builds a regex with the case sensativility of the current language
833
+ *
834
+ * @param {RegExp | string} value
835
+ * @param {boolean} [global]
836
+ */
837
+ function langRe(value, global) {
838
+ return new RegExp(
839
+ source(value),
840
+ 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')
841
+ );
842
+ }
843
+
844
+ /**
845
+ Stores multiple regular expressions and allows you to quickly search for
846
+ them all in a string simultaneously - returning the first match. It does
847
+ this by creating a huge (a|b|c) regex - each individual item wrapped with ()
848
+ and joined by `|` - using match groups to track position. When a match is
849
+ found checking which position in the array has content allows us to figure
850
+ out which of the original regexes / match groups triggered the match.
851
+
852
+ The match object itself (the result of `Regex.exec`) is returned but also
853
+ enhanced by merging in any meta-data that was registered with the regex.
854
+ This is how we keep track of which mode matched, and what type of rule
855
+ (`illegal`, `begin`, end, etc).
856
+ */
857
+ class MultiRegex {
858
+ constructor() {
859
+ this.matchIndexes = {};
860
+ // @ts-ignore
861
+ this.regexes = [];
862
+ this.matchAt = 1;
863
+ this.position = 0;
864
+ }
865
+
866
+ // @ts-ignore
867
+ addRule(re, opts) {
868
+ opts.position = this.position++;
869
+ // @ts-ignore
870
+ this.matchIndexes[this.matchAt] = opts;
871
+ this.regexes.push([opts, re]);
872
+ this.matchAt += countMatchGroups(re) + 1;
873
+ }
874
+
875
+ compile() {
876
+ if (this.regexes.length === 0) {
877
+ // avoids the need to check length every time exec is called
878
+ // @ts-ignore
879
+ this.exec = () => null;
880
+ }
881
+ const terminators = this.regexes.map(el => el[1]);
882
+ this.matcherRe = langRe(join(terminators), true);
883
+ this.lastIndex = 0;
884
+ }
885
+
886
+ /** @param {string} s */
887
+ exec(s) {
888
+ this.matcherRe.lastIndex = this.lastIndex;
889
+ const match = this.matcherRe.exec(s);
890
+ if (!match) { return null; }
891
+
892
+ // eslint-disable-next-line no-undefined
893
+ const i = match.findIndex((el, i) => i > 0 && el !== undefined);
894
+ // @ts-ignore
895
+ const matchData = this.matchIndexes[i];
896
+ // trim off any earlier non-relevant match groups (ie, the other regex
897
+ // match groups that make up the multi-matcher)
898
+ match.splice(0, i);
899
+
900
+ return Object.assign(match, matchData);
901
+ }
902
+ }
903
+
904
+ /*
905
+ Created to solve the key deficiently with MultiRegex - there is no way to
906
+ test for multiple matches at a single location. Why would we need to do
907
+ that? In the future a more dynamic engine will allow certain matches to be
908
+ ignored. An example: if we matched say the 3rd regex in a large group but
909
+ decided to ignore it - we'd need to started testing again at the 4th
910
+ regex... but MultiRegex itself gives us no real way to do that.
911
+
912
+ So what this class creates MultiRegexs on the fly for whatever search
913
+ position they are needed.
914
+
915
+ NOTE: These additional MultiRegex objects are created dynamically. For most
916
+ grammars most of the time we will never actually need anything more than the
917
+ first MultiRegex - so this shouldn't have too much overhead.
918
+
919
+ Say this is our search group, and we match regex3, but wish to ignore it.
920
+
921
+ regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0
922
+
923
+ What we need is a new MultiRegex that only includes the remaining
924
+ possibilities:
925
+
926
+ regex4 | regex5 ' ie, startAt = 3
927
+
928
+ This class wraps all that complexity up in a simple API... `startAt` decides
929
+ where in the array of expressions to start doing the matching. It
930
+ auto-increments, so if a match is found at position 2, then startAt will be
931
+ set to 3. If the end is reached startAt will return to 0.
932
+
933
+ MOST of the time the parser will be setting startAt manually to 0.
934
+ */
935
+ class ResumableMultiRegex {
936
+ constructor() {
937
+ // @ts-ignore
938
+ this.rules = [];
939
+ // @ts-ignore
940
+ this.multiRegexes = [];
941
+ this.count = 0;
942
+
943
+ this.lastIndex = 0;
944
+ this.regexIndex = 0;
945
+ }
946
+
947
+ // @ts-ignore
948
+ getMatcher(index) {
949
+ if (this.multiRegexes[index]) return this.multiRegexes[index];
950
+
951
+ const matcher = new MultiRegex();
952
+ this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
953
+ matcher.compile();
954
+ this.multiRegexes[index] = matcher;
955
+ return matcher;
956
+ }
957
+
958
+ resumingScanAtSamePosition() {
959
+ return this.regexIndex !== 0;
960
+ }
961
+
962
+ considerAll() {
963
+ this.regexIndex = 0;
964
+ }
965
+
966
+ // @ts-ignore
967
+ addRule(re, opts) {
968
+ this.rules.push([re, opts]);
969
+ if (opts.type === "begin") this.count++;
970
+ }
971
+
972
+ /** @param {string} s */
973
+ exec(s) {
974
+ const m = this.getMatcher(this.regexIndex);
975
+ m.lastIndex = this.lastIndex;
976
+ let result = m.exec(s);
977
+
978
+ // The following is because we have no easy way to say "resume scanning at the
979
+ // existing position but also skip the current rule ONLY". What happens is
980
+ // all prior rules are also skipped which can result in matching the wrong
981
+ // thing. Example of matching "booger":
982
+
983
+ // our matcher is [string, "booger", number]
984
+ //
985
+ // ....booger....
986
+
987
+ // if "booger" is ignored then we'd really need a regex to scan from the
988
+ // SAME position for only: [string, number] but ignoring "booger" (if it
989
+ // was the first match), a simple resume would scan ahead who knows how
990
+ // far looking only for "number", ignoring potential string matches (or
991
+ // future "booger" matches that might be valid.)
992
+
993
+ // So what we do: We execute two matchers, one resuming at the same
994
+ // position, but the second full matcher starting at the position after:
995
+
996
+ // /--- resume first regex match here (for [number])
997
+ // |/---- full match here for [string, "booger", number]
998
+ // vv
999
+ // ....booger....
1000
+
1001
+ // Which ever results in a match first is then used. So this 3-4 step
1002
+ // process essentially allows us to say "match at this position, excluding
1003
+ // a prior rule that was ignored".
1004
+ //
1005
+ // 1. Match "booger" first, ignore. Also proves that [string] does non match.
1006
+ // 2. Resume matching for [number]
1007
+ // 3. Match at index + 1 for [string, "booger", number]
1008
+ // 4. If #2 and #3 result in matches, which came first?
1009
+ if (this.resumingScanAtSamePosition()) {
1010
+ if (result && result.index === this.lastIndex) ; else { // use the second matcher result
1011
+ const m2 = this.getMatcher(0);
1012
+ m2.lastIndex = this.lastIndex + 1;
1013
+ result = m2.exec(s);
1014
+ }
1015
+ }
1016
+
1017
+ if (result) {
1018
+ this.regexIndex += result.position + 1;
1019
+ if (this.regexIndex === this.count) {
1020
+ // wrap-around to considering all matches again
1021
+ this.considerAll();
1022
+ }
1023
+ }
1024
+
1025
+ return result;
1026
+ }
1027
+ }
1028
+
1029
+ /**
1030
+ * Given a mode, builds a huge ResumableMultiRegex that can be used to walk
1031
+ * the content and find matches.
1032
+ *
1033
+ * @param {CompiledMode} mode
1034
+ * @returns {ResumableMultiRegex}
1035
+ */
1036
+ function buildModeRegex(mode) {
1037
+ const mm = new ResumableMultiRegex();
1038
+
1039
+ mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: "begin" }));
1040
+
1041
+ if (mode.terminatorEnd) {
1042
+ mm.addRule(mode.terminatorEnd, { type: "end" });
1043
+ }
1044
+ if (mode.illegal) {
1045
+ mm.addRule(mode.illegal, { type: "illegal" });
1046
+ }
1047
+
1048
+ return mm;
1049
+ }
1050
+
1051
+ /** skip vs abort vs ignore
1052
+ *
1053
+ * @skip - The mode is still entered and exited normally (and contains rules apply),
1054
+ * but all content is held and added to the parent buffer rather than being
1055
+ * output when the mode ends. Mostly used with `sublanguage` to build up
1056
+ * a single large buffer than can be parsed by sublanguage.
1057
+ *
1058
+ * - The mode begin ands ends normally.
1059
+ * - Content matched is added to the parent mode buffer.
1060
+ * - The parser cursor is moved forward normally.
1061
+ *
1062
+ * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it
1063
+ * never matched) but DOES NOT continue to match subsequent `contains`
1064
+ * modes. Abort is bad/suboptimal because it can result in modes
1065
+ * farther down not getting applied because an earlier rule eats the
1066
+ * content but then aborts.
1067
+ *
1068
+ * - The mode does not begin.
1069
+ * - Content matched by `begin` is added to the mode buffer.
1070
+ * - The parser cursor is moved forward accordingly.
1071
+ *
1072
+ * @ignore - Ignores the mode (as if it never matched) and continues to match any
1073
+ * subsequent `contains` modes. Ignore isn't technically possible with
1074
+ * the current parser implementation.
1075
+ *
1076
+ * - The mode does not begin.
1077
+ * - Content matched by `begin` is ignored.
1078
+ * - The parser cursor is not moved forward.
1079
+ */
1080
+
1081
+ /**
1082
+ * Compiles an individual mode
1083
+ *
1084
+ * This can raise an error if the mode contains certain detectable known logic
1085
+ * issues.
1086
+ * @param {Mode} mode
1087
+ * @param {CompiledMode | null} [parent]
1088
+ * @returns {CompiledMode | never}
1089
+ */
1090
+ function compileMode(mode, parent) {
1091
+ const cmode = /** @type CompiledMode */ (mode);
1092
+ if (mode.isCompiled) return cmode;
1093
+
1094
+ [
1095
+ // do this early so compiler extensions generally don't have to worry about
1096
+ // the distinction between match/begin
1097
+ compileMatch
1098
+ ].forEach(ext => ext(mode, parent));
1099
+
1100
+ language.compilerExtensions.forEach(ext => ext(mode, parent));
1101
+
1102
+ // __beforeBegin is considered private API, internal use only
1103
+ mode.__beforeBegin = null;
1104
+
1105
+ [
1106
+ beginKeywords,
1107
+ // do this later so compiler extensions that come earlier have access to the
1108
+ // raw array if they wanted to perhaps manipulate it, etc.
1109
+ compileIllegal,
1110
+ // default to 1 relevance if not specified
1111
+ compileRelevance
1112
+ ].forEach(ext => ext(mode, parent));
1113
+
1114
+ mode.isCompiled = true;
1115
+
1116
+ let keywordPattern = null;
1117
+ if (typeof mode.keywords === "object") {
1118
+ keywordPattern = mode.keywords.$pattern;
1119
+ delete mode.keywords.$pattern;
1120
+ }
1121
+
1122
+ if (mode.keywords) {
1123
+ mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
1124
+ }
1125
+
1126
+ // both are not allowed
1127
+ if (mode.lexemes && keywordPattern) {
1128
+ throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");
1129
+ }
1130
+
1131
+ // `mode.lexemes` was the old standard before we added and now recommend
1132
+ // using `keywords.$pattern` to pass the keyword pattern
1133
+ keywordPattern = keywordPattern || mode.lexemes || /\w+/;
1134
+ cmode.keywordPatternRe = langRe(keywordPattern, true);
1135
+
1136
+ if (parent) {
1137
+ if (!mode.begin) mode.begin = /\B|\b/;
1138
+ cmode.beginRe = langRe(mode.begin);
1139
+ if (mode.endSameAsBegin) mode.end = mode.begin;
1140
+ if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
1141
+ if (mode.end) cmode.endRe = langRe(mode.end);
1142
+ cmode.terminatorEnd = source(mode.end) || '';
1143
+ if (mode.endsWithParent && parent.terminatorEnd) {
1144
+ cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;
1145
+ }
1146
+ }
1147
+ if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));
1148
+ if (!mode.contains) mode.contains = [];
1149
+
1150
+ mode.contains = [].concat(...mode.contains.map(function(c) {
1151
+ return expandOrCloneMode(c === 'self' ? mode : c);
1152
+ }));
1153
+ mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });
1154
+
1155
+ if (mode.starts) {
1156
+ compileMode(mode.starts, parent);
1157
+ }
1158
+
1159
+ cmode.matcher = buildModeRegex(cmode);
1160
+ return cmode;
1161
+ }
1162
+
1163
+ if (!language.compilerExtensions) language.compilerExtensions = [];
1164
+
1165
+ // self is not valid at the top-level
1166
+ if (language.contains && language.contains.includes('self')) {
1167
+ throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
1168
+ }
1169
+
1170
+ // we need a null object, which inherit will guarantee
1171
+ language.classNameAliases = inherit(language.classNameAliases || {});
1172
+
1173
+ return compileMode(/** @type Mode */ (language));
1174
+ }
1175
+
1176
+ /**
1177
+ * Determines if a mode has a dependency on it's parent or not
1178
+ *
1179
+ * If a mode does have a parent dependency then often we need to clone it if
1180
+ * it's used in multiple places so that each copy points to the correct parent,
1181
+ * where-as modes without a parent can often safely be re-used at the bottom of
1182
+ * a mode chain.
1183
+ *
1184
+ * @param {Mode | null} mode
1185
+ * @returns {boolean} - is there a dependency on the parent?
1186
+ * */
1187
+ function dependencyOnParent(mode) {
1188
+ if (!mode) return false;
1189
+
1190
+ return mode.endsWithParent || dependencyOnParent(mode.starts);
1191
+ }
1192
+
1193
+ /**
1194
+ * Expands a mode or clones it if necessary
1195
+ *
1196
+ * This is necessary for modes with parental dependenceis (see notes on
1197
+ * `dependencyOnParent`) and for nodes that have `variants` - which must then be
1198
+ * exploded into their own individual modes at compile time.
1199
+ *
1200
+ * @param {Mode} mode
1201
+ * @returns {Mode | Mode[]}
1202
+ * */
1203
+ function expandOrCloneMode(mode) {
1204
+ if (mode.variants && !mode.cachedVariants) {
1205
+ mode.cachedVariants = mode.variants.map(function(variant) {
1206
+ return inherit(mode, { variants: null }, variant);
1207
+ });
1208
+ }
1209
+
1210
+ // EXPAND
1211
+ // if we have variants then essentially "replace" the mode with the variants
1212
+ // this happens in compileMode, where this function is called from
1213
+ if (mode.cachedVariants) {
1214
+ return mode.cachedVariants;
1215
+ }
1216
+
1217
+ // CLONE
1218
+ // if we have dependencies on parents then we need a unique
1219
+ // instance of ourselves, so we can be reused with many
1220
+ // different parents without issue
1221
+ if (dependencyOnParent(mode)) {
1222
+ return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });
1223
+ }
1224
+
1225
+ if (Object.isFrozen(mode)) {
1226
+ return inherit(mode);
1227
+ }
1228
+
1229
+ // no special dependency issues, just return ourselves
1230
+ return mode;
1231
+ }
1232
+
1233
+ var version = "10.7.2";
1234
+
1235
+ // @ts-nocheck
1236
+
1237
+ function hasValueOrEmptyAttribute(value) {
1238
+ return Boolean(value || value === "");
1239
+ }
1240
+
1241
+ function BuildVuePlugin(hljs) {
1242
+ const Component = {
1243
+ props: ["language", "code", "autodetect"],
1244
+ data: function() {
1245
+ return {
1246
+ detectedLanguage: "",
1247
+ unknownLanguage: false
1248
+ };
1249
+ },
1250
+ computed: {
1251
+ className() {
1252
+ if (this.unknownLanguage) return "";
1253
+
1254
+ return "hljs " + this.detectedLanguage;
1255
+ },
1256
+ highlighted() {
1257
+ // no idea what language to use, return raw code
1258
+ if (!this.autoDetect && !hljs.getLanguage(this.language)) {
1259
+ console.warn(`The language "${this.language}" you specified could not be found.`);
1260
+ this.unknownLanguage = true;
1261
+ return escapeHTML(this.code);
1262
+ }
1263
+
1264
+ let result = {};
1265
+ if (this.autoDetect) {
1266
+ result = hljs.highlightAuto(this.code);
1267
+ this.detectedLanguage = result.language;
1268
+ } else {
1269
+ result = hljs.highlight(this.language, this.code, this.ignoreIllegals);
1270
+ this.detectedLanguage = this.language;
1271
+ }
1272
+ return result.value;
1273
+ },
1274
+ autoDetect() {
1275
+ return !this.language || hasValueOrEmptyAttribute(this.autodetect);
1276
+ },
1277
+ ignoreIllegals() {
1278
+ return true;
1279
+ }
1280
+ },
1281
+ // this avoids needing to use a whole Vue compilation pipeline just
1282
+ // to build Highlight.js
1283
+ render(createElement) {
1284
+ return createElement("pre", {}, [
1285
+ createElement("code", {
1286
+ class: this.className,
1287
+ domProps: { innerHTML: this.highlighted }
1288
+ })
1289
+ ]);
1290
+ }
1291
+ // template: `<pre><code :class="className" v-html="highlighted"></code></pre>`
1292
+ };
1293
+
1294
+ const VuePlugin = {
1295
+ install(Vue) {
1296
+ Vue.component('highlightjs', Component);
1297
+ }
1298
+ };
1299
+
1300
+ return { Component, VuePlugin };
1301
+ }
1302
+
1303
+ /* plugin itself */
1304
+
1305
+ /** @type {HLJSPlugin} */
1306
+ const mergeHTMLPlugin = {
1307
+ "after:highlightElement": ({ el, result, text }) => {
1308
+ const originalStream = nodeStream(el);
1309
+ if (!originalStream.length) return;
1310
+
1311
+ const resultNode = document.createElement('div');
1312
+ resultNode.innerHTML = result.value;
1313
+ result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
1314
+ }
1315
+ };
1316
+
1317
+ /* Stream merging support functions */
1318
+
1319
+ /**
1320
+ * @typedef Event
1321
+ * @property {'start'|'stop'} event
1322
+ * @property {number} offset
1323
+ * @property {Node} node
1324
+ */
1325
+
1326
+ /**
1327
+ * @param {Node} node
1328
+ */
1329
+ function tag(node) {
1330
+ return node.nodeName.toLowerCase();
1331
+ }
1332
+
1333
+ /**
1334
+ * @param {Node} node
1335
+ */
1336
+ function nodeStream(node) {
1337
+ /** @type Event[] */
1338
+ const result = [];
1339
+ (function _nodeStream(node, offset) {
1340
+ for (let child = node.firstChild; child; child = child.nextSibling) {
1341
+ if (child.nodeType === 3) {
1342
+ offset += child.nodeValue.length;
1343
+ } else if (child.nodeType === 1) {
1344
+ result.push({
1345
+ event: 'start',
1346
+ offset: offset,
1347
+ node: child
1348
+ });
1349
+ offset = _nodeStream(child, offset);
1350
+ // Prevent void elements from having an end tag that would actually
1351
+ // double them in the output. There are more void elements in HTML
1352
+ // but we list only those realistically expected in code display.
1353
+ if (!tag(child).match(/br|hr|img|input/)) {
1354
+ result.push({
1355
+ event: 'stop',
1356
+ offset: offset,
1357
+ node: child
1358
+ });
1359
+ }
1360
+ }
1361
+ }
1362
+ return offset;
1363
+ })(node, 0);
1364
+ return result;
1365
+ }
1366
+
1367
+ /**
1368
+ * @param {any} original - the original stream
1369
+ * @param {any} highlighted - stream of the highlighted source
1370
+ * @param {string} value - the original source itself
1371
+ */
1372
+ function mergeStreams(original, highlighted, value) {
1373
+ let processed = 0;
1374
+ let result = '';
1375
+ const nodeStack = [];
1376
+
1377
+ function selectStream() {
1378
+ if (!original.length || !highlighted.length) {
1379
+ return original.length ? original : highlighted;
1380
+ }
1381
+ if (original[0].offset !== highlighted[0].offset) {
1382
+ return (original[0].offset < highlighted[0].offset) ? original : highlighted;
1383
+ }
1384
+
1385
+ /*
1386
+ To avoid starting the stream just before it should stop the order is
1387
+ ensured that original always starts first and closes last:
1388
+
1389
+ if (event1 == 'start' && event2 == 'start')
1390
+ return original;
1391
+ if (event1 == 'start' && event2 == 'stop')
1392
+ return highlighted;
1393
+ if (event1 == 'stop' && event2 == 'start')
1394
+ return original;
1395
+ if (event1 == 'stop' && event2 == 'stop')
1396
+ return highlighted;
1397
+
1398
+ ... which is collapsed to:
1399
+ */
1400
+ return highlighted[0].event === 'start' ? original : highlighted;
1401
+ }
1402
+
1403
+ /**
1404
+ * @param {Node} node
1405
+ */
1406
+ function open(node) {
1407
+ /** @param {Attr} attr */
1408
+ function attributeString(attr) {
1409
+ return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"';
1410
+ }
1411
+ // @ts-ignore
1412
+ result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';
1413
+ }
1414
+
1415
+ /**
1416
+ * @param {Node} node
1417
+ */
1418
+ function close(node) {
1419
+ result += '</' + tag(node) + '>';
1420
+ }
1421
+
1422
+ /**
1423
+ * @param {Event} event
1424
+ */
1425
+ function render(event) {
1426
+ (event.event === 'start' ? open : close)(event.node);
1427
+ }
1428
+
1429
+ while (original.length || highlighted.length) {
1430
+ let stream = selectStream();
1431
+ result += escapeHTML(value.substring(processed, stream[0].offset));
1432
+ processed = stream[0].offset;
1433
+ if (stream === original) {
1434
+ /*
1435
+ On any opening or closing tag of the original markup we first close
1436
+ the entire highlighted node stack, then render the original tag along
1437
+ with all the following original tags at the same offset and then
1438
+ reopen all the tags on the highlighted stack.
1439
+ */
1440
+ nodeStack.reverse().forEach(close);
1441
+ do {
1442
+ render(stream.splice(0, 1)[0]);
1443
+ stream = selectStream();
1444
+ } while (stream === original && stream.length && stream[0].offset === processed);
1445
+ nodeStack.reverse().forEach(open);
1446
+ } else {
1447
+ if (stream[0].event === 'start') {
1448
+ nodeStack.push(stream[0].node);
1449
+ } else {
1450
+ nodeStack.pop();
1451
+ }
1452
+ render(stream.splice(0, 1)[0]);
1453
+ }
1454
+ }
1455
+ return result + escapeHTML(value.substr(processed));
1456
+ }
1457
+
1458
+ /*
1459
+
1460
+ For the reasoning behind this please see:
1461
+ https://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419
1462
+
1463
+ */
1464
+
1465
+ /**
1466
+ * @type {Record<string, boolean>}
1467
+ */
1468
+ const seenDeprecations = {};
1469
+
1470
+ /**
1471
+ * @param {string} message
1472
+ */
1473
+ const error = (message) => {
1474
+ console.error(message);
1475
+ };
1476
+
1477
+ /**
1478
+ * @param {string} message
1479
+ * @param {any} args
1480
+ */
1481
+ const warn = (message, ...args) => {
1482
+ console.log(`WARN: ${message}`, ...args);
1483
+ };
1484
+
1485
+ /**
1486
+ * @param {string} version
1487
+ * @param {string} message
1488
+ */
1489
+ const deprecated = (version, message) => {
1490
+ if (seenDeprecations[`${version}/${message}`]) return;
1491
+
1492
+ console.log(`Deprecated as of ${version}. ${message}`);
1493
+ seenDeprecations[`${version}/${message}`] = true;
1494
+ };
1495
+
1496
+ /*
1497
+ Syntax highlighting with language autodetection.
1498
+ https://highlightjs.org/
1499
+ */
1500
+
1501
+ const escape$1 = escapeHTML;
1502
+ const inherit$1 = inherit;
1503
+ const NO_MATCH = Symbol("nomatch");
1504
+
1505
+ /**
1506
+ * @param {any} hljs - object that is extended (legacy)
1507
+ * @returns {HLJSApi}
1508
+ */
1509
+ const HLJS = function(hljs) {
1510
+ // Global internal variables used within the highlight.js library.
1511
+ /** @type {Record<string, Language>} */
1512
+ const languages = Object.create(null);
1513
+ /** @type {Record<string, string>} */
1514
+ const aliases = Object.create(null);
1515
+ /** @type {HLJSPlugin[]} */
1516
+ const plugins = [];
1517
+
1518
+ // safe/production mode - swallows more errors, tries to keep running
1519
+ // even if a single syntax or parse hits a fatal error
1520
+ let SAFE_MODE = true;
1521
+ const fixMarkupRe = /(^(<[^>]+>|\t|)+|\n)/gm;
1522
+ const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
1523
+ /** @type {Language} */
1524
+ const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };
1525
+
1526
+ // Global options used when within external APIs. This is modified when
1527
+ // calling the `hljs.configure` function.
1528
+ /** @type HLJSOptions */
1529
+ let options = {
1530
+ noHighlightRe: /^(no-?highlight)$/i,
1531
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
1532
+ classPrefix: 'hljs-',
1533
+ tabReplace: null,
1534
+ useBR: false,
1535
+ languages: null,
1536
+ // beta configuration options, subject to change, welcome to discuss
1537
+ // https://github.com/highlightjs/highlight.js/issues/1086
1538
+ __emitter: TokenTreeEmitter
1539
+ };
1540
+
1541
+ /* Utility functions */
1542
+
1543
+ /**
1544
+ * Tests a language name to see if highlighting should be skipped
1545
+ * @param {string} languageName
1546
+ */
1547
+ function shouldNotHighlight(languageName) {
1548
+ return options.noHighlightRe.test(languageName);
1549
+ }
1550
+
1551
+ /**
1552
+ * @param {HighlightedHTMLElement} block - the HTML element to determine language for
1553
+ */
1554
+ function blockLanguage(block) {
1555
+ let classes = block.className + ' ';
1556
+
1557
+ classes += block.parentNode ? block.parentNode.className : '';
1558
+
1559
+ // language-* takes precedence over non-prefixed class names.
1560
+ const match = options.languageDetectRe.exec(classes);
1561
+ if (match) {
1562
+ const language = getLanguage(match[1]);
1563
+ if (!language) {
1564
+ warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
1565
+ warn("Falling back to no-highlight mode for this block.", block);
1566
+ }
1567
+ return language ? match[1] : 'no-highlight';
1568
+ }
1569
+
1570
+ return classes
1571
+ .split(/\s+/)
1572
+ .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));
1573
+ }
1574
+
1575
+ /**
1576
+ * Core highlighting function.
1577
+ *
1578
+ * OLD API
1579
+ * highlight(lang, code, ignoreIllegals, continuation)
1580
+ *
1581
+ * NEW API
1582
+ * highlight(code, {lang, ignoreIllegals})
1583
+ *
1584
+ * @param {string} codeOrlanguageName - the language to use for highlighting
1585
+ * @param {string | HighlightOptions} optionsOrCode - the code to highlight
1586
+ * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
1587
+ * @param {CompiledMode} [continuation] - current continuation mode, if any
1588
+ *
1589
+ * @returns {HighlightResult} Result - an object that represents the result
1590
+ * @property {string} language - the language name
1591
+ * @property {number} relevance - the relevance score
1592
+ * @property {string} value - the highlighted HTML code
1593
+ * @property {string} code - the original raw code
1594
+ * @property {CompiledMode} top - top of the current mode stack
1595
+ * @property {boolean} illegal - indicates whether any illegal matches were found
1596
+ */
1597
+ function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {
1598
+ let code = "";
1599
+ let languageName = "";
1600
+ if (typeof optionsOrCode === "object") {
1601
+ code = codeOrlanguageName;
1602
+ ignoreIllegals = optionsOrCode.ignoreIllegals;
1603
+ languageName = optionsOrCode.language;
1604
+ // continuation not supported at all via the new API
1605
+ // eslint-disable-next-line no-undefined
1606
+ continuation = undefined;
1607
+ } else {
1608
+ // old API
1609
+ deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
1610
+ deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
1611
+ languageName = codeOrlanguageName;
1612
+ code = optionsOrCode;
1613
+ }
1614
+
1615
+ /** @type {BeforeHighlightContext} */
1616
+ const context = {
1617
+ code,
1618
+ language: languageName
1619
+ };
1620
+ // the plugin can change the desired language or the code to be highlighted
1621
+ // just be changing the object it was passed
1622
+ fire("before:highlight", context);
1623
+
1624
+ // a before plugin can usurp the result completely by providing it's own
1625
+ // in which case we don't even need to call highlight
1626
+ const result = context.result
1627
+ ? context.result
1628
+ : _highlight(context.language, context.code, ignoreIllegals, continuation);
1629
+
1630
+ result.code = context.code;
1631
+ // the plugin can change anything in result to suite it
1632
+ fire("after:highlight", result);
1633
+
1634
+ return result;
1635
+ }
1636
+
1637
+ /**
1638
+ * private highlight that's used internally and does not fire callbacks
1639
+ *
1640
+ * @param {string} languageName - the language to use for highlighting
1641
+ * @param {string} codeToHighlight - the code to highlight
1642
+ * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
1643
+ * @param {CompiledMode?} [continuation] - current continuation mode, if any
1644
+ * @returns {HighlightResult} - result of the highlight operation
1645
+ */
1646
+ function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
1647
+ /**
1648
+ * Return keyword data if a match is a keyword
1649
+ * @param {CompiledMode} mode - current mode
1650
+ * @param {RegExpMatchArray} match - regexp match data
1651
+ * @returns {KeywordData | false}
1652
+ */
1653
+ function keywordData(mode, match) {
1654
+ const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];
1655
+ return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];
1656
+ }
1657
+
1658
+ function processKeywords() {
1659
+ if (!top.keywords) {
1660
+ emitter.addText(modeBuffer);
1661
+ return;
1662
+ }
1663
+
1664
+ let lastIndex = 0;
1665
+ top.keywordPatternRe.lastIndex = 0;
1666
+ let match = top.keywordPatternRe.exec(modeBuffer);
1667
+ let buf = "";
1668
+
1669
+ while (match) {
1670
+ buf += modeBuffer.substring(lastIndex, match.index);
1671
+ const data = keywordData(top, match);
1672
+ if (data) {
1673
+ const [kind, keywordRelevance] = data;
1674
+ emitter.addText(buf);
1675
+ buf = "";
1676
+
1677
+ relevance += keywordRelevance;
1678
+ if (kind.startsWith("_")) {
1679
+ // _ implied for relevance only, do not highlight
1680
+ // by applying a class name
1681
+ buf += match[0];
1682
+ } else {
1683
+ const cssClass = language.classNameAliases[kind] || kind;
1684
+ emitter.addKeyword(match[0], cssClass);
1685
+ }
1686
+ } else {
1687
+ buf += match[0];
1688
+ }
1689
+ lastIndex = top.keywordPatternRe.lastIndex;
1690
+ match = top.keywordPatternRe.exec(modeBuffer);
1691
+ }
1692
+ buf += modeBuffer.substr(lastIndex);
1693
+ emitter.addText(buf);
1694
+ }
1695
+
1696
+ function processSubLanguage() {
1697
+ if (modeBuffer === "") return;
1698
+ /** @type HighlightResult */
1699
+ let result = null;
1700
+
1701
+ if (typeof top.subLanguage === 'string') {
1702
+ if (!languages[top.subLanguage]) {
1703
+ emitter.addText(modeBuffer);
1704
+ return;
1705
+ }
1706
+ result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
1707
+ continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);
1708
+ } else {
1709
+ result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
1710
+ }
1711
+
1712
+ // Counting embedded language score towards the host language may be disabled
1713
+ // with zeroing the containing mode relevance. Use case in point is Markdown that
1714
+ // allows XML everywhere and makes every XML snippet to have a much larger Markdown
1715
+ // score.
1716
+ if (top.relevance > 0) {
1717
+ relevance += result.relevance;
1718
+ }
1719
+ emitter.addSublanguage(result.emitter, result.language);
1720
+ }
1721
+
1722
+ function processBuffer() {
1723
+ if (top.subLanguage != null) {
1724
+ processSubLanguage();
1725
+ } else {
1726
+ processKeywords();
1727
+ }
1728
+ modeBuffer = '';
1729
+ }
1730
+
1731
+ /**
1732
+ * @param {Mode} mode - new mode to start
1733
+ */
1734
+ function startNewMode(mode) {
1735
+ if (mode.className) {
1736
+ emitter.openNode(language.classNameAliases[mode.className] || mode.className);
1737
+ }
1738
+ top = Object.create(mode, { parent: { value: top } });
1739
+ return top;
1740
+ }
1741
+
1742
+ /**
1743
+ * @param {CompiledMode } mode - the mode to potentially end
1744
+ * @param {RegExpMatchArray} match - the latest match
1745
+ * @param {string} matchPlusRemainder - match plus remainder of content
1746
+ * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode
1747
+ */
1748
+ function endOfMode(mode, match, matchPlusRemainder) {
1749
+ let matched = startsWith(mode.endRe, matchPlusRemainder);
1750
+
1751
+ if (matched) {
1752
+ if (mode["on:end"]) {
1753
+ const resp = new Response(mode);
1754
+ mode["on:end"](match, resp);
1755
+ if (resp.isMatchIgnored) matched = false;
1756
+ }
1757
+
1758
+ if (matched) {
1759
+ while (mode.endsParent && mode.parent) {
1760
+ mode = mode.parent;
1761
+ }
1762
+ return mode;
1763
+ }
1764
+ }
1765
+ // even if on:end fires an `ignore` it's still possible
1766
+ // that we might trigger the end node because of a parent mode
1767
+ if (mode.endsWithParent) {
1768
+ return endOfMode(mode.parent, match, matchPlusRemainder);
1769
+ }
1770
+ }
1771
+
1772
+ /**
1773
+ * Handle matching but then ignoring a sequence of text
1774
+ *
1775
+ * @param {string} lexeme - string containing full match text
1776
+ */
1777
+ function doIgnore(lexeme) {
1778
+ if (top.matcher.regexIndex === 0) {
1779
+ // no more regexs to potentially match here, so we move the cursor forward one
1780
+ // space
1781
+ modeBuffer += lexeme[0];
1782
+ return 1;
1783
+ } else {
1784
+ // no need to move the cursor, we still have additional regexes to try and
1785
+ // match at this very spot
1786
+ resumeScanAtSamePosition = true;
1787
+ return 0;
1788
+ }
1789
+ }
1790
+
1791
+ /**
1792
+ * Handle the start of a new potential mode match
1793
+ *
1794
+ * @param {EnhancedMatch} match - the current match
1795
+ * @returns {number} how far to advance the parse cursor
1796
+ */
1797
+ function doBeginMatch(match) {
1798
+ const lexeme = match[0];
1799
+ const newMode = match.rule;
1800
+
1801
+ const resp = new Response(newMode);
1802
+ // first internal before callbacks, then the public ones
1803
+ const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
1804
+ for (const cb of beforeCallbacks) {
1805
+ if (!cb) continue;
1806
+ cb(match, resp);
1807
+ if (resp.isMatchIgnored) return doIgnore(lexeme);
1808
+ }
1809
+
1810
+ if (newMode && newMode.endSameAsBegin) {
1811
+ newMode.endRe = escape(lexeme);
1812
+ }
1813
+
1814
+ if (newMode.skip) {
1815
+ modeBuffer += lexeme;
1816
+ } else {
1817
+ if (newMode.excludeBegin) {
1818
+ modeBuffer += lexeme;
1819
+ }
1820
+ processBuffer();
1821
+ if (!newMode.returnBegin && !newMode.excludeBegin) {
1822
+ modeBuffer = lexeme;
1823
+ }
1824
+ }
1825
+ startNewMode(newMode);
1826
+ // if (mode["after:begin"]) {
1827
+ // let resp = new Response(mode);
1828
+ // mode["after:begin"](match, resp);
1829
+ // }
1830
+ return newMode.returnBegin ? 0 : lexeme.length;
1831
+ }
1832
+
1833
+ /**
1834
+ * Handle the potential end of mode
1835
+ *
1836
+ * @param {RegExpMatchArray} match - the current match
1837
+ */
1838
+ function doEndMatch(match) {
1839
+ const lexeme = match[0];
1840
+ const matchPlusRemainder = codeToHighlight.substr(match.index);
1841
+
1842
+ const endMode = endOfMode(top, match, matchPlusRemainder);
1843
+ if (!endMode) { return NO_MATCH; }
1844
+
1845
+ const origin = top;
1846
+ if (origin.skip) {
1847
+ modeBuffer += lexeme;
1848
+ } else {
1849
+ if (!(origin.returnEnd || origin.excludeEnd)) {
1850
+ modeBuffer += lexeme;
1851
+ }
1852
+ processBuffer();
1853
+ if (origin.excludeEnd) {
1854
+ modeBuffer = lexeme;
1855
+ }
1856
+ }
1857
+ do {
1858
+ if (top.className) {
1859
+ emitter.closeNode();
1860
+ }
1861
+ if (!top.skip && !top.subLanguage) {
1862
+ relevance += top.relevance;
1863
+ }
1864
+ top = top.parent;
1865
+ } while (top !== endMode.parent);
1866
+ if (endMode.starts) {
1867
+ if (endMode.endSameAsBegin) {
1868
+ endMode.starts.endRe = endMode.endRe;
1869
+ }
1870
+ startNewMode(endMode.starts);
1871
+ }
1872
+ return origin.returnEnd ? 0 : lexeme.length;
1873
+ }
1874
+
1875
+ function processContinuations() {
1876
+ const list = [];
1877
+ for (let current = top; current !== language; current = current.parent) {
1878
+ if (current.className) {
1879
+ list.unshift(current.className);
1880
+ }
1881
+ }
1882
+ list.forEach(item => emitter.openNode(item));
1883
+ }
1884
+
1885
+ /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */
1886
+ let lastMatch = {};
1887
+
1888
+ /**
1889
+ * Process an individual match
1890
+ *
1891
+ * @param {string} textBeforeMatch - text preceeding the match (since the last match)
1892
+ * @param {EnhancedMatch} [match] - the match itself
1893
+ */
1894
+ function processLexeme(textBeforeMatch, match) {
1895
+ const lexeme = match && match[0];
1896
+
1897
+ // add non-matched text to the current mode buffer
1898
+ modeBuffer += textBeforeMatch;
1899
+
1900
+ if (lexeme == null) {
1901
+ processBuffer();
1902
+ return 0;
1903
+ }
1904
+
1905
+ // we've found a 0 width match and we're stuck, so we need to advance
1906
+ // this happens when we have badly behaved rules that have optional matchers to the degree that
1907
+ // sometimes they can end up matching nothing at all
1908
+ // Ref: https://github.com/highlightjs/highlight.js/issues/2140
1909
+ if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
1910
+ // spit the "skipped" character that our regex choked on back into the output sequence
1911
+ modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
1912
+ if (!SAFE_MODE) {
1913
+ /** @type {AnnotatedError} */
1914
+ const err = new Error('0 width match regex');
1915
+ err.languageName = languageName;
1916
+ err.badRule = lastMatch.rule;
1917
+ throw err;
1918
+ }
1919
+ return 1;
1920
+ }
1921
+ lastMatch = match;
1922
+
1923
+ if (match.type === "begin") {
1924
+ return doBeginMatch(match);
1925
+ } else if (match.type === "illegal" && !ignoreIllegals) {
1926
+ // illegal match, we do not continue processing
1927
+ /** @type {AnnotatedError} */
1928
+ const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
1929
+ err.mode = top;
1930
+ throw err;
1931
+ } else if (match.type === "end") {
1932
+ const processed = doEndMatch(match);
1933
+ if (processed !== NO_MATCH) {
1934
+ return processed;
1935
+ }
1936
+ }
1937
+
1938
+ // edge case for when illegal matches $ (end of line) which is technically
1939
+ // a 0 width match but not a begin/end match so it's not caught by the
1940
+ // first handler (when ignoreIllegals is true)
1941
+ if (match.type === "illegal" && lexeme === "") {
1942
+ // advance so we aren't stuck in an infinite loop
1943
+ return 1;
1944
+ }
1945
+
1946
+ // infinite loops are BAD, this is a last ditch catch all. if we have a
1947
+ // decent number of iterations yet our index (cursor position in our
1948
+ // parsing) still 3x behind our index then something is very wrong
1949
+ // so we bail
1950
+ if (iterations > 100000 && iterations > match.index * 3) {
1951
+ const err = new Error('potential infinite loop, way more iterations than matches');
1952
+ throw err;
1953
+ }
1954
+
1955
+ /*
1956
+ Why might be find ourselves here? Only one occasion now. An end match that was
1957
+ triggered but could not be completed. When might this happen? When an `endSameasBegin`
1958
+ rule sets the end rule to a specific match. Since the overall mode termination rule that's
1959
+ being used to scan the text isn't recompiled that means that any match that LOOKS like
1960
+ the end (but is not, because it is not an exact match to the beginning) will
1961
+ end up here. A definite end match, but when `doEndMatch` tries to "reapply"
1962
+ the end rule and fails to match, we wind up here, and just silently ignore the end.
1963
+
1964
+ This causes no real harm other than stopping a few times too many.
1965
+ */
1966
+
1967
+ modeBuffer += lexeme;
1968
+ return lexeme.length;
1969
+ }
1970
+
1971
+ const language = getLanguage(languageName);
1972
+ if (!language) {
1973
+ error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
1974
+ throw new Error('Unknown language: "' + languageName + '"');
1975
+ }
1976
+
1977
+ const md = compileLanguage(language, { plugins });
1978
+ let result = '';
1979
+ /** @type {CompiledMode} */
1980
+ let top = continuation || md;
1981
+ /** @type Record<string,CompiledMode> */
1982
+ const continuations = {}; // keep continuations for sub-languages
1983
+ const emitter = new options.__emitter(options);
1984
+ processContinuations();
1985
+ let modeBuffer = '';
1986
+ let relevance = 0;
1987
+ let index = 0;
1988
+ let iterations = 0;
1989
+ let resumeScanAtSamePosition = false;
1990
+
1991
+ try {
1992
+ top.matcher.considerAll();
1993
+
1994
+ for (;;) {
1995
+ iterations++;
1996
+ if (resumeScanAtSamePosition) {
1997
+ // only regexes not matched previously will now be
1998
+ // considered for a potential match
1999
+ resumeScanAtSamePosition = false;
2000
+ } else {
2001
+ top.matcher.considerAll();
2002
+ }
2003
+ top.matcher.lastIndex = index;
2004
+
2005
+ const match = top.matcher.exec(codeToHighlight);
2006
+ // console.log("match", match[0], match.rule && match.rule.begin)
2007
+
2008
+ if (!match) break;
2009
+
2010
+ const beforeMatch = codeToHighlight.substring(index, match.index);
2011
+ const processedCount = processLexeme(beforeMatch, match);
2012
+ index = match.index + processedCount;
2013
+ }
2014
+ processLexeme(codeToHighlight.substr(index));
2015
+ emitter.closeAllNodes();
2016
+ emitter.finalize();
2017
+ result = emitter.toHTML();
2018
+
2019
+ return {
2020
+ // avoid possible breakage with v10 clients expecting
2021
+ // this to always be an integer
2022
+ relevance: Math.floor(relevance),
2023
+ value: result,
2024
+ language: languageName,
2025
+ illegal: false,
2026
+ emitter: emitter,
2027
+ top: top
2028
+ };
2029
+ } catch (err) {
2030
+ if (err.message && err.message.includes('Illegal')) {
2031
+ return {
2032
+ illegal: true,
2033
+ illegalBy: {
2034
+ msg: err.message,
2035
+ context: codeToHighlight.slice(index - 100, index + 100),
2036
+ mode: err.mode
2037
+ },
2038
+ sofar: result,
2039
+ relevance: 0,
2040
+ value: escape$1(codeToHighlight),
2041
+ emitter: emitter
2042
+ };
2043
+ } else if (SAFE_MODE) {
2044
+ return {
2045
+ illegal: false,
2046
+ relevance: 0,
2047
+ value: escape$1(codeToHighlight),
2048
+ emitter: emitter,
2049
+ language: languageName,
2050
+ top: top,
2051
+ errorRaised: err
2052
+ };
2053
+ } else {
2054
+ throw err;
2055
+ }
2056
+ }
2057
+ }
2058
+
2059
+ /**
2060
+ * returns a valid highlight result, without actually doing any actual work,
2061
+ * auto highlight starts with this and it's possible for small snippets that
2062
+ * auto-detection may not find a better match
2063
+ * @param {string} code
2064
+ * @returns {HighlightResult}
2065
+ */
2066
+ function justTextHighlightResult(code) {
2067
+ const result = {
2068
+ relevance: 0,
2069
+ emitter: new options.__emitter(options),
2070
+ value: escape$1(code),
2071
+ illegal: false,
2072
+ top: PLAINTEXT_LANGUAGE
2073
+ };
2074
+ result.emitter.addText(code);
2075
+ return result;
2076
+ }
2077
+
2078
+ /**
2079
+ Highlighting with language detection. Accepts a string with the code to
2080
+ highlight. Returns an object with the following properties:
2081
+
2082
+ - language (detected language)
2083
+ - relevance (int)
2084
+ - value (an HTML string with highlighting markup)
2085
+ - second_best (object with the same structure for second-best heuristically
2086
+ detected language, may be absent)
2087
+
2088
+ @param {string} code
2089
+ @param {Array<string>} [languageSubset]
2090
+ @returns {AutoHighlightResult}
2091
+ */
2092
+ function highlightAuto(code, languageSubset) {
2093
+ languageSubset = languageSubset || options.languages || Object.keys(languages);
2094
+ const plaintext = justTextHighlightResult(code);
2095
+
2096
+ const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>
2097
+ _highlight(name, code, false)
2098
+ );
2099
+ results.unshift(plaintext); // plaintext is always an option
2100
+
2101
+ const sorted = results.sort((a, b) => {
2102
+ // sort base on relevance
2103
+ if (a.relevance !== b.relevance) return b.relevance - a.relevance;
2104
+
2105
+ // always award the tie to the base language
2106
+ // ie if C++ and Arduino are tied, it's more likely to be C++
2107
+ if (a.language && b.language) {
2108
+ if (getLanguage(a.language).supersetOf === b.language) {
2109
+ return 1;
2110
+ } else if (getLanguage(b.language).supersetOf === a.language) {
2111
+ return -1;
2112
+ }
2113
+ }
2114
+
2115
+ // otherwise say they are equal, which has the effect of sorting on
2116
+ // relevance while preserving the original ordering - which is how ties
2117
+ // have historically been settled, ie the language that comes first always
2118
+ // wins in the case of a tie
2119
+ return 0;
2120
+ });
2121
+
2122
+ const [best, secondBest] = sorted;
2123
+
2124
+ /** @type {AutoHighlightResult} */
2125
+ const result = best;
2126
+ result.second_best = secondBest;
2127
+
2128
+ return result;
2129
+ }
2130
+
2131
+ /**
2132
+ Post-processing of the highlighted markup:
2133
+
2134
+ - replace TABs with something more useful
2135
+ - replace real line-breaks with '<br>' for non-pre containers
2136
+
2137
+ @param {string} html
2138
+ @returns {string}
2139
+ */
2140
+ function fixMarkup(html) {
2141
+ if (!(options.tabReplace || options.useBR)) {
2142
+ return html;
2143
+ }
2144
+
2145
+ return html.replace(fixMarkupRe, match => {
2146
+ if (match === '\n') {
2147
+ return options.useBR ? '<br>' : match;
2148
+ } else if (options.tabReplace) {
2149
+ return match.replace(/\t/g, options.tabReplace);
2150
+ }
2151
+ return match;
2152
+ });
2153
+ }
2154
+
2155
+ /**
2156
+ * Builds new class name for block given the language name
2157
+ *
2158
+ * @param {HTMLElement} element
2159
+ * @param {string} [currentLang]
2160
+ * @param {string} [resultLang]
2161
+ */
2162
+ function updateClassName(element, currentLang, resultLang) {
2163
+ const language = currentLang ? aliases[currentLang] : resultLang;
2164
+
2165
+ element.classList.add("hljs");
2166
+ if (language) element.classList.add(language);
2167
+ }
2168
+
2169
+ /** @type {HLJSPlugin} */
2170
+ const brPlugin = {
2171
+ "before:highlightElement": ({ el }) => {
2172
+ if (options.useBR) {
2173
+ el.innerHTML = el.innerHTML.replace(/\n/g, '').replace(/<br[ /]*>/g, '\n');
2174
+ }
2175
+ },
2176
+ "after:highlightElement": ({ result }) => {
2177
+ if (options.useBR) {
2178
+ result.value = result.value.replace(/\n/g, "<br>");
2179
+ }
2180
+ }
2181
+ };
2182
+
2183
+ const TAB_REPLACE_RE = /^(<[^>]+>|\t)+/gm;
2184
+ /** @type {HLJSPlugin} */
2185
+ const tabReplacePlugin = {
2186
+ "after:highlightElement": ({ result }) => {
2187
+ if (options.tabReplace) {
2188
+ result.value = result.value.replace(TAB_REPLACE_RE, (m) =>
2189
+ m.replace(/\t/g, options.tabReplace)
2190
+ );
2191
+ }
2192
+ }
2193
+ };
2194
+
2195
+ /**
2196
+ * Applies highlighting to a DOM node containing code. Accepts a DOM node and
2197
+ * two optional parameters for fixMarkup.
2198
+ *
2199
+ * @param {HighlightedHTMLElement} element - the HTML element to highlight
2200
+ */
2201
+ function highlightElement(element) {
2202
+ /** @type HTMLElement */
2203
+ let node = null;
2204
+ const language = blockLanguage(element);
2205
+
2206
+ if (shouldNotHighlight(language)) return;
2207
+
2208
+ // support for v10 API
2209
+ fire("before:highlightElement",
2210
+ { el: element, language: language });
2211
+
2212
+ node = element;
2213
+ const text = node.textContent;
2214
+ const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);
2215
+
2216
+ // support for v10 API
2217
+ fire("after:highlightElement", { el: element, result, text });
2218
+
2219
+ element.innerHTML = result.value;
2220
+ updateClassName(element, language, result.language);
2221
+ element.result = {
2222
+ language: result.language,
2223
+ // TODO: remove with version 11.0
2224
+ re: result.relevance,
2225
+ relavance: result.relevance
2226
+ };
2227
+ if (result.second_best) {
2228
+ element.second_best = {
2229
+ language: result.second_best.language,
2230
+ // TODO: remove with version 11.0
2231
+ re: result.second_best.relevance,
2232
+ relavance: result.second_best.relevance
2233
+ };
2234
+ }
2235
+ }
2236
+
2237
+ /**
2238
+ * Updates highlight.js global options with the passed options
2239
+ *
2240
+ * @param {Partial<HLJSOptions>} userOptions
2241
+ */
2242
+ function configure(userOptions) {
2243
+ if (userOptions.useBR) {
2244
+ deprecated("10.3.0", "'useBR' will be removed entirely in v11.0");
2245
+ deprecated("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559");
2246
+ }
2247
+ options = inherit$1(options, userOptions);
2248
+ }
2249
+
2250
+ /**
2251
+ * Highlights to all <pre><code> blocks on a page
2252
+ *
2253
+ * @type {Function & {called?: boolean}}
2254
+ */
2255
+ // TODO: remove v12, deprecated
2256
+ const initHighlighting = () => {
2257
+ if (initHighlighting.called) return;
2258
+ initHighlighting.called = true;
2259
+
2260
+ deprecated("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead.");
2261
+
2262
+ const blocks = document.querySelectorAll('pre code');
2263
+ blocks.forEach(highlightElement);
2264
+ };
2265
+
2266
+ // Higlights all when DOMContentLoaded fires
2267
+ // TODO: remove v12, deprecated
2268
+ function initHighlightingOnLoad() {
2269
+ deprecated("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead.");
2270
+ wantsHighlight = true;
2271
+ }
2272
+
2273
+ let wantsHighlight = false;
2274
+
2275
+ /**
2276
+ * auto-highlights all pre>code elements on the page
2277
+ */
2278
+ function highlightAll() {
2279
+ // if we are called too early in the loading process
2280
+ if (document.readyState === "loading") {
2281
+ wantsHighlight = true;
2282
+ return;
2283
+ }
2284
+
2285
+ const blocks = document.querySelectorAll('pre code');
2286
+ blocks.forEach(highlightElement);
2287
+ }
2288
+
2289
+ function boot() {
2290
+ // if a highlight was requested before DOM was loaded, do now
2291
+ if (wantsHighlight) highlightAll();
2292
+ }
2293
+
2294
+ // make sure we are in the browser environment
2295
+ if (typeof window !== 'undefined' && window.addEventListener) {
2296
+ window.addEventListener('DOMContentLoaded', boot, false);
2297
+ }
2298
+
2299
+ /**
2300
+ * Register a language grammar module
2301
+ *
2302
+ * @param {string} languageName
2303
+ * @param {LanguageFn} languageDefinition
2304
+ */
2305
+ function registerLanguage(languageName, languageDefinition) {
2306
+ let lang = null;
2307
+ try {
2308
+ lang = languageDefinition(hljs);
2309
+ } catch (error$1) {
2310
+ error("Language definition for '{}' could not be registered.".replace("{}", languageName));
2311
+ // hard or soft error
2312
+ if (!SAFE_MODE) { throw error$1; } else { error(error$1); }
2313
+ // languages that have serious errors are replaced with essentially a
2314
+ // "plaintext" stand-in so that the code blocks will still get normal
2315
+ // css classes applied to them - and one bad language won't break the
2316
+ // entire highlighter
2317
+ lang = PLAINTEXT_LANGUAGE;
2318
+ }
2319
+ // give it a temporary name if it doesn't have one in the meta-data
2320
+ if (!lang.name) lang.name = languageName;
2321
+ languages[languageName] = lang;
2322
+ lang.rawDefinition = languageDefinition.bind(null, hljs);
2323
+
2324
+ if (lang.aliases) {
2325
+ registerAliases(lang.aliases, { languageName });
2326
+ }
2327
+ }
2328
+
2329
+ /**
2330
+ * Remove a language grammar module
2331
+ *
2332
+ * @param {string} languageName
2333
+ */
2334
+ function unregisterLanguage(languageName) {
2335
+ delete languages[languageName];
2336
+ for (const alias of Object.keys(aliases)) {
2337
+ if (aliases[alias] === languageName) {
2338
+ delete aliases[alias];
2339
+ }
2340
+ }
2341
+ }
2342
+
2343
+ /**
2344
+ * @returns {string[]} List of language internal names
2345
+ */
2346
+ function listLanguages() {
2347
+ return Object.keys(languages);
2348
+ }
2349
+
2350
+ /**
2351
+ intended usage: When one language truly requires another
2352
+
2353
+ Unlike `getLanguage`, this will throw when the requested language
2354
+ is not available.
2355
+
2356
+ @param {string} name - name of the language to fetch/require
2357
+ @returns {Language | never}
2358
+ */
2359
+ function requireLanguage(name) {
2360
+ deprecated("10.4.0", "requireLanguage will be removed entirely in v11.");
2361
+ deprecated("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844");
2362
+
2363
+ const lang = getLanguage(name);
2364
+ if (lang) { return lang; }
2365
+
2366
+ const err = new Error('The \'{}\' language is required, but not loaded.'.replace('{}', name));
2367
+ throw err;
2368
+ }
2369
+
2370
+ /**
2371
+ * @param {string} name - name of the language to retrieve
2372
+ * @returns {Language | undefined}
2373
+ */
2374
+ function getLanguage(name) {
2375
+ name = (name || '').toLowerCase();
2376
+ return languages[name] || languages[aliases[name]];
2377
+ }
2378
+
2379
+ /**
2380
+ *
2381
+ * @param {string|string[]} aliasList - single alias or list of aliases
2382
+ * @param {{languageName: string}} opts
2383
+ */
2384
+ function registerAliases(aliasList, { languageName }) {
2385
+ if (typeof aliasList === 'string') {
2386
+ aliasList = [aliasList];
2387
+ }
2388
+ aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });
2389
+ }
2390
+
2391
+ /**
2392
+ * Determines if a given language has auto-detection enabled
2393
+ * @param {string} name - name of the language
2394
+ */
2395
+ function autoDetection(name) {
2396
+ const lang = getLanguage(name);
2397
+ return lang && !lang.disableAutodetect;
2398
+ }
2399
+
2400
+ /**
2401
+ * Upgrades the old highlightBlock plugins to the new
2402
+ * highlightElement API
2403
+ * @param {HLJSPlugin} plugin
2404
+ */
2405
+ function upgradePluginAPI(plugin) {
2406
+ // TODO: remove with v12
2407
+ if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) {
2408
+ plugin["before:highlightElement"] = (data) => {
2409
+ plugin["before:highlightBlock"](
2410
+ Object.assign({ block: data.el }, data)
2411
+ );
2412
+ };
2413
+ }
2414
+ if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) {
2415
+ plugin["after:highlightElement"] = (data) => {
2416
+ plugin["after:highlightBlock"](
2417
+ Object.assign({ block: data.el }, data)
2418
+ );
2419
+ };
2420
+ }
2421
+ }
2422
+
2423
+ /**
2424
+ * @param {HLJSPlugin} plugin
2425
+ */
2426
+ function addPlugin(plugin) {
2427
+ upgradePluginAPI(plugin);
2428
+ plugins.push(plugin);
2429
+ }
2430
+
2431
+ /**
2432
+ *
2433
+ * @param {PluginEvent} event
2434
+ * @param {any} args
2435
+ */
2436
+ function fire(event, args) {
2437
+ const cb = event;
2438
+ plugins.forEach(function(plugin) {
2439
+ if (plugin[cb]) {
2440
+ plugin[cb](args);
2441
+ }
2442
+ });
2443
+ }
2444
+
2445
+ /**
2446
+ Note: fixMarkup is deprecated and will be removed entirely in v11
2447
+
2448
+ @param {string} arg
2449
+ @returns {string}
2450
+ */
2451
+ function deprecateFixMarkup(arg) {
2452
+ deprecated("10.2.0", "fixMarkup will be removed entirely in v11.0");
2453
+ deprecated("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534");
2454
+
2455
+ return fixMarkup(arg);
2456
+ }
2457
+
2458
+ /**
2459
+ *
2460
+ * @param {HighlightedHTMLElement} el
2461
+ */
2462
+ function deprecateHighlightBlock(el) {
2463
+ deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
2464
+ deprecated("10.7.0", "Please use highlightElement now.");
2465
+
2466
+ return highlightElement(el);
2467
+ }
2468
+
2469
+ /* Interface definition */
2470
+ Object.assign(hljs, {
2471
+ highlight,
2472
+ highlightAuto,
2473
+ highlightAll,
2474
+ fixMarkup: deprecateFixMarkup,
2475
+ highlightElement,
2476
+ // TODO: Remove with v12 API
2477
+ highlightBlock: deprecateHighlightBlock,
2478
+ configure,
2479
+ initHighlighting,
2480
+ initHighlightingOnLoad,
2481
+ registerLanguage,
2482
+ unregisterLanguage,
2483
+ listLanguages,
2484
+ getLanguage,
2485
+ registerAliases,
2486
+ requireLanguage,
2487
+ autoDetection,
2488
+ inherit: inherit$1,
2489
+ addPlugin,
2490
+ // plugins for frameworks
2491
+ vuePlugin: BuildVuePlugin(hljs).VuePlugin
2492
+ });
2493
+
2494
+ hljs.debugMode = function() { SAFE_MODE = false; };
2495
+ hljs.safeMode = function() { SAFE_MODE = true; };
2496
+ hljs.versionString = version;
2497
+
2498
+ for (const key in MODES) {
2499
+ // @ts-ignore
2500
+ if (typeof MODES[key] === "object") {
2501
+ // @ts-ignore
2502
+ deepFreezeEs6(MODES[key]);
2503
+ }
2504
+ }
2505
+
2506
+ // merge all the modes/regexs into our main object
2507
+ Object.assign(hljs, MODES);
2508
+
2509
+ // built-in plugins, likely to be moved out of core in the future
2510
+ hljs.addPlugin(brPlugin); // slated to be removed in v11
2511
+ hljs.addPlugin(mergeHTMLPlugin);
2512
+ hljs.addPlugin(tabReplacePlugin);
2513
+ return hljs;
2514
+ };
2515
+
2516
+ // export an "instance" of the highlighter
2517
+ var highlight = HLJS({});
2518
+
2519
+ var core = highlight;
2520
+
2521
+ var hljs = /*@__PURE__*/getDefaultExportFromCjs(core);
2522
+
2523
+ export { hljs as default };
2524
+ //# sourceMappingURL=core.mjs.map