@openclaw/whatsapp 2026.9.5 → 2026.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/{accounts-D_NGDjCx.mjs → accounts-CtRPAQCL.mjs} +3 -9
  3. package/dist/.setup/{action-runtime-DZZFamfl.mjs → action-runtime-DeVk5V7r.mjs} +2 -2
  4. package/dist/.setup/{agent-tools-login-B6MAs75N.mjs → agent-tools-login-CL5C1rA2.mjs} +5 -1
  5. package/dist/.setup/{approval-handler.runtime-C0hzmMSj.mjs → approval-handler.runtime-CjqMlPOX.mjs} +6 -26
  6. package/dist/.setup/{approval-reactions-BnXw-UZI.mjs → approval-reactions-DiOFvb1s.mjs} +8 -14
  7. package/dist/.setup/{auth-store-Dh8a3cba.mjs → auth-store-BBonwKks.mjs} +9 -33
  8. package/dist/.setup/{channel-CSclZYjU.mjs → channel-CJFE0kD_.mjs} +82 -154
  9. package/dist/.setup/{channel-react-action-1iBiEnq7.mjs → channel-react-action-2r_hjLZV.mjs} +4 -8
  10. package/dist/.setup/{channel.runtime-ddGY37w8.mjs → channel.runtime-C94goLw9.mjs} +4 -4
  11. package/dist/.setup/{channel.setup-CqUl8COe.mjs → channel.setup-CfN1UfdY.mjs} +1 -1
  12. package/dist/.setup/{connection-controller-C60mU7j7.mjs → connection-controller-CHo1oRJA.mjs} +13 -63
  13. package/dist/.setup/{creds-files-Drg3usj1.mjs → creds-files-CDATZWWM.mjs} +5 -11
  14. package/dist/.setup/{directory-config-BHPoBklt.mjs → directory-config-DUiJ5d8I.mjs} +13 -14
  15. package/dist/.setup/doctor-iMwg0Vhr.mjs +222 -0
  16. package/dist/.setup/group-config-path-DZr3ucUO.mjs +40 -0
  17. package/dist/.setup/{group-session-key-D22hYMdE.mjs → group-session-key-2-mja4OF.mjs} +3 -9
  18. package/dist/.setup/{login-2dmd1TfE.mjs → login-BFlvSh9h.mjs} +9 -11
  19. package/dist/.setup/{login-qr-CgKtO_ef.mjs → login-qr-Ayb8i25J.mjs} +29 -77
  20. package/dist/.setup/{monitor-BblvzLpX.mjs → monitor-CGpV2VNN.mjs} +391 -509
  21. package/dist/.setup/{question-reactions-D3Zq9Gbn.mjs → question-reactions-CPyyi5AY.mjs} +2 -2
  22. package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
  23. package/dist/.setup/{send-C6jDmcL9.mjs → send-BGdvf5cC.mjs} +31 -80
  24. package/dist/.setup/{send-api-B4DOt2RJ.mjs → send-api-H4AkQJjT.mjs} +45 -109
  25. package/dist/.setup/{session-errors-JuazczrA.mjs → session-errors-B8UcAnZN.mjs} +1 -4
  26. package/dist/.setup/{session.runtime-DcJuO42v.mjs → session.runtime-st1konFI.mjs} +1 -1
  27. package/dist/.setup/{setup-finalize-BYEgU0hb.mjs → setup-finalize-DmPX4EaW.mjs} +32 -70
  28. package/dist/.setup/setup-plugin-api-vJlxKzca.mjs +3 -0
  29. package/dist/.setup/{setup-surface-Cd3wN5HD.mjs → setup-surface-43fj197P.mjs} +3 -3
  30. package/dist/.setup/{shared-C9OEtKgc.mjs → shared-DgOG5Iqr.mjs} +26 -37
  31. package/dist/.setup/{socket-close-CCVSFufF.mjs → socket-close-CT__V2fz.mjs} +80 -92
  32. package/dist/.setup/{targets-runtime-RBjx3pg_.mjs → targets-runtime-DmiqXIXO.mjs} +2 -7
  33. package/dist/action-runtime-api.js +1 -1
  34. package/dist/action-runtime.runtime.js +1 -1
  35. package/dist/agent-tools-api.js +6 -13
  36. package/dist/api.js +10 -10
  37. package/dist/auth-presence.js +1 -1
  38. package/dist/channel-plugin-api.js +1 -1
  39. package/dist/contract-api.js +2 -2
  40. package/dist/directory-contract-api.js +1 -1
  41. package/dist/doctor-contract-api.js +9 -10
  42. package/dist/light-runtime-api.js +3 -3
  43. package/dist/login-qr-runtime.js +1 -1
  44. package/dist/runtime-api.js +10 -10
  45. package/dist/setup-entry.js +1 -1
  46. package/dist/setup-plugin-api.js +1 -1
  47. package/node_modules/audio-decode/LICENSE +9 -10
  48. package/node_modules/audio-decode/README.md +16 -0
  49. package/node_modules/audio-decode/audio-decode.d.ts +2 -14
  50. package/node_modules/audio-decode/audio-decode.js +4 -92
  51. package/node_modules/audio-decode/meta.js +1 -0
  52. package/node_modules/audio-decode/node_modules/{audio-buffer → @audio/decode}/LICENSE +1 -1
  53. package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.d.ts +52 -0
  54. package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.js +242 -0
  55. package/node_modules/audio-decode/node_modules/@audio/decode/meta.js +14 -0
  56. package/node_modules/audio-decode/node_modules/@audio/decode/package.json +114 -0
  57. package/node_modules/audio-decode/node_modules/@audio/decode/readme.md +191 -0
  58. package/node_modules/audio-decode/node_modules/@audio/decode/stream.d.ts +12 -0
  59. package/node_modules/audio-decode/node_modules/@audio/decode/stream.js +1 -0
  60. package/node_modules/audio-decode/node_modules/@audio/decode/test.html +52 -0
  61. package/node_modules/audio-decode/node_modules/@audio/decode-aac/LICENSE +9 -0
  62. package/node_modules/audio-decode/node_modules/@audio/decode-aac/README.md +80 -0
  63. package/node_modules/audio-decode/node_modules/@audio/decode-aac/alac.js +326 -0
  64. package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.d.ts +15 -0
  65. package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.js +10 -0
  66. package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.d.ts +24 -0
  67. package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.js +452 -0
  68. package/node_modules/audio-decode/node_modules/@audio/decode-aac/meta.js +81 -0
  69. package/node_modules/audio-decode/node_modules/@audio/decode-aac/package.json +63 -0
  70. package/node_modules/audio-decode/node_modules/@audio/decode-aac/src/aac.wasm.js +0 -0
  71. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE +12 -0
  72. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE.liba52 +340 -0
  73. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/README.md +41 -0
  74. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.d.ts +15 -0
  75. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.js +9 -0
  76. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.d.ts +20 -0
  77. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.js +131 -0
  78. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/package.json +64 -0
  79. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/src/ac3.wasm.js +0 -0
  80. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/LICENSE +21 -0
  81. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/README.md +46 -0
  82. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.d.ts +15 -0
  83. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.js +10 -0
  84. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.d.ts +16 -0
  85. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.js +583 -0
  86. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/package.json +52 -0
  87. package/node_modules/audio-decode/node_modules/@audio/decode-amr/LICENSE +191 -0
  88. package/node_modules/audio-decode/node_modules/@audio/decode-amr/README.md +65 -0
  89. package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.d.ts +15 -0
  90. package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.js +10 -0
  91. package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.d.ts +16 -0
  92. package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.js +150 -0
  93. package/node_modules/audio-decode/node_modules/@audio/decode-amr/package.json +58 -0
  94. package/node_modules/audio-decode/node_modules/@audio/decode-amr/src/amr.wasm.js +0 -0
  95. package/node_modules/audio-decode/node_modules/@audio/decode-avi/LICENSE +21 -0
  96. package/node_modules/audio-decode/node_modules/@audio/decode-avi/README.md +53 -0
  97. package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.d.ts +15 -0
  98. package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.js +9 -0
  99. package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.d.ts +21 -0
  100. package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.js +241 -0
  101. package/node_modules/audio-decode/node_modules/@audio/decode-avi/package.json +66 -0
  102. package/node_modules/audio-decode/node_modules/@audio/decode-caf/LICENSE +21 -0
  103. package/node_modules/audio-decode/node_modules/@audio/decode-caf/README.md +48 -0
  104. package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.d.ts +15 -0
  105. package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.js +10 -0
  106. package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.d.ts +16 -0
  107. package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.js +238 -0
  108. package/node_modules/audio-decode/node_modules/@audio/decode-caf/package.json +53 -0
  109. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/LICENSE +21 -0
  110. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/README.md +73 -0
  111. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.d.ts +21 -0
  112. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.js +15 -0
  113. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.d.ts +29 -0
  114. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.js +423 -0
  115. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/meta.js +40 -0
  116. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/package.json +64 -0
  117. package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE +12 -0
  118. package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE.libdca +339 -0
  119. package/node_modules/audio-decode/node_modules/@audio/decode-dts/README.md +41 -0
  120. package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.d.ts +15 -0
  121. package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.js +9 -0
  122. package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.d.ts +20 -0
  123. package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.js +139 -0
  124. package/node_modules/audio-decode/node_modules/@audio/decode-dts/package.json +64 -0
  125. package/node_modules/audio-decode/node_modules/@audio/decode-dts/src/dts.wasm.js +0 -0
  126. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE +12 -0
  127. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE.ffmpeg +502 -0
  128. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/README.md +45 -0
  129. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.d.ts +15 -0
  130. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.js +9 -0
  131. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.d.ts +20 -0
  132. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.js +124 -0
  133. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/package.json +68 -0
  134. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/src/eac3.wasm.js +0 -0
  135. package/node_modules/audio-decode/node_modules/@audio/decode-flac/LICENSE +25 -0
  136. package/node_modules/audio-decode/node_modules/@audio/decode-flac/README.md +23 -0
  137. package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.d.ts +15 -0
  138. package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.js +10 -0
  139. package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.d.ts +18 -0
  140. package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.js +3172 -0
  141. package/node_modules/audio-decode/node_modules/@audio/decode-flac/meta.js +115 -0
  142. package/node_modules/audio-decode/node_modules/@audio/decode-flac/package.json +60 -0
  143. package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE +23 -0
  144. package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE.libopenmpt +25 -0
  145. package/node_modules/audio-decode/node_modules/@audio/decode-mod/README.md +86 -0
  146. package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.d.ts +20 -0
  147. package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.js +12 -0
  148. package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.d.ts +58 -0
  149. package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.js +148 -0
  150. package/node_modules/audio-decode/node_modules/@audio/decode-mod/package.json +68 -0
  151. package/node_modules/audio-decode/node_modules/@audio/decode-mod/src/mod.wasm.js +0 -0
  152. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/LICENSE +25 -0
  153. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/README.md +20 -0
  154. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.d.ts +15 -0
  155. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.js +10 -0
  156. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.d.ts +16 -0
  157. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.js +793 -0
  158. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/meta.js +143 -0
  159. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/package.json +60 -0
  160. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/LICENSE +21 -0
  161. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/README.md +58 -0
  162. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.d.ts +15 -0
  163. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.js +9 -0
  164. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.d.ts +21 -0
  165. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.js +455 -0
  166. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/package.json +74 -0
  167. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE +31 -0
  168. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE.libmpcdec +31 -0
  169. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/README.md +60 -0
  170. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.d.ts +15 -0
  171. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.js +9 -0
  172. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.d.ts +20 -0
  173. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.js +158 -0
  174. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/package.json +64 -0
  175. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/src/mpc.wasm.js +0 -0
  176. package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE +25 -0
  177. package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE.libopus +44 -0
  178. package/node_modules/audio-decode/node_modules/@audio/decode-opus/README.md +32 -0
  179. package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.d.ts +15 -0
  180. package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.js +10 -0
  181. package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.d.ts +33 -0
  182. package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.js +147 -0
  183. package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.d.ts +18 -0
  184. package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.js +1 -0
  185. package/node_modules/audio-decode/node_modules/@audio/decode-opus/meta.js +103 -0
  186. package/node_modules/audio-decode/node_modules/@audio/decode-opus/package.json +68 -0
  187. package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/decode-opus.js +2 -0
  188. package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/opus.wasm.js +0 -0
  189. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/LICENSE +25 -0
  190. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/README.md +19 -0
  191. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.d.ts +15 -0
  192. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.js +10 -0
  193. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.d.ts +16 -0
  194. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.js +275 -0
  195. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/package.json +56 -0
  196. package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE +21 -0
  197. package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE.ttadec +39 -0
  198. package/node_modules/audio-decode/node_modules/@audio/decode-tta/README.md +58 -0
  199. package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.d.ts +15 -0
  200. package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.js +9 -0
  201. package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.d.ts +17 -0
  202. package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.js +302 -0
  203. package/node_modules/audio-decode/node_modules/@audio/decode-tta/package.json +58 -0
  204. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/LICENSE +25 -0
  205. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/README.md +33 -0
  206. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.d.ts +15 -0
  207. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.js +10 -0
  208. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.d.ts +18 -0
  209. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.js +2984 -0
  210. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/meta.js +102 -0
  211. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/package.json +60 -0
  212. package/node_modules/audio-decode/node_modules/@audio/decode-wav/LICENSE +21 -0
  213. package/node_modules/audio-decode/node_modules/@audio/decode-wav/README.md +23 -0
  214. package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.d.ts +15 -0
  215. package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.js +10 -0
  216. package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.d.ts +8 -0
  217. package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.js +256 -0
  218. package/node_modules/audio-decode/node_modules/@audio/decode-wav/meta.js +114 -0
  219. package/node_modules/audio-decode/node_modules/@audio/decode-wav/package.json +52 -0
  220. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE +29 -0
  221. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE.wavpack +25 -0
  222. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/README.md +41 -0
  223. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.d.ts +15 -0
  224. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.js +9 -0
  225. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.d.ts +18 -0
  226. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.js +140 -0
  227. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/package.json +62 -0
  228. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/src/wavpack.wasm.js +0 -0
  229. package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE +21 -0
  230. package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE.libopus +44 -0
  231. package/node_modules/audio-decode/node_modules/@audio/decode-webm/README.md +59 -0
  232. package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.d.ts +15 -0
  233. package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.js +10 -0
  234. package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.d.ts +18 -0
  235. package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.js +141 -0
  236. package/node_modules/audio-decode/node_modules/@audio/decode-webm/package.json +76 -0
  237. package/node_modules/audio-decode/node_modules/@audio/decode-webm/src/opus.wasm.js +0 -0
  238. package/node_modules/audio-decode/node_modules/@audio/decode-wma/LICENSE +12 -0
  239. package/node_modules/audio-decode/node_modules/@audio/decode-wma/README.md +74 -0
  240. package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.d.ts +15 -0
  241. package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.js +10 -0
  242. package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.d.ts +33 -0
  243. package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.js +516 -0
  244. package/node_modules/audio-decode/node_modules/@audio/decode-wma/package.json +57 -0
  245. package/node_modules/audio-decode/node_modules/@audio/decode-wma/src/wma.wasm.js +0 -0
  246. package/node_modules/audio-decode/package.json +37 -39
  247. package/node_modules/audio-decode/stream.d.ts +2 -0
  248. package/node_modules/audio-decode/stream.js +2 -0
  249. package/node_modules/baileys/lib/Utils/messages-media.js +1 -1
  250. package/node_modules/baileys/node_modules/file-type/package.json +3 -2
  251. package/node_modules/baileys/node_modules/file-type/readme.md +5 -0
  252. package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +9 -4
  253. package/node_modules/baileys/node_modules/file-type/source/index.js +28 -1
  254. package/node_modules/baileys/node_modules/file-type/source/supported.js +2 -0
  255. package/node_modules/baileys/node_modules/p-timeout/index.js +3 -0
  256. package/node_modules/baileys/node_modules/p-timeout/package.json +1 -1
  257. package/node_modules/baileys/package.json +1 -1
  258. package/node_modules/typebox/build/compile/code.mjs +1 -2
  259. package/node_modules/typebox/build/compile/validator.mjs +5 -1
  260. package/node_modules/typebox/build/format/iri.mjs +16 -9
  261. package/node_modules/typebox/build/guard/emit.mjs +2 -2
  262. package/node_modules/typebox/build/guard/guard.d.mts +7 -5
  263. package/node_modules/typebox/build/guard/guard.mjs +14 -9
  264. package/node_modules/typebox/build/guard/index.mjs +6 -0
  265. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  266. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  267. package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
  268. package/node_modules/typebox/build/schema/build.mjs +2 -3
  269. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  270. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  271. package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
  272. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
  273. package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
  274. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
  275. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
  276. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
  277. package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
  278. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
  279. package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
  280. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
  281. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
  282. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
  283. package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
  284. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  285. package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
  286. package/node_modules/typebox/build/schema/parse.mjs +3 -0
  287. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
  288. package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
  289. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  290. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  291. package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
  292. package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
  293. package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
  294. package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
  295. package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
  296. package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
  297. package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
  298. package/node_modules/typebox/package.json +1 -1
  299. package/node_modules/typebox/readme.md +3 -1
  300. package/package.json +6 -6
  301. package/dist/.setup/doctor-BPb-SjdE.mjs +0 -65
  302. package/dist/.setup/group-config-path-BGyzT9Lg.mjs +0 -54
  303. package/dist/.setup/normalize-DdsROMMa.mjs +0 -2
  304. package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
  305. package/dist/.setup/runtime-group-policy-DeSRFXEV.mjs +0 -11
  306. package/dist/.setup/setup-plugin-api-CXfU-7vN.mjs +0 -3
  307. package/dist/.setup/text-runtime-CHl0iPYe.mjs +0 -4
  308. package/node_modules/audio-decode/.eslintrc.json +0 -43
  309. package/node_modules/audio-decode/.github/workflows/test.js.yml +0 -31
  310. package/node_modules/audio-decode/.travis.yml +0 -13
  311. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/README.md +0 -293
  312. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +0 -11646
  313. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +0 -1
  314. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/index.js +0 -8
  315. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +0 -58
  316. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
  317. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoder.js +0 -253
  318. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoderWebWorker.js +0 -17
  319. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +0 -77
  320. package/node_modules/audio-decode/node_modules/audio-buffer/.eslintrc.json +0 -44
  321. package/node_modules/audio-decode/node_modules/audio-buffer/.github/workflows/node.js.yml +0 -31
  322. package/node_modules/audio-decode/node_modules/audio-buffer/.travis.yml +0 -7
  323. package/node_modules/audio-decode/node_modules/audio-buffer/index.js +0 -76
  324. package/node_modules/audio-decode/node_modules/audio-buffer/package.json +0 -37
  325. package/node_modules/audio-decode/node_modules/audio-buffer/readme.md +0 -56
  326. package/node_modules/audio-decode/node_modules/node-wav/README.md +0 -35
  327. package/node_modules/audio-decode/node_modules/node-wav/file.wav +0 -0
  328. package/node_modules/audio-decode/node_modules/node-wav/index.js +0 -291
  329. package/node_modules/audio-decode/node_modules/node-wav/package.json +0 -29
  330. package/node_modules/audio-decode/node_modules/node-wav/tests/file1.wav +0 -0
  331. package/node_modules/audio-decode/node_modules/node-wav/tests/test.js +0 -66
  332. package/node_modules/audio-decode/node_modules/node-wav/x.js +0 -12
  333. package/node_modules/audio-decode/node_modules/node-wav/x.json +0 -86702
  334. package/node_modules/audio-decode/node_modules/node-wav/x.js~ +0 -13
  335. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +0 -320
  336. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +0 -232
  337. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +0 -1
  338. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
  339. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +0 -1
  340. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/index.js +0 -8
  341. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +0 -74
  342. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +0 -226
  343. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoderWebWorker.js +0 -17
  344. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/types.d.ts +0 -37
  345. package/node_modules/audio-decode/node_modules/opus-decoder/README.md +0 -265
  346. package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +0 -232
  347. package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +0 -1
  348. package/node_modules/audio-decode/node_modules/opus-decoder/index.js +0 -8
  349. package/node_modules/audio-decode/node_modules/opus-decoder/package.json +0 -56
  350. package/node_modules/audio-decode/node_modules/opus-decoder/src/EmscriptenWasm.js +0 -0
  351. package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoder.js +0 -239
  352. package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoderWebWorker.js +0 -17
  353. package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +0 -74
  354. package/node_modules/audio-decode/readme.md +0 -49
  355. package/node_modules/audio-decode/tea.yaml +0 -6
  356. package/node_modules/audio-decode/test-case.js +0 -11
  357. package/node_modules/audio-decode/test.html +0 -15
  358. package/node_modules/audio-decode/test.js +0 -107
  359. /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, audiojs
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,25 @@
1
+ Copyright (c) 1998 - 2025 David Bryant
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * Neither the name of the copyright holder nor the names of its
13
+ contributors may be used to endorse or promote products derived from
14
+ this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
20
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,41 @@
1
+ # @audio/decode-wavpack [![npm](https://img.shields.io/npm/v/@audio/decode-wavpack)](https://www.npmjs.com/package/@audio/decode-wavpack) [![BSD-3-Clause](https://img.shields.io/badge/BSD--3--Clause-%E0%A5%90-white)](https://github.com/krishnized/license)
2
+
3
+ Decode WavPack (.wv) to PCM float samples
4
+
5
+ ```
6
+ npm install @audio/decode-wavpack
7
+ ```
8
+
9
+ ```js
10
+ import decode, { decoder } from '@audio/decode-wavpack'
11
+ ```
12
+
13
+ [libwavpack](https://github.com/dbry/WavPack) (the reference WavPack 5 implementation, David Bryant) compiled to a single-file WASM ES module — no side files, loads from any CDN, Node, workers and AudioWorklets. Handles everything the format defines: lossless and hybrid/lossy, 8/16/24/32-bit integer and 32-bit float, mono through multichannel, and DSD-as-PCM (`OPEN_DSD_AS_PCM`, decimated to 24-bit PCM by the library). Streaming decode drives libwavpack's own block reader through a memory-backed `WavpackStreamReader64`, so multichannel block groups and adaptive decorrelation state are handled exactly as the reference library handles them — this package only tracks byte-level block boundaries.
14
+
15
+ ```js
16
+ let { channelData, sampleRate } = await decode(wvBytes)
17
+
18
+ let dec = await decoder()
19
+ let head = dec.decode(chunk1) // synchronous; partial blocks carry over
20
+ let tail = dec.flush() // drops an incomplete trailing block, if any
21
+ dec.free()
22
+ ```
23
+
24
+ | Export | | |
25
+ |---|---|---|
26
+ | `decode(src)` | `Promise<AudioData>` | Whole-stream decode |
27
+ | `decoder()` | `Promise<{decode, flush, free}>` | Streaming decoder; `decode(chunk)` is synchronous |
28
+
29
+ `AudioData` is `{ channelData: Float32Array[], sampleRate: number }`, samples in `[-1, 1]`. Integer PCM is scaled by `2^(bits-1)` (asymmetric, matching WAV convention: max positive sample maps to `<1`, max negative to exactly `-1`); float PCM is a direct bit reinterpretation (WavPack stores float samples pre-normalized when opened with `OPEN_NORMALIZE`, which this package always sets). Channels come out in the order libwavpack reports them, which for standard Microsoft-ordered sources (anything ffmpeg or the WavPack CLI produces) is WAV order: FL, FR, FC, LFE, BL, BR, ...
30
+
31
+ `decode()` drains every sample libwavpack can produce from the blocks fed so far, every call — there's no encoder lookahead or block-spanning delay to hold back, so `flush()` only ever discards an incomplete trailing block (a stream cut off mid-block) and returns nothing new.
32
+
33
+ Hybrid/lossy WavPack (`-b<n>`) decodes at whatever quality it was encoded at; the `.wvc` correction file (lossless-hybrid two-file mode) is not read — only the standalone `.wv` bitstream. A garbage or non-WavPack input throws instead of returning empty/wrong data.
34
+
35
+ **Use when:** you need a from-scratch, spec-accurate WavPack decoder in the browser or Node — audio tools reading `.wv` files, WavPack-in-container demuxers, or any pipeline that already speaks `@audio`'s `{channelData, sampleRate}` shape.
36
+
37
+ ---
38
+
39
+ Part of [@audio/decode](https://github.com/audiojs/decode) — the decode family umbrella.
40
+
41
+ [ॐ](https://github.com/krishnized/license/) · [BSD-3-Clause](./LICENSE), inherited from the bundled [libwavpack](./LICENSE.wavpack).
@@ -0,0 +1,15 @@
1
+ // Generated from the audio.js manifest (params metadata is the source of truth).
2
+ // Regenerate: node tools/dts.js in @audio/compile. Do not edit by hand.
3
+
4
+ /** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
5
+ type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
6
+ /** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
7
+ type Live = Record<string, Float32Array | string | boolean>
8
+ type Ctx = { sampleRate: number, maxBlockSize: number, maxChannels: number, currentTime: number, duration?: number, events?: readonly any[], emit?: (name: string, ...args: any[]) => void, [k: string]: unknown }
9
+ type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
10
+
11
+ /** Codec plugin 'wv' — extends audio()'s openable formats / save() targets */
12
+ export declare const wv: {
13
+ codec: 'wv'
14
+ decode(bytes: Uint8Array): { channelData: Float32Array[], sampleRate: number } | Promise<{ channelData: Float32Array[], sampleRate: number }>
15
+ }
@@ -0,0 +1,9 @@
1
+ // audio.js manifest — codec atom, decode half: whole-buffer bytes → { channelData,
2
+ // sampleRate }. Format detection is magic-byte (audio-type, 'wvpk' at offset 0) — no test() needed here.
3
+
4
+ import decodeFn from './decode-wavpack.js'
5
+
6
+ export const wv = {
7
+ codec: 'wv',
8
+ decode: (bytes) => decodeFn(bytes),
9
+ }
@@ -0,0 +1,18 @@
1
+ export interface AudioData {
2
+ channelData: Float32Array[];
3
+ sampleRate: number;
4
+ }
5
+
6
+ interface WavpackDecoder {
7
+ /** Decode a chunk of a WavPack (.wv) stream synchronously. Partial blocks carry over to the next call. */
8
+ decode(data: Uint8Array | ArrayBuffer): AudioData;
9
+ /** Drop any incomplete trailing block. decode() already returns every decodable sample, so this yields nothing new. */
10
+ flush(): AudioData;
11
+ free(): void;
12
+ }
13
+
14
+ /** Decode a complete WavPack stream. Channels come out in WAV order (as libwavpack reports them). */
15
+ export default function decode(src: ArrayBuffer | Uint8Array): Promise<AudioData>;
16
+
17
+ /** Initialize WASM and create a decoder with synchronous methods. */
18
+ export function decoder(): Promise<WavpackDecoder>;
@@ -0,0 +1,140 @@
1
+ /**
2
+ * WavPack decoder — libwavpack compiled to WASM (single-file ES module, host-neutral).
3
+ * Streaming: the memory-backed WavpackStreamReader64 in the C glue lets libwavpack's own block
4
+ * reader drive decoding, so multichannel block groups, hybrid/lossy streams and DSD-as-PCM all
5
+ * decode exactly as the reference library would. JS only tracks byte-level block boundaries
6
+ * (the 32-byte block header's ckSize field) so it never hands the reader a partial block.
7
+ *
8
+ * let { channelData, sampleRate } = await decode(wvBuf)
9
+ * let dec = await decoder(); let result = dec.decode(chunk)
10
+ */
11
+ import createWavpack from './src/wavpack.wasm.js'
12
+
13
+ const EMPTY = Object.freeze({ channelData: [], sampleRate: 0 })
14
+ const EMPTY_BYTES = new Uint8Array(0)
15
+ const HEADER = 8 // bytes needed to read ckSize and know the full block size
16
+ const MAX_BLOCK = 16 << 20 // sanity cap: no real WavPack block approaches 16 MiB
17
+
18
+ let modP
19
+ function getMod() {
20
+ if (modP) return modP
21
+ let p = createWavpack()
22
+ modP = p
23
+ return p.catch(e => { modP = null; throw e })
24
+ }
25
+
26
+ /**
27
+ * Whole-file decode
28
+ * @param {Uint8Array|ArrayBuffer} src
29
+ * @returns {Promise<{channelData: Float32Array[], sampleRate: number}>}
30
+ */
31
+ export default async function decode(src) {
32
+ let buf = src instanceof Uint8Array ? src : new Uint8Array(src)
33
+ let dec = await decoder()
34
+ try { return dec.decode(buf) }
35
+ finally { dec.free() }
36
+ }
37
+
38
+ /** Create streaming decoder instance — decode() and flush() are synchronous. */
39
+ export async function decoder() {
40
+ return new WavpackDecoder(await getMod())
41
+ }
42
+
43
+ class WavpackDecoder {
44
+ constructor(m) {
45
+ this.m = m
46
+ this.h = m._wv_create()
47
+ if (!this.h) throw Error('WavPack decoder allocation failed')
48
+ this.left = EMPTY_BYTES
49
+ this.sawBlock = false // true once at least one real block has been parsed (ever)
50
+ this.freed = false
51
+ }
52
+
53
+ decode(data) {
54
+ if (this.freed) throw Error('Decoder already freed')
55
+ if (!data || !data.byteLength) return EMPTY
56
+ let buf = data instanceof Uint8Array ? data : new Uint8Array(data)
57
+ let joined = this.left.length ? concat(this.left, buf) : buf
58
+
59
+ // Audio blocks are always contiguous from the start of the stream; anything after them
60
+ // (APEv2 tags, padding) does not start with 'wvpk' and is inert trailer, not corruption —
61
+ // only a magic/size mismatch before any real block has been seen is a hard error.
62
+ let pos = 0, seen = this.sawBlock
63
+ while (pos + HEADER <= joined.length) {
64
+ let isWvpk = joined[pos] === 0x77 && joined[pos + 1] === 0x76 && joined[pos + 2] === 0x70 && joined[pos + 3] === 0x6B
65
+ if (!isWvpk) {
66
+ if (!seen) throw Error('WavPack: not a WavPack stream (missing "wvpk" sync)')
67
+ break
68
+ }
69
+ let ckSize = (joined[pos + 4] | joined[pos + 5] << 8 | joined[pos + 6] << 16 | joined[pos + 7] << 24) >>> 0
70
+ let blockLen = ckSize + 8
71
+ if (blockLen < 32 || blockLen > MAX_BLOCK) {
72
+ if (!seen) throw Error('WavPack: implausible block size (corrupt stream?)')
73
+ break
74
+ }
75
+ if (pos + blockLen > joined.length) break // incomplete block — wait for more
76
+ pos += blockLen
77
+ seen = true
78
+ }
79
+ this.sawBlock = seen
80
+ this.left = pos < joined.length ? joined.subarray(pos).slice() : EMPTY_BYTES
81
+ if (!pos) return EMPTY
82
+
83
+ let m = this.m
84
+ let dst = m._wv_reserve(this.h, pos)
85
+ if (!dst) throw Error('WavPack: out of WASM memory')
86
+ m.HEAPU8.set(joined.subarray(0, pos), dst)
87
+ let n = m._wv_feed(this.h, pos)
88
+ if (n < 0) throw Error(readError(m, this.h))
89
+ if (!n) return EMPTY
90
+
91
+ let channels = m._wv_channels(this.h)
92
+ let sampleRate = m._wv_rate(this.h)
93
+ let bits = m._wv_bits(this.h)
94
+ let isFloat = m._wv_is_float(this.h)
95
+ let outPtr = m._wv_output(this.h)
96
+ let channelData = Array.from({ length: channels }, () => new Float32Array(n))
97
+
98
+ if (isFloat) {
99
+ let f32 = new Float32Array(m.HEAPU8.buffer, outPtr, n * channels)
100
+ for (let i = 0, k = 0; i < n; i++) for (let c = 0; c < channels; c++) channelData[c][i] = f32[k++]
101
+ } else {
102
+ let div = 2 ** (bits - 1), max = div - 1
103
+ let base = outPtr >> 2, k = base
104
+ let i32 = m.HEAP32
105
+ for (let i = 0; i < n; i++) for (let c = 0; c < channels; c++) {
106
+ let v = i32[k++]
107
+ channelData[c][i] = v < 0 ? v / div : v / max
108
+ }
109
+ }
110
+ return { channelData, sampleRate }
111
+ }
112
+
113
+ /** No trailing latency: decode() already drains every sample libwavpack can produce from the
114
+ blocks fed so far. Drops an incomplete trailing block, if any. */
115
+ flush() {
116
+ this.left = EMPTY_BYTES
117
+ return EMPTY
118
+ }
119
+
120
+ free() {
121
+ if (this.freed) return
122
+ this.freed = true
123
+ this.m._wv_destroy(this.h)
124
+ this.h = 0
125
+ this.left = EMPTY_BYTES
126
+ }
127
+ }
128
+
129
+ function concat(a, b) {
130
+ let out = new Uint8Array(a.length + b.length)
131
+ out.set(a); out.set(b, a.length)
132
+ return out
133
+ }
134
+
135
+ function readError(m, h) {
136
+ let ptr = m._wv_error(h)
137
+ let bytes = m.HEAPU8.subarray(ptr, ptr + 128)
138
+ let nul = bytes.indexOf(0)
139
+ return new TextDecoder().decode(bytes.subarray(0, nul < 0 ? 128 : nul))
140
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@audio/decode-wavpack",
3
+ "version": "1.0.0",
4
+ "description": "Decode WavPack (.wv) audio with libwavpack WASM",
5
+ "type": "module",
6
+ "main": "decode-wavpack.js",
7
+ "types": "decode-wavpack.d.ts",
8
+ "exports": {
9
+ ".": "./decode-wavpack.js",
10
+ "./audio": {
11
+ "types": "./audio.d.ts",
12
+ "default": "./audio.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "build": "bash build.sh",
21
+ "prepack": "npm run build",
22
+ "test": "node test.js"
23
+ },
24
+ "files": [
25
+ "decode-wavpack.js",
26
+ "decode-wavpack.d.ts",
27
+ "src/wavpack.wasm.js",
28
+ "audio.js",
29
+ "audio.d.ts",
30
+ "LICENSE",
31
+ "LICENSE.wavpack"
32
+ ],
33
+ "devDependencies": {
34
+ "tst": "^9.4.0"
35
+ },
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "keywords": [
40
+ "wavpack",
41
+ "wv",
42
+ "hybrid",
43
+ "lossless",
44
+ "audio",
45
+ "decode",
46
+ "decoder",
47
+ "wasm",
48
+ "libwavpack"
49
+ ],
50
+ "license": "BSD-3-Clause",
51
+ "author": "audiojs",
52
+ "homepage": "https://github.com/audiojs/decode/tree/main/packages/decode-wavpack",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/audiojs/decode.git",
56
+ "directory": "packages/decode-wavpack"
57
+ },
58
+ "bugs": "https://github.com/audiojs/decode/issues",
59
+ "audio": "./audio.js",
60
+ "sideEffects": false,
61
+ "funding": "https://github.com/sponsors/audiojs"
62
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 audiojs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,44 @@
1
+ Copyright 2001-2023 Xiph.Org, Skype Limited, Octasic,
2
+ Jean-Marc Valin, Timothy B. Terriberry,
3
+ CSIRO, Gregory Maxwell, Mark Borgerding,
4
+ Erik de Castro Lopo, Mozilla, Amazon
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions
8
+ are met:
9
+
10
+ - Redistributions of source code must retain the above copyright
11
+ notice, this list of conditions and the following disclaimer.
12
+
13
+ - Redistributions in binary form must reproduce the above copyright
14
+ notice, this list of conditions and the following disclaimer in the
15
+ documentation and/or other materials provided with the distribution.
16
+
17
+ - Neither the name of Internet Society, IETF or IETF Trust, nor the
18
+ names of specific contributors, may be used to endorse or promote
19
+ products derived from this software without specific prior written
20
+ permission.
21
+
22
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
26
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
+
34
+ Opus is subject to the royalty-free patent licenses which are
35
+ specified at:
36
+
37
+ Xiph.Org Foundation:
38
+ https://datatracker.ietf.org/ipr/1524/
39
+
40
+ Microsoft Corporation:
41
+ https://datatracker.ietf.org/ipr/1914/
42
+
43
+ Broadcom Corporation:
44
+ https://datatracker.ietf.org/ipr/1526/
@@ -0,0 +1,59 @@
1
+ # @audio/decode-webm
2
+
3
+ Decode WebM and Matroska (MKV) audio to PCM float samples — the audio track of video files included (Opus, Vorbis, AAC, ALAC, MP3, FLAC, AC-3, DTS, PCM).
4
+
5
+ ## Install
6
+
7
+ ```
8
+ npm i @audio/decode-webm
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import decode, { decoder } from '@audio/decode-webm'
15
+
16
+ let { channelData, sampleRate } = await decode(webmBytes)
17
+
18
+ let dec = await decoder() // initialize Opus and Vorbis WASM
19
+ let result = dec.decode(chunk)
20
+ let tail = dec.flush()
21
+ dec.free()
22
+ ```
23
+
24
+ Video tracks are skipped; the first audio track is decoded. Laced blocks (Xiph, EBML, fixed) are split into frames.
25
+
26
+ ## API
27
+
28
+ ### `decode(src): Promise<AudioData>`
29
+
30
+ Decode a complete `Uint8Array` or `ArrayBuffer`.
31
+
32
+ ### `decoder(): Promise<WebmDecoder>`
33
+
34
+ Initialize the codec runtimes and return a streaming decoder. For the WebM codecs (Opus, Vorbis) `decode()` and `flush()` are synchronous. For Matroska-only codecs the call that completes the track header returns a Promise while the codec package loads; later calls are synchronous. `flush()` ends the stream.
35
+
36
+ The factory prepares the Opus and Vorbis runtimes, then releases what the track does not need once the header is read.
37
+
38
+ ## Codecs
39
+
40
+ | CodecID | Decoded by |
41
+ |---|---|
42
+ | `A_OPUS` | bundled libopus WASM core from [@audio/decode-opus](../decode-opus) |
43
+ | `A_VORBIS` | bundled [@audio/decode-vorbis](../decode-vorbis) |
44
+ | `A_AAC` (all profiles) | [@audio/decode-aac](../decode-aac), loaded on demand |
45
+ | `A_ALAC` | [@audio/decode-aac](../decode-aac), loaded on demand |
46
+ | `A_MPEG/L3` | [@audio/decode-mp3](../decode-mp3), loaded on demand |
47
+ | `A_FLAC` | [@audio/decode-flac](../decode-flac), loaded on demand |
48
+ | `A_PCM/INT/LIT`, `A_PCM/INT/BIG`, `A_PCM/FLOAT/IEEE` | built in |
49
+ | `A_AC3` | [@audio/decode-ac3](../decode-ac3), loaded on demand |
50
+ | `A_DTS` (core of DTS-HD too) | [@audio/decode-dts](../decode-dts), loaded on demand |
51
+ | `A_EAC3` | [@audio/decode-eac3](../decode-eac3), loaded on demand |
52
+
53
+ TrueHD, MPEG Layer I/II, WavPack, TTA and `A_MS/ACM` tracks throw an error naming the codec. `DiscardPadding` on Opus blocks is honoured, so files from @audio/encode-webm decode sample-exact.
54
+
55
+ On-demand codec packages are imported dynamically, which is unavailable inside an AudioWorklet — Opus and Vorbis work there, the others need the main thread or a Worker.
56
+
57
+ ## License
58
+
59
+ [ॐ](https://github.com/krishnized/license/) · [MIT](./LICENSE). Bundled [libopus](https://opus-codec.org/) is [BSD 3-Clause](./LICENSE.libopus).
@@ -0,0 +1,15 @@
1
+ // Generated from the audio.js manifest (params metadata is the source of truth).
2
+ // Regenerate: node tools/dts.js in @audio/compile. Do not edit by hand.
3
+
4
+ /** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
5
+ type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
6
+ /** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
7
+ type Live = Record<string, Float32Array | string | boolean>
8
+ type Ctx = { sampleRate: number, maxBlockSize: number, maxChannels: number, currentTime: number, duration?: number, events?: readonly any[], emit?: (name: string, ...args: any[]) => void, [k: string]: unknown }
9
+ type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
10
+
11
+ /** Codec plugin 'webm' — extends audio()'s openable formats / save() targets */
12
+ export declare const webm: {
13
+ codec: 'webm'
14
+ decode(bytes: Uint8Array): { channelData: Float32Array[], sampleRate: number } | Promise<{ channelData: Float32Array[], sampleRate: number }>
15
+ }
@@ -0,0 +1,10 @@
1
+ // audio.js manifest — codec atom, decode half: whole-buffer bytes → { channelData,
2
+ // sampleRate }. Hosts merge with the encode half (@audio/encode-webm) by format
3
+ // name. Format detection is magic-byte (audio-type) — no test() needed here.
4
+
5
+ import decodeFn from './decode-webm.js'
6
+
7
+ export const webm = {
8
+ codec: 'webm',
9
+ decode: (bytes) => decodeFn(bytes),
10
+ }
@@ -0,0 +1,18 @@
1
+ export interface AudioData {
2
+ channelData: Float32Array[];
3
+ sampleRate: number;
4
+ }
5
+
6
+ interface WebmDecoder {
7
+ /** Decode a WebM chunk synchronously. */
8
+ decode(data: Uint8Array | ArrayBuffer): AudioData;
9
+ /** Finish the stream synchronously. */
10
+ flush(): AudioData;
11
+ free(): void;
12
+ }
13
+
14
+ /** Decode a complete WebM audio file. */
15
+ export default function decode(src: ArrayBuffer | Uint8Array): Promise<AudioData>;
16
+
17
+ /** Initialize WASM and return a decoder with synchronous methods. */
18
+ export function decoder(): Promise<WebmDecoder>;