/*! * Copyright 2021-2023 Ethan Halsall * https://github.com/eshaz/icecast-metadata-js * * This file is part of icecast-metadata-player. * * icecast-metadata-player free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * icecast-metadata-player distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see */ "use strict";(self.webpackChunkIcecastMetadataPlayer=self.webpackChunkIcecastMetadataPlayer||[]).push([[385],{209:(U,e,t)=>{t.d(e,{A:()=>a});var s=t(178);function a(){const U=Uint8Array,e=Float32Array;a.modules||Object.defineProperties(a,{modules:{value:new WeakMap},setModule:{value(U,e){a.modules.set(U,Promise.resolve(e))}},getModule:{value(U,e){let t=a.modules.get(U);return t||(e?t=WebAssembly.compile((0,s.D4)(e)):(e=U.wasm,t=a.inflateDynEncodeString(e).then((U=>WebAssembly.compile(U)))),a.modules.set(U,t)),t}},concatFloat32:{value(U,t){let s=new e(t),a=0,n=0;for(;a({errors:U,channelData:e,samplesDecoded:t,sampleRate:s,bitDepth:a})},getDecodedAudioMultiChannel:{value(U,e,t,s,n,r){let i,T,o=[];for(i=0;i(e=(0,s.D4)(e),new Promise((t=>{const s=String.raw`dynEncode0114db91da9bu‡*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$%& !"#`;a.getModule(a,s).then((U=>WebAssembly.instantiate(U,{}))).then((({exports:s})=>{const a=new Map(Object.entries(s)),n=a.get("puff"),r=a.get("memory").buffer,i=new U(r),T=new DataView(r);let o=a.get("__heap_base");const l=e.length,u=o;o+=4,T.setInt32(u,l,!0);const c=o;o+=l,i.set(e,c);const h=o;o+=4,T.setInt32(h,i.byteLength-o,!0),n(o,h,c,u),t(i.slice(o,o+T.getInt32(h,!0)))}))})))}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this.U}),this.getOutputChannels=(U,e,t)=>{let s=[],a=0;for(;a{const s=this.U.malloc(e.BYTES_PER_ELEMENT*U);return t&&this.t.add(s),{ptr:s,len:U,buf:new e(this.U.HEAP,s,U)}},this.free=()=>{this.t.forEach((U=>{this.U.free(U)})),this.t.clear()},this.codeToString=U=>{const e=[],t=new Uint8Array(this.U.HEAP);for(let s=t[U];0!==s;s=t[++U])e.push(s);return String.fromCharCode.apply(null,e)},this.addError=(U,e,t,s,a,n)=>{U.push({message:e,frameLength:t,frameNumber:s,inputBytes:a,outputSamples:n})},this.instantiate=(U,e)=>(e&&a.setModule(U,e),this.U=new U(a).instantiate(),this.t=new Set,this.U.ready.then((()=>this)))}},374:(U,e,t)=>{t.d(e,{A:()=>n});var s=t(761),a=t(209);class n extends((()=>globalThis.Worker||s)()){constructor(U,e,t,s){a.A.modules||new a.A;let n=a.A.modules.get(t);if(!n){let U,e="text/javascript",r=`'use strict';(${((U,e,t)=>{let s,a,n=new Promise((U=>{a=U}));self.onmessage=({data:{id:r,command:i,data:T}})=>{let o,l=n,u={id:r};"init"===i?(Object.defineProperties(U,{WASMAudioDecoderCommon:{value:e},EmscriptenWASM:{value:t},module:{value:T.module},isWebWorker:{value:!0}}),s=new U(T.options),a()):"free"===i?s.free():"ready"===i?l=l.then((()=>s.ready)):"reset"===i?l=l.then((()=>s.reset())):(Object.assign(u,s[i](Array.isArray(T)?T.map((U=>new Uint8Array(U))):new Uint8Array(T))),o=u.channelData?u.channelData.map((U=>U.buffer)):[]),l.then((()=>self.postMessage(u,o)))}}).toString()})(${t}, ${a.A}, ${s})`;try{U=void 0!==process.versions.node}catch{}n=U?`data:${e};base64,${Buffer.from(r).toString("base64")}`:URL.createObjectURL(new Blob([r],{type:e})),a.A.modules.set(t,n)}super(n,{name:e}),this.i=Number.MIN_SAFE_INTEGER,this.T=new Map,this.onmessage=({data:U})=>{const{id:e,...t}=U;this.T.get(e)(t),this.T.delete(e)},new s(a.A).getModule().then((e=>{this.postToDecoder("init",{module:e,options:U})}))}async postToDecoder(U,e){return new Promise((t=>{this.postMessage({command:U,id:this.i,data:e}),this.T.set(this.i++,t)}))}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally((()=>{this.terminate()}))}async reset(){await this.postToDecoder("reset")}}},0:(U,e,t)=>{t.d(e,{A:()=>s});const s=(U,e)=>{Object.defineProperty(U,"name",{value:e})}}}]); //# sourceMappingURL=icecast-metadata-player-1.17.3.common.min.js.map