@easyv/biz-components 0.0.20 → 0.0.21

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 (579) hide show
  1. package/dist/_virtual/___vite-browser-external.es.js +4 -4
  2. package/dist/_virtual/__vite-browser-external.es.js +2 -2
  3. package/dist/_virtual/__vite-browser-external.es.js.map +1 -1
  4. package/dist/_virtual/_commonjs-dynamic-modules.es.js +3 -3
  5. package/dist/_virtual/_commonjsHelpers.es.js +25 -20
  6. package/dist/_virtual/_commonjsHelpers.es.js.map +1 -1
  7. package/dist/_virtual/aes.es.js +2 -2
  8. package/dist/_virtual/blowfish.es.js +2 -2
  9. package/dist/_virtual/cipher-core.es.js +2 -2
  10. package/dist/_virtual/core.es.js +2 -2
  11. package/dist/_virtual/enc-base64.es.js +2 -2
  12. package/dist/_virtual/enc-base64url.es.js +2 -2
  13. package/dist/_virtual/enc-utf16.es.js +2 -2
  14. package/dist/_virtual/evpkdf.es.js +2 -2
  15. package/dist/_virtual/format-hex.es.js +2 -2
  16. package/dist/_virtual/hmac.es.js +2 -2
  17. package/dist/_virtual/index.es.js +2 -2
  18. package/dist/_virtual/index.es2.js +2 -2
  19. package/dist/_virtual/index.es3.js +2 -2
  20. package/dist/_virtual/index.es4.js +2 -2
  21. package/dist/_virtual/index.es5.js +2 -2
  22. package/dist/_virtual/index.es6.js +2 -2
  23. package/dist/_virtual/index.es7.js +2 -2
  24. package/dist/_virtual/jsx-runtime.es.js +2 -2
  25. package/dist/_virtual/lib-typedarrays.es.js +2 -2
  26. package/dist/_virtual/md5.es.js +2 -2
  27. package/dist/_virtual/mode-cfb.es.js +2 -2
  28. package/dist/_virtual/mode-ctr-gladman.es.js +2 -2
  29. package/dist/_virtual/mode-ctr.es.js +2 -2
  30. package/dist/_virtual/mode-ecb.es.js +2 -2
  31. package/dist/_virtual/mode-ofb.es.js +2 -2
  32. package/dist/_virtual/pad-ansix923.es.js +2 -2
  33. package/dist/_virtual/pad-iso10126.es.js +2 -2
  34. package/dist/_virtual/pad-iso97971.es.js +2 -2
  35. package/dist/_virtual/pad-nopadding.es.js +2 -2
  36. package/dist/_virtual/pad-zeropadding.es.js +2 -2
  37. package/dist/_virtual/pbkdf2.es.js +2 -2
  38. package/dist/_virtual/rabbit-legacy.es.js +2 -2
  39. package/dist/_virtual/rabbit.es.js +2 -2
  40. package/dist/_virtual/rc4.es.js +2 -2
  41. package/dist/_virtual/react-is.development.es.js +2 -2
  42. package/dist/_virtual/react-is.production.min.es.js +2 -2
  43. package/dist/_virtual/react-jsx-runtime.development.es.js +2 -2
  44. package/dist/_virtual/react-jsx-runtime.production.min.es.js +2 -2
  45. package/dist/_virtual/ripemd160.es.js +2 -2
  46. package/dist/_virtual/sha1.es.js +2 -2
  47. package/dist/_virtual/sha224.es.js +2 -2
  48. package/dist/_virtual/sha256.es.js +2 -2
  49. package/dist/_virtual/sha3.es.js +2 -2
  50. package/dist/_virtual/sha384.es.js +2 -2
  51. package/dist/_virtual/sha512.es.js +2 -2
  52. package/dist/_virtual/tripledes.es.js +2 -2
  53. package/dist/_virtual/utilities.es.js +2 -2
  54. package/dist/_virtual/x64-core.es.js +2 -2
  55. package/dist/components/AiMessageRender/AiMessageRender.es.js +62 -46
  56. package/dist/components/AiMessageRender/AiMessageRender.es.js.map +1 -1
  57. package/dist/components/AiMessageRender/index.less.es.js +2 -191
  58. package/dist/components/AiMessageRender/index.less.es.js.map +1 -1
  59. package/dist/components/ScrollController/ScrollController.es.js +57 -34
  60. package/dist/components/ScrollController/ScrollController.es.js.map +1 -1
  61. package/dist/components/ShadowDom/ShadowDom.es.js +28 -20
  62. package/dist/components/ShadowDom/ShadowDom.es.js.map +1 -1
  63. package/dist/components/VoiceAnimation/VoiceAnimation.es.js +22 -15
  64. package/dist/components/VoiceAnimation/VoiceAnimation.es.js.map +1 -1
  65. package/dist/hooks/useDivAutoScroll.es.js +47 -24
  66. package/dist/hooks/useDivAutoScroll.es.js.map +1 -1
  67. package/dist/hooks/useXunFeiSteamVoiceManager.es.js +12 -10
  68. package/dist/hooks/useXunFeiSteamVoiceManager.es.js.map +1 -1
  69. package/dist/index.es.js +19 -19
  70. package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js +5117 -1099
  71. package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js.map +1 -1
  72. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js +54 -48
  73. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +1 -1
  74. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js +8 -8
  75. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js.map +1 -1
  76. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js +103 -74
  77. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +1 -1
  78. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js +20 -11
  79. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js.map +1 -1
  80. package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js +5 -4
  81. package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js.map +1 -1
  82. package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js +12 -8
  83. package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js.map +1 -1
  84. package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js +37 -27
  85. package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js.map +1 -1
  86. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +49 -28
  87. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js.map +1 -1
  88. package/dist/node_modules/.pnpm/co-web-worker@1.0.1/node_modules/co-web-worker/index.es.js +11 -11
  89. package/dist/node_modules/.pnpm/co-web-worker@1.0.1/node_modules/co-web-worker/index.es.js.map +1 -1
  90. package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js +6 -5
  91. package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js.map +1 -1
  92. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.es.js +145 -53
  93. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.es.js.map +1 -1
  94. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.es.js +125 -60
  95. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.es.js.map +1 -1
  96. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.es.js +244 -140
  97. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.es.js.map +1 -1
  98. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.es.js +232 -127
  99. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.es.js.map +1 -1
  100. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.es.js +74 -43
  101. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.es.js.map +1 -1
  102. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.es.js +80 -45
  103. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.es.js.map +1 -1
  104. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.es.js +58 -36
  105. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.es.js.map +1 -1
  106. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.es.js +55 -29
  107. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.es.js.map +1 -1
  108. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.es.js +32 -21
  109. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.es.js.map +1 -1
  110. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.es.js +56 -29
  111. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.es.js.map +1 -1
  112. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js +48 -46
  113. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js.map +1 -1
  114. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.es.js +44 -23
  115. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.es.js.map +1 -1
  116. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.es.js +158 -47
  117. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.es.js.map +1 -1
  118. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.es.js +49 -29
  119. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.es.js.map +1 -1
  120. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.es.js +72 -33
  121. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.es.js.map +1 -1
  122. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.es.js +39 -23
  123. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.es.js.map +1 -1
  124. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.es.js +30 -22
  125. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.es.js.map +1 -1
  126. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.es.js +37 -21
  127. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.es.js.map +1 -1
  128. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.es.js +31 -20
  129. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.es.js.map +1 -1
  130. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.es.js +27 -20
  131. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.es.js.map +1 -1
  132. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.es.js +26 -18
  133. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.es.js.map +1 -1
  134. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.es.js +20 -14
  135. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.es.js.map +1 -1
  136. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.es.js +31 -21
  137. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.es.js.map +1 -1
  138. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.es.js +61 -32
  139. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.es.js.map +1 -1
  140. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.es.js +119 -59
  141. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.es.js.map +1 -1
  142. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.es.js +122 -61
  143. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.es.js.map +1 -1
  144. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.es.js +67 -40
  145. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.es.js.map +1 -1
  146. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.es.js +135 -49
  147. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.es.js.map +1 -1
  148. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.es.js +75 -30
  149. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.es.js.map +1 -1
  150. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.es.js +32 -19
  151. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.es.js.map +1 -1
  152. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.es.js +107 -40
  153. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.es.js.map +1 -1
  154. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.es.js +167 -77
  155. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.es.js.map +1 -1
  156. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.es.js +42 -28
  157. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.es.js.map +1 -1
  158. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.es.js +268 -129
  159. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.es.js.map +1 -1
  160. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.es.js +122 -63
  161. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.es.js.map +1 -1
  162. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.es.js +52 -27
  163. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.es.js.map +1 -1
  164. package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js +12 -9
  165. package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js.map +1 -1
  166. package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js +4 -4
  167. package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js.map +1 -1
  168. package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js +5 -4
  169. package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js.map +1 -1
  170. package/dist/node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js +8 -4
  171. package/dist/node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js.map +1 -1
  172. package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js +86 -36
  173. package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js.map +1 -1
  174. package/dist/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +314 -226
  175. package/dist/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js.map +1 -1
  176. package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js +6 -6
  177. package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js.map +1 -1
  178. package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js +2 -2
  179. package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js.map +1 -1
  180. package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js +115 -67
  181. package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js.map +1 -1
  182. package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js +7 -6
  183. package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js.map +1 -1
  184. package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js +21 -8
  185. package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js.map +1 -1
  186. package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js +124 -57
  187. package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js.map +1 -1
  188. package/dist/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.es.js +93 -54
  189. package/dist/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.es.js.map +1 -1
  190. package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js +509 -371
  191. package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js.map +1 -1
  192. package/dist/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.es.js +107 -81
  193. package/dist/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.es.js.map +1 -1
  194. package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js +85 -63
  195. package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js.map +1 -1
  196. package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js +26 -22
  197. package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js.map +1 -1
  198. package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js +104 -82
  199. package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js.map +1 -1
  200. package/dist/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.es.js +57 -38
  201. package/dist/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.es.js.map +1 -1
  202. package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js +19 -19
  203. package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js.map +1 -1
  204. package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js +4 -4
  205. package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js.map +1 -1
  206. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js +94 -69
  207. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js.map +1 -1
  208. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js +6 -5
  209. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js.map +1 -1
  210. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.es.js +5 -5
  211. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.es.js.map +1 -1
  212. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.es.js +18 -9
  213. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.es.js.map +1 -1
  214. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js +6 -5
  215. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js.map +1 -1
  216. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js +6 -5
  217. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js.map +1 -1
  218. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js +28 -15
  219. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js.map +1 -1
  220. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js +7 -6
  221. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js.map +1 -1
  222. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.es.js +7 -5
  223. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.es.js.map +1 -1
  224. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js +16 -11
  225. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js.map +1 -1
  226. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.es.js +13 -7
  227. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.es.js.map +1 -1
  228. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.es.js +54 -53
  229. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.es.js.map +1 -1
  230. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js +8 -7
  231. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js.map +1 -1
  232. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js +18 -13
  233. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js.map +1 -1
  234. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.es.js +12 -9
  235. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.es.js.map +1 -1
  236. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js +53 -31
  237. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js.map +1 -1
  238. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.es.js +18 -13
  239. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.es.js.map +1 -1
  240. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js +6 -5
  241. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js.map +1 -1
  242. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.es.js +5 -4
  243. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.es.js.map +1 -1
  244. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js +6 -5
  245. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js.map +1 -1
  246. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js +6 -5
  247. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js.map +1 -1
  248. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js +27 -13
  249. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js.map +1 -1
  250. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.es.js +23 -16
  251. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.es.js.map +1 -1
  252. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.es.js +6 -5
  253. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.es.js.map +1 -1
  254. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js +5 -4
  255. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js.map +1 -1
  256. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js +12 -7
  257. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js.map +1 -1
  258. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js +26 -10
  259. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js.map +1 -1
  260. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js +123 -79
  261. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js.map +1 -1
  262. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js +13 -10
  263. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js.map +1 -1
  264. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.es.js +10 -10
  265. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.es.js.map +1 -1
  266. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.es.js +44 -32
  267. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.es.js.map +1 -1
  268. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js +53 -29
  269. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js.map +1 -1
  270. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js +37 -26
  271. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js.map +1 -1
  272. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js +35 -24
  273. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js.map +1 -1
  274. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.es.js +5 -5
  275. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.es.js.map +1 -1
  276. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js +31 -18
  277. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js.map +1 -1
  278. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.es.js +54 -28
  279. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.es.js.map +1 -1
  280. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.es.js +41 -41
  281. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.es.js.map +1 -1
  282. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js +25 -15
  283. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js.map +1 -1
  284. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js +31 -18
  285. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js.map +1 -1
  286. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.es.js +74 -41
  287. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.es.js.map +1 -1
  288. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js +27 -17
  289. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js.map +1 -1
  290. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.es.js +34 -24
  291. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.es.js.map +1 -1
  292. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js +8 -4
  293. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js.map +1 -1
  294. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.es.js +8 -6
  295. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.es.js.map +1 -1
  296. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js +37 -26
  297. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js.map +1 -1
  298. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.es.js +3 -3
  299. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.es.js.map +1 -1
  300. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js +6 -6
  301. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js.map +1 -1
  302. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js +7 -6
  303. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js.map +1 -1
  304. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js +15 -11
  305. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js.map +1 -1
  306. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js +7 -6
  307. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js.map +1 -1
  308. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js +7 -6
  309. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js.map +1 -1
  310. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js +7 -6
  311. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js.map +1 -1
  312. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js +7 -6
  313. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js.map +1 -1
  314. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js +7 -6
  315. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js.map +1 -1
  316. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js +7 -6
  317. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js.map +1 -1
  318. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js +7 -6
  319. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js.map +1 -1
  320. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js +7 -6
  321. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js.map +1 -1
  322. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.es.js +3 -3
  323. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.es.js.map +1 -1
  324. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js +36 -29
  325. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js.map +1 -1
  326. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js +8 -6
  327. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js.map +1 -1
  328. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js +15 -10
  329. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js.map +1 -1
  330. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js +14 -12
  331. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js.map +1 -1
  332. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js +17 -11
  333. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js.map +1 -1
  334. package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js +31 -22
  335. package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js.map +1 -1
  336. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js +109 -57
  337. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -1
  338. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js +88 -28
  339. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js.map +1 -1
  340. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js +12 -12
  341. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js.map +1 -1
  342. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js +47 -28
  343. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js.map +1 -1
  344. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js +21 -10
  345. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js.map +1 -1
  346. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js +58 -20
  347. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js.map +1 -1
  348. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +162 -70
  349. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -1
  350. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js +54 -30
  351. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -1
  352. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js +101 -30
  353. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js.map +1 -1
  354. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js +61 -36
  355. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js.map +1 -1
  356. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js +66 -52
  357. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js.map +1 -1
  358. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js +16 -10
  359. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js.map +1 -1
  360. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +83 -34
  361. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -1
  362. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js +344 -105
  363. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -1
  364. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js +275 -68
  365. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js.map +1 -1
  366. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js +191 -108
  367. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -1
  368. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +25 -14
  369. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js.map +1 -1
  370. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +17 -12
  371. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js.map +1 -1
  372. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js +11 -8
  373. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js.map +1 -1
  374. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js +110 -65
  375. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js.map +1 -1
  376. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +75 -37
  377. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -1
  378. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js +33 -16
  379. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js.map +1 -1
  380. package/dist/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.es.js +295 -144
  381. package/dist/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.es.js.map +1 -1
  382. package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js +216 -129
  383. package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js.map +1 -1
  384. package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js +76 -45
  385. package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js.map +1 -1
  386. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js +37 -28
  387. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js.map +1 -1
  388. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js +22 -17
  389. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js.map +1 -1
  390. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +350 -104
  391. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js.map +1 -1
  392. package/dist/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.es.js +59 -27
  393. package/dist/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.es.js.map +1 -1
  394. package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js +14 -14
  395. package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js.map +1 -1
  396. package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js +83 -20
  397. package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js.map +1 -1
  398. package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js +51 -16
  399. package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js.map +1 -1
  400. package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js +19 -10
  401. package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js.map +1 -1
  402. package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js +56 -17
  403. package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js.map +1 -1
  404. package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js +18 -8
  405. package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js.map +1 -1
  406. package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js +32 -27
  407. package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js.map +1 -1
  408. package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js +32 -12
  409. package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js.map +1 -1
  410. package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js +7 -5
  411. package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js.map +1 -1
  412. package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js +32 -27
  413. package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js.map +1 -1
  414. package/dist/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.es.js +14 -11
  415. package/dist/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.es.js.map +1 -1
  416. package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js +16 -13
  417. package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js.map +1 -1
  418. package/dist/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.es.js +5 -4
  419. package/dist/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.es.js.map +1 -1
  420. package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js +3 -3
  421. package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js.map +1 -1
  422. package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js +11 -8
  423. package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js.map +1 -1
  424. package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js +37 -19
  425. package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js.map +1 -1
  426. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js +149 -47
  427. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js.map +1 -1
  428. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js +61 -42
  429. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js.map +1 -1
  430. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js +88 -80
  431. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js.map +1 -1
  432. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js +247 -150
  433. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -1
  434. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js +39 -23
  435. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js.map +1 -1
  436. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js +151 -91
  437. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js.map +1 -1
  438. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js +29 -20
  439. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js.map +1 -1
  440. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js +116 -69
  441. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js.map +1 -1
  442. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js +26 -24
  443. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js.map +1 -1
  444. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js +6 -6
  445. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js.map +1 -1
  446. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js +63 -22
  447. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js.map +1 -1
  448. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +62 -38
  449. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js.map +1 -1
  450. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +49 -35
  451. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js.map +1 -1
  452. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +49 -43
  453. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js.map +1 -1
  454. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +363 -241
  455. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js.map +1 -1
  456. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +14 -12
  457. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js.map +1 -1
  458. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +9 -7
  459. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js.map +1 -1
  460. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +8 -4
  461. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js.map +1 -1
  462. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js +11 -10
  463. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js.map +1 -1
  464. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js +39 -39
  465. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js.map +1 -1
  466. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js +31 -24
  467. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js.map +1 -1
  468. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js +2 -2
  469. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js.map +1 -1
  470. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js +94 -94
  471. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js.map +1 -1
  472. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js +3 -3
  473. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js.map +1 -1
  474. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js +77 -77
  475. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js.map +1 -1
  476. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js +4 -4
  477. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +1 -1
  478. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js +3 -3
  479. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +1 -1
  480. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js +20 -14
  481. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js.map +1 -1
  482. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js +20 -15
  483. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js.map +1 -1
  484. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js +17 -16
  485. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js.map +1 -1
  486. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js +10 -7
  487. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js.map +1 -1
  488. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js +11 -7
  489. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js.map +1 -1
  490. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js +17 -11
  491. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js.map +1 -1
  492. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js +5 -5
  493. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js.map +1 -1
  494. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js +5 -5
  495. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js.map +1 -1
  496. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js +5 -5
  497. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js.map +1 -1
  498. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +152 -82
  499. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js.map +1 -1
  500. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +86 -58
  501. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js.map +1 -1
  502. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +14 -7
  503. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js.map +1 -1
  504. package/dist/node_modules/.pnpm/react-markdown@10.1.0_@types_react@18.2.0_react@18.2.0/node_modules/react-markdown/lib/index.es.js +102 -55
  505. package/dist/node_modules/.pnpm/react-markdown@10.1.0_@types_react@18.2.0_react@18.2.0/node_modules/react-markdown/lib/index.es.js.map +1 -1
  506. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js +825 -539
  507. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -1
  508. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +20 -15
  509. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -1
  510. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js +10 -6
  511. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js.map +1 -1
  512. package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js +15 -8
  513. package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js.map +1 -1
  514. package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js +11 -11
  515. package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js.map +1 -1
  516. package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js +14 -11
  517. package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js.map +1 -1
  518. package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js +3 -3
  519. package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js.map +1 -1
  520. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js +23 -15
  521. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js.map +1 -1
  522. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js +33 -13
  523. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js.map +1 -1
  524. package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js +27 -18
  525. package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js.map +1 -1
  526. package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js +35 -22
  527. package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js.map +1 -1
  528. package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js +68 -42
  529. package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js.map +1 -1
  530. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js +13 -8
  531. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js.map +1 -1
  532. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +246 -139
  533. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js.map +1 -1
  534. package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js +59 -50
  535. package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js.map +1 -1
  536. package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js +20 -16
  537. package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js.map +1 -1
  538. package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js +21 -9
  539. package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js.map +1 -1
  540. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js +3 -3
  541. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js.map +1 -1
  542. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js +65 -38
  543. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js.map +1 -1
  544. package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js +24 -12
  545. package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js.map +1 -1
  546. package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js +77 -30
  547. package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js.map +1 -1
  548. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js +116 -60
  549. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js.map +1 -1
  550. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js +181 -79
  551. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js.map +1 -1
  552. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js +3 -3
  553. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js.map +1 -1
  554. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js +32 -27
  555. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js.map +1 -1
  556. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js +6 -4
  557. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js.map +1 -1
  558. package/dist/utils/funASR/funASRManager.es.js +109 -68
  559. package/dist/utils/funASR/funASRManager.es.js.map +1 -1
  560. package/dist/utils/funASR/pcm.es.js +51 -36
  561. package/dist/utils/funASR/pcm.es.js.map +1 -1
  562. package/dist/utils/funASR/recorder.es.js +1048 -542
  563. package/dist/utils/funASR/recorder.es.js.map +1 -1
  564. package/dist/utils/funASR/wav.es.js +46 -20
  565. package/dist/utils/funASR/wav.es.js.map +1 -1
  566. package/dist/utils/funASR/wsConnecter.es.js +79 -44
  567. package/dist/utils/funASR/wsConnecter.es.js.map +1 -1
  568. package/dist/utils/xunFeiVoice/RecorderManager/RecorderManager.es.js +126 -78
  569. package/dist/utils/xunFeiVoice/RecorderManager/RecorderManager.es.js.map +1 -1
  570. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worker.es.js +2 -207
  571. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worker.es.js.map +1 -1
  572. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worklet.es.js +2 -2
  573. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worklet.es.js.map +1 -1
  574. package/dist/utils/xunFeiVoice/XFStreamVoiceManager.d.ts +4 -0
  575. package/dist/utils/xunFeiVoice/XFStreamVoiceManager.es.js +207 -131
  576. package/dist/utils/xunFeiVoice/XFStreamVoiceManager.es.js.map +1 -1
  577. package/dist/utils/xunFeiVoice/utils.es.js +9 -7
  578. package/dist/utils/xunFeiVoice/utils.es.js.map +1 -1
  579. package/package.json +1 -1
@@ -1,257 +1,466 @@
1
- var j = function() {
1
+ var NOOP = function() {
2
2
  };
3
- const o = function(e) {
4
- return new fe(e);
3
+ const Recorder = function(set) {
4
+ return new initFn(set);
5
5
  };
6
- o.LM = "2023-02-01 18:05";
7
- var G = "Recorder", q = "getUserMedia", K = "srcSampleRate", F = "sampleRate", ee = "catch";
8
- o.IsOpen = function() {
9
- var e = o.Stream;
10
- if (e) {
11
- var t = e.getTracks && e.getTracks() || e.audioTracks || [], r = t[0];
12
- if (r) {
13
- var n = r.readyState;
14
- return n == "live" || n == r.LIVE;
15
- }
16
- }
17
- return !1;
6
+ Recorder.LM = "2023-02-01 18:05";
7
+ var RecTxt = "Recorder";
8
+ var getUserMediaTxt = "getUserMedia";
9
+ var srcSampleRateTxt = "srcSampleRate";
10
+ var sampleRateTxt = "sampleRate";
11
+ var CatchTxt = "catch";
12
+ Recorder.IsOpen = function() {
13
+ var stream = Recorder.Stream;
14
+ if (stream) {
15
+ var tracks = stream.getTracks && stream.getTracks() || stream.audioTracks || [];
16
+ var track = tracks[0];
17
+ if (track) {
18
+ var state = track.readyState;
19
+ return state == "live" || state == track.LIVE;
20
+ }
21
+ }
22
+ return false;
18
23
  };
19
- o.BufferSize = 4096;
20
- o.Destroy = function() {
21
- z(G + " Destroy"), Z();
22
- for (var e in re)
23
- re[e]();
24
+ Recorder.BufferSize = 4096;
25
+ Recorder.Destroy = function() {
26
+ CLog(RecTxt + " Destroy");
27
+ Disconnect();
28
+ for (var k in DestroyList) {
29
+ DestroyList[k]();
30
+ }
24
31
  };
25
- var re = {};
26
- o.BindDestroy = function(e, t) {
27
- re[e] = t;
32
+ var DestroyList = {};
33
+ Recorder.BindDestroy = function(key, call) {
34
+ DestroyList[key] = call;
28
35
  };
29
- o.Support = function() {
30
- var e = navigator.mediaDevices || {};
31
- return e[q] || (e = navigator, e[q] || (e[q] = e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia)), !(!e[q] || (o.Scope = e, !o.GetContext()));
36
+ Recorder.Support = function() {
37
+ var scope = navigator.mediaDevices || {};
38
+ if (!scope[getUserMediaTxt]) {
39
+ scope = navigator;
40
+ scope[getUserMediaTxt] || (scope[getUserMediaTxt] = scope.webkitGetUserMedia || scope.mozGetUserMedia || scope.msGetUserMedia);
41
+ }
42
+ if (!scope[getUserMediaTxt]) {
43
+ return false;
44
+ }
45
+ Recorder.Scope = scope;
46
+ if (!Recorder.GetContext()) {
47
+ return false;
48
+ }
49
+ return true;
32
50
  };
33
- o.GetContext = function() {
34
- var e = window.AudioContext;
35
- return e || (e = window.webkitAudioContext), e ? ((!o.Ctx || o.Ctx.state == "closed") && (o.Ctx = new e(), o.BindDestroy("Ctx", function() {
36
- var t = o.Ctx;
37
- t && t.close && (t.close(), o.Ctx = 0);
38
- })), o.Ctx) : null;
51
+ Recorder.GetContext = function() {
52
+ var AC = window.AudioContext;
53
+ if (!AC) {
54
+ AC = window.webkitAudioContext;
55
+ }
56
+ if (!AC) {
57
+ return null;
58
+ }
59
+ if (!Recorder.Ctx || Recorder.Ctx.state == "closed") {
60
+ Recorder.Ctx = new AC();
61
+ Recorder.BindDestroy("Ctx", function() {
62
+ var ctx = Recorder.Ctx;
63
+ if (ctx && ctx.close) {
64
+ ctx.close();
65
+ Recorder.Ctx = 0;
66
+ }
67
+ });
68
+ }
69
+ return Recorder.Ctx;
39
70
  };
40
- var te = "ConnectEnableWebM";
41
- o[te] = !0;
42
- var Q = "ConnectEnableWorklet";
43
- o[Q] = !1;
44
- var ne = function(e, t) {
45
- var r = e.BufferSize || o.BufferSize, n = o.Ctx, a = e.Stream, i = function(x) {
46
- var T = a._m = n.createMediaStreamSource(a), C = n.destination, k = "createMediaStreamDestination";
47
- n[k] && (C = n[k]()), T.connect(x), x.connect(C);
48
- }, s, p, v, l = "", M = a._call, g = function(x) {
49
- for (var T in M) {
50
- for (var C = x.length, k = new Int16Array(C), I = 0, w = 0; w < C; w++) {
51
- var y = Math.max(-1, Math.min(1, x[w]));
52
- y = y < 0 ? y * 32768 : y * 32767, k[w] = y, I += Math.abs(y);
53
- }
54
- for (var L in M)
55
- M[L](k, I);
71
+ var ConnectEnableWebM = "ConnectEnableWebM";
72
+ Recorder[ConnectEnableWebM] = true;
73
+ var ConnectEnableWorklet = "ConnectEnableWorklet";
74
+ Recorder[ConnectEnableWorklet] = false;
75
+ var Connect = function(streamStore, isUserMedia) {
76
+ var bufferSize = streamStore.BufferSize || Recorder.BufferSize;
77
+ var ctx = Recorder.Ctx, stream = streamStore.Stream;
78
+ var mediaConn = function(node) {
79
+ var media = stream._m = ctx.createMediaStreamSource(stream);
80
+ var ctxDest = ctx.destination, cmsdTxt = "createMediaStreamDestination";
81
+ if (ctx[cmsdTxt]) {
82
+ ctxDest = ctx[cmsdTxt]();
83
+ }
84
+ media.connect(node);
85
+ node.connect(ctxDest);
86
+ };
87
+ var isWebM, isWorklet, badInt, webMTips = "";
88
+ var calls = stream._call;
89
+ var onReceive = function(float32Arr) {
90
+ for (var k0 in calls) {
91
+ var size = float32Arr.length;
92
+ var pcm = new Int16Array(size);
93
+ var sum = 0;
94
+ for (var j = 0; j < size; j++) {
95
+ var s = Math.max(-1, Math.min(1, float32Arr[j]));
96
+ s = s < 0 ? s * 32768 : s * 32767;
97
+ pcm[j] = s;
98
+ sum += Math.abs(s);
99
+ }
100
+ for (var k in calls) {
101
+ calls[k](pcm, sum);
102
+ }
56
103
  return;
57
104
  }
58
- }, c = "ScriptProcessor", u = "audioWorklet", h = G + " " + u, b = "RecProc", _ = "MediaRecorder", S = _ + ".WebM.PCM", f = n.createScriptProcessor || n.createJavaScriptNode, d = "。由于" + u + "内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启" + u + "。", m = function() {
59
- p = a.isWorklet = !1, ae(a), z(
60
- "Connect采用老的" + c + "" + (o[Q] ? "但已" : "可") + "设置" + G + "." + Q + "=true尝试启用" + u + l + d,
105
+ };
106
+ var scriptProcessor = "ScriptProcessor";
107
+ var audioWorklet = "audioWorklet";
108
+ var recAudioWorklet = RecTxt + " " + audioWorklet;
109
+ var RecProc = "RecProc";
110
+ var MediaRecorderTxt = "MediaRecorder";
111
+ var MRWebMPCM = MediaRecorderTxt + ".WebM.PCM";
112
+ var oldFn = ctx.createScriptProcessor || ctx.createJavaScriptNode;
113
+ var oldIsBest = "。由于" + audioWorklet + "内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启" + audioWorklet + "。";
114
+ var oldScript = function() {
115
+ isWorklet = stream.isWorklet = false;
116
+ _Disconn_n(stream);
117
+ CLog(
118
+ "Connect采用老的" + scriptProcessor + "," + (Recorder[ConnectEnableWorklet] ? "但已" : "可") + "设置" + RecTxt + "." + ConnectEnableWorklet + "=true尝试启用" + audioWorklet + webMTips + oldIsBest,
61
119
  3
62
120
  );
63
- var x = a._p = f.call(n, r, 1, 1);
64
- i(x);
65
- var T = "_D220626", C = o[T];
66
- C && z("Use " + G + "." + T, 3), x.onaudioprocess = function(k) {
67
- var I = k.inputBuffer.getChannelData(0);
68
- C ? (I = new Float32Array(I), setTimeout(function() {
69
- g(I);
70
- })) : g(I);
121
+ var process = stream._p = oldFn.call(ctx, bufferSize, 1, 1);
122
+ mediaConn(process);
123
+ var _DsetTxt = "_D220626", _Dset = Recorder[_DsetTxt];
124
+ if (_Dset) CLog("Use " + RecTxt + "." + _DsetTxt, 3);
125
+ process.onaudioprocess = function(e) {
126
+ var arr = e.inputBuffer.getChannelData(0);
127
+ if (_Dset) {
128
+ arr = new Float32Array(arr);
129
+ setTimeout(function() {
130
+ onReceive(arr);
131
+ });
132
+ } else {
133
+ onReceive(arr);
134
+ }
71
135
  };
72
- }, R = function() {
73
- s = a.isWebM = !1, ie(a), p = a.isWorklet = !f || o[Q];
74
- var x = window.AudioWorkletNode;
75
- if (!(p && n[u] && x)) {
76
- m();
136
+ };
137
+ var connWorklet = function() {
138
+ isWebM = stream.isWebM = false;
139
+ _Disconn_r(stream);
140
+ isWorklet = stream.isWorklet = !oldFn || Recorder[ConnectEnableWorklet];
141
+ var AwNode = window.AudioWorkletNode;
142
+ if (!(isWorklet && ctx[audioWorklet] && AwNode)) {
143
+ oldScript();
77
144
  return;
78
145
  }
79
- var T = function() {
80
- var w = function(L) {
81
- return L.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, h);
82
- }, y = "class " + b + " extends AudioWorkletProcessor{";
83
- return y += "constructor " + w(function(L) {
84
- DEL_super(L);
85
- var O = this, P = L.processorOptions.bufferSize;
86
- O.bufferSize = P, O.buffer = new Float32Array(P * 2), O.pos = 0, O.port.onmessage = function(A) {
87
- A.data.kill && (O.kill = !0, console.log("$RA kill call"));
88
- }, console.log("$RA .ctor call", L);
89
- }), y += "process " + w(function(L, O, P) {
90
- var A = this, H = A.bufferSize, E = A.buffer, B = A.pos;
91
- if (L = (L[0] || [])[0] || [], L.length) {
92
- E.set(L, B), B += L.length;
93
- var U = ~~(B / H) * H;
94
- if (U) {
95
- this.port.postMessage({ val: E.slice(0, U) });
96
- var J = E.subarray(U, B);
97
- E = new Float32Array(H * 2), E.set(J), B = J.length, A.buffer = E;
146
+ var clazzUrl = function() {
147
+ var xf = function(f) {
148
+ return f.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, recAudioWorklet);
149
+ };
150
+ var clazz = "class " + RecProc + " extends AudioWorkletProcessor{";
151
+ clazz += "constructor " + xf(function(option) {
152
+ DEL_super(option);
153
+ var This = this, bufferSize2 = option.processorOptions.bufferSize;
154
+ This.bufferSize = bufferSize2;
155
+ This.buffer = new Float32Array(bufferSize2 * 2);
156
+ This.pos = 0;
157
+ This.port.onmessage = function(e) {
158
+ if (e.data.kill) {
159
+ This.kill = true;
160
+ console.log("$RA kill call");
98
161
  }
99
- A.pos = B;
162
+ };
163
+ console.log("$RA .ctor call", option);
164
+ });
165
+ clazz += "process " + xf(function(input, b, c) {
166
+ var This = this, bufferSize2 = This.bufferSize;
167
+ var buffer = This.buffer, pos = This.pos;
168
+ input = (input[0] || [])[0] || [];
169
+ if (input.length) {
170
+ buffer.set(input, pos);
171
+ pos += input.length;
172
+ var len = ~~(pos / bufferSize2) * bufferSize2;
173
+ if (len) {
174
+ this.port.postMessage({ val: buffer.slice(0, len) });
175
+ var more = buffer.subarray(len, pos);
176
+ buffer = new Float32Array(bufferSize2 * 2);
177
+ buffer.set(more);
178
+ pos = more.length;
179
+ This.buffer = buffer;
180
+ }
181
+ This.pos = pos;
100
182
  }
101
- return !A.kill;
102
- }), y += '}try{registerProcessor("' + b + '", ' + b + ')}catch(e){console.error("' + h + '注册失败",e)}', "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(y)));
103
- }, C = function() {
104
- return p && a._na;
105
- }, k = a._na = function() {
106
- v !== "" && (clearTimeout(v), v = setTimeout(function() {
107
- v = 0, C() && (z(u + "未返回任何音频,恢复使用" + c, 3), f && m());
108
- }, 500));
109
- }, I = function() {
110
- if (C()) {
111
- var w = a._n = new x(n, b, {
112
- processorOptions: { bufferSize: r }
113
- });
114
- i(w), w.port.onmessage = function(y) {
115
- v && (clearTimeout(v), v = ""), C() ? g(y.data.val) : p || z(u + "多余回调", 3);
116
- }, z(
117
- "Connect采用" + u + ",设置" + G + "." + Q + "=false可恢复老式" + c + l + d,
118
- 3
119
- );
183
+ return !This.kill;
184
+ });
185
+ clazz += '}try{registerProcessor("' + RecProc + '", ' + RecProc + ')}catch(e){console.error("' + recAudioWorklet + '注册失败",e)}';
186
+ return "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(clazz)));
187
+ };
188
+ var awNext = function() {
189
+ return isWorklet && stream._na;
190
+ };
191
+ var nodeAlive = stream._na = function() {
192
+ if (badInt !== "") {
193
+ clearTimeout(badInt);
194
+ badInt = setTimeout(function() {
195
+ badInt = 0;
196
+ if (awNext()) {
197
+ CLog(audioWorklet + "未返回任何音频,恢复使用" + scriptProcessor, 3);
198
+ oldFn && oldScript();
199
+ }
200
+ }, 500);
120
201
  }
121
202
  };
122
- n.resume()[M && "finally"](function() {
123
- if (C()) {
124
- if (n[b]) {
125
- I();
126
- return;
203
+ var createNode = function() {
204
+ if (!awNext()) return;
205
+ var node = stream._n = new AwNode(ctx, RecProc, {
206
+ processorOptions: { bufferSize }
207
+ });
208
+ mediaConn(node);
209
+ node.port.onmessage = function(e) {
210
+ if (badInt) {
211
+ clearTimeout(badInt);
212
+ badInt = "";
127
213
  }
128
- var w = T();
129
- n[u].addModule(w).then(function(y) {
130
- C() && (n[b] = 1, I(), v && k());
131
- })[ee](function(y) {
132
- z(u + ".addModule失败", 1, y), C() && m();
133
- });
214
+ if (awNext()) {
215
+ onReceive(e.data.val);
216
+ } else if (!isWorklet) {
217
+ CLog(audioWorklet + "多余回调", 3);
218
+ }
219
+ };
220
+ CLog(
221
+ "Connect采用" + audioWorklet + ",设置" + RecTxt + "." + ConnectEnableWorklet + "=false可恢复老式" + scriptProcessor + webMTips + oldIsBest,
222
+ 3
223
+ );
224
+ };
225
+ ctx.resume()[calls && "finally"](function() {
226
+ if (!awNext()) return;
227
+ if (ctx[RecProc]) {
228
+ createNode();
229
+ return;
134
230
  }
231
+ var url = clazzUrl();
232
+ ctx[audioWorklet].addModule(url).then(function(e) {
233
+ if (!awNext()) return;
234
+ ctx[RecProc] = 1;
235
+ createNode();
236
+ if (badInt) {
237
+ nodeAlive();
238
+ }
239
+ })[CatchTxt](function(e) {
240
+ CLog(audioWorklet + ".addModule失败", 1, e);
241
+ awNext() && oldScript();
242
+ });
135
243
  });
136
- }, D = function() {
137
- var x = window[_], T = "ondataavailable", C = "audio/webm; codecs=pcm";
138
- s = a.isWebM = o[te];
139
- var k = x && T in x.prototype && x.isTypeSupported(C);
140
- if (l = k ? "" : "(此浏览器不支持" + S + ")", !t || !s || !k) {
141
- R();
244
+ };
245
+ var connWebM = function() {
246
+ var MR = window[MediaRecorderTxt];
247
+ var onData = "ondataavailable";
248
+ var webmType = "audio/webm; codecs=pcm";
249
+ isWebM = stream.isWebM = Recorder[ConnectEnableWebM];
250
+ var supportMR = MR && onData in MR.prototype && MR.isTypeSupported(webmType);
251
+ webMTips = supportMR ? "" : "(此浏览器不支持" + MRWebMPCM + ")";
252
+ if (!isUserMedia || !isWebM || !supportMR) {
253
+ connWorklet();
142
254
  return;
143
255
  }
144
- var I = function() {
145
- return s && a._ra;
256
+ var mrNext = function() {
257
+ return isWebM && stream._ra;
146
258
  };
147
- a._ra = function() {
148
- v !== "" && (clearTimeout(v), v = setTimeout(function() {
149
- I() && (z(_ + "未返回任何音频,降级使用" + u, 3), R());
150
- }, 500));
259
+ stream._ra = function() {
260
+ if (badInt !== "") {
261
+ clearTimeout(badInt);
262
+ badInt = setTimeout(function() {
263
+ if (mrNext()) {
264
+ CLog(MediaRecorderTxt + "未返回任何音频,降级使用" + audioWorklet, 3);
265
+ connWorklet();
266
+ }
267
+ }, 500);
268
+ }
151
269
  };
152
- var w = Object.assign({ mimeType: C }, o.ConnectWebMOptions), y = a._r = new x(a, w), L = a._rd = { sampleRate: n[F] };
153
- y[T] = function(O) {
154
- var P = new FileReader();
155
- P.onloadend = function() {
156
- if (I()) {
157
- var A = ce(new Uint8Array(P.result), L);
158
- if (!A) return;
159
- if (A == -1) {
160
- R();
270
+ var mrSet = Object.assign({ mimeType: webmType }, Recorder.ConnectWebMOptions);
271
+ var mr = stream._r = new MR(stream, mrSet);
272
+ var webmData = stream._rd = { sampleRate: ctx[sampleRateTxt] };
273
+ mr[onData] = function(e) {
274
+ var reader = new FileReader();
275
+ reader.onloadend = function() {
276
+ if (mrNext()) {
277
+ var f32arr = WebM_Extract(new Uint8Array(reader.result), webmData);
278
+ if (!f32arr) return;
279
+ if (f32arr == -1) {
280
+ connWorklet();
161
281
  return;
162
282
  }
163
- v && (clearTimeout(v), v = ""), g(A);
164
- } else s || z(_ + "多余回调", 3);
165
- }, P.readAsArrayBuffer(O.data);
166
- }, y.start(~~(r / 48)), z(
167
- "Connect采用" + S + ",设置" + G + "." + te + "=false可恢复使用" + u + "或老式" + c
283
+ if (badInt) {
284
+ clearTimeout(badInt);
285
+ badInt = "";
286
+ }
287
+ onReceive(f32arr);
288
+ } else if (!isWebM) {
289
+ CLog(MediaRecorderTxt + "多余回调", 3);
290
+ }
291
+ };
292
+ reader.readAsArrayBuffer(e.data);
293
+ };
294
+ mr.start(~~(bufferSize / 48));
295
+ CLog(
296
+ "Connect采用" + MRWebMPCM + ",设置" + RecTxt + "." + ConnectEnableWebM + "=false可恢复使用" + audioWorklet + "或老式" + scriptProcessor
168
297
  );
169
298
  };
170
- D();
171
- }, ve = function(e) {
172
- e._na && e._na(), e._ra && e._ra();
173
- }, ae = function(e) {
174
- e._na = null, e._n && (e._n.port.postMessage({ kill: !0 }), e._n.disconnect(), e._n = null);
175
- }, ie = function(e) {
176
- e._ra = null, e._r && (e._r.stop(), e._r = null);
177
- }, Z = function(e) {
178
- e = e || o;
179
- var t = e == o, r = e.Stream;
180
- if (r && (r._m && (r._m.disconnect(), r._m = null), r._p && (r._p.disconnect(), r._p.onaudioprocess = r._p = null), ae(r), ie(r), t)) {
181
- for (var n = r.getTracks && r.getTracks() || r.audioTracks || [], a = 0; a < n.length; a++) {
182
- var i = n[a];
183
- i.stop && i.stop();
184
- }
185
- r.stop && r.stop();
186
- }
187
- e.Stream = 0;
299
+ connWebM();
300
+ };
301
+ var ConnAlive = function(stream) {
302
+ if (stream._na) stream._na();
303
+ if (stream._ra) stream._ra();
304
+ };
305
+ var _Disconn_n = function(stream) {
306
+ stream._na = null;
307
+ if (stream._n) {
308
+ stream._n.port.postMessage({ kill: true });
309
+ stream._n.disconnect();
310
+ stream._n = null;
311
+ }
312
+ };
313
+ var _Disconn_r = function(stream) {
314
+ stream._ra = null;
315
+ if (stream._r) {
316
+ stream._r.stop();
317
+ stream._r = null;
318
+ }
319
+ };
320
+ var Disconnect = function(streamStore) {
321
+ streamStore = streamStore || Recorder;
322
+ var isGlobal = streamStore == Recorder;
323
+ var stream = streamStore.Stream;
324
+ if (stream) {
325
+ if (stream._m) {
326
+ stream._m.disconnect();
327
+ stream._m = null;
328
+ }
329
+ if (stream._p) {
330
+ stream._p.disconnect();
331
+ stream._p.onaudioprocess = stream._p = null;
332
+ }
333
+ _Disconn_n(stream);
334
+ _Disconn_r(stream);
335
+ if (isGlobal) {
336
+ var tracks = stream.getTracks && stream.getTracks() || stream.audioTracks || [];
337
+ for (var i = 0; i < tracks.length; i++) {
338
+ var track = tracks[i];
339
+ track.stop && track.stop();
340
+ }
341
+ stream.stop && stream.stop();
342
+ }
343
+ }
344
+ streamStore.Stream = 0;
188
345
  };
189
- o.SampleData = function(e, t, r, n, a) {
190
- n || (n = {});
191
- var i = n.index || 0, s = n.offset || 0, p = n.frameNext || [];
192
- a || (a = {});
193
- var v = a.frameSize || 1;
194
- a.frameType && (v = a.frameType == "mp3" ? 1152 : 1);
195
- var l = e.length;
196
- i > l + 1 && z("SampleData似乎传入了未重置chunk " + i + ">" + l, 3);
197
- for (var M = 0, g = i; g < l; g++)
198
- M += e[g].length;
199
- M = Math.max(0, M - Math.floor(s));
200
- var c = t / r;
201
- c > 1 ? M = Math.floor(M / c) : (c = 1, r = t), M += p.length;
202
- for (var u = new Int16Array(M), h = 0, g = 0; g < p.length; g++)
203
- u[h] = p[g], h++;
204
- for (; i < l; i++) {
205
- for (var b = e[i], g = s, _ = b.length; g < _; ) {
206
- var S = Math.floor(g), f = Math.ceil(g), d = g - S, m = b[S], R = f < _ ? b[f] : (
346
+ Recorder.SampleData = function(pcmDatas, pcmSampleRate, newSampleRate, prevChunkInfo, option) {
347
+ prevChunkInfo || (prevChunkInfo = {});
348
+ var index = prevChunkInfo.index || 0;
349
+ var offset = prevChunkInfo.offset || 0;
350
+ var frameNext = prevChunkInfo.frameNext || [];
351
+ option || (option = {});
352
+ var frameSize = option.frameSize || 1;
353
+ if (option.frameType) {
354
+ frameSize = option.frameType == "mp3" ? 1152 : 1;
355
+ }
356
+ var nLen = pcmDatas.length;
357
+ if (index > nLen + 1) {
358
+ CLog("SampleData似乎传入了未重置chunk " + index + ">" + nLen, 3);
359
+ }
360
+ var size = 0;
361
+ for (var i = index; i < nLen; i++) {
362
+ size += pcmDatas[i].length;
363
+ }
364
+ size = Math.max(0, size - Math.floor(offset));
365
+ var step = pcmSampleRate / newSampleRate;
366
+ if (step > 1) {
367
+ size = Math.floor(size / step);
368
+ } else {
369
+ step = 1;
370
+ newSampleRate = pcmSampleRate;
371
+ }
372
+ size += frameNext.length;
373
+ var res = new Int16Array(size);
374
+ var idx = 0;
375
+ for (var i = 0; i < frameNext.length; i++) {
376
+ res[idx] = frameNext[i];
377
+ idx++;
378
+ }
379
+ for (; index < nLen; index++) {
380
+ var o = pcmDatas[index];
381
+ var i = offset, il = o.length;
382
+ while (i < il) {
383
+ var before = Math.floor(i);
384
+ var after = Math.ceil(i);
385
+ var atPoint = i - before;
386
+ var beforeVal = o[before];
387
+ var afterVal = after < il ? o[after] : (
207
388
  //后个点越界了,查找下一个数组
208
- (e[i + 1] || [m])[0] || 0
389
+ (pcmDatas[index + 1] || [beforeVal])[0] || 0
209
390
  );
210
- u[h] = m + (R - m) * d, h++, g += c;
391
+ res[idx] = beforeVal + (afterVal - beforeVal) * atPoint;
392
+ idx++;
393
+ i += step;
211
394
  }
212
- s = g - _;
395
+ offset = i - il;
213
396
  }
214
- p = null;
215
- var D = u.length % v;
216
- if (D > 0) {
217
- var x = (u.length - D) * 2;
218
- p = new Int16Array(u.buffer.slice(x)), u = new Int16Array(u.buffer.slice(0, x));
397
+ frameNext = null;
398
+ var frameNextSize = res.length % frameSize;
399
+ if (frameNextSize > 0) {
400
+ var u8Pos = (res.length - frameNextSize) * 2;
401
+ frameNext = new Int16Array(res.buffer.slice(u8Pos));
402
+ res = new Int16Array(res.buffer.slice(0, u8Pos));
219
403
  }
220
404
  return {
221
- index: i,
222
- offset: s,
223
- frameNext: p,
224
- sampleRate: r,
225
- data: u
405
+ index,
406
+ offset,
407
+ frameNext,
408
+ sampleRate: newSampleRate,
409
+ data: res
226
410
  };
227
411
  };
228
- o.PowerLevel = function(e, t) {
229
- var r = e / t || 0, n;
230
- return r < 1251 ? n = Math.round(r / 1250 * 10) : n = Math.round(
231
- Math.min(100, Math.max(0, (1 + Math.log(r / 1e4) / Math.log(10)) * 100))
232
- ), n;
412
+ Recorder.PowerLevel = function(pcmAbsSum, pcmLength) {
413
+ var power = pcmAbsSum / pcmLength || 0;
414
+ var level;
415
+ if (power < 1251) {
416
+ level = Math.round(power / 1250 * 10);
417
+ } else {
418
+ level = Math.round(
419
+ Math.min(100, Math.max(0, (1 + Math.log(power / 1e4) / Math.log(10)) * 100))
420
+ );
421
+ }
422
+ return level;
233
423
  };
234
- o.PowerDBFS = function(e) {
235
- var t = Math.max(0.1, e || 0), r = 32767;
236
- return t = Math.min(t, r), t = 20 * Math.log(t / r) / Math.log(10), Math.max(-100, Math.round(t));
424
+ Recorder.PowerDBFS = function(maxSample) {
425
+ var val = Math.max(0.1, maxSample || 0), Pref = 32767;
426
+ val = Math.min(val, Pref);
427
+ val = 20 * Math.log(val / Pref) / Math.log(10);
428
+ return Math.max(-100, Math.round(val));
237
429
  };
238
- o.CLog = function(e, t) {
239
- var r = /* @__PURE__ */ new Date(), n = ("0" + r.getMinutes()).substr(-2) + ":" + ("0" + r.getSeconds()).substr(-2) + "." + ("00" + r.getMilliseconds()).substr(-3), a = this && this.envIn && this.envCheck && this.id, i = ["[" + n + " " + G + (a ? ":" + a : "") + "]" + e], s = arguments, p = window.console || {}, v = 2, l = p.log;
240
- for (typeof t == "number" ? l = t == 1 ? p.error : t == 3 ? p.warn : l : v = 1; v < s.length; v++)
241
- i.push(s[v]);
242
- oe ? l && l("[IsLoser]" + i[0], i.length > 1 ? i : "") : l.apply(p, i);
430
+ Recorder.CLog = function(msg, err) {
431
+ var now = /* @__PURE__ */ new Date();
432
+ var t = ("0" + now.getMinutes()).substr(-2) + ":" + ("0" + now.getSeconds()).substr(-2) + "." + ("00" + now.getMilliseconds()).substr(-3);
433
+ var recID = this && this.envIn && this.envCheck && this.id;
434
+ var arr = ["[" + t + " " + RecTxt + (recID ? ":" + recID : "") + "]" + msg];
435
+ var a = arguments, console2 = window.console || {};
436
+ var i = 2, fn = console2.log;
437
+ if (typeof err == "number") {
438
+ fn = err == 1 ? console2.error : err == 3 ? console2.warn : fn;
439
+ } else {
440
+ i = 1;
441
+ }
442
+ for (; i < a.length; i++) {
443
+ arr.push(a[i]);
444
+ }
445
+ if (IsLoser) {
446
+ fn && fn("[IsLoser]" + arr[0], arr.length > 1 ? arr : "");
447
+ } else {
448
+ fn.apply(console2, arr);
449
+ }
243
450
  };
244
- var z = function() {
245
- o.CLog.apply(this, arguments);
246
- }, oe = !0;
451
+ var CLog = function() {
452
+ Recorder.CLog.apply(this, arguments);
453
+ };
454
+ var IsLoser = true;
247
455
  try {
248
- oe = !console.log.apply;
249
- } catch {
456
+ IsLoser = !console.log.apply;
457
+ } catch (e) {
250
458
  }
251
- var le = 0;
252
- function fe(e) {
253
- this.id = ++le, se();
254
- var t = {
459
+ var ID = 0;
460
+ function initFn(set) {
461
+ this.id = ++ID;
462
+ Traffic();
463
+ var o = {
255
464
  type: "mp3",
256
465
  //输出类型:mp3,wav,wav输出文件尺寸超大不推荐使用,但mp3编码支持会导致js文件超大,如果不需支持mp3可以使js文件大幅减小
257
466
  bitRate: 16,
@@ -260,7 +469,7 @@ function fe(e) {
260
469
  //采样率,wav格式大小=sampleRate*时间;mp3此项对低比特率有影响,高比特率几乎无影响。
261
470
  //wav任意值,mp3取值范围:48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000
262
471
  //采样率参考https://www.cnblogs.com/devin87/p/mp3-recorder.html
263
- onProcess: j
472
+ onProcess: NOOP
264
473
  //fn(buffers,powerLevel,bufferDuration,bufferSampleRate,newBufferIdx,asyncEnd) buffers=[[Int16,...],...]:缓冲的PCM数据,为从开始录音到现在的所有pcm片段;powerLevel:当前缓冲的音量级别0-100,bufferDuration:已缓冲时长,bufferSampleRate:缓冲使用的采样率(当type支持边录边转码(Worker)时,此采样率和设置的采样率相同,否则不一定相同);newBufferIdx:本次回调新增的buffer起始索引;asyncEnd:fn() 如果onProcess是异步的(返回值为true时),处理完成时需要调用此回调,如果不是异步的请忽略此参数,此方法回调时必须是真异步(不能真异步时需用setTimeout包裹)。onProcess返回值:如果返回true代表开启异步模式,在某些大量运算的场合异步是必须的,必须在异步处理完成时调用asyncEnd(不能真异步时需用setTimeout包裹),在onProcess执行后新增的buffer会全部替换成空数组,因此本回调开头应立即将newBufferIdx到本次回调结尾位置的buffer全部保存到另外一个数组内,处理完成后写回buffers中本次回调的结尾位置。
265
474
  //*******高级设置******
266
475
  //,sourceStream:MediaStream Object
@@ -278,250 +487,450 @@ function fe(e) {
278
487
  //目前只有mp3格式实现了实时编码,在支持实时处理的环境中将会实时的将编码出来的mp3片段通过此方法回调,所有的chunkBytes拼接到一起即为完整的mp3,此种拼接的结果比mock方法实时生成的音质更加,因为天然避免了首尾的静默
279
488
  //目前除mp3外其他格式不可以提供此回调,提供了将在open时直接走fail逻辑
280
489
  };
281
- for (var r in e)
282
- t[r] = e[r];
283
- this.set = t, this._S = 9, this.Sync = { O: 9, C: 9 };
490
+ for (var k in set) {
491
+ o[k] = set[k];
492
+ }
493
+ this.set = o;
494
+ this._S = 9;
495
+ this.Sync = { O: 9, C: 9 };
284
496
  }
285
- o.Sync = {
497
+ Recorder.Sync = {
286
498
  /*open*/
287
499
  O: 9,
288
500
  /*close*/
289
501
  C: 9
290
502
  };
291
- o.prototype = fe.prototype = {
292
- CLog: z,
503
+ Recorder.prototype = initFn.prototype = {
504
+ CLog,
293
505
  //流相关的数据存储在哪个对象里面;如果提供了sourceStream,数据直接存储在当前对象中,否则存储在全局
294
506
  _streamStore: function() {
295
- return this.set.sourceStream ? this : o;
507
+ if (this.set.sourceStream) {
508
+ return this;
509
+ } else {
510
+ return Recorder;
511
+ }
296
512
  },
297
513
  //打开录音资源True(),False(msg,isUserNotAllow),需要调用close。注意:此方法是异步的;一般使用时打开,用完立即关闭;可重复调用,可用来测试是否能录音
298
- open: function(e, t) {
299
- var r = this, n = r._streamStore();
300
- e = e || j;
301
- var a = function(f, d) {
302
- d = !!d, r.CLog("录音open失败:" + f + ",isUserNotAllow:" + d, 1), t && t(f, d);
303
- }, i = function() {
304
- r.CLog("open ok id:" + r.id), e(), r._SO = 0;
305
- }, s = n.Sync, p = ++s.O, v = s.C;
306
- r._O = r._O_ = p, r._SO = r._S;
307
- var l = function() {
308
- if (v != s.C || !r._O) {
309
- var f = "open被取消";
310
- return p == s.O ? r.close() : f = "open被中断", a(f), !0;
311
- }
312
- }, M = r.envCheck({ envName: "H5", canProcess: !0 });
313
- if (M) {
314
- a("不能录音:" + M);
514
+ open: function(True, False) {
515
+ var This = this, streamStore = This._streamStore();
516
+ True = True || NOOP;
517
+ var failCall = function(errMsg, isUserNotAllow) {
518
+ isUserNotAllow = !!isUserNotAllow;
519
+ This.CLog("录音open失败:" + errMsg + ",isUserNotAllow:" + isUserNotAllow, 1);
520
+ False && False(errMsg, isUserNotAllow);
521
+ };
522
+ var ok = function() {
523
+ This.CLog("open ok id:" + This.id);
524
+ True();
525
+ This._SO = 0;
526
+ };
527
+ var Lock = streamStore.Sync;
528
+ var lockOpen = ++Lock.O, lockClose = Lock.C;
529
+ This._O = This._O_ = lockOpen;
530
+ This._SO = This._S;
531
+ var lockFail = function() {
532
+ if (lockClose != Lock.C || !This._O) {
533
+ var err = "open被取消";
534
+ if (lockOpen == Lock.O) {
535
+ This.close();
536
+ } else {
537
+ err = "open被中断";
538
+ }
539
+ failCall(err);
540
+ return true;
541
+ }
542
+ };
543
+ var checkMsg = This.envCheck({ envName: "H5", canProcess: true });
544
+ if (checkMsg) {
545
+ failCall("不能录音:" + checkMsg);
315
546
  return;
316
547
  }
317
- if (r.set.sourceStream) {
318
- if (!o.GetContext()) {
319
- a("不支持此浏览器从流中获取录音");
548
+ if (This.set.sourceStream) {
549
+ if (!Recorder.GetContext()) {
550
+ failCall("不支持此浏览器从流中获取录音");
320
551
  return;
321
552
  }
322
- Z(n), r.Stream = r.set.sourceStream, r.Stream._call = {};
553
+ Disconnect(streamStore);
554
+ This.Stream = This.set.sourceStream;
555
+ This.Stream._call = {};
323
556
  try {
324
- ne(n);
325
- } catch (f) {
326
- a("从流中打开录音失败:" + f.message);
557
+ Connect(streamStore);
558
+ } catch (e) {
559
+ failCall("从流中打开录音失败:" + e.message);
327
560
  return;
328
561
  }
329
- i();
562
+ ok();
330
563
  return;
331
564
  }
332
- var g = function(f, d) {
565
+ var codeFail = function(code, msg) {
333
566
  try {
334
567
  window.top.a;
335
- } catch {
336
- a('无权录音(跨域,请尝试给iframe添加麦克风访问策略,如allow="camera;microphone")');
568
+ } catch (e) {
569
+ failCall('无权录音(跨域,请尝试给iframe添加麦克风访问策略,如allow="camera;microphone")');
337
570
  return;
338
571
  }
339
- /Permission|Allow/i.test(f) ? a("用户拒绝了录音权限", !0) : window.isSecureContext === !1 ? a("浏览器禁止不安全页面录音,可开启https解决") : /Found/i.test(f) ? a(d + ",无可用麦克风") : a(d);
572
+ if (/Permission|Allow/i.test(code)) {
573
+ failCall("用户拒绝了录音权限", true);
574
+ } else if (window.isSecureContext === false) {
575
+ failCall("浏览器禁止不安全页面录音,可开启https解决");
576
+ } else if (/Found/i.test(code)) {
577
+ failCall(msg + ",无可用麦克风");
578
+ } else {
579
+ failCall(msg);
580
+ }
340
581
  };
341
- if (o.IsOpen()) {
342
- i();
582
+ if (Recorder.IsOpen()) {
583
+ ok();
343
584
  return;
344
585
  }
345
- if (!o.Support()) {
346
- g("", "此浏览器不支持录音");
586
+ if (!Recorder.Support()) {
587
+ codeFail("", "此浏览器不支持录音");
347
588
  return;
348
589
  }
349
- var c = function(f) {
590
+ var f1 = function(stream) {
350
591
  setTimeout(function() {
351
- f._call = {};
352
- var d = o.Stream;
353
- d && (Z(), f._call = d._call), o.Stream = f, !l() && (o.IsOpen() ? (d && r.CLog("发现同时多次调用open", 1), ne(n, 1), i()) : a("录音功能无效:无音频流"));
592
+ stream._call = {};
593
+ var oldStream = Recorder.Stream;
594
+ if (oldStream) {
595
+ Disconnect();
596
+ stream._call = oldStream._call;
597
+ }
598
+ Recorder.Stream = stream;
599
+ if (lockFail()) return;
600
+ if (Recorder.IsOpen()) {
601
+ if (oldStream) This.CLog("发现同时多次调用open", 1);
602
+ Connect(streamStore, 1);
603
+ ok();
604
+ } else {
605
+ failCall("录音功能无效:无音频流");
606
+ }
354
607
  }, 100);
355
- }, u = function(f) {
356
- var d = f.name || f.message || f.code + ":" + f;
357
- r.CLog("请求录音权限错误", 1, f), g(d, "无法录音:" + d);
358
- }, h = {
359
- noiseSuppression: !1,
608
+ };
609
+ var f2 = function(e) {
610
+ var code = e.name || e.message || e.code + ":" + e;
611
+ This.CLog("请求录音权限错误", 1, e);
612
+ codeFail(code, "无法录音:" + code);
613
+ };
614
+ var trackSet = {
615
+ noiseSuppression: false,
360
616
  //默认禁用降噪,原声录制,免得移动端表现怪异(包括系统播放声音变小)
361
- echoCancellation: !1
617
+ echoCancellation: false
362
618
  //回声消除
363
- }, b = r.set.audioTrackSet;
364
- for (var _ in b) h[_] = b[_];
365
- h.sampleRate = o.Ctx.sampleRate;
619
+ };
620
+ var trackSet2 = This.set.audioTrackSet;
621
+ for (var k in trackSet2) trackSet[k] = trackSet2[k];
622
+ trackSet.sampleRate = Recorder.Ctx.sampleRate;
366
623
  try {
367
- var S = o.Scope[q]({ audio: h }, c, u);
368
- } catch (f) {
369
- r.CLog(q, 3, f), S = o.Scope[q]({ audio: !0 }, c, u);
624
+ var pro = Recorder.Scope[getUserMediaTxt]({ audio: trackSet }, f1, f2);
625
+ } catch (e) {
626
+ This.CLog(getUserMediaTxt, 3, e);
627
+ pro = Recorder.Scope[getUserMediaTxt]({ audio: true }, f1, f2);
628
+ }
629
+ if (pro && pro.then) {
630
+ pro.then(f1)[CatchTxt](f2);
370
631
  }
371
- S && S.then && S.then(c)[ee](u);
372
632
  },
373
633
  //关闭释放录音资源
374
- close: function(e) {
375
- e = e || j;
376
- var t = this, r = t._streamStore();
377
- t._stop();
378
- var n = r.Sync;
379
- if (t._O = 0, t._O_ != n.O) {
380
- t.CLog("close被忽略(因为同时open了多个rec,只有最后一个会真正close)", 3), e();
634
+ close: function(call) {
635
+ call = call || NOOP;
636
+ var This = this, streamStore = This._streamStore();
637
+ This._stop();
638
+ var Lock = streamStore.Sync;
639
+ This._O = 0;
640
+ if (This._O_ != Lock.O) {
641
+ This.CLog("close被忽略(因为同时open了多个rec,只有最后一个会真正close)", 3);
642
+ call();
381
643
  return;
382
644
  }
383
- n.C++, Z(r), t.CLog("close"), e();
645
+ Lock.C++;
646
+ Disconnect(streamStore);
647
+ This.CLog("close");
648
+ call();
384
649
  },
385
650
  /*模拟一段录音数据,后面可以调用stop进行编码,需提供pcm数据[1,2,3...],pcm的采样率*/
386
- mock: function(e, t) {
387
- var r = this;
388
- return r._stop(), r.isMock = 1, r.mockEnvInfo = null, r.buffers = [e], r.recSize = e.length, r[K] = t, r;
651
+ mock: function(pcmData, pcmSampleRate) {
652
+ var This = this;
653
+ This._stop();
654
+ This.isMock = 1;
655
+ This.mockEnvInfo = null;
656
+ This.buffers = [pcmData];
657
+ This.recSize = pcmData.length;
658
+ This[srcSampleRateTxt] = pcmSampleRate;
659
+ return This;
389
660
  },
390
- envCheck: function(e) {
391
- var t, r = this, n = r.set, a = "CPU_BE";
392
- if (!t && !o[a] && window.Int8Array && !new Int8Array(new Int32Array([1]).buffer)[0] && (se(a), t = "不支持" + a + "架构"), !t) {
393
- var i = n.type;
394
- r[i + "_envCheck"] ? t = r[i + "_envCheck"](e, n) : n.takeoffEncodeChunk && (t = i + "类型" + (r[i] ? "" : "(未加载编码器)") + "不支持设置takeoffEncodeChunk");
661
+ envCheck: function(envInfo) {
662
+ var errMsg, This = this, set = This.set;
663
+ var tag = "CPU_BE";
664
+ if (!errMsg && !Recorder[tag] && window.Int8Array && !new Int8Array(new Int32Array([1]).buffer)[0]) {
665
+ Traffic(tag);
666
+ errMsg = "不支持" + tag + "架构";
395
667
  }
396
- return t || "";
668
+ if (!errMsg) {
669
+ var type = set.type;
670
+ if (This[type + "_envCheck"]) {
671
+ errMsg = This[type + "_envCheck"](envInfo, set);
672
+ } else {
673
+ if (set.takeoffEncodeChunk) {
674
+ errMsg = type + "类型" + (This[type] ? "" : "(未加载编码器)") + "不支持设置takeoffEncodeChunk";
675
+ }
676
+ }
677
+ }
678
+ return errMsg || "";
397
679
  },
398
- envStart: function(e, t) {
399
- var r = this, n = r.set;
400
- r.isMock = e ? 1 : 0, r.mockEnvInfo = e, r.buffers = [], r.recSize = 0, r.envInLast = 0, r.envInFirst = 0, r.envInFix = 0, r.envInFixTs = [];
401
- var a = n[F];
402
- if (a > t ? n[F] = t : a = 0, r[K] = t, r.CLog(
403
- K + ": " + t + " set." + F + ": " + n[F] + (a ? " 忽略" + a : ""),
404
- a ? 3 : 0
405
- ), r.engineCtx = 0, r[n.type + "_start"]) {
406
- var i = r.engineCtx = r[n.type + "_start"](n);
407
- i && (i.pcmDatas = [], i.pcmSize = 0);
680
+ envStart: function(mockEnvInfo, sampleRate) {
681
+ var This = this, set = This.set;
682
+ This.isMock = mockEnvInfo ? 1 : 0;
683
+ This.mockEnvInfo = mockEnvInfo;
684
+ This.buffers = [];
685
+ This.recSize = 0;
686
+ This.envInLast = 0;
687
+ This.envInFirst = 0;
688
+ This.envInFix = 0;
689
+ This.envInFixTs = [];
690
+ var setSr = set[sampleRateTxt];
691
+ if (setSr > sampleRate) {
692
+ set[sampleRateTxt] = sampleRate;
693
+ } else {
694
+ setSr = 0;
695
+ }
696
+ This[srcSampleRateTxt] = sampleRate;
697
+ This.CLog(
698
+ srcSampleRateTxt + ": " + sampleRate + " set." + sampleRateTxt + ": " + set[sampleRateTxt] + (setSr ? " 忽略" + setSr : ""),
699
+ setSr ? 3 : 0
700
+ );
701
+ This.engineCtx = 0;
702
+ if (This[set.type + "_start"]) {
703
+ var engineCtx = This.engineCtx = This[set.type + "_start"](set);
704
+ if (engineCtx) {
705
+ engineCtx.pcmDatas = [];
706
+ engineCtx.pcmSize = 0;
707
+ }
408
708
  }
409
709
  },
410
710
  envResume: function() {
411
711
  this.envInFixTs = [];
412
712
  },
413
- envIn: function(e, t) {
414
- var r = this, n = r.set, a = r.engineCtx, i = r[K], s = e.length, p = o.PowerLevel(t, s), v = r.buffers, l = v.length;
415
- v.push(e);
416
- var M = v, g = l, c = Date.now(), u = Math.round(s / i * 1e3);
417
- r.envInLast = c, r.buffers.length == 1 && (r.envInFirst = c - u);
418
- var h = r.envInFixTs;
419
- h.splice(0, 0, { t: c, d: u });
420
- for (var b = c, _ = 0, S = 0; S < h.length; S++) {
421
- var f = h[S];
422
- if (c - f.t > 3e3) {
423
- h.length = S;
713
+ envIn: function(pcm, sum) {
714
+ var This = this, set = This.set, engineCtx = This.engineCtx;
715
+ var bufferSampleRate = This[srcSampleRateTxt];
716
+ var size = pcm.length;
717
+ var powerLevel = Recorder.PowerLevel(sum, size);
718
+ var buffers = This.buffers;
719
+ var bufferFirstIdx = buffers.length;
720
+ buffers.push(pcm);
721
+ var buffersThis = buffers;
722
+ var bufferFirstIdxThis = bufferFirstIdx;
723
+ var now = Date.now();
724
+ var pcmTime = Math.round(size / bufferSampleRate * 1e3);
725
+ This.envInLast = now;
726
+ if (This.buffers.length == 1) {
727
+ This.envInFirst = now - pcmTime;
728
+ }
729
+ var envInFixTs = This.envInFixTs;
730
+ envInFixTs.splice(0, 0, { t: now, d: pcmTime });
731
+ var tsInStart = now, tsPcm = 0;
732
+ for (var i = 0; i < envInFixTs.length; i++) {
733
+ var o = envInFixTs[i];
734
+ if (now - o.t > 3e3) {
735
+ envInFixTs.length = i;
424
736
  break;
425
737
  }
426
- b = f.t, _ += f.d;
738
+ tsInStart = o.t;
739
+ tsPcm += o.d;
427
740
  }
428
- var d = h[1], m = c - b, R = m - _;
429
- if (R > m / 3 && (d && m > 1e3 || h.length >= 6)) {
430
- var D = c - d.t - u;
431
- if (D > u / 5) {
432
- var x = !n.disableEnvInFix;
433
- if (r.CLog("[" + c + "]" + (x ? "" : "未") + "补偿" + D + "ms", 3), r.envInFix += D, x) {
434
- var T = new Int16Array(D * i / 1e3);
435
- s += T.length, v.push(T);
741
+ var tsInPrev = envInFixTs[1];
742
+ var tsIn = now - tsInStart;
743
+ var lost = tsIn - tsPcm;
744
+ if (lost > tsIn / 3 && (tsInPrev && tsIn > 1e3 || envInFixTs.length >= 6)) {
745
+ var addTime = now - tsInPrev.t - pcmTime;
746
+ if (addTime > pcmTime / 5) {
747
+ var fixOpen = !set.disableEnvInFix;
748
+ This.CLog("[" + now + "]" + (fixOpen ? "" : "未") + "补偿" + addTime + "ms", 3);
749
+ This.envInFix += addTime;
750
+ if (fixOpen) {
751
+ var addPcm = new Int16Array(addTime * bufferSampleRate / 1e3);
752
+ size += addPcm.length;
753
+ buffers.push(addPcm);
436
754
  }
437
755
  }
438
756
  }
439
- var C = r.recSize, k = s, I = C + k;
440
- if (r.recSize = I, a) {
441
- var w = o.SampleData(
442
- v,
443
- i,
444
- n[F],
445
- a.chunkInfo
757
+ var sizeOld = This.recSize, addSize = size;
758
+ var bufferSize = sizeOld + addSize;
759
+ This.recSize = bufferSize;
760
+ if (engineCtx) {
761
+ var chunkInfo = Recorder.SampleData(
762
+ buffers,
763
+ bufferSampleRate,
764
+ set[sampleRateTxt],
765
+ engineCtx.chunkInfo
446
766
  );
447
- a.chunkInfo = w, C = a.pcmSize, k = w.data.length, I = C + k, a.pcmSize = I, v = a.pcmDatas, l = v.length, v.push(w.data), i = w[F];
767
+ engineCtx.chunkInfo = chunkInfo;
768
+ sizeOld = engineCtx.pcmSize;
769
+ addSize = chunkInfo.data.length;
770
+ bufferSize = sizeOld + addSize;
771
+ engineCtx.pcmSize = bufferSize;
772
+ buffers = engineCtx.pcmDatas;
773
+ bufferFirstIdx = buffers.length;
774
+ buffers.push(chunkInfo.data);
775
+ bufferSampleRate = chunkInfo[sampleRateTxt];
448
776
  }
449
- var y = Math.round(I / i * 1e3), L = v.length, O = M.length, P = function() {
450
- for (var U = A ? 0 : -k, J = v[0] == null, $ = l; $ < L; $++) {
451
- var Y = v[$];
452
- Y == null ? J = 1 : (U += Y.length, a && Y.length && r[n.type + "_encode"](a, Y));
777
+ var duration = Math.round(bufferSize / bufferSampleRate * 1e3);
778
+ var bufferNextIdx = buffers.length;
779
+ var bufferNextIdxThis = buffersThis.length;
780
+ var asyncEnd = function() {
781
+ var num = asyncBegin ? 0 : -addSize;
782
+ var hasClear2 = buffers[0] == null;
783
+ for (var i2 = bufferFirstIdx; i2 < bufferNextIdx; i2++) {
784
+ var buffer = buffers[i2];
785
+ if (buffer == null) {
786
+ hasClear2 = 1;
787
+ } else {
788
+ num += buffer.length;
789
+ if (engineCtx && buffer.length) {
790
+ This[set.type + "_encode"](engineCtx, buffer);
791
+ }
792
+ }
793
+ }
794
+ if (hasClear2 && engineCtx) {
795
+ var i2 = bufferFirstIdxThis;
796
+ if (buffersThis[0]) {
797
+ i2 = 0;
798
+ }
799
+ for (; i2 < bufferNextIdxThis; i2++) {
800
+ buffersThis[i2] = null;
801
+ }
802
+ }
803
+ if (hasClear2) {
804
+ num = asyncBegin ? addSize : 0;
805
+ buffers[0] = null;
453
806
  }
454
- if (J && a) {
455
- var $ = g;
456
- for (M[0] && ($ = 0); $ < O; $++)
457
- M[$] = null;
807
+ if (engineCtx) {
808
+ engineCtx.pcmSize += num;
809
+ } else {
810
+ This.recSize += num;
458
811
  }
459
- J && (U = A ? k : 0, v[0] = null), a ? a.pcmSize += U : r.recSize += U;
460
- }, A = 0, H = "rec.set.onProcess";
812
+ };
813
+ var asyncBegin = 0, procTxt = "rec.set.onProcess";
461
814
  try {
462
- A = n.onProcess(
463
- v,
464
- p,
465
- y,
466
- i,
467
- l,
468
- P
815
+ asyncBegin = set.onProcess(
816
+ buffers,
817
+ powerLevel,
818
+ duration,
819
+ bufferSampleRate,
820
+ bufferFirstIdx,
821
+ asyncEnd
469
822
  );
470
- } catch (U) {
471
- console.error(H + "回调出错是不允许的,需保证不会抛异常", U);
472
- }
473
- var E = Date.now() - c;
474
- if (E > 10 && r.envInFirst - c > 1e3 && r.CLog(H + "低性能,耗时" + E + "ms", 3), A === !0) {
475
- for (var B = 0, S = l; S < L; S++)
476
- v[S] == null ? B = 1 : v[S] = new Int16Array(0);
477
- B ? r.CLog("未进入异步前不能清除buffers", 3) : a ? a.pcmSize -= k : r.recSize -= k;
478
- } else
479
- P();
823
+ } catch (e) {
824
+ console.error(procTxt + "回调出错是不允许的,需保证不会抛异常", e);
825
+ }
826
+ var slowT = Date.now() - now;
827
+ if (slowT > 10 && This.envInFirst - now > 1e3) {
828
+ This.CLog(procTxt + "低性能,耗时" + slowT + "ms", 3);
829
+ }
830
+ if (asyncBegin === true) {
831
+ var hasClear = 0;
832
+ for (var i = bufferFirstIdx; i < bufferNextIdx; i++) {
833
+ if (buffers[i] == null) {
834
+ hasClear = 1;
835
+ } else {
836
+ buffers[i] = new Int16Array(0);
837
+ }
838
+ }
839
+ if (hasClear) {
840
+ This.CLog("未进入异步前不能清除buffers", 3);
841
+ } else {
842
+ if (engineCtx) {
843
+ engineCtx.pcmSize -= addSize;
844
+ } else {
845
+ This.recSize -= addSize;
846
+ }
847
+ }
848
+ } else {
849
+ asyncEnd();
850
+ }
480
851
  },
481
852
  //开始录音,需先调用open;只要open成功时,调用此方法是安全的,如果未open强行调用导致的内部错误将不会有任何提示,stop时自然能得到错误
482
853
  start: function() {
483
- var e = this, t = o.Ctx, r = 1;
484
- if (e.set.sourceStream ? e.Stream || (r = 0) : o.IsOpen() || (r = 0), !r) {
485
- e.CLog("未open", 1);
854
+ var This = this, ctx = Recorder.Ctx;
855
+ var isOpen = 1;
856
+ if (This.set.sourceStream) {
857
+ if (!This.Stream) {
858
+ isOpen = 0;
859
+ }
860
+ } else if (!Recorder.IsOpen()) {
861
+ isOpen = 0;
862
+ }
863
+ if (!isOpen) {
864
+ This.CLog("未open", 1);
486
865
  return;
487
866
  }
488
- if (e.CLog("开始录音"), e._stop(), e.state = 3, e.envStart(null, t[F]), e._SO && e._SO + 1 != e._S) {
489
- e.CLog("start被中断", 3);
867
+ This.CLog("开始录音");
868
+ This._stop();
869
+ This.state = 3;
870
+ This.envStart(null, ctx[sampleRateTxt]);
871
+ if (This._SO && This._SO + 1 != This._S) {
872
+ This.CLog("start被中断", 3);
490
873
  return;
491
874
  }
492
- e._SO = 0;
493
- var n = function() {
494
- e.state == 3 && (e.state = 1, e.resume());
875
+ This._SO = 0;
876
+ var end = function() {
877
+ if (This.state == 3) {
878
+ This.state = 1;
879
+ This.resume();
880
+ }
495
881
  };
496
- if (t.state == "suspended") {
497
- var a = "AudioContext resume: ";
498
- e.CLog(a + "wait..."), t.resume().then(function() {
499
- e.CLog(a + t.state), n();
500
- })[ee](function(i) {
501
- e.CLog(a + t.state + " 可能无法录音:" + i.message, 1, i), n();
882
+ if (ctx.state == "suspended") {
883
+ var tag = "AudioContext resume: ";
884
+ This.CLog(tag + "wait...");
885
+ ctx.resume().then(function() {
886
+ This.CLog(tag + ctx.state);
887
+ end();
888
+ })[CatchTxt](function(e) {
889
+ This.CLog(tag + ctx.state + " 可能无法录音:" + e.message, 1, e);
890
+ end();
502
891
  });
503
- } else
504
- n();
892
+ } else {
893
+ end();
894
+ }
505
895
  },
506
896
  /*暂停录音*/
507
897
  pause: function() {
508
- var e = this;
509
- e.state && (e.state = 2, e.CLog("pause"), delete e._streamStore().Stream._call[e.id]);
898
+ var This = this;
899
+ if (This.state) {
900
+ This.state = 2;
901
+ This.CLog("pause");
902
+ delete This._streamStore().Stream._call[This.id];
903
+ }
510
904
  },
511
905
  /*恢复录音*/
512
906
  resume: function() {
513
- var e = this;
514
- if (e.state) {
515
- e.state = 1, e.CLog("resume"), e.envResume();
516
- var t = e._streamStore().Stream;
517
- t._call[e.id] = function(r, n) {
518
- e.state == 1 && e.envIn(r, n);
519
- }, ve(t);
907
+ var This = this;
908
+ if (This.state) {
909
+ This.state = 1;
910
+ This.CLog("resume");
911
+ This.envResume();
912
+ var stream = This._streamStore().Stream;
913
+ stream._call[This.id] = function(pcm, sum) {
914
+ if (This.state == 1) {
915
+ This.envIn(pcm, sum);
916
+ }
917
+ };
918
+ ConnAlive(stream);
520
919
  }
521
920
  },
522
- _stop: function(e) {
523
- var t = this, r = t.set;
524
- t.isMock || t._S++, t.state && (t.pause(), t.state = 0), !e && t[r.type + "_stop"] && (t[r.type + "_stop"](t.engineCtx), t.engineCtx = 0);
921
+ _stop: function(keepEngine) {
922
+ var This = this, set = This.set;
923
+ if (!This.isMock) {
924
+ This._S++;
925
+ }
926
+ if (This.state) {
927
+ This.pause();
928
+ This.state = 0;
929
+ }
930
+ if (!keepEngine && This[set.type + "_stop"]) {
931
+ This[set.type + "_stop"](This.engineCtx);
932
+ This.engineCtx = 0;
933
+ }
525
934
  },
526
935
  /*
527
936
  结束录音并返回录音数据blob对象
@@ -531,213 +940,310 @@ o.prototype = fe.prototype = {
531
940
  False(msg)
532
941
  autoClose:false 可选,是否自动调用close,默认为false
533
942
  */
534
- stop: function(e, t, r) {
535
- var n = this, a = n.set, i, s = n.envInLast - n.envInFirst, p = s && n.buffers.length;
536
- n.CLog(
537
- "stop 和start时差" + (s ? s + "ms 补偿" + n.envInFix + "ms envIn:" + p + " fps:" + (p / s * 1e3).toFixed(1) : "-")
943
+ stop: function(True, False, autoClose) {
944
+ var This = this, set = This.set, t1;
945
+ var envInMS = This.envInLast - This.envInFirst, envInLen = envInMS && This.buffers.length;
946
+ This.CLog(
947
+ "stop 和start时差" + (envInMS ? envInMS + "ms 补偿" + This.envInFix + "ms envIn:" + envInLen + " fps:" + (envInLen / envInMS * 1e3).toFixed(1) : "-")
538
948
  );
539
- var v = function() {
540
- n._stop(), r && n.close();
541
- }, l = function(f) {
542
- n.CLog("结束录音失败:" + f, 1), t && t(f), v();
543
- }, M = function(f, d) {
544
- if (n.CLog(
545
- "结束录音 编码花" + (Date.now() - i) + "ms 音频时长" + d + "ms 文件大小" + f.size + "b"
546
- ), a.takeoffEncodeChunk)
547
- n.CLog("启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据", 3);
548
- else if (f.size < Math.max(100, d / 2)) {
549
- l("生成的" + a.type + "无效");
949
+ var end = function() {
950
+ This._stop();
951
+ if (autoClose) {
952
+ This.close();
953
+ }
954
+ };
955
+ var err = function(msg) {
956
+ This.CLog("结束录音失败:" + msg, 1);
957
+ False && False(msg);
958
+ end();
959
+ };
960
+ var ok = function(blob, duration2) {
961
+ This.CLog(
962
+ "结束录音 编码花" + (Date.now() - t1) + "ms 音频时长" + duration2 + "ms 文件大小" + blob.size + "b"
963
+ );
964
+ if (set.takeoffEncodeChunk) {
965
+ This.CLog("启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据", 3);
966
+ } else if (blob.size < Math.max(100, duration2 / 2)) {
967
+ err("生成的" + set.type + "无效");
550
968
  return;
551
969
  }
552
- e && e(f, d), v();
970
+ True && True(blob, duration2);
971
+ end();
553
972
  };
554
- if (!n.isMock) {
555
- var g = n.state == 3;
556
- if (!n.state || g) {
973
+ if (!This.isMock) {
974
+ var isCtxWait = This.state == 3;
975
+ if (!This.state || isCtxWait) {
557
976
  console.log(
558
- "未开始录音" + (g ? ",开始录音前无用户交互导致AudioContext未运行" : "")
977
+ "未开始录音" + (isCtxWait ? ",开始录音前无用户交互导致AudioContext未运行" : "")
559
978
  );
560
979
  return;
561
980
  }
562
- n._stop(!0);
981
+ This._stop(true);
563
982
  }
564
- var c = n.recSize;
565
- if (!c) {
566
- l("未采集到录音");
983
+ var size = This.recSize;
984
+ if (!size) {
985
+ err("未采集到录音");
567
986
  return;
568
987
  }
569
- if (!n.buffers[0]) {
570
- l("音频buffers被释放");
988
+ if (!This.buffers[0]) {
989
+ err("音频buffers被释放");
571
990
  return;
572
991
  }
573
- if (!n[a.type]) {
574
- l("未加载" + a.type + "编码器");
992
+ if (!This[set.type]) {
993
+ err("未加载" + set.type + "编码器");
575
994
  return;
576
995
  }
577
- if (n.isMock) {
578
- var u = n.envCheck(n.mockEnvInfo || { envName: "mock", canProcess: !1 });
579
- if (u) {
580
- l("录音错误:" + u);
996
+ if (This.isMock) {
997
+ var checkMsg = This.envCheck(This.mockEnvInfo || { envName: "mock", canProcess: false });
998
+ if (checkMsg) {
999
+ err("录音错误:" + checkMsg);
581
1000
  return;
582
1001
  }
583
1002
  }
584
- var h = n.engineCtx;
585
- if (n[a.type + "_complete"] && h) {
586
- var S = Math.round(h.pcmSize / a[F] * 1e3);
587
- i = Date.now(), n[a.type + "_complete"](
588
- h,
589
- function(d) {
590
- M(d, S);
1003
+ var engineCtx = This.engineCtx;
1004
+ if (This[set.type + "_complete"] && engineCtx) {
1005
+ var duration = Math.round(engineCtx.pcmSize / set[sampleRateTxt] * 1e3);
1006
+ t1 = Date.now();
1007
+ This[set.type + "_complete"](
1008
+ engineCtx,
1009
+ function(blob) {
1010
+ ok(blob, duration);
591
1011
  },
592
- l
1012
+ err
593
1013
  );
594
1014
  return;
595
1015
  }
596
- i = Date.now();
597
- var b = o.SampleData(n.buffers, n[K], a[F]);
598
- a[F] = b[F];
599
- var _ = b.data, S = Math.round(_.length / a[F] * 1e3);
600
- n.CLog("采样" + c + "->" + _.length + " 花:" + (Date.now() - i) + "ms"), setTimeout(function() {
601
- i = Date.now(), n[a.type](
602
- _,
603
- function(f) {
604
- M(f, S);
1016
+ t1 = Date.now();
1017
+ var chunk = Recorder.SampleData(This.buffers, This[srcSampleRateTxt], set[sampleRateTxt]);
1018
+ set[sampleRateTxt] = chunk[sampleRateTxt];
1019
+ var res = chunk.data;
1020
+ var duration = Math.round(res.length / set[sampleRateTxt] * 1e3);
1021
+ This.CLog("采样" + size + "->" + res.length + " 花:" + (Date.now() - t1) + "ms");
1022
+ setTimeout(function() {
1023
+ t1 = Date.now();
1024
+ This[set.type](
1025
+ res,
1026
+ function(blob) {
1027
+ ok(blob, duration);
605
1028
  },
606
- function(f) {
607
- l(f);
1029
+ function(msg) {
1030
+ err(msg);
608
1031
  }
609
1032
  );
610
1033
  });
611
1034
  }
612
1035
  };
613
- var ce = function(e, t) {
614
- t.pos || (t.pos = [0], t.tracks = {}, t.bytes = []);
615
- var r = t.tracks, n = [t.pos[0]], a = function() {
616
- t.pos[0] = n[0];
617
- }, i = t.bytes.length, s = new Uint8Array(i + e.length);
618
- if (s.set(t.bytes), s.set(e, i), t.bytes = s, !t._ht) {
619
- if (N(s, n), V(s, n), !W(N(s, n), [24, 83, 128, 103]))
1036
+ var WebM_Extract = function(inBytes, scope) {
1037
+ if (!scope.pos) {
1038
+ scope.pos = [0];
1039
+ scope.tracks = {};
1040
+ scope.bytes = [];
1041
+ }
1042
+ var tracks = scope.tracks, position = [scope.pos[0]];
1043
+ var endPos = function() {
1044
+ scope.pos[0] = position[0];
1045
+ };
1046
+ var sBL = scope.bytes.length;
1047
+ var bytes = new Uint8Array(sBL + inBytes.length);
1048
+ bytes.set(scope.bytes);
1049
+ bytes.set(inBytes, sBL);
1050
+ scope.bytes = bytes;
1051
+ if (!scope._ht) {
1052
+ readMatroskaVInt(bytes, position);
1053
+ readMatroskaBlock(bytes, position);
1054
+ if (!BytesEq(readMatroskaVInt(bytes, position), [24, 83, 128, 103])) {
620
1055
  return;
621
- for (N(s, n); n[0] < s.length; ) {
622
- var p = N(s, n), v = V(s, n), l = [0], M = 0;
623
- if (!v) return;
624
- if (W(p, [22, 84, 174, 107])) {
625
- for (; l[0] < v.length; ) {
626
- var g = N(v, l), c = V(v, l), u = [0], h = { channels: 0, sampleRate: 0 };
627
- if (W(g, [174]))
628
- for (; u[0] < c.length; ) {
629
- var b = N(c, u), _ = V(c, u), S = [0];
630
- if (W(b, [215])) {
631
- var f = X(_);
632
- h.number = f, r[f] = h;
633
- } else if (W(b, [131])) {
634
- var f = X(_);
635
- f == 1 ? h.type = "video" : f == 2 ? (h.type = "audio", M || (t.track0 = h), h.idx = M++) : h.type = "Type-" + f;
636
- } else if (W(b, [134])) {
637
- for (var d = "", m = 0; m < _.length; m++)
638
- d += String.fromCharCode(_[m]);
639
- h.codec = d;
640
- } else if (W(b, [225]))
641
- for (; S[0] < _.length; ) {
642
- var R = N(_, S), D = V(_, S);
643
- if (W(R, [181])) {
644
- var f = 0, x = new Uint8Array(D.reverse()).buffer;
645
- D.length == 4 ? f = new Float32Array(x)[0] : D.length == 8 ? f = new Float64Array(x)[0] : z("WebM Track !Float", 1, D), h[F] = Math.round(f);
646
- } else W(R, [98, 100]) ? h.bitDepth = X(D) : W(R, [159]) && (h.channels = X(D));
1056
+ }
1057
+ readMatroskaVInt(bytes, position);
1058
+ while (position[0] < bytes.length) {
1059
+ var eid0 = readMatroskaVInt(bytes, position);
1060
+ var bytes0 = readMatroskaBlock(bytes, position);
1061
+ var pos0 = [0], audioIdx = 0;
1062
+ if (!bytes0) return;
1063
+ if (BytesEq(eid0, [22, 84, 174, 107])) {
1064
+ while (pos0[0] < bytes0.length) {
1065
+ var eid1 = readMatroskaVInt(bytes0, pos0);
1066
+ var bytes1 = readMatroskaBlock(bytes0, pos0);
1067
+ var pos1 = [0], track = { channels: 0, sampleRate: 0 };
1068
+ if (BytesEq(eid1, [174])) {
1069
+ while (pos1[0] < bytes1.length) {
1070
+ var eid2 = readMatroskaVInt(bytes1, pos1);
1071
+ var bytes2 = readMatroskaBlock(bytes1, pos1);
1072
+ var pos2 = [0];
1073
+ if (BytesEq(eid2, [215])) {
1074
+ var val = BytesInt(bytes2);
1075
+ track.number = val;
1076
+ tracks[val] = track;
1077
+ } else if (BytesEq(eid2, [131])) {
1078
+ var val = BytesInt(bytes2);
1079
+ if (val == 1) track.type = "video";
1080
+ else if (val == 2) {
1081
+ track.type = "audio";
1082
+ if (!audioIdx) scope.track0 = track;
1083
+ track.idx = audioIdx++;
1084
+ } else track.type = "Type-" + val;
1085
+ } else if (BytesEq(eid2, [134])) {
1086
+ var str = "";
1087
+ for (var i = 0; i < bytes2.length; i++) {
1088
+ str += String.fromCharCode(bytes2[i]);
1089
+ }
1090
+ track.codec = str;
1091
+ } else if (BytesEq(eid2, [225])) {
1092
+ while (pos2[0] < bytes2.length) {
1093
+ var eid3 = readMatroskaVInt(bytes2, pos2);
1094
+ var bytes3 = readMatroskaBlock(bytes2, pos2);
1095
+ if (BytesEq(eid3, [181])) {
1096
+ var val = 0, arr = new Uint8Array(bytes3.reverse()).buffer;
1097
+ if (bytes3.length == 4) val = new Float32Array(arr)[0];
1098
+ else if (bytes3.length == 8) val = new Float64Array(arr)[0];
1099
+ else CLog("WebM Track !Float", 1, bytes3);
1100
+ track[sampleRateTxt] = Math.round(val);
1101
+ } else if (BytesEq(eid3, [98, 100])) track.bitDepth = BytesInt(bytes3);
1102
+ else if (BytesEq(eid3, [159])) track.channels = BytesInt(bytes3);
647
1103
  }
1104
+ }
648
1105
  }
1106
+ }
649
1107
  }
650
- t._ht = 1, z("WebM Tracks", r), a();
1108
+ scope._ht = 1;
1109
+ CLog("WebM Tracks", tracks);
1110
+ endPos();
651
1111
  break;
652
1112
  }
653
1113
  }
654
1114
  }
655
- var T = t.track0;
656
- if (T) {
657
- if (T.bitDepth == 16 && /FLOAT/i.test(T.codec) && (T.bitDepth = 32, z("WebM 16改32位", 3)), T[F] != t[F] || T.bitDepth != 32 || T.channels < 1 || !/(\b|_)PCM\b/i.test(T.codec))
658
- return t.bytes = [], t.bad || z("WebM Track非预期", 3, t), t.bad = 1, -1;
659
- for (var C = [], k = 0; n[0] < s.length; ) {
660
- var g = N(s, n), c = V(s, n);
661
- if (!c) break;
662
- if (W(g, [163])) {
663
- var I = c[0] & 15, h = r[I];
664
- if (!h)
665
- z("WebM !Track" + I, 1, r);
666
- else if (h.idx === 0) {
667
- for (var w = new Uint8Array(c.length - 4), m = 4; m < c.length; m++)
668
- w[m - 4] = c[m];
669
- C.push(w), k += w.length;
1115
+ var track0 = scope.track0;
1116
+ if (!track0) return;
1117
+ if (track0.bitDepth == 16 && /FLOAT/i.test(track0.codec)) {
1118
+ track0.bitDepth = 32;
1119
+ CLog("WebM 16改32位", 3);
1120
+ }
1121
+ if (track0[sampleRateTxt] != scope[sampleRateTxt] || track0.bitDepth != 32 || track0.channels < 1 || !/(\b|_)PCM\b/i.test(track0.codec)) {
1122
+ scope.bytes = [];
1123
+ if (!scope.bad) CLog("WebM Track非预期", 3, scope);
1124
+ scope.bad = 1;
1125
+ return -1;
1126
+ }
1127
+ var datas = [], dataLen = 0;
1128
+ while (position[0] < bytes.length) {
1129
+ var eid1 = readMatroskaVInt(bytes, position);
1130
+ var bytes1 = readMatroskaBlock(bytes, position);
1131
+ if (!bytes1) break;
1132
+ if (BytesEq(eid1, [163])) {
1133
+ var trackNo = bytes1[0] & 15;
1134
+ var track = tracks[trackNo];
1135
+ if (!track) {
1136
+ CLog("WebM !Track" + trackNo, 1, tracks);
1137
+ } else if (track.idx === 0) {
1138
+ var u8arr = new Uint8Array(bytes1.length - 4);
1139
+ for (var i = 4; i < bytes1.length; i++) {
1140
+ u8arr[i - 4] = bytes1[i];
670
1141
  }
1142
+ datas.push(u8arr);
1143
+ dataLen += u8arr.length;
671
1144
  }
672
- a();
673
- }
674
- if (k) {
675
- var y = new Uint8Array(s.length - t.pos[0]);
676
- y.set(s.subarray(t.pos[0])), t.bytes = y, t.pos[0] = 0;
677
- for (var w = new Uint8Array(k), m = 0, L = 0; m < C.length; m++)
678
- w.set(C[m], L), L += C[m].length;
679
- var x = new Float32Array(w.buffer);
680
- if (T.channels > 1) {
681
- for (var O = [], m = 0; m < x.length; )
682
- O.push(x[m]), m += T.channels;
683
- x = new Float32Array(O);
684
- }
685
- return x;
686
- }
687
- }
688
- }, W = function(e, t) {
689
- if (!e || e.length != t.length) return !1;
690
- if (e.length == 1) return e[0] == t[0];
691
- for (var r = 0; r < e.length; r++)
692
- if (e[r] != t[r]) return !1;
693
- return !0;
694
- }, X = function(e) {
695
- for (var t = "", r = 0; r < e.length; r++) {
696
- var n = e[r];
697
- t += (n < 16 ? "0" : "") + n.toString(16);
698
- }
699
- return parseInt(t, 16) || 0;
700
- }, N = function(e, t, r) {
701
- var n = t[0];
702
- if (!(n >= e.length)) {
703
- var a = e[n], i = ("0000000" + a.toString(2)).substr(-8), s = /^(0*1)(\d*)$/.exec(i);
704
- if (s) {
705
- var p = s[1].length, v = [];
706
- if (!(n + p > e.length)) {
707
- for (var l = 0; l < p; l++)
708
- v[l] = e[n], n++;
709
- return r && (v[0] = parseInt(s[2] || "0", 2)), t[0] = n, v;
710
- }
711
- }
712
- }
713
- }, V = function(e, t) {
714
- var r = N(e, t, 1);
715
- if (r) {
716
- var n = X(r), a = t[0], i = [];
717
- if (n < 2147483647) {
718
- if (a + n > e.length) return;
719
- for (var s = 0; s < n; s++)
720
- i[s] = e[a], a++;
721
- }
722
- return t[0] = a, i;
1145
+ }
1146
+ endPos();
723
1147
  }
1148
+ if (dataLen) {
1149
+ var more = new Uint8Array(bytes.length - scope.pos[0]);
1150
+ more.set(bytes.subarray(scope.pos[0]));
1151
+ scope.bytes = more;
1152
+ scope.pos[0] = 0;
1153
+ var u8arr = new Uint8Array(dataLen);
1154
+ for (var i = 0, i2 = 0; i < datas.length; i++) {
1155
+ u8arr.set(datas[i], i2);
1156
+ i2 += datas[i].length;
1157
+ }
1158
+ var arr = new Float32Array(u8arr.buffer);
1159
+ if (track0.channels > 1) {
1160
+ var arr2 = [];
1161
+ for (var i = 0; i < arr.length; ) {
1162
+ arr2.push(arr[i]);
1163
+ i += track0.channels;
1164
+ }
1165
+ arr = new Float32Array(arr2);
1166
+ }
1167
+ return arr;
1168
+ }
1169
+ };
1170
+ var BytesEq = function(bytes1, bytes2) {
1171
+ if (!bytes1 || bytes1.length != bytes2.length) return false;
1172
+ if (bytes1.length == 1) return bytes1[0] == bytes2[0];
1173
+ for (var i = 0; i < bytes1.length; i++) {
1174
+ if (bytes1[i] != bytes2[i]) return false;
1175
+ }
1176
+ return true;
1177
+ };
1178
+ var BytesInt = function(bytes) {
1179
+ var s = "";
1180
+ for (var i = 0; i < bytes.length; i++) {
1181
+ var n = bytes[i];
1182
+ s += (n < 16 ? "0" : "") + n.toString(16);
1183
+ }
1184
+ return parseInt(s, 16) || 0;
724
1185
  };
725
- o.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
726
- var se = o.Traffic = function(e) {
727
- e = e ? "/" + G + "/Report/" + e : "";
728
- var t = o.TrafficImgUrl;
729
- if (t) {
730
- var r = o.Traffic, n = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [], a = n[1] || "http://file/", i = (n[0] || a) + e;
731
- if (t.indexOf("//") == 0 && (/^https:/i.test(i) ? t = "https:" + t : t = "http:" + t), e && (t = t + "&cu=" + encodeURIComponent(a + e)), !r[i]) {
732
- r[i] = 1;
733
- var s = new Image();
734
- s.src = t, z(
735
- "Traffic Analysis Image: " + (e || G + ".TrafficImgUrl=" + o.TrafficImgUrl)
1186
+ var readMatroskaVInt = function(arr, pos, trim) {
1187
+ var i = pos[0];
1188
+ if (i >= arr.length) return;
1189
+ var b0 = arr[i], b2 = ("0000000" + b0.toString(2)).substr(-8);
1190
+ var m = /^(0*1)(\d*)$/.exec(b2);
1191
+ if (!m) return;
1192
+ var len = m[1].length, val = [];
1193
+ if (i + len > arr.length) return;
1194
+ for (var i2 = 0; i2 < len; i2++) {
1195
+ val[i2] = arr[i];
1196
+ i++;
1197
+ }
1198
+ if (trim) val[0] = parseInt(m[2] || "0", 2);
1199
+ pos[0] = i;
1200
+ return val;
1201
+ };
1202
+ var readMatroskaBlock = function(arr, pos) {
1203
+ var lenVal = readMatroskaVInt(arr, pos, 1);
1204
+ if (!lenVal) return;
1205
+ var len = BytesInt(lenVal);
1206
+ var i = pos[0], val = [];
1207
+ if (len < 2147483647) {
1208
+ if (i + len > arr.length) return;
1209
+ for (var i2 = 0; i2 < len; i2++) {
1210
+ val[i2] = arr[i];
1211
+ i++;
1212
+ }
1213
+ }
1214
+ pos[0] = i;
1215
+ return val;
1216
+ };
1217
+ Recorder.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
1218
+ var Traffic = Recorder.Traffic = function(report) {
1219
+ report = report ? "/" + RecTxt + "/Report/" + report : "";
1220
+ var imgUrl = Recorder.TrafficImgUrl;
1221
+ if (imgUrl) {
1222
+ var data = Recorder.Traffic;
1223
+ var m = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [];
1224
+ var host = m[1] || "http://file/";
1225
+ var idf = (m[0] || host) + report;
1226
+ if (imgUrl.indexOf("//") == 0) {
1227
+ if (/^https:/i.test(idf)) {
1228
+ imgUrl = "https:" + imgUrl;
1229
+ } else {
1230
+ imgUrl = "http:" + imgUrl;
1231
+ }
1232
+ }
1233
+ if (report) {
1234
+ imgUrl = imgUrl + "&cu=" + encodeURIComponent(host + report);
1235
+ }
1236
+ if (!data[idf]) {
1237
+ data[idf] = 1;
1238
+ var img = new Image();
1239
+ img.src = imgUrl;
1240
+ CLog(
1241
+ "Traffic Analysis Image: " + (report || RecTxt + ".TrafficImgUrl=" + Recorder.TrafficImgUrl)
736
1242
  );
737
1243
  }
738
1244
  }
739
1245
  };
740
1246
  export {
741
- o as Recorder
1247
+ Recorder
742
1248
  };
743
1249
  //# sourceMappingURL=recorder.es.js.map