/*! * 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([[968],{662:(U,e,t)=>{function s(){const U=Uint8Array,e=Float32Array;s.modules||Object.defineProperties(s,{modules:{value:new WeakMap},setModule:{value(U,e){s.modules.set(U,Promise.resolve(e))}},getModule:{value(U,e){let t=s.modules.get(U);return t||(e?t=WebAssembly.compile(s.decodeDynString(e)):(e=U.wasm,t=s.inflateDynEncodeString(e).then((U=>WebAssembly.compile(U)))),s.modules.set(U,t)),t}},concatFloat32:{value(U,t){let s=new e(t),r=0,n=0;for(;r({errors:U,channelData:e,samplesDecoded:t,sampleRate:s,bitDepth:r})},getDecodedAudioMultiChannel:{value(U,e,t,r,n,a){let i,T,o=[];for(i=0;i{let U,e,t,s=new Int32Array(256);for(U=0;U<256;U++){for(t=U<<24,e=8;e>0;--e)t=2147483648&t?t<<1^79764919:t<<1;s[U]=t}return s})()},decodeDynString:{value(e){let t,r,n,a=new U(e.length),i=parseInt(e.substring(11,13),16),T=256-i,o=!1,l=0,u=21,c=4294967295;for(;u0?r+T:r-i,c=c<<8^s.crc32Table[255&(c>>24^a[l++])]}else o=!0;for(t=0;t<=8;t+=2)n|=parseInt(e.substring(13+t,15+t),16)<<4*t;if(n!==c)throw new Error("WASM string decode failed crc32 validation");return a.subarray(0,l)}},inflateDynEncodeString:{value:e=>(e=s.decodeDynString(e),new Promise((t=>{const r=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$%& !"#`;s.getModule(s,r).then((U=>WebAssembly.instantiate(U,{}))).then((({exports:s})=>{const r=new Map(Object.entries(s)),n=r.get("puff"),a=r.get("memory").buffer,i=new U(a),T=new DataView(a);let o=r.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 d=o;o+=4,T.setInt32(d,i.byteLength-o,!0),n(o,d,c,u),t(i.slice(o,o+T.getInt32(d,!0)))}))})))}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this.U}),this.getOutputChannels=(U,e,t)=>{let s=[],r=0;for(;r{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,r,n)=>{U.push({message:e,frameLength:t,frameNumber:s,inputBytes:r,outputSamples:n})},this.instantiate=(U,e)=>(e&&s.setModule(U,e),this.U=new U(s).instantiate(),this.t=new Set,this.U.ready.then((()=>this)))}t.d(e,{Z:()=>s})},838:(U,e,t)=>{t.d(e,{Z:()=>n});var s=t(26),r=t(662);class n extends((()=>globalThis.Worker||s)()){constructor(U,e,t,s){r.Z.modules||new r.Z;let n=r.Z.modules.get(t);if(!n){let U,e="text/javascript",a=`'use strict';(${((U,e,t)=>{let s,r,n=new Promise((U=>{r=U}));self.onmessage=({data:{id:a,command:i,data:T}})=>{let o,l=n,u={id:a};"init"===i?(Object.defineProperties(U,{WASMAudioDecoderCommon:{value:e},EmscriptenWASM:{value:t},module:{value:T.module},isWebWorker:{value:!0}}),s=new U(T.options),r()):"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}, ${r.Z}, ${s})`;try{U=void 0!==process.versions.node}catch{}n=U?`data:${e};base64,${Buffer.from(a).toString("base64")}`:URL.createObjectURL(new Blob([a],{type:e})),r.Z.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(r.Z).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")}}},514:(U,e,t)=>{t.d(e,{$:()=>s});const s=(U,e)=>{Object.defineProperty(U,"name",{value:e})}}}]); //# sourceMappingURL=icecast-metadata-player-1.17.2.common.min.js.map