Socket
Socket
Sign inDemoInstall

@wasm-audio-decoders/flac

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wasm-audio-decoders/flac - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

4

dist/flac-decoder.min.js
/* Copyright 2021-2022 Ethan Halsall. This file is part of wasm-audio-decoders. https://github.com/eshaz/wasm-audio-decoders */
var t,e;t=this,e=function(t,e){function s(){const t=Uint8Array,e=Float32Array;s.t||Object.defineProperties(s,{t:{value:new WeakMap},o:{value(t,e){s.t.set(t,Promise.resolve(e))}},u:{value(t,e){let i=s.t.get(t);return i||(e?i=WebAssembly.compile(s.U(e)):(e=t.p,i=s.M(e).then((t=>WebAssembly.compile(t)))),s.t.set(t,i)),i}},T:{value(t,s){let i=new e(s),r=0,n=0;for(;r<t.length;)i.set(t[r],n),n+=t[r++].length;return i}},S:{value:(t,e,s,i,r)=>({A:t,channelData:e,samplesDecoded:s,sampleRate:i,bitDepth:r})},$:{value(t,e,i,r,n,h){let a,o,c=[];for(a=0;a<i;a++){const t=[];for(o=0;o<e.length;)t.push(e[o++][a]||[]);c.push(s.T(t,r))}return s.S(t,c,r,n,h)}},U:{value(e){const s=new t(e.length),i=parseInt(e.substring(11,13),16),r=256-i;let n,h=!1,a=0,o=13;for(;o<e.length;)n=e.charCodeAt(o++),61!==n||h?(h&&(h=!1,n-=64),s[a++]=n<i&&n>0?n+r:n-i):h=!0;return s.subarray(0,a)}},M:{value(e){return e=s.U(e),new Promise((i=>{const r=String.raw`dynEncode0014u‡*t“““t“““““t““““$#“U¤¤“U¤¤3yƒ†„‰zzss|yu„svu‡yÚ&ˆ“4<054<,5T44^T44<(6U~J(44< ~A544U~6J0444ˆ†545 444J0444‰J,4U“4ˆU“‡…Ò“7U45“4U4Z“4U4U^/6545T4T44BUˆ~64CU~O4U54U~5 U5T4B4Z!4U~5U5U5T4U~6U4ZTU5U5T44~4O4U2ZTU5T44Z!4B6T44Uˆ~64B6U~O44Uˆ~4O4U~54U~5 44~C4~54U~5 44~5454Uˆ4B6Ub!444~UO4U~5 “U5“4U4ZTUŠ#44U$4†64<4~B6^“4<444~Uˆ~B4U~54Uˆ544~544~Uˆ5 µ“Uä#UJUè#5TT4U0ZTTUX5U5T4T4Uà#~4OU4U $~Cˆ4~54U~5 T44$6U\!TTT4UaT4<6T4<64<Z!44~4N4<U~5 4U”Z!4U±_TUŠ#44U•Uˆ6UÔ~B$544$6U\!4Uˆ6U¤#~B44Uä#~B$~64<6_TU‰#444U”~B~6~54<Y!44<_!T4Y!4<64~444~AN44<U~6J4U5 44J4U”[!U#44UŠO4U~54U~5 U54 “7U6844J44J 4UJ4UJ04VK(44<J44<J$4U´~54U~5 4U¤~5!TTT4U$5"U“5TTTTTTT4U$"4VK,U54<(6U~64<$6_!4< 64~6A54A544U~6#J(U’54A4U‡[!44J(44#~A4Uˆ6U“‡UŠU…[!44†64~64_!4<64~54<6T4<4]TU5 T4Y!44~44~AN4U~54U~54U5 44J(44J UÄA!U5U”#UôJU"UÔJUœ#UÔ"JU˜#U´"JT4U´ZTU5T4UôZTU5T4UDZTU5T4U$[T44~UO4U~5 UÔUô4U~U´$.U5T4UP[T4U~4~UO4U~5 U˜#<Uœ#<4U~U2$.UÄUN 44 ~UO4U~5 44!~UO4U~5 4U~4~UO4U~5 44J44J(U5 44U¤~J@44Uä~J<44UD~J844U~J44U$54U$5U‘54U$54U1^4U1^†!4U•~54U~5U”54U~6U4U^/65T4T4U$54U~4BUˆ~4O4U54U~5 UU'464U'_/54UˆU”~5T4T4U~4BUˆ~UO4U54U~5 U54Uä~4U¤~4U~U'$!44~5U5T44\T44U<~$6U\!4U#aT4U~4Uˆ~4O4U~5 U5U5U5TTT4U$"4YTU5 4Uˆ4~C5U5 U5U5444$4~64~\TUŽ5 4U~4Uˆ~5T4Y!44O4U~54U~54U5 4CYTU‹5 4Uä~4U¤~4U~4$6TU54U\!44Bæ4Bä~[!4U~4UD~4U~4Uˆ~4$6TUŒ54U\!44B†4B„~[!44U<~4U4~$5 4U"U˜#$544"†Y!454U^!44<J44<(J454U~84­U”N!#%'+/37?GOWgw‡—·×÷Uä;U”9$%& !"#`;s.u(s,r).then((t=>WebAssembly.instantiate(t,{}))).then((({exports:s})=>{const r=new Map(Object.entries(s)),n=r.get("puff"),h=r.get("memory").buffer,a=new t(h),o=new DataView(h);let c=r.get("__heap_base");const d=e.length,l=c;c+=4,o.setInt32(l,d,!0);const u=c;c+=d,a.set(e,u);const U=c;c+=4,o.setInt32(U,a.byteLength-c,!0),n(c,U,u,l),i(a.slice(c,c+o.getInt32(U,!0)))}))}))}}}),Object.defineProperty(this,"p",{O:!0,get:()=>this.F}),this.v=(t,e,s)=>{let i=[],r=0;for(;r<e;)i.push(t.slice(r*s,r++*s+s));return i},this.C=(t,e,s=!0)=>{const i=this.F._malloc(e.BYTES_PER_ELEMENT*t);return s&&this.B.add(i),{J:i,_:t,I:new e(this.F.L,i,t)}},this.free=()=>{this.B.forEach((t=>{this.F._free(t)})),this.B.clear()},this.P=t=>{const e=[],s=new Uint8Array(this.F.L);for(let i=s[t];0!==i;i=s[++t])e.push(i);return String.fromCharCode.apply(null,e)},this.Y=(t,e,s,i,r,n)=>{t.push({message:e,frameLength:s,frameNumber:i,inputBytes:r,outputSamples:n})},this.instantiate=(t,e)=>(e&&s.o(t,e),this.F=new t(s).instantiate(),this.B=new Set,this.F.ready.then((()=>this)))}class i extends((()=>globalThis.Worker||e)()){constructor(t,e,i,r){s.t||new s;let n=s.t.get(i);if(!n){const t=`'use strict';(${""+((t,e,s)=>{let i,r,n=new Promise((t=>{r=t}));self.onmessage=({data:{id:h,command:a,data:o}})=>{let c,d=n,l={id:h};"init"===a?(Object.defineProperties(t,{N:{value:e},W:{value:s},D:{value:o.D},R:{value:!0}}),i=new t(o.options),r()):"free"===a?i.free():"ready"===a?d=d.then((()=>i.ready)):"reset"===a?d=d.then((()=>i.reset())):(Object.assign(l,i[a](Array.isArray(o)?o.map((t=>new Uint8Array(t))):new Uint8Array(o))),c=l.channelData?l.channelData.map((t=>t.buffer)):[]),d.then((()=>self.postMessage(l,c)))}})})(${i}, ${s}, ${r})`,e="text/javascript";try{n=URL.createObjectURL(new Blob([t],{type:e}))}catch{n=`data:${e};base64,${Buffer.from(t).toString("base64")}`}s.t.set(i,n)}super(n,{name:e}),this.G=Number.MIN_SAFE_INTEGER,this.H=new Map,this.onmessage=({data:t})=>{const{id:e,...s}=t;this.H.get(e)(s),this.H.delete(e)},new r(s).u().then((e=>{this.V("init",{D:e,options:t})}))}async V(t,e){return new Promise((s=>{this.postMessage({command:t,id:this.G,data:e}),this.H.set(this.G++,s)}))}get ready(){return this.V("ready")}async free(){await this.V("free").finally((()=>{this.terminate()}))}async reset(){await this.V("reset")}}const r=(t,e)=>{Object.defineProperty(t,"name",{value:e})},n=(t,e,s)=>{for(let i=0;i<t.length;i++){let r=e(i);for(let t=8;t>0;t--)r=s(r);t[i]=r}return t},h=n(new Uint8Array(256),(t=>t),(t=>128&t?7^t<<1:t<<1)),a=[n(new Uint16Array(256),(t=>t<<8),(t=>t<<1^(32768&t?32773:0)))],o=[n(new Uint32Array(256),(t=>t),(t=>t>>>1^3988292384*(1&t)))];for(let ie=0;ie<15;ie++){a.push(new Uint16Array(256)),o.push(new Uint32Array(256));for(let t=0;t<=255;t++)a[ie+1][t]=a[0][a[ie][t]>>>8]^a[ie][t]<<8,o[ie+1][t]=o[ie][t]>>>8^o[0][255&o[ie][t]]}const c=t=>{const e=t.length,s=e-16;let i=0,r=0;for(;r<=s;)i=o[15][255&(t[r++]^i)]^o[14][255&(t[r++]^i>>>8)]^o[13][255&(t[r++]^i>>>16)]^o[12][t[r++]^i>>>24]^o[11][t[r++]]^o[10][t[r++]]^o[9][t[r++]]^o[8][t[r++]]^o[7][t[r++]]^o[6][t[r++]]^o[5][t[r++]]^o[4][t[r++]]^o[3][t[r++]]^o[2][t[r++]]^o[1][t[r++]]^o[0][t[r++]];for(;r!==e;)i=o[0][255&(i^t[r++])]^i>>>8;return-1^i},d=(...t)=>{const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));return t.reduce(((t,s)=>(e.set(s,t),t+s.length)),0),e},l=t=>String.fromCharCode(...t),u=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],U=t=>u[15&t]<<4|u[t>>4];class f{constructor(t){this.K=t,this.q=8*t.length}set position(t){this.q=t}get position(){return this.q}read(t){const e=Math.floor(this.q/8),s=this.q%8;return this.q-=t,(U(this.K[e-1])<<8)+U(this.K[e])>>7-s&255}}class m{constructor(t){this.Z=t,this.reset()}enable(){this.X=!0}reset(){this.tt=new Map,this.et=new WeakMap,this.st=!1,this.it=null,this.X=!1}rt(t,e){if(this.Z){this.it!==t&&(this.it=t,this.st=!0);const s=this.et.get(this.tt.get(this.nt));this.st&&s&&this.Z({ht:t,...s},e),this.st=!1}}at(t){this.Z&&t!==this.nt&&(this.st=!0,this.nt=t)}ot(t){const e=this.tt.get(t);return e&&this.at(t),e}ct(t,e,s){this.X&&(this.at(t),this.tt.set(t,e),this.et.set(e,s))}}const p=new WeakMap,y=new WeakMap;class w{constructor(t,e){this.dt=t,this.tt=e}*lt(){let t;for(;;){if(t=yield*this.Ut.ut(this.dt,this.tt,0),t)return t;this.dt.ft(1)}}*yt(t){let e=yield*this.lt();const s=y.get(e).length;if(t||this.dt.wt||(yield*this.gt.ot(this.dt,this.tt,s)))return this.tt.enable(),this.dt.ft(s),this.dt.bt(e),e;this.dt.Mt(`Missing frame frame at ${s} bytes from current position.`,"Dropping current frame and trying again."),this.tt.reset(),this.dt.ft(1)}}class g{constructor(t,e){y.set(this,{Tt:t}),this.data=e}}class b extends g{static*ut(t,e,s,i,r){const n=yield*t.ot(s,i,r);if(n){const t=p.get(n).frameLength,i=p.get(n).St;return new e(n,(yield*s.At(t,r)).subarray(0,t),i)}return null}constructor(t,e,s){super(t,e),this.Tt=t,this.St=s,this.duration=s/t.sampleRate*1e3,this.frameNumber=null,this.xt=null,this.$t=null,this.Ot=null,y.get(this).length=e.length}}const M="reserved",T="bad",S="free",A="none",x="16bit CRC",$="left",O="center",F="right",v=["","front ","side ","rear "].map((t=>[[$,F],[$,F,O],[$,O,F],[O,$,F],[O]].flatMap((e=>e.map((e=>t+e)).join(", "))))),C="LFE",B="monophonic (mono)",z="stereo",J="surround",_=[B,z,"linear "+J,"quadraphonic","5.0 "+J,"5.1 "+J,"6.1 "+J,"7.1 "+J],E=(t,...e)=>`${_[t-1]} (${e.join(", ")})`,I=[B,E(2,v[0][0]),E(3,v[0][2]),E(4,v[1][0],v[3][0]),E(5,v[1][2],v[3][0]),E(6,v[1][2],v[3][0],C),E(7,v[1][2],v[2][0],v[3][4],C),E(8,v[1][2],v[2][0],v[3][0],C)],L=48e3,k=44100,P=32e3,Y=24e3,j=22050,N=16e3,W=8e3;class D{static*Ft(t,e,s){const i={vt:10};let r=yield*t.At(3,s);return 73!==r[0]||68!==r[1]||51!==r[2]?null:(r=yield*t.At(i.vt,s),i.version=`id3v2.${r[3]}.${r[4]}`,15&r[5]?null:(i.Ct=!!(128&r[5]),i.Bt=!!(64&r[5]),i.zt=!!(32&r[5]),i.Jt=!!(16&r[5]),128&r[6]||128&r[7]||128&r[8]||128&r[9]?null:(i._t=r[6]<<21|r[7]<<14|r[8]<<7|r[9],i.length=i.vt+i._t,new D(i))))}constructor(t){this.version=t.version,this.Ct=t.Ct,this.Bt=t.Bt,this.zt=t.zt,this.Jt=t.Jt,this.length=t.length}}class R{constructor(t){p.set(this,t),this.bitDepth=t.bitDepth,this.ht=null,this.Et=t.Et,this.It=t.It,this.sampleRate=t.sampleRate}}const G={0:[S,S,S,S,S],16:[32,32,32,32,8],240:[T,T,T,T,T]},H=(t,e,s)=>8*((t+s)%e+e)*(1<<(t+s)/e)-8*e*(e/8|0);for(let ie=2;ie<15;ie++)G[ie<<4]=[32*ie,H(ie,4,0),H(ie,4,-1),H(ie,8,4),H(ie,8,0)];const V="bands ",K=" to 31",q={0:V+4+K,16:V+8+K,32:V+12+K,48:V+16+K},Q="Intensity stereo ",Z=", MS stereo ",X="on",tt="off",et={0:{description:M},2:{description:"Layer III",Lt:1,kt:{0:Q+tt+Z+tt,16:Q+X+Z+tt,32:Q+tt+Z+X,48:Q+X+Z+X},Pt:{Yt:2,St:1152},jt:{Yt:4,St:576}},4:{description:"Layer II",Lt:1,kt:q,St:1152,Pt:{Yt:1},jt:{Yt:4}},6:{description:"Layer I",Lt:4,kt:q,St:384,Pt:{Yt:0},jt:{Yt:3}}},st="MPEG Version ",it="ISO/IEC ",rt={0:{description:st+"2.5 (later extension of MPEG 2)",Nt:"v2",Wt:{0:11025,4:12e3,8:W,12:M}},8:{description:M},16:{description:`${st}2 (${it}13818-3)`,Nt:"v2",Wt:{0:j,4:Y,8:N,12:M}},24:{description:`${st}1 (${it}11172-3)`,Nt:"v1",Wt:{0:k,4:L,8:P,12:M}}},nt={0:x,1:A},ht={0:A,1:"50/15 ms",2:M,3:"CCIT J.17"},at={0:{Et:2,description:z},64:{Et:2,description:"joint "+z},128:{Et:2,description:"dual channel"},192:{Et:1,description:B}};class ot extends R{static*ot(t,e,s){const i={},r=yield*D.Ft(t,e,s);r&&(yield*t.At(r.length,s),t.ft(r.length));const n=yield*t.At(4,s),h=l(n.subarray(0,4)),a=e.ot(h);if(a)return new ot(a);if(255!==n[0]||n[1]<224)return null;const o=rt[24&n[1]];if(o.description===M)return null;const c=6&n[1];if(et[c].description===M)return null;const d={...et[c],...et[c][o.Nt]};if(i.Dt=o.description,i.Rt=d.description,i.St=d.St,i.Gt=nt[1&n[1]],i.length=4,i.ht=G[240&n[2]][d.Yt],i.ht===T)return null;if(i.sampleRate=o.Wt[12&n[2]],i.sampleRate===M)return null;if(i.Lt=2&n[2]&&d.Lt,i.Ht=!!(1&n[2]),i.frameLength=Math.floor(125*i.ht*i.St/i.sampleRate+i.Lt),!i.frameLength)return null;const u=192&n[3];if(i.It=at[u].description,i.Et=at[u].Et,i.Vt=d.kt[48&n[3]],i.Kt=!!(8&n[3]),i.qt=!!(4&n[3]),i.Qt=ht[3&n[3]],i.Qt===M)return null;i.bitDepth=16;const{length:U,frameLength:f,St:m,...p}=i;return e.ct(h,i,p),new ot(i)}constructor(t){super(t),this.ht=t.ht,this.Qt=t.Qt,this.Lt=t.Lt,this.Kt=t.Kt,this.qt=t.qt,this.Ht=t.Ht,this.Rt=t.Rt,this.Vt=t.Vt,this.Dt=t.Dt,this.Gt=t.Gt}}class ct extends b{static*ut(t,e,s){return yield*super.ut(ot,ct,t,e,s)}constructor(t,e,s){super(t,e,s)}}class dt extends w{constructor(t,e,s){super(t,e),this.Ut=ct,this.gt=ot,s(this.Zt)}get Zt(){return"mpeg"}*Xt(){return yield*this.yt()}}const lt={0:"MPEG-4",8:"MPEG-2"},ut={0:"valid",2:T,4:T,6:T},Ut={0:x,1:A},ft={0:"AAC Main",64:"AAC LC (Low Complexity)",128:"AAC SSR (Scalable Sample Rate)",192:"AAC LTP (Long Term Prediction)"},mt={0:96e3,4:88200,8:64e3,12:L,16:k,20:P,24:Y,28:j,32:N,36:12e3,40:11025,44:W,48:7350,52:M,56:M,60:"frequency is written explicitly"},pt={0:{Et:0,description:"Defined in AOT Specific Config"},64:{Et:1,description:B},128:{Et:2,description:E(2,v[0][0])},192:{Et:3,description:E(3,v[1][3])},256:{Et:4,description:E(4,v[1][3],v[3][4])},320:{Et:5,description:E(5,v[1][3],v[3][0])},384:{Et:6,description:E(6,v[1][3],v[3][0],C)},448:{Et:8,description:E(8,v[1][3],v[2][0],v[3][0],C)}};class yt extends R{static*ot(t,e,s){const i={},r=yield*t.At(7,s),n=l([r[0],r[1],r[2],252&r[3]|3&r[6]]),h=e.ot(n);if(h)Object.assign(i,h);else{if(255!==r[0]||r[1]<240)return null;if(i.Dt=lt[8&r[1]],i.Rt=ut[6&r[1]],i.Rt===T)return null;const t=1&r[1];i.Gt=Ut[t],i.length=t?7:9,i.te=192&r[2],i.ee=60&r[2];const s=2&r[2];if(i.profile=ft[i.te],i.sampleRate=mt[i.ee],i.sampleRate===M)return null;i.Ht=!!s,i.se=448&(r[2]<<8|r[3]),i.It=pt[i.se].description,i.Et=pt[i.se].Et,i.qt=!!(32&r[3]),i.ie=!!(8&r[3]),i.re=!!(8&r[3]),i.ne=!!(4&r[3]),i.bitDepth=16,i.St=1024,i.he=3&r[6];const{length:h,se:a,te:o,ee:c,frameLength:d,St:l,he:u,...U}=i;e.ct(n,i,U)}if(i.frameLength=8191&(r[3]<<11|r[4]<<3|r[5]>>5),!i.frameLength)return null;const a=2047&(r[5]<<6|r[6]>>2);return i.ae=2047===a?"VBR":a,new yt(i)}constructor(t){super(t),this.re=t.re,this.ne=t.ne,this.ae=t.ae,this.ie=t.ie,this.qt=t.qt,this.Ht=t.Ht,this.Rt=t.Rt,this.length=t.length,this.Dt=t.Dt,this.he=t.he,this.profile=t.profile,this.Gt=t.Gt}get oe(){const t=p.get(this),e=t.te+64<<5|t.ee<<5|t.se>>3,s=new Uint8Array(2);return new DataView(s.buffer).setUint16(0,e,!1),s}}class wt extends b{static*ut(t,e,s){return yield*super.ut(yt,wt,t,e,s)}constructor(t,e,s){super(t,e,s)}}class gt extends w{constructor(t,e,s){super(t,e),this.Ut=wt,this.gt=yt,s(this.Zt)}get Zt(){return"aac"}*Xt(){return yield*this.yt()}}class bt extends b{static ce(t){return(t[t.length-2]<<8)+t[t.length-1]}static de(t){return bt.ce(t)===(t=>{const e=t.length,s=e-16;let i=0,r=0;for(;r<=s;)i^=t[r++]<<8|t[r++],i=a[15][i>>8]^a[14][255&i]^a[13][t[r++]]^a[12][t[r++]]^a[11][t[r++]]^a[10][t[r++]]^a[9][t[r++]]^a[8][t[r++]]^a[7][t[r++]]^a[6][t[r++]]^a[5][t[r++]]^a[4][t[r++]]^a[3][t[r++]]^a[2][t[r++]]^a[1][t[r++]]^a[0][t[r++]];for(;r!==e;)i=(255&i)<<8^a[0][i>>8^t[r++]];return i})(t.subarray(0,-2))}constructor(t,e,s){e.le=s,e.ue=bt.ce(t),super(e,t,p.get(e).St)}}const Mt="get from STREAMINFO metadata block",Tt={0:"Fixed",1:"Variable"},St={0:M,16:192};for(let ie=2;ie<16;ie++)St[ie<<4]=ie<6?576*2**(ie-2):2**ie;const At={0:Mt,1:88200,2:176400,3:192e3,4:W,5:N,6:j,7:Y,8:P,9:k,10:L,11:96e3,15:T},xt={0:{Et:1,description:B},16:{Et:2,description:E(2,v[0][0])},32:{Et:3,description:E(3,v[0][1])},48:{Et:4,description:E(4,v[1][0],v[3][0])},64:{Et:5,description:E(5,v[1][1],v[3][0])},80:{Et:6,description:E(6,v[1][1],C,v[3][0])},96:{Et:7,description:E(7,v[1][1],C,v[3][4],v[2][0])},112:{Et:8,description:E(8,v[1][1],C,v[3][0],v[2][0])},128:{Et:2,description:z+" (left, diff)"},144:{Et:2,description:z+" (diff, right)"},160:{Et:2,description:z+" (avg, diff)"},176:M,192:M,208:M,224:M,240:M},$t={0:Mt,2:8,4:12,6:M,8:16,10:20,12:24,14:M};class Ot extends R{static Ue(t){if(t[0]>254)return null;if(t[0]<128)return{value:t[0],length:1};let e=1;for(let n=64;n&t[0];n>>=1)e++;let s=e-1,i=0,r=0;for(;s>0;r+=6,s--){if(128!=(192&t[s]))return null;i|=(63&t[s])<<r}return i|=(t[s]&127>>e)<<r,{value:i,length:e}}static fe(t,e){const s={*At(){return t}};return Ot.ot(s,e,0).next().value}static*ot(t,e,s){let i=yield*t.At(6,s);if(255!==i[0]||248!==i[1]&&249!==i[1])return null;const r={},n=l(i.subarray(0,4)),a=e.ot(n);if(a)Object.assign(r,a);else{if(r.me=1&i[1],r.pe=Tt[r.me],r.ye=240&i[2],r.ee=15&i[2],r.blockSize=St[r.ye],r.blockSize===M)return null;if(r.sampleRate=At[r.ee],r.sampleRate===T)return null;if(1&i[3])return null;const t=xt[240&i[3]];if(t===M)return null;if(r.Et=t.Et,r.It=t.description,r.bitDepth=$t[14&i[3]],r.bitDepth===M)return null}r.length=5,i=yield*t.At(r.length+8,s);const o=Ot.Ue(i.subarray(4));if(!o)return null;if(r.me?r.we=o.value:r.frameNumber=o.value,r.length+=o.length,96===r.ye?(i.length<r.length&&(i=yield*t.At(r.length,s)),r.blockSize=i[r.length-1]+1,r.length+=1):112===r.ye&&(i.length<r.length&&(i=yield*t.At(r.length,s)),r.blockSize=(i[r.length-1]<<8)+i[r.length]+1,r.length+=2),r.St=r.blockSize,12===r.ee?(i.length<r.length&&(i=yield*t.At(r.length,s)),r.sampleRate=1e3*i[r.length-1],r.length+=1):13===r.ee?(i.length<r.length&&(i=yield*t.At(r.length,s)),r.sampleRate=(i[r.length-1]<<8)+i[r.length],r.length+=2):14===r.ee&&(i.length<r.length&&(i=yield*t.At(r.length,s)),r.sampleRate=10*((i[r.length-1]<<8)+i[r.length]),r.length+=2),i.length<r.length&&(i=yield*t.At(r.length,s)),r.ge=i[r.length-1],r.ge!==(t=>{let e=0;const s=t.length;for(let i=0;i!==s;i++)e=h[e^t[i]];return e})(i.subarray(0,r.length-1)))return null;if(!a){const{me:t,frameNumber:s,we:i,St:h,ee:a,ye:o,ge:c,length:d,...l}=r;e.ct(n,r,l)}return new Ot(r)}constructor(t){super(t),this.ue=null,this.pe=t.pe,this.blockSize=t.blockSize,this.frameNumber=t.frameNumber,this.we=t.we,this.le=null}}class Ft extends w{constructor(t,e){super(t,e),this.Ut=bt,this.gt=Ot}get Zt(){return"flac"}*be(t){const e=yield*this.dt.At(2,0),s=e.length-2;for(;t<s;){if(255===e[t]){const s=e[t+1];if(248===s||249===s)break;255!==s&&t++}t++}return t}*Xt(){for(;;){const t=yield*Ot.ot(this.dt,this.tt,0);if(t){let e=p.get(t).length+2;for(;e<=524288;){if(this.dt.wt||(yield*Ot.ot(this.dt,this.tt,e))){let s=yield*this.dt.At(e);if(this.dt.wt||(s=s.subarray(0,e)),bt.de(s)){const i=new bt(s,t);return this.tt.enable(),this.dt.ft(e),this.dt.bt(i),i}}e=yield*this.be(e+1)}this.dt.Mt(`Unable to sync FLAC frame after searching ${e} bytes.`),this.dt.ft(e)}else this.dt.ft(yield*this.be(1))}}Me(t){return 0===t.Te?(this.tt.enable(),this.Se=t.data.subarray(13)):1===t.Te||(t.Ae=y.get(t).xe.map((t=>{const e=Ot.fe(t,this.tt);if(e)return new bt(t,e,this.Se);this.dt.Mt("Failed to parse Ogg FLAC frame","Skipping invalid FLAC frame")})).filter((t=>!!t))),t}}class vt{static*ot(t,e,s){const i={};let r=yield*t.At(28,s);if(79!==r[0]||103!==r[1]||103!==r[2]||83!==r[3])return null;if(i.$e=r[4],248&r[5])return null;i.Oe=!!(4&r[5]),i.Fe=!!(2&r[5]),i.ve=!!(1&r[5]);const n=new DataView(Uint8Array.from(r.subarray(0,28)).buffer);try{i.Ce=n.getBigInt64(6,!0)}catch{}i.Be=n.getInt32(14,!0),i.Te=n.getInt32(18,!0),i.ze=n.getInt32(22,!0);const h=r[26];i.length=h+27,r=yield*t.At(i.length,s),i.frameLength=0,i.Je=[],i._e=Uint8Array.from(r.subarray(27,i.length));for(let a=0,o=0;a<h;a++){const t=i._e[a];i.frameLength+=t,o+=t,255===t&&a!==h-1||(i.Je.push(o),o=0)}return new vt(i)}constructor(t){p.set(this,t),this.Ce=t.Ce,this.ve=t.ve,this.Fe=t.Fe,this.Oe=t.Oe,this.Je=t.Je,this.Te=t.Te,this.ze=t.ze,this.Be=t.Be}}class Ct extends g{static*ut(t,e,s){const i=yield*vt.ot(t,e,s);if(i){const e=p.get(i).frameLength,s=p.get(i).length,r=s+e,n=(yield*t.At(r,0)).subarray(0,r),h=n.subarray(s,r);return new Ct(i,h,n)}return null}constructor(t,e,s){super(t,e),y.get(this).length=s.length,this.Ae=[],this.Ee=s,this.Ce=t.Ce,this.Ie=t.ze,this.duration=0,this.ve=t.ve,this.Fe=t.Fe,this.Oe=t.Oe,this.Te=t.Te,this.St=0,this.Be=t.Be}}class Bt extends b{constructor(t,e){super(e,t,e.Le*e.ke/1e3*e.sampleRate)}}const zt={0:I.slice(0,2),1:I},Jt="SILK-only",_t="CELT-only",Et="Hybrid",It="narrowband",Lt="medium-band",kt="wideband",Pt="super-wideband",Yt="fullband",jt={0:{mode:Jt,Pe:It,Le:10},8:{mode:Jt,Pe:It,Le:20},16:{mode:Jt,Pe:It,Le:40},24:{mode:Jt,Pe:It,Le:60},32:{mode:Jt,Pe:Lt,Le:10},40:{mode:Jt,Pe:Lt,Le:20},48:{mode:Jt,Pe:Lt,Le:40},56:{mode:Jt,Pe:Lt,Le:60},64:{mode:Jt,Pe:kt,Le:10},72:{mode:Jt,Pe:kt,Le:20},80:{mode:Jt,Pe:kt,Le:40},88:{mode:Jt,Pe:kt,Le:60},96:{mode:Et,Pe:Pt,Le:10},104:{mode:Et,Pe:Pt,Le:20},112:{mode:Et,Pe:Yt,Le:10},120:{mode:Et,Pe:Yt,Le:20},128:{mode:_t,Pe:It,Le:2.5},136:{mode:_t,Pe:It,Le:5},144:{mode:_t,Pe:It,Le:10},152:{mode:_t,Pe:It,Le:20},160:{mode:_t,Pe:kt,Le:2.5},168:{mode:_t,Pe:kt,Le:5},176:{mode:_t,Pe:kt,Le:10},184:{mode:_t,Pe:kt,Le:20},192:{mode:_t,Pe:Pt,Le:2.5},200:{mode:_t,Pe:Pt,Le:5},208:{mode:_t,Pe:Pt,Le:10},216:{mode:_t,Pe:Pt,Le:20},224:{mode:_t,Pe:Yt,Le:2.5},232:{mode:_t,Pe:Yt,Le:5},240:{mode:_t,Pe:Yt,Le:10},248:{mode:_t,Pe:Yt,Le:20}};class Nt extends R{static fe(t,e,s){const i={};if(i.Et=t[9],i.Ye=t[18],i.length=0!==i.Ye?21+i.Et:19,t.length<i.length)throw Error("Out of data while inside an Ogg Page");const r=3&e[0],n=3===r?2:1,h=l(t.subarray(0,i.length))+l(e.subarray(0,n)),a=s.ot(h);if(a)return new Nt(a);if("OpusHead"!==h.substr(0,8))return null;if(1!==t[8])return null;i.data=Uint8Array.from(t.subarray(0,i.length));const o=new DataView(i.data.buffer);if(i.bitDepth=16,i.je=o.getUint16(10,!0),i.Ne=o.getUint32(12,!0),i.sampleRate=L,i.We=o.getInt16(16,!0),i.Ye in zt&&(i.It=zt[i.Ye][i.Et-1],!i.It))return null;0!==i.Ye&&(i.De=t[19],i.Re=t[20],i.Ge=[...t.subarray(21,i.Et+21)]);const c=jt[248&e[0]];switch(i.mode=c.mode,i.Pe=c.Pe,i.Le=c.Le,r){case 0:i.ke=1;break;case 1:case 2:i.ke=2;break;case 3:i.He=!!(128&e[1]),i.Ve=!!(64&e[1]),i.ke=63&e[1];break;default:return null}const{length:d,data:u,Ye:U,...f}=i;return s.ct(h,i,f),new Nt(i)}constructor(t){super(t),this.data=t.data,this.Pe=t.Pe,this.Ye=t.Ye,this.Ge=t.Ge,this.Re=t.Re,this.ke=t.ke,this.Le=t.Le,this.Ve=t.Ve,this.Ne=t.Ne,this.He=t.He,this.mode=t.mode,this.We=t.We,this.je=t.je,this.De=t.De}}class Wt extends w{constructor(t,e){super(t,e),this.Ut=Bt,this.gt=Nt,this.Ke=null}get Zt(){return"opus"}Me(t){return 0===t.Te?(this.tt.enable(),this.Ke=t.data):1===t.Te||(t.Ae=y.get(t).xe.map((t=>{const e=Nt.fe(this.Ke,t,this.tt);if(e)return new Bt(t,e);this.dt.qe("Failed to parse Ogg Opus Header","Not a valid Ogg Opus file")}))),t}}class Dt extends b{constructor(t,e,s){super(e,t,s)}}const Rt={};for(let ie=0;ie<8;ie++)Rt[ie+6]=2**(6+ie);class Gt extends R{static fe(t,e){if(t.length<30)throw Error("Out of data while inside an Ogg Page");const s=l(t.subarray(0,30)),i=e.ot(s);if(i)return new Gt(i);const r={length:30};if("vorbis"!==s.substr(0,7))return null;r.data=Uint8Array.from(t.subarray(0,30));const n=new DataView(r.data.buffer);if(r.version=n.getUint32(7,!0),0!==r.version)return null;if(r.Et=t[11],r.It=I[r.Et-1]||"application defined",r.sampleRate=n.getUint32(12,!0),r.Qe=n.getInt32(16,!0),r.Ze=n.getInt32(20,!0),r.Xe=n.getInt32(24,!0),r.ts=Rt[(240&t[28])>>4],r.es=Rt[15&t[28]],r.es>r.ts)return null;if(1!==t[29])return null;r.bitDepth=32;{const{length:t,data:i,version:n,...h}=r;e.ct(s,r,h)}return new Gt(r)}constructor(t){super(t),this.Qe=t.Qe,this.Xe=t.Xe,this.Ze=t.Ze,this.es=t.es,this.ts=t.ts,this.data=t.data,this.ss=null,this.rs=null}}class Ht extends w{constructor(t,e){super(t,e),this.Ut=Dt,this.Ke=null,this.ns={count:0},this.hs=0,this.os=0}get Zt(){return"vorbis"}Me(t){const e=y.get(t).xe;return 0===t.Te?(this.tt.enable(),this.Ke=t.data):1===t.Te?e[1]&&(this.cs=e[0],this.ds=e[1],this.ns=this.ls(e[1])):t.Ae=e.map((t=>{const e=Gt.fe(this.Ke,this.tt);if(e)return e.ss=this.cs,e.rs=this.ds,new Dt(t,e,this.us(t,e));this.dt.qe("Failed to parse Ogg Vorbis Header","Not a valid Ogg Vorbis file")})),t}us(t,e){const s=t[0]>>1,i=this.ns[s&this.ns.mask];i&&(this.hs=s&this.ns.Us?e.ts:e.es),this.os=i?e.ts:e.es;const r=this.hs+this.os>>2;return this.hs=this.os,r}ls(t){const e=new f(t),s="Failed to read Vorbis stream",i=", failed to parse vorbis modes";let r,n={count:0};for(;1!=(1&e.read(1)););for(;n.count<64&&e.position>0;){const t=U(e.read(8));if(t in n&&(1!==n.count||0!==t))throw this.dt.qe("received duplicate mode mapping"+i),Error(s);let h=0;for(;0===e.read(8)&&h++<3;);if(4!==h){if(1+((126&U(r))>>1)!==n.count)throw this.dt.qe("mode count did not match actual modes"+i),Error(s);break}r=e.read(7),n[t]=1&r,e.position+=6,n.count++}return n.mask=(1<<Math.log2(n.count))-1,n.Us=1+(1|n.mask),n}}class Vt extends w{constructor(t,e,s){super(t,e),this.fs=s,this.Ut=Ct,this.gt=vt,this.ps=null,this.ys=new Uint8Array,this.ws=0}get Zt(){return this.ps||""}gs(t,e){this.ps!==t&&(this.bs=new e(this.dt,this.tt),this.ps=t,this.fs(t))}Ms({data:t}){const e=l(t.subarray(0,8));switch(e){case"fishead\0":case"fisbone\0":case"index\0\0\0":return!1;case"OpusHead":return this.gs("opus",Wt),!0;case/^\x7fFLAC/.test(e)&&e:return this.gs("flac",Ft),!0;case/^\x01vorbis/.test(e)&&e:return this.gs("vorbis",Ht),!0}}Ts(t){t.Te!==this.ws+1&&this.ws>1&&t.Te>1&&this.dt.Mt("Unexpected gap in Ogg Page Sequence Number.",`Expected: ${this.ws+1}, Got: ${t.Te}`),this.ws=t.Te}*Xt(){const t=yield*this.yt(!0);this.Ts(t);const e=y.get(t),{_e:s,Je:i}=p.get(e.Tt);let r=0;if(e.xe=i.map((e=>t.data.subarray(r,r+=e))),255===s[s.length-1]?this.ys=d(this.ys,e.xe.pop()):this.ys.length&&(e.xe[0]=d(this.ys,e.xe[0]),this.ys=new Uint8Array),this.ps||this.Ms(t)){const e=this.bs.Me(t);return this.dt.bt(e),e}}}const Kt=()=>{};class qt{constructor(t,{Ss:e,As:s,xs:i=!1,$s:r=!0}={}){this.Os=t,this.fs=s||Kt,this.Z=e,this.Fs=i,this.vs=r?c:Kt,this.Cs=this.Bs(),this.Cs.next()}get Zt(){return this.bs.Zt}*flush(){this.wt=!0;for(let t=this.Cs.next();t.value;t=this.Cs.next())yield t.value;this.wt=!1,this.Cs=this.Bs(),this.Cs.next()}*zs(t){for(let e=this.Cs.next(t);e.value;e=this.Cs.next())yield e.value}parseAll(t){return[...this.zs(t),...this.flush()]}*Bs(){if(this.tt=new m(this.Z),this.Os.match(/aac/))this.bs=new gt(this,this.tt,this.fs);else if(this.Os.match(/mpeg/))this.bs=new dt(this,this.tt,this.fs);else if(this.Os.match(/flac/))this.bs=new Ft(this,this.tt,this.fs);else{if(!this.Os.match(/ogg/))throw Error("Unsupported Codec "+mimeType);this.bs=new Vt(this,this.tt,this.fs)}for(this.Js=0,this._s=0,this.Es=0,this.Is=0,this.Ls=0,this.ks=void 0,this.Ps=new Uint8Array(0);;){const t=yield*this.bs.Xt();t&&(yield t)}}*At(t=0,e=0){let s;for(;this.Ps.length<=t+e;){if(s=yield,this.wt)return this.Ps.subarray(e);s&&(this.Es+=s.length,this.Ps=d(this.Ps,s))}return this.Ps.subarray(e)}ft(t){this._s+=t,this.Ps=this.Ps.subarray(t)}Ys(t){this.ks=t.Tt.sampleRate,t.Tt.ht=8*Math.round(t.data.length/t.duration),t.frameNumber=this.Js++,t.xt=this.Is,t.$t=this.Ls,t.Ot=this.Ls/this.ks*1e3,t.Ie=this.vs(t.data),this.tt.rt(t.Tt.ht,t.Ot),this.Is+=t.data.length,this.Ls+=t.St}bt(t){t.Ae?(t.Ae.forEach((e=>{t.duration+=e.duration,t.St+=e.St,this.Ys(e)})),t.$t=this.Ls,t.Ot=this.Ls/this.ks*1e3||0,t.xt=this.Is):this.Ys(t)}js(t,e){if(this.Fs){const s=["codec: "+this.Zt,"inputMimeType: "+this.Os,"readPosition: "+this._s,"totalBytesIn: "+this.Es,"totalBytesOut: "+this.Is],i=Math.max(...s.map((t=>t.length)));e.push("--stats--"+"-".repeat(i-9),...s,"-".repeat(i)),t("codec-parser",e.reduce(((t,e)=>t+"\n "+e),""))}}Mt(...t){this.js(console.warn,t)}qe(...t){this.js(console.error,t)}}function Qt(t){function e(t){console.log(t)}function s(t){console.error(t)}function i(){}for(var r=new Uint8Array(123),n=25;n>=0;--n)r[48+n]=52+n,r[65+n]=n,r[97+n]=26+n;r[43]=62,r[47]=63,Qt.p||Object.defineProperty(Qt,"p",{get:()=>String.raw`dynEncode00d9…/qõ¤æo-®‰Çr‘˜_¾.¥ò•>?—= ‚´Z^¨E¨_lLK˜Ó½Lgº½ï4É
var t,e;t=this,e=function(t,e){function s(){const t=Uint8Array,e=Float32Array;s.t||Object.defineProperties(s,{t:{value:new WeakMap},o:{value(t,e){s.t.set(t,Promise.resolve(e))}},u:{value(t,e){let i=s.t.get(t);return i||(e?i=WebAssembly.compile(s.U(e)):(e=t.p,i=s.M(e).then((t=>WebAssembly.compile(t)))),s.t.set(t,i)),i}},T:{value(t,s){let i=new e(s),r=0,n=0;for(;r<t.length;)i.set(t[r],n),n+=t[r++].length;return i}},S:{value:(t,e,s,i,r)=>({A:t,channelData:e,samplesDecoded:s,sampleRate:i,bitDepth:r})},$:{value(t,e,i,r,n,h){let a,o,c=[];for(a=0;a<i;a++){const t=[];for(o=0;o<e.length;)t.push(e[o++][a]||[]);c.push(s.T(t,r))}return s.S(t,c,r,n,h)}},U:{value(e){const s=new t(e.length),i=parseInt(e.substring(11,13),16),r=256-i;let n,h=!1,a=0,o=13;for(;o<e.length;)n=e.charCodeAt(o++),61!==n||h?(h&&(h=!1,n-=64),s[a++]=n<i&&n>0?n+r:n-i):h=!0;return s.subarray(0,a)}},M:{value(e){return e=s.U(e),new Promise((i=>{const r=String.raw`dynEncode0014u‡*t“““t“““““t““““$#“U¤¤“U¤¤3yƒ†„‰zzss|yu„svu‡yÚ&ˆ“4<054<,5T44^T44<(6U~J(44< ~A544U~6J0444ˆ†545 444J0444‰J,4U“4ˆU“‡…Ò“7U45“4U4Z“4U4U^/6545T4T44BUˆ~64CU~O4U54U~5 U5T4B4Z!4U~5U5U5T4U~6U4ZTU5U5T44~4O4U2ZTU5T44Z!4B6T44Uˆ~64B6U~O44Uˆ~4O4U~54U~5 44~C4~54U~5 44~5454Uˆ4B6Ub!444~UO4U~5 “U5“4U4ZTUŠ#44U$4†64<4~B6^“4<444~Uˆ~B4U~54Uˆ544~544~Uˆ5 µ“Uä#UJUè#5TT4U0ZTTUX5U5T4T4Uà#~4OU4U $~Cˆ4~54U~5 T44$6U\!TTT4UaT4<6T4<64<Z!44~4N4<U~5 4U”Z!4U±_TUŠ#44U•Uˆ6UÔ~B$544$6U\!4Uˆ6U¤#~B44Uä#~B$~64<6_TU‰#444U”~B~6~54<Y!44<_!T4Y!4<64~444~AN44<U~6J4U5 44J4U”[!U#44UŠO4U~54U~5 U54 “7U6844J44J 4UJ4UJ04VK(44<J44<J$4U´~54U~5 4U¤~5!TTT4U$5"U“5TTTTTTT4U$"4VK,U54<(6U~64<$6_!4< 64~6A54A544U~6#J(U’54A4U‡[!44J(44#~A4Uˆ6U“‡UŠU…[!44†64~64_!4<64~54<6T4<4]TU5 T4Y!44~44~AN4U~54U~54U5 44J(44J UÄA!U5U”#UôJU"UÔJUœ#UÔ"JU˜#U´"JT4U´ZTU5T4UôZTU5T4UDZTU5T4U$[T44~UO4U~5 UÔUô4U~U´$.U5T4UP[T4U~4~UO4U~5 U˜#<Uœ#<4U~U2$.UÄUN 44 ~UO4U~5 44!~UO4U~5 4U~4~UO4U~5 44J44J(U5 44U¤~J@44Uä~J<44UD~J844U~J44U$54U$5U‘54U$54U1^4U1^†!4U•~54U~5U”54U~6U4U^/65T4T4U$54U~4BUˆ~4O4U54U~5 UU'464U'_/54UˆU”~5T4T4U~4BUˆ~UO4U54U~5 U54Uä~4U¤~4U~U'$!44~5U5T44\T44U<~$6U\!4U#aT4U~4Uˆ~4O4U~5 U5U5U5TTT4U$"4YTU5 4Uˆ4~C5U5 U5U5444$4~64~\TUŽ5 4U~4Uˆ~5T4Y!44O4U~54U~54U5 4CYTU‹5 4Uä~4U¤~4U~4$6TU54U\!44Bæ4Bä~[!4U~4UD~4U~4Uˆ~4$6TUŒ54U\!44B†4B„~[!44U<~4U4~$5 4U"U˜#$544"†Y!454U^!44<J44<(J454U~84­U”N!#%'+/37?GOWgw‡—·×÷Uä;U”9$%& !"#`;s.u(s,r).then((t=>WebAssembly.instantiate(t,{}))).then((({exports:s})=>{const r=new Map(Object.entries(s)),n=r.get("puff"),h=r.get("memory").buffer,a=new t(h),o=new DataView(h);let c=r.get("__heap_base");const d=e.length,l=c;c+=4,o.setInt32(l,d,!0);const u=c;c+=d,a.set(e,u);const U=c;c+=4,o.setInt32(U,a.byteLength-c,!0),n(c,U,u,l),i(a.slice(c,c+o.getInt32(U,!0)))}))}))}}}),Object.defineProperty(this,"p",{O:!0,get:()=>this.F}),this.v=(t,e,s)=>{let i=[],r=0;for(;r<e;)i.push(t.slice(r*s,r++*s+s));return i},this.C=(t,e,s=!0)=>{const i=this.F.B(e.BYTES_PER_ELEMENT*t);return s&&this.J.add(i),{_:i,I:t,L:new e(this.F.P,i,t)}},this.free=()=>{this.J.forEach((t=>{this.F.free(t)})),this.J.clear()},this.Y=t=>{const e=[],s=new Uint8Array(this.F.P);for(let i=s[t];0!==i;i=s[++t])e.push(i);return String.fromCharCode.apply(null,e)},this.N=(t,e,s,i,r,n)=>{t.push({message:e,frameLength:s,frameNumber:i,inputBytes:r,outputSamples:n})},this.instantiate=(t,e)=>(e&&s.o(t,e),this.F=new t(s).instantiate(),this.J=new Set,this.F.ready.then((()=>this)))}class i extends((()=>globalThis.Worker||e)()){constructor(t,e,i,r){s.t||new s;let n=s.t.get(i);if(!n){const t=`'use strict';(${""+((t,e,s)=>{let i,r,n=new Promise((t=>{r=t}));self.onmessage=({data:{id:h,command:a,data:o}})=>{let c,d=n,l={id:h};"init"===a?(Object.defineProperties(t,{W:{value:e},D:{value:s},R:{value:o.R},G:{value:!0}}),i=new t(o.options),r()):"free"===a?i.free():"ready"===a?d=d.then((()=>i.ready)):"reset"===a?d=d.then((()=>i.reset())):(Object.assign(l,i[a](Array.isArray(o)?o.map((t=>new Uint8Array(t))):new Uint8Array(o))),c=l.channelData?l.channelData.map((t=>t.buffer)):[]),d.then((()=>self.postMessage(l,c)))}})})(${i}, ${s}, ${r})`,e="text/javascript";try{n=URL.createObjectURL(new Blob([t],{type:e}))}catch{n=`data:${e};base64,${Buffer.from(t).toString("base64")}`}s.t.set(i,n)}super(n,{name:e}),this.H=Number.MIN_SAFE_INTEGER,this.V=new Map,this.onmessage=({data:t})=>{const{id:e,...s}=t;this.V.get(e)(s),this.V.delete(e)},new r(s).u().then((e=>{this.K("init",{R:e,options:t})}))}async K(t,e){return new Promise((s=>{this.postMessage({command:t,id:this.H,data:e}),this.V.set(this.H++,s)}))}get ready(){return this.K("ready")}async free(){await this.K("free").finally((()=>{this.terminate()}))}async reset(){await this.K("reset")}}const r=(t,e)=>{Object.defineProperty(t,"name",{value:e})},n=(t,e,s)=>{for(let i=0;i<t.length;i++){let r=e(i);for(let t=8;t>0;t--)r=s(r);t[i]=r}return t},h=n(new Uint8Array(256),(t=>t),(t=>128&t?7^t<<1:t<<1)),a=[n(new Uint16Array(256),(t=>t<<8),(t=>t<<1^(32768&t?32773:0)))],o=[n(new Uint32Array(256),(t=>t),(t=>t>>>1^3988292384*(1&t)))];for(let ie=0;ie<15;ie++){a.push(new Uint16Array(256)),o.push(new Uint32Array(256));for(let t=0;t<=255;t++)a[ie+1][t]=a[0][a[ie][t]>>>8]^a[ie][t]<<8,o[ie+1][t]=o[ie][t]>>>8^o[0][255&o[ie][t]]}const c=t=>{const e=t.length,s=e-16;let i=0,r=0;for(;r<=s;)i=o[15][255&(t[r++]^i)]^o[14][255&(t[r++]^i>>>8)]^o[13][255&(t[r++]^i>>>16)]^o[12][t[r++]^i>>>24]^o[11][t[r++]]^o[10][t[r++]]^o[9][t[r++]]^o[8][t[r++]]^o[7][t[r++]]^o[6][t[r++]]^o[5][t[r++]]^o[4][t[r++]]^o[3][t[r++]]^o[2][t[r++]]^o[1][t[r++]]^o[0][t[r++]];for(;r!==e;)i=o[0][255&(i^t[r++])]^i>>>8;return-1^i},d=(...t)=>{const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));return t.reduce(((t,s)=>(e.set(s,t),t+s.length)),0),e},l=t=>String.fromCharCode(...t),u=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],U=t=>u[15&t]<<4|u[t>>4];class f{constructor(t){this.q=t,this.Z=8*t.length}set position(t){this.Z=t}get position(){return this.Z}read(t){const e=Math.floor(this.Z/8),s=this.Z%8;return this.Z-=t,(U(this.q[e-1])<<8)+U(this.q[e])>>7-s&255}}class m{constructor(t){this.X=t,this.reset()}enable(){this.tt=!0}reset(){this.et=new Map,this.st=new WeakMap,this.it=!1,this.rt=null,this.tt=!1}nt(t,e){if(this.X){this.rt!==t&&(this.rt=t,this.it=!0);const s=this.st.get(this.et.get(this.ht));this.it&&s&&this.X({at:t,...s},e),this.it=!1}}ot(t){this.X&&t!==this.ht&&(this.it=!0,this.ht=t)}ct(t){const e=this.et.get(t);return e&&this.ot(t),e}dt(t,e,s){this.tt&&(this.ot(t),this.et.set(t,e),this.st.set(e,s))}}const p=new WeakMap,y=new WeakMap;class w{constructor(t,e){this.lt=t,this.et=e}*ut(){let t;for(;;){if(t=yield*this.ft.Ut(this.lt,this.et,0),t)return t;this.lt.yt(1)}}*wt(t){let e=yield*this.ut();const s=y.get(e).length;if(t||this.lt.gt||(yield*this.bt.ct(this.lt,this.et,s)))return this.et.enable(),this.lt.yt(s),this.lt.Mt(e),e;this.lt.Tt(`Missing frame frame at ${s} bytes from current position.`,"Dropping current frame and trying again."),this.et.reset(),this.lt.yt(1)}}class g{constructor(t,e){y.set(this,{St:t}),this.data=e}}class b extends g{static*Ut(t,e,s,i,r){const n=yield*t.ct(s,i,r);if(n){const t=p.get(n).frameLength,i=p.get(n).At;return new e(n,(yield*s.xt(t,r)).subarray(0,t),i)}return null}constructor(t,e,s){super(t,e),this.St=t,this.At=s,this.duration=s/t.sampleRate*1e3,this.frameNumber=null,this.$t=null,this.Ot=null,this.Ft=null,y.get(this).length=e.length}}const M="reserved",T="bad",S="free",A="none",x="16bit CRC",$="left",O="center",F="right",v=["","front ","side ","rear "].map((t=>[[$,F],[$,F,O],[$,O,F],[O,$,F],[O]].flatMap((e=>e.map((e=>t+e)).join(", "))))),C="LFE",B="monophonic (mono)",z="stereo",J="surround",_=[B,z,"linear "+J,"quadraphonic","5.0 "+J,"5.1 "+J,"6.1 "+J,"7.1 "+J],E=(t,...e)=>`${_[t-1]} (${e.join(", ")})`,I=[B,E(2,v[0][0]),E(3,v[0][2]),E(4,v[1][0],v[3][0]),E(5,v[1][2],v[3][0]),E(6,v[1][2],v[3][0],C),E(7,v[1][2],v[2][0],v[3][4],C),E(8,v[1][2],v[2][0],v[3][0],C)],L=48e3,k=44100,P=32e3,Y=24e3,j=22050,N=16e3,W=8e3;class D{static*vt(t,e,s){const i={Ct:10};let r=yield*t.xt(3,s);return 73!==r[0]||68!==r[1]||51!==r[2]?null:(r=yield*t.xt(i.Ct,s),i.version=`id3v2.${r[3]}.${r[4]}`,15&r[5]?null:(i.Bt=!!(128&r[5]),i.zt=!!(64&r[5]),i.Jt=!!(32&r[5]),i._t=!!(16&r[5]),128&r[6]||128&r[7]||128&r[8]||128&r[9]?null:(i.Et=r[6]<<21|r[7]<<14|r[8]<<7|r[9],i.length=i.Ct+i.Et,new D(i))))}constructor(t){this.version=t.version,this.Bt=t.Bt,this.zt=t.zt,this.Jt=t.Jt,this._t=t._t,this.length=t.length}}class R{constructor(t){p.set(this,t),this.bitDepth=t.bitDepth,this.at=null,this.It=t.It,this.Lt=t.Lt,this.sampleRate=t.sampleRate}}const G={0:[S,S,S,S,S],16:[32,32,32,32,8],240:[T,T,T,T,T]},H=(t,e,s)=>8*((t+s)%e+e)*(1<<(t+s)/e)-8*e*(e/8|0);for(let ie=2;ie<15;ie++)G[ie<<4]=[32*ie,H(ie,4,0),H(ie,4,-1),H(ie,8,4),H(ie,8,0)];const V="bands ",K=" to 31",q={0:V+4+K,16:V+8+K,32:V+12+K,48:V+16+K},Q="Intensity stereo ",Z=", MS stereo ",X="on",tt="off",et={0:{description:M},2:{description:"Layer III",kt:1,Pt:{0:Q+tt+Z+tt,16:Q+X+Z+tt,32:Q+tt+Z+X,48:Q+X+Z+X},Yt:{jt:2,At:1152},Nt:{jt:4,At:576}},4:{description:"Layer II",kt:1,Pt:q,At:1152,Yt:{jt:1},Nt:{jt:4}},6:{description:"Layer I",kt:4,Pt:q,At:384,Yt:{jt:0},Nt:{jt:3}}},st="MPEG Version ",it="ISO/IEC ",rt={0:{description:st+"2.5 (later extension of MPEG 2)",Wt:"v2",Dt:{0:11025,4:12e3,8:W,12:M}},8:{description:M},16:{description:`${st}2 (${it}13818-3)`,Wt:"v2",Dt:{0:j,4:Y,8:N,12:M}},24:{description:`${st}1 (${it}11172-3)`,Wt:"v1",Dt:{0:k,4:L,8:P,12:M}}},nt={0:x,1:A},ht={0:A,1:"50/15 ms",2:M,3:"CCIT J.17"},at={0:{It:2,description:z},64:{It:2,description:"joint "+z},128:{It:2,description:"dual channel"},192:{It:1,description:B}};class ot extends R{static*ct(t,e,s){const i={},r=yield*D.vt(t,e,s);r&&(yield*t.xt(r.length,s),t.yt(r.length));const n=yield*t.xt(4,s),h=l(n.subarray(0,4)),a=e.ct(h);if(a)return new ot(a);if(255!==n[0]||n[1]<224)return null;const o=rt[24&n[1]];if(o.description===M)return null;const c=6&n[1];if(et[c].description===M)return null;const d={...et[c],...et[c][o.Wt]};if(i.Rt=o.description,i.Gt=d.description,i.At=d.At,i.Ht=nt[1&n[1]],i.length=4,i.at=G[240&n[2]][d.jt],i.at===T)return null;if(i.sampleRate=o.Dt[12&n[2]],i.sampleRate===M)return null;if(i.kt=2&n[2]&&d.kt,i.Vt=!!(1&n[2]),i.frameLength=Math.floor(125*i.at*i.At/i.sampleRate+i.kt),!i.frameLength)return null;const u=192&n[3];if(i.Lt=at[u].description,i.It=at[u].It,i.Kt=d.Pt[48&n[3]],i.qt=!!(8&n[3]),i.Qt=!!(4&n[3]),i.Zt=ht[3&n[3]],i.Zt===M)return null;i.bitDepth=16;const{length:U,frameLength:f,At:m,...p}=i;return e.dt(h,i,p),new ot(i)}constructor(t){super(t),this.at=t.at,this.Zt=t.Zt,this.kt=t.kt,this.qt=t.qt,this.Qt=t.Qt,this.Vt=t.Vt,this.Gt=t.Gt,this.Kt=t.Kt,this.Rt=t.Rt,this.Ht=t.Ht}}class ct extends b{static*Ut(t,e,s){return yield*super.Ut(ot,ct,t,e,s)}constructor(t,e,s){super(t,e,s)}}class dt extends w{constructor(t,e,s){super(t,e),this.ft=ct,this.bt=ot,s(this.Xt)}get Xt(){return"mpeg"}*te(){return yield*this.wt()}}const lt={0:"MPEG-4",8:"MPEG-2"},ut={0:"valid",2:T,4:T,6:T},Ut={0:x,1:A},ft={0:"AAC Main",64:"AAC LC (Low Complexity)",128:"AAC SSR (Scalable Sample Rate)",192:"AAC LTP (Long Term Prediction)"},mt={0:96e3,4:88200,8:64e3,12:L,16:k,20:P,24:Y,28:j,32:N,36:12e3,40:11025,44:W,48:7350,52:M,56:M,60:"frequency is written explicitly"},pt={0:{It:0,description:"Defined in AOT Specific Config"},64:{It:1,description:B},128:{It:2,description:E(2,v[0][0])},192:{It:3,description:E(3,v[1][3])},256:{It:4,description:E(4,v[1][3],v[3][4])},320:{It:5,description:E(5,v[1][3],v[3][0])},384:{It:6,description:E(6,v[1][3],v[3][0],C)},448:{It:8,description:E(8,v[1][3],v[2][0],v[3][0],C)}};class yt extends R{static*ct(t,e,s){const i={},r=yield*t.xt(7,s),n=l([r[0],r[1],r[2],252&r[3]|3&r[6]]),h=e.ct(n);if(h)Object.assign(i,h);else{if(255!==r[0]||r[1]<240)return null;if(i.Rt=lt[8&r[1]],i.Gt=ut[6&r[1]],i.Gt===T)return null;const t=1&r[1];i.Ht=Ut[t],i.length=t?7:9,i.ee=192&r[2],i.se=60&r[2];const s=2&r[2];if(i.profile=ft[i.ee],i.sampleRate=mt[i.se],i.sampleRate===M)return null;i.Vt=!!s,i.ie=448&(r[2]<<8|r[3]),i.Lt=pt[i.ie].description,i.It=pt[i.ie].It,i.Qt=!!(32&r[3]),i.re=!!(8&r[3]),i.ne=!!(8&r[3]),i.he=!!(4&r[3]),i.bitDepth=16,i.At=1024,i.ae=3&r[6];const{length:h,ie:a,ee:o,se:c,frameLength:d,At:l,ae:u,...U}=i;e.dt(n,i,U)}if(i.frameLength=8191&(r[3]<<11|r[4]<<3|r[5]>>5),!i.frameLength)return null;const a=2047&(r[5]<<6|r[6]>>2);return i.oe=2047===a?"VBR":a,new yt(i)}constructor(t){super(t),this.ne=t.ne,this.he=t.he,this.oe=t.oe,this.re=t.re,this.Qt=t.Qt,this.Vt=t.Vt,this.Gt=t.Gt,this.length=t.length,this.Rt=t.Rt,this.ae=t.ae,this.profile=t.profile,this.Ht=t.Ht}get ce(){const t=p.get(this),e=t.ee+64<<5|t.se<<5|t.ie>>3,s=new Uint8Array(2);return new DataView(s.buffer).setUint16(0,e,!1),s}}class wt extends b{static*Ut(t,e,s){return yield*super.Ut(yt,wt,t,e,s)}constructor(t,e,s){super(t,e,s)}}class gt extends w{constructor(t,e,s){super(t,e),this.ft=wt,this.bt=yt,s(this.Xt)}get Xt(){return"aac"}*te(){return yield*this.wt()}}class bt extends b{static de(t){return(t[t.length-2]<<8)+t[t.length-1]}static le(t){return bt.de(t)===(t=>{const e=t.length,s=e-16;let i=0,r=0;for(;r<=s;)i^=t[r++]<<8|t[r++],i=a[15][i>>8]^a[14][255&i]^a[13][t[r++]]^a[12][t[r++]]^a[11][t[r++]]^a[10][t[r++]]^a[9][t[r++]]^a[8][t[r++]]^a[7][t[r++]]^a[6][t[r++]]^a[5][t[r++]]^a[4][t[r++]]^a[3][t[r++]]^a[2][t[r++]]^a[1][t[r++]]^a[0][t[r++]];for(;r!==e;)i=(255&i)<<8^a[0][i>>8^t[r++]];return i})(t.subarray(0,-2))}constructor(t,e,s){e.ue=s,e.Ue=bt.de(t),super(e,t,p.get(e).At)}}const Mt="get from STREAMINFO metadata block",Tt={0:"Fixed",1:"Variable"},St={0:M,16:192};for(let ie=2;ie<16;ie++)St[ie<<4]=ie<6?576*2**(ie-2):2**ie;const At={0:Mt,1:88200,2:176400,3:192e3,4:W,5:N,6:j,7:Y,8:P,9:k,10:L,11:96e3,15:T},xt={0:{It:1,description:B},16:{It:2,description:E(2,v[0][0])},32:{It:3,description:E(3,v[0][1])},48:{It:4,description:E(4,v[1][0],v[3][0])},64:{It:5,description:E(5,v[1][1],v[3][0])},80:{It:6,description:E(6,v[1][1],C,v[3][0])},96:{It:7,description:E(7,v[1][1],C,v[3][4],v[2][0])},112:{It:8,description:E(8,v[1][1],C,v[3][0],v[2][0])},128:{It:2,description:z+" (left, diff)"},144:{It:2,description:z+" (diff, right)"},160:{It:2,description:z+" (avg, diff)"},176:M,192:M,208:M,224:M,240:M},$t={0:Mt,2:8,4:12,6:M,8:16,10:20,12:24,14:M};class Ot extends R{static fe(t){if(t[0]>254)return null;if(t[0]<128)return{value:t[0],length:1};let e=1;for(let n=64;n&t[0];n>>=1)e++;let s=e-1,i=0,r=0;for(;s>0;r+=6,s--){if(128!=(192&t[s]))return null;i|=(63&t[s])<<r}return i|=(t[s]&127>>e)<<r,{value:i,length:e}}static me(t,e){const s={*xt(){return t}};return Ot.ct(s,e,0).next().value}static*ct(t,e,s){let i=yield*t.xt(6,s);if(255!==i[0]||248!==i[1]&&249!==i[1])return null;const r={},n=l(i.subarray(0,4)),a=e.ct(n);if(a)Object.assign(r,a);else{if(r.pe=1&i[1],r.ye=Tt[r.pe],r.we=240&i[2],r.se=15&i[2],r.blockSize=St[r.we],r.blockSize===M)return null;if(r.sampleRate=At[r.se],r.sampleRate===T)return null;if(1&i[3])return null;const t=xt[240&i[3]];if(t===M)return null;if(r.It=t.It,r.Lt=t.description,r.bitDepth=$t[14&i[3]],r.bitDepth===M)return null}r.length=5,i=yield*t.xt(r.length+8,s);const o=Ot.fe(i.subarray(4));if(!o)return null;if(r.pe?r.ge=o.value:r.frameNumber=o.value,r.length+=o.length,96===r.we?(i.length<r.length&&(i=yield*t.xt(r.length,s)),r.blockSize=i[r.length-1]+1,r.length+=1):112===r.we&&(i.length<r.length&&(i=yield*t.xt(r.length,s)),r.blockSize=(i[r.length-1]<<8)+i[r.length]+1,r.length+=2),r.At=r.blockSize,12===r.se?(i.length<r.length&&(i=yield*t.xt(r.length,s)),r.sampleRate=1e3*i[r.length-1],r.length+=1):13===r.se?(i.length<r.length&&(i=yield*t.xt(r.length,s)),r.sampleRate=(i[r.length-1]<<8)+i[r.length],r.length+=2):14===r.se&&(i.length<r.length&&(i=yield*t.xt(r.length,s)),r.sampleRate=10*((i[r.length-1]<<8)+i[r.length]),r.length+=2),i.length<r.length&&(i=yield*t.xt(r.length,s)),r.be=i[r.length-1],r.be!==(t=>{let e=0;const s=t.length;for(let i=0;i!==s;i++)e=h[e^t[i]];return e})(i.subarray(0,r.length-1)))return null;if(!a){const{pe:t,frameNumber:s,ge:i,At:h,se:a,we:o,be:c,length:d,...l}=r;e.dt(n,r,l)}return new Ot(r)}constructor(t){super(t),this.Ue=null,this.ye=t.ye,this.blockSize=t.blockSize,this.frameNumber=t.frameNumber,this.ge=t.ge,this.ue=null}}class Ft extends w{constructor(t,e){super(t,e),this.ft=bt,this.bt=Ot}get Xt(){return"flac"}*Me(t){const e=yield*this.lt.xt(2,0),s=e.length-2;for(;t<s;){if(255===e[t]){const s=e[t+1];if(248===s||249===s)break;255!==s&&t++}t++}return t}*te(){for(;;){const t=yield*Ot.ct(this.lt,this.et,0);if(t){let e=p.get(t).length+2;for(;e<=524288;){if(this.lt.gt||(yield*Ot.ct(this.lt,this.et,e))){let s=yield*this.lt.xt(e);if(this.lt.gt||(s=s.subarray(0,e)),bt.le(s)){const i=new bt(s,t);return this.et.enable(),this.lt.yt(e),this.lt.Mt(i),i}}e=yield*this.Me(e+1)}this.lt.Tt(`Unable to sync FLAC frame after searching ${e} bytes.`),this.lt.yt(e)}else this.lt.yt(yield*this.Me(1))}}Te(t){return 0===t.Se?(this.et.enable(),this.Ae=t.data.subarray(13)):1===t.Se||(t.xe=y.get(t).$e.map((t=>{const e=Ot.me(t,this.et);if(e)return new bt(t,e,this.Ae);this.lt.Tt("Failed to parse Ogg FLAC frame","Skipping invalid FLAC frame")})).filter((t=>!!t))),t}}class vt{static*ct(t,e,s){const i={};let r=yield*t.xt(28,s);if(79!==r[0]||103!==r[1]||103!==r[2]||83!==r[3])return null;if(i.Oe=r[4],248&r[5])return null;i.Fe=!!(4&r[5]),i.ve=!!(2&r[5]),i.Ce=!!(1&r[5]);const n=new DataView(Uint8Array.from(r.subarray(0,28)).buffer);try{i.Be=n.getBigInt64(6,!0)}catch{}i.ze=n.getInt32(14,!0),i.Se=n.getInt32(18,!0),i.Je=n.getInt32(22,!0);const h=r[26];i.length=h+27,r=yield*t.xt(i.length,s),i.frameLength=0,i._e=[],i.Ee=Uint8Array.from(r.subarray(27,i.length));for(let a=0,o=0;a<h;a++){const t=i.Ee[a];i.frameLength+=t,o+=t,255===t&&a!==h-1||(i._e.push(o),o=0)}return new vt(i)}constructor(t){p.set(this,t),this.Be=t.Be,this.Ce=t.Ce,this.ve=t.ve,this.Fe=t.Fe,this._e=t._e,this.Se=t.Se,this.Je=t.Je,this.ze=t.ze}}class Ct extends g{static*Ut(t,e,s){const i=yield*vt.ct(t,e,s);if(i){const e=p.get(i).frameLength,s=p.get(i).length,r=s+e,n=(yield*t.xt(r,0)).subarray(0,r),h=n.subarray(s,r);return new Ct(i,h,n)}return null}constructor(t,e,s){super(t,e),y.get(this).length=s.length,this.xe=[],this.Ie=s,this.Be=t.Be,this.Le=t.Je,this.duration=0,this.Ce=t.Ce,this.ve=t.ve,this.Fe=t.Fe,this.Se=t.Se,this.At=0,this.ze=t.ze}}class Bt extends b{constructor(t,e){super(e,t,e.ke*e.Pe/1e3*e.sampleRate)}}const zt={0:I.slice(0,2),1:I},Jt="SILK-only",_t="CELT-only",Et="Hybrid",It="narrowband",Lt="medium-band",kt="wideband",Pt="super-wideband",Yt="fullband",jt={0:{mode:Jt,Ye:It,ke:10},8:{mode:Jt,Ye:It,ke:20},16:{mode:Jt,Ye:It,ke:40},24:{mode:Jt,Ye:It,ke:60},32:{mode:Jt,Ye:Lt,ke:10},40:{mode:Jt,Ye:Lt,ke:20},48:{mode:Jt,Ye:Lt,ke:40},56:{mode:Jt,Ye:Lt,ke:60},64:{mode:Jt,Ye:kt,ke:10},72:{mode:Jt,Ye:kt,ke:20},80:{mode:Jt,Ye:kt,ke:40},88:{mode:Jt,Ye:kt,ke:60},96:{mode:Et,Ye:Pt,ke:10},104:{mode:Et,Ye:Pt,ke:20},112:{mode:Et,Ye:Yt,ke:10},120:{mode:Et,Ye:Yt,ke:20},128:{mode:_t,Ye:It,ke:2.5},136:{mode:_t,Ye:It,ke:5},144:{mode:_t,Ye:It,ke:10},152:{mode:_t,Ye:It,ke:20},160:{mode:_t,Ye:kt,ke:2.5},168:{mode:_t,Ye:kt,ke:5},176:{mode:_t,Ye:kt,ke:10},184:{mode:_t,Ye:kt,ke:20},192:{mode:_t,Ye:Pt,ke:2.5},200:{mode:_t,Ye:Pt,ke:5},208:{mode:_t,Ye:Pt,ke:10},216:{mode:_t,Ye:Pt,ke:20},224:{mode:_t,Ye:Yt,ke:2.5},232:{mode:_t,Ye:Yt,ke:5},240:{mode:_t,Ye:Yt,ke:10},248:{mode:_t,Ye:Yt,ke:20}};class Nt extends R{static me(t,e,s){const i={};if(i.It=t[9],i.je=t[18],i.length=0!==i.je?21+i.It:19,t.length<i.length)throw Error("Out of data while inside an Ogg Page");const r=3&e[0],n=3===r?2:1,h=l(t.subarray(0,i.length))+l(e.subarray(0,n)),a=s.ct(h);if(a)return new Nt(a);if("OpusHead"!==h.substr(0,8))return null;if(1!==t[8])return null;i.data=Uint8Array.from(t.subarray(0,i.length));const o=new DataView(i.data.buffer);if(i.bitDepth=16,i.Ne=o.getUint16(10,!0),i.We=o.getUint32(12,!0),i.sampleRate=L,i.De=o.getInt16(16,!0),i.je in zt&&(i.Lt=zt[i.je][i.It-1],!i.Lt))return null;0!==i.je&&(i.Re=t[19],i.Ge=t[20],i.He=[...t.subarray(21,i.It+21)]);const c=jt[248&e[0]];switch(i.mode=c.mode,i.Ye=c.Ye,i.ke=c.ke,r){case 0:i.Pe=1;break;case 1:case 2:i.Pe=2;break;case 3:i.Ve=!!(128&e[1]),i.Ke=!!(64&e[1]),i.Pe=63&e[1];break;default:return null}const{length:d,data:u,je:U,...f}=i;return s.dt(h,i,f),new Nt(i)}constructor(t){super(t),this.data=t.data,this.Ye=t.Ye,this.je=t.je,this.He=t.He,this.Ge=t.Ge,this.Pe=t.Pe,this.ke=t.ke,this.Ke=t.Ke,this.We=t.We,this.Ve=t.Ve,this.mode=t.mode,this.De=t.De,this.Ne=t.Ne,this.Re=t.Re}}class Wt extends w{constructor(t,e){super(t,e),this.ft=Bt,this.bt=Nt,this.qe=null}get Xt(){return"opus"}Te(t){return 0===t.Se?(this.et.enable(),this.qe=t.data):1===t.Se||(t.xe=y.get(t).$e.map((t=>{const e=Nt.me(this.qe,t,this.et);if(e)return new Bt(t,e);this.lt.Qe("Failed to parse Ogg Opus Header","Not a valid Ogg Opus file")}))),t}}class Dt extends b{constructor(t,e,s){super(e,t,s)}}const Rt={};for(let ie=0;ie<8;ie++)Rt[ie+6]=2**(6+ie);class Gt extends R{static me(t,e){if(t.length<30)throw Error("Out of data while inside an Ogg Page");const s=l(t.subarray(0,30)),i=e.ct(s);if(i)return new Gt(i);const r={length:30};if("vorbis"!==s.substr(0,7))return null;r.data=Uint8Array.from(t.subarray(0,30));const n=new DataView(r.data.buffer);if(r.version=n.getUint32(7,!0),0!==r.version)return null;if(r.It=t[11],r.Lt=I[r.It-1]||"application defined",r.sampleRate=n.getUint32(12,!0),r.Ze=n.getInt32(16,!0),r.Xe=n.getInt32(20,!0),r.ts=n.getInt32(24,!0),r.es=Rt[(240&t[28])>>4],r.ss=Rt[15&t[28]],r.ss>r.es)return null;if(1!==t[29])return null;r.bitDepth=32;{const{length:t,data:i,version:n,...h}=r;e.dt(s,r,h)}return new Gt(r)}constructor(t){super(t),this.Ze=t.Ze,this.ts=t.ts,this.Xe=t.Xe,this.ss=t.ss,this.es=t.es,this.data=t.data,this.rs=null,this.ns=null}}class Ht extends w{constructor(t,e){super(t,e),this.ft=Dt,this.qe=null,this.hs={count:0},this.os=0,this.cs=0}get Xt(){return"vorbis"}Te(t){const e=y.get(t).$e;return 0===t.Se?(this.et.enable(),this.qe=t.data):1===t.Se?e[1]&&(this.ds=e[0],this.ls=e[1],this.hs=this.us(e[1])):t.xe=e.map((t=>{const e=Gt.me(this.qe,this.et);if(e)return e.rs=this.ds,e.ns=this.ls,new Dt(t,e,this.Us(t,e));this.lt.Qe("Failed to parse Ogg Vorbis Header","Not a valid Ogg Vorbis file")})),t}Us(t,e){const s=t[0]>>1,i=this.hs[s&this.hs.mask];i&&(this.os=s&this.hs.fs?e.es:e.ss),this.cs=i?e.es:e.ss;const r=this.os+this.cs>>2;return this.os=this.cs,r}us(t){const e=new f(t),s="Failed to read Vorbis stream",i=", failed to parse vorbis modes";let r,n={count:0};for(;1!=(1&e.read(1)););for(;n.count<64&&e.position>0;){const t=U(e.read(8));if(t in n&&(1!==n.count||0!==t))throw this.lt.Qe("received duplicate mode mapping"+i),Error(s);let h=0;for(;0===e.read(8)&&h++<3;);if(4!==h){if(1+((126&U(r))>>1)!==n.count)throw this.lt.Qe("mode count did not match actual modes"+i),Error(s);break}r=e.read(7),n[t]=1&r,e.position+=6,n.count++}return n.mask=(1<<Math.log2(n.count))-1,n.fs=1+(1|n.mask),n}}class Vt extends w{constructor(t,e,s){super(t,e),this.ps=s,this.ft=Ct,this.bt=vt,this.ys=null,this.ws=new Uint8Array,this.gs=0}get Xt(){return this.ys||""}bs(t,e){this.ys!==t&&(this.Ms=new e(this.lt,this.et),this.ys=t,this.ps(t))}Ts({data:t}){const e=l(t.subarray(0,8));switch(e){case"fishead\0":case"fisbone\0":case"index\0\0\0":return!1;case"OpusHead":return this.bs("opus",Wt),!0;case/^\x7fFLAC/.test(e)&&e:return this.bs("flac",Ft),!0;case/^\x01vorbis/.test(e)&&e:return this.bs("vorbis",Ht),!0}}Ss(t){t.Se!==this.gs+1&&this.gs>1&&t.Se>1&&this.lt.Tt("Unexpected gap in Ogg Page Sequence Number.",`Expected: ${this.gs+1}, Got: ${t.Se}`),this.gs=t.Se}*te(){const t=yield*this.wt(!0);this.Ss(t);const e=y.get(t),{Ee:s,_e:i}=p.get(e.St);let r=0;if(e.$e=i.map((e=>t.data.subarray(r,r+=e))),255===s[s.length-1]?this.ws=d(this.ws,e.$e.pop()):this.ws.length&&(e.$e[0]=d(this.ws,e.$e[0]),this.ws=new Uint8Array),this.ys||this.Ts(t)){const e=this.Ms.Te(t);return this.lt.Mt(e),e}}}const Kt=()=>{};class qt{constructor(t,{As:e,xs:s,$s:i=!1,Os:r=!0}={}){this.Fs=t,this.ps=s||Kt,this.X=e,this.vs=i,this.Cs=r?c:Kt,this.Bs=this.zs(),this.Bs.next()}get Xt(){return this.Ms.Xt}*flush(){this.gt=!0;for(let t=this.Bs.next();t.value;t=this.Bs.next())yield t.value;this.gt=!1,this.Bs=this.zs(),this.Bs.next()}*Js(t){for(let e=this.Bs.next(t);e.value;e=this.Bs.next())yield e.value}parseAll(t){return[...this.Js(t),...this.flush()]}*zs(){if(this.et=new m(this.X),this.Fs.match(/aac/))this.Ms=new gt(this,this.et,this.ps);else if(this.Fs.match(/mpeg/))this.Ms=new dt(this,this.et,this.ps);else if(this.Fs.match(/flac/))this.Ms=new Ft(this,this.et,this.ps);else{if(!this.Fs.match(/ogg/))throw Error("Unsupported Codec "+mimeType);this.Ms=new Vt(this,this.et,this.ps)}for(this._s=0,this.Es=0,this.Is=0,this.Ls=0,this.ks=0,this.Ps=void 0,this.Ys=new Uint8Array(0);;){const t=yield*this.Ms.te();t&&(yield t)}}*xt(t=0,e=0){let s;for(;this.Ys.length<=t+e;){if(s=yield,this.gt)return this.Ys.subarray(e);s&&(this.Is+=s.length,this.Ys=d(this.Ys,s))}return this.Ys.subarray(e)}yt(t){this.Es+=t,this.Ys=this.Ys.subarray(t)}js(t){this.Ps=t.St.sampleRate,t.St.at=8*Math.round(t.data.length/t.duration),t.frameNumber=this._s++,t.$t=this.Ls,t.Ot=this.ks,t.Ft=this.ks/this.Ps*1e3,t.Le=this.Cs(t.data),this.et.nt(t.St.at,t.Ft),this.Ls+=t.data.length,this.ks+=t.At}Mt(t){t.xe?(t.xe.forEach((e=>{t.duration+=e.duration,t.At+=e.At,this.js(e)})),t.Ot=this.ks,t.Ft=this.ks/this.Ps*1e3||0,t.$t=this.Ls):this.js(t)}Ns(t,e){if(this.vs){const s=["codec: "+this.Xt,"inputMimeType: "+this.Fs,"readPosition: "+this.Es,"totalBytesIn: "+this.Is,"totalBytesOut: "+this.Ls],i=Math.max(...s.map((t=>t.length)));e.push("--stats--"+"-".repeat(i-9),...s,"-".repeat(i)),t("codec-parser",e.reduce(((t,e)=>t+"\n "+e),""))}}Tt(...t){this.Ns(console.warn,t)}Qe(...t){this.Ns(console.error,t)}}function Qt(t){function e(t){console.log(t)}function s(t){console.error(t)}function i(){}for(var r=new Uint8Array(123),n=25;n>=0;--n)r[48+n]=52+n,r[65+n]=n,r[97+n]=26+n;r[43]=62,r[47]=63,Qt.p||Object.defineProperty(Qt,"p",{get:()=>String.raw`dynEncode00d9…/qõ¤æo-®‰Çr‘˜_¾.¥ò•>?—= ‚´Z^¨E¨_lLK˜Ó½Lgº½ï4É
xø#~ÊQʊz~+âWÖÞ,ɲ^ˆúÙ¹@¸Ëò°ÈÐúWŠØò­hð6þr§·Ç¼FîC"Óàr$¼Aé€_µåªÝ âWïä'—xÜkÈÀ¼ÐäYËÖû½GÐ%¡ÜS»¢üj(µÛÚýÀyla%”šH;w»ë*û1œ¬XÑî2n¼pÒ¤ÉOÕã}Ñ.qšßO9äÊëÅBN}d鉡„sÐÅW´x”—ÀªÐBoÂix>å©üÁ9úßQôÆ­ÞnH„6Áøïv±véáÖ÷–™¿[Zö,üâJ

@@ -84,3 +84,3 @@ ˆìî>Æ´iƒ³âGŠ*>$Æ3 6=}Pzaò ý€ÌŒz¨ÇKieZh&-

‘ð³€mùÔNÖæÜÉÝ:dI«ï(í”d´öÃæõp£½JÉâ¦áÍýOŸ=M«ëkm¦î¤õÊæãå¾hÛ~«’Ûª%‰K¬ý$ÛÂy0,Åôðñ¦ðb+™©>~ã’tDq\8þ5=} ë&T?‰p‘dz‚™FÂÒûÑgd·Gr«̢ĭæ°Û_ʂ܂• ÍúÑÍtËü½@v·‰ëØ^Ѫϗ¼ÜÓ¨;o¾Uzþ{¨™Xy˜nxûXÂòeÑxø(õø¬˜T¯‹Úgä†ÚS}½´º0s%Íþϛ=}Eüx,¨54riüi§ÌÙéæÏ\ӛ =}ýádž:;tsq¢ÅAZ8 ñ¡æ­ïSl¢L´Ñ~Yç5ç†_ðûBó4Y¸úGk÷ÃVhB?4’ÔUèÉÛ娹 !ô³ZŸ$ZK‰ñ{¹}󆠵Ñâ»ýRmûÂE?TiŒËÒ2€Khî½/3óOøC´´2ïJ¿5Uk$VJʎp¬8 ]<“»xÿÖz¿ï؎¿ÈÍø‹•’fÞ¸/×­™Ø«ÏDÀÔê$;ÍÊøþ–„W@
‹¿†ÍhŒ¯¿óä„Õ“º„?•Æd§}…ò’Lã+ %B÷¬ÿÈeaÁö¬7kýÕQPʹ«M~>sFw<ª "A1U!ýÃþöÈ|e¬e©æqob)ÂãÒ¾ûf/pCqH3HšEôöt6?ºÜGæ–ë–mËËÀ£= sO6©ÉM´K¤ŸG‘ÇS3]YáöuŠöJ±52wÛ)zë*^!Ç)/CCMN_3l ËŲ]›=}Ϋk„Dˆ=}±Œ(Àö¥„ûóPÅH¸°ÎVO,7ºP.Ó3WG؆Ę¡Ç±§]XlX(æÒLÆòx=}ˆ¢´-ÑB®f8q³ÈÓùKJÅ£]èl¸$VTb?Ætòjj*ŠÜ띢œ+= ò‹ï¥!§ws).zJ;¤±OÄ-ىÚY1Ix¹!=My€!-(^S=MÙµíUgù3QЊyÒ[áz÷Ñ= [ܙÄ-¹N¨4›nÈážTYëªà)î…ðy›k±A¹Ø€ùغêށ„:"-hIÙNñoaÑJÁØÙ`});var h,a,o,c,d,l,u,U,f=new TextDecoder("utf8"),m={Ns:{},Ws:[null,[],[]],Ds(t,i){var r=m.Ws[t];0===i||10===i?((1===t?e:s)(((t,e,s)=>{for(var i=0;t[i]&&!(i>=NaN);)++i;return f.decode(t.subarray?t.subarray(0,i):new Uint8Array(t.slice(0,i)))})(r)),r.length=0):r.push(i)},Rs:void 0,get:()=>(m.Rs+=4,h[m.Rs-4>>2]),Gs(t){var e=((t,e)=>{if(!t)return"";for(var s=t+void 0,i=t;!(i>=s)&&a[i];)++i;return f.decode(a.subarray(t,i))})(t);return e},Hs:(t,e)=>t},p={a:{d(t,e,s){a.copyWithin(t,e,e+s)},c(t){a.length,(t=>{throw"OOM"})()},b:t=>0,a(t,e,s,i){var r=m.Vs(t),n=m.Ks(r,e,s);return h[i>>2]=n,0},e(t,e,s,i,r){}}};this.o=e=>{t.o(Qt,e)},this.u=()=>t.u(Qt),this.instantiate=()=>(this.u().then((t=>WebAssembly.instantiate(t,p))).then((t=>{var e,s=t.exports;c=s.h,d=s.i,l=s.j,u=s.k,U=s.l,s.m,e=s.f.buffer,o=e,h=new Int32Array(e),a=new Uint8Array(e),(t=>{t.g()})(s),i()})),this.ready=new Promise((t=>{i=t})).then((()=>{this.L=o,this._malloc=d,this._free=c,this._create_decoder=l,this._destroy_decoder=u,this._decode_frame=U})),this)}function Zt(){return this.qs=()=>(new this.Qs).instantiate(this.Zs,this.Xs).then((t=>{this.ti=t,this.ei=0,this.si=0,this.Js=0,this.ii=this.ti.C(1,Uint32Array),this.ks=this.ti.C(1,Uint32Array),this.ri=this.ti.C(1,Uint32Array),this.ni=this.ti.C(1,Uint32Array),this.hi=this.ti.C(1,Uint32Array),this.ai=this.ti.C(1,Uint32Array),this.oi=this.ti.C(1,Uint32Array),this.ci=this.ti.C(1,Uint32Array),this.di=this.ti.p._create_decoder(this.ii.J,this.ks.J,this.ri.J,this.ni.J,this.hi.J,this.ai.J,this.oi.J,this.ci.J)})),Object.defineProperty(this,"ready",{O:!0,get:()=>this.li}),this.reset=()=>(this.free(),this.qs()),this.free=()=>{this.ti.p._destroy_decoder(this.di),this.ti.free()},this.ui=t=>{if(!(t instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+typeof t);const e=this.ti.C(t.length,Uint8Array,!1);e.I.set(t),this.ti.p._decode_frame(this.di,e.J,e._);let s,i=[];this.oi.I[0]&&i.push("Error: "+this.ti.P(this.oi.I[0])),this.ci.I[0]&&i.push("State: "+this.ti.P(this.ci.I[0])),i.length&&(s=i.join("; "),console.error("@wasm-audio-decoders/flac: \n\t"+i.join("\n\t")));const r=new Float32Array(this.ti.p.L,this.hi.I[0],this.ai.I[0]),n={error:s,outputBuffer:this.ti.v(r,this.ii.I[0],this.ni.I[0]),samplesDecoded:this.ni.I[0]};return this.ti.p._free(this.hi.I[0]),this.ai.I[0]=0,this.ni.I[0]=0,n},this.decodeFrames=t=>{let e=[],s=[],i=0;for(let r=0;r<t.length;r++){let n=0;const h=t[r];for(;n<h.length;){const t=h.subarray(n,n+this.Ui);n+=t.length;const r=this.ui(t);e.push(r.outputBuffer),i+=r.samplesDecoded,r.error&&this.ti.Y(s,r.error,h.length,this.Js,this.ei,this.si),this.ei+=h.length,this.si+=r.samplesDecoded}this.Js++}return this.Qs.$(s,e,this.ii.I[0],i,this.ks.I[0],this.ri.I[0])},this.fi=Zt.R,this.Qs=Zt.N||s,this.Zs=Zt.W||Qt,this.Xs=Zt.D,this.Ui=524280,this.li=this.qs(),this}const Xt=Symbol();class te{constructor(){this.fs=t=>{if("flac"!==t)throw Error("@wasm-audio-decoders/flac does not support this codec "+t)},new s,this.qs(),this[Xt](Zt)}qs(){this.dt=new qt("audio/flac",{As:this.fs,$s:!1})}[Xt](t){if(this.di){const t=this.di;t.ready.then((()=>t.free()))}this.di=new t,this.li=this.di.ready}get ready(){return this.li}async reset(){return this.qs(),this.di.reset()}free(){this.di.free()}async decode(t){return this.di.decodeFrames([...this.dt.zs(t)].map((t=>t.data)))}async flush(){const t=this.di.decodeFrames([...this.dt.flush()].map((t=>t.data)));return await this.reset(),t}async decodeFile(t){const e=this.di.decodeFrames([...this.dt.parseAll(t)].map((t=>t.data)));return await this.reset(),e}async decodeFrames(t){return this.di.decodeFrames(t)}}class ee extends i{constructor(t){super(t,"flac-decoder",Zt,Qt)}async decodeFrames(t){return this.V("decodeFrames",t)}}class se extends te{constructor(){super(),super[Xt](ee)}async free(){super.free()}terminate(){this.di.terminate()}}r(te,"FLACDecoder"),r(se,"FLACDecoderWebWorker"),t.FLACDecoder=te,t.FLACDecoderWebWorker=se},"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@eshaz/web-worker")):"function"==typeof define&&define.amd?define(["exports","@eshaz/web-worker"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["flac-decoder"]={},t.Worker);
‹¿†ÍhŒ¯¿óä„Õ“º„?•Æd§}…ò’Lã+ %B÷¬ÿÈeaÁö¬7kýÕQPʹ«M~>sFw<ª "A1U!ýÃþöÈ|e¬e©æqob)ÂãÒ¾ûf/pCqH3HšEôöt6?ºÜGæ–ë–mËËÀ£= sO6©ÉM´K¤ŸG‘ÇS3]YáöuŠöJ±52wÛ)zë*^!Ç)/CCMN_3l ËŲ]›=}Ϋk„Dˆ=}±Œ(Àö¥„ûóPÅH¸°ÎVO,7ºP.Ó3WG؆Ę¡Ç±§]XlX(æÒLÆòx=}ˆ¢´-ÑB®f8q³ÈÓùKJÅ£]èl¸$VTb?Ætòjj*ŠÜ띢œ+= ò‹ï¥!§ws).zJ;¤±OÄ-ىÚY1Ix¹!=My€!-(^S=MÙµíUgù3QЊyÒ[áz÷Ñ= [ܙÄ-¹N¨4›nÈážTYëªà)î…ðy›k±A¹Ø€ùغêށ„:"-hIÙNñoaÑJÁØÙ`});var h,a,o,c,d,l,u,U,f=new TextDecoder("utf8"),m={Ws:{},Ds:[null,[],[]],Rs(t,i){var r=m.Ds[t];0===i||10===i?((1===t?e:s)(((t,e,s)=>{for(var i=0;t[i]&&!(i>=NaN);)++i;return f.decode(t.subarray?t.subarray(0,i):new Uint8Array(t.slice(0,i)))})(r)),r.length=0):r.push(i)},Gs:void 0,get:()=>(m.Gs+=4,h[m.Gs-4>>2]),Hs(t){var e=((t,e)=>{if(!t)return"";for(var s=t+void 0,i=t;!(i>=s)&&a[i];)++i;return f.decode(a.subarray(t,i))})(t);return e},Vs:(t,e)=>t},p={a:{d(t,e,s){a.copyWithin(t,e,e+s)},c(t){a.length,(t=>{throw"OOM"})()},b:t=>0,a(t,e,s,i){var r=m.Ks(t),n=m.qs(r,e,s);return h[i>>2]=n,0},e(t,e,s,i,r){}}};this.o=e=>{t.o(Qt,e)},this.u=()=>t.u(Qt),this.instantiate=()=>(this.u().then((t=>WebAssembly.instantiate(t,p))).then((t=>{var e,s=t.exports;c=s.h,d=s.i,l=s.j,u=s.k,U=s.l,s.m,e=s.f.buffer,o=e,h=new Int32Array(e),a=new Uint8Array(e),(t=>{t.g()})(s),i()})),this.ready=new Promise((t=>{i=t})).then((()=>{this.P=o,this.B=d,this.free=c,this.Qs=l,this.Zs=u,this.Xs=U})),this)}function Zt(){return this.ti=()=>(new this.ei).instantiate(this.si,this.ii).then((t=>{this.ri=t,this.ni=0,this.hi=0,this._s=0,this.ai=this.ri.C(1,Uint32Array),this.Ps=this.ri.C(1,Uint32Array),this.oi=this.ri.C(1,Uint32Array),this.ci=this.ri.C(1,Uint32Array),this.di=this.ri.C(1,Uint32Array),this.li=this.ri.C(1,Uint32Array),this.ui=this.ri.C(1,Uint32Array),this.Ui=this.ri.C(1,Uint32Array),this.fi=this.ri.p.Qs(this.ai._,this.Ps._,this.oi._,this.ci._,this.di._,this.li._,this.ui._,this.Ui._)})),Object.defineProperty(this,"ready",{O:!0,get:()=>this.mi}),this.reset=()=>(this.free(),this.ti()),this.free=()=>{this.ri.p.Zs(this.fi),this.ri.free()},this.pi=t=>{if(!(t instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+typeof t);const e=this.ri.C(t.length,Uint8Array,!1);e.L.set(t),this.ri.p.Xs(this.fi,e._,e.I);let s,i=[];this.ui.L[0]&&i.push("Error: "+this.ri.Y(this.ui.L[0])),this.Ui.L[0]&&i.push("State: "+this.ri.Y(this.Ui.L[0])),i.length&&(s=i.join("; "),console.error("@wasm-audio-decoders/flac: \n\t"+i.join("\n\t")));const r=new Float32Array(this.ri.p.P,this.di.L[0],this.li.L[0]),n={error:s,outputBuffer:this.ri.v(r,this.ai.L[0],this.ci.L[0]),samplesDecoded:this.ci.L[0]};return this.ri.p.free(this.di.L[0]),this.li.L[0]=0,this.ci.L[0]=0,n},this.decodeFrames=t=>{let e=[],s=[],i=0;for(let r=0;r<t.length;r++){let n=0;const h=t[r];for(;n<h.length;){const t=h.subarray(n,n+this.yi);n+=t.length;const r=this.pi(t);e.push(r.outputBuffer),i+=r.samplesDecoded,r.error&&this.ri.N(s,r.error,h.length,this._s,this.ni,this.hi),this.ni+=h.length,this.hi+=r.samplesDecoded}this._s++}return this.ei.$(s,e,this.ai.L[0],i,this.Ps.L[0],this.oi.L[0])},this.wi=Zt.G,this.ei=Zt.W||s,this.si=Zt.D||Qt,this.ii=Zt.R,this.yi=524280,this.mi=this.ti(),this}const Xt=Symbol();class te{constructor(){this.ps=t=>{if("flac"!==t)throw Error("@wasm-audio-decoders/flac does not support this codec "+t)},new s,this.ti(),this[Xt](Zt)}ti(){this.lt=new qt("audio/flac",{xs:this.ps,Os:!1})}[Xt](t){if(this.fi){const t=this.fi;t.ready.then((()=>t.free()))}this.fi=new t,this.mi=this.fi.ready}get ready(){return this.mi}async reset(){return this.ti(),this.fi.reset()}free(){this.fi.free()}async decode(t){return this.fi.decodeFrames([...this.lt.Js(t)].map((t=>t.data)))}async flush(){const t=this.fi.decodeFrames([...this.lt.flush()].map((t=>t.data)));return await this.reset(),t}async decodeFile(t){const e=this.fi.decodeFrames([...this.lt.parseAll(t)].map((t=>t.data)));return await this.reset(),e}async decodeFrames(t){return this.fi.decodeFrames(t)}}class ee extends i{constructor(t){super(t,"flac-decoder",Zt,Qt)}async decodeFrames(t){return this.K("decodeFrames",t)}}class se extends te{constructor(){super(),super[Xt](ee)}async free(){super.free()}terminate(){this.fi.terminate()}}r(te,"FLACDecoder"),r(se,"FLACDecoderWebWorker"),t.FLACDecoder=te,t.FLACDecoderWebWorker=se},"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@eshaz/web-worker")):"function"==typeof define&&define.amd?define(["exports","@eshaz/web-worker"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["flac-decoder"]={},t.Worker);
//# sourceMappingURL=flac-decoder.min.js.map
{
"name": "@wasm-audio-decoders/flac",
"version": "0.1.5",
"version": "0.1.6",
"description": "Web Assembly streaming FLAC decoder",

@@ -51,5 +51,5 @@ "type": "module",

"dependencies": {
"@wasm-audio-decoders/common": "7.0.1",
"@wasm-audio-decoders/common": "8.0.0",
"codec-parser": "2.2.1"
}
}

@@ -262,9 +262,9 @@ /* **************************************************

this.HEAP = buffer;
this._malloc = _malloc;
this._free = _free;
this._create_decoder = _create_decoder;
this._destroy_decoder = _destroy_decoder;
this._decode_frame = _decode_frame;
this.malloc = _malloc;
this.free = _free;
this.create_decoder = _create_decoder;
this.destroy_decoder = _destroy_decoder;
this.decode_frame = _decode_frame;
});
return this;
}}

@@ -29,3 +29,3 @@ import { WASMAudioDecoderCommon } from "@wasm-audio-decoders/common";

this._decoder = this._common.wasm["_create_decoder"](
this._decoder = this._common.wasm.create_decoder(
this._channels.ptr,

@@ -55,3 +55,3 @@ this._sampleRate.ptr,

this.free = () => {
this._common.wasm["_destroy_decoder"](this._decoder);
this._common.wasm.destroy_decoder(this._decoder);

@@ -74,3 +74,3 @@ this._common.free();

this._common.wasm["_decode_frame"](this._decoder, input.ptr, input.len);
this._common.wasm.decode_frame(this._decoder, input.ptr, input.len);

@@ -112,3 +112,3 @@ let errorMessage = [],

this._common.wasm["_free"](this._outputBufferPtr.buf[0]);
this._common.wasm.free(this._outputBufferPtr.buf[0]);
this._outputBufferLen.buf[0] = 0;

@@ -115,0 +115,0 @@ this._samplesDecoded.buf[0] = 0;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc