!function(t){self.webpackChunk=function(e,n){for(var i in n)t[i]=n[i];for(;e.length;)r[e.pop()]=1};var e={},r={0:1},n={};var i={11:function(){return{"./index_bg.js":{__wbindgen_throw:function(t,r){return e[10].exports.b(t,r)}}}}};function a(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.e=function(t){var e=[];return e.push(Promise.resolve().then((function(){r[t]||importScripts(a.p+""+t+".worker.js")}))),({1:[11]}[t]||[]).forEach((function(t){var r=n[t];if(r)e.push(r);else{var o,s=i[t](),u=fetch(a.p+""+{11:"d80733de3401ff78c096"}[t]+".module.wasm");if(s instanceof Promise&&"function"==typeof WebAssembly.compileStreaming)o=Promise.all([WebAssembly.compileStreaming(u),s]).then((function(t){return WebAssembly.instantiate(t[0],t[1])}));else if("function"==typeof WebAssembly.instantiateStreaming)o=WebAssembly.instantiateStreaming(u,s);else{o=u.then((function(t){return t.arrayBuffer()})).then((function(t){return WebAssembly.instantiate(t,s)}))}e.push(n[t]=o.then((function(e){return a.w[t]=(e.instance||e).exports})))}})),Promise.all(e)},a.m=t,a.c=e,a.d=function(t,e,r){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a.w={},a(a.s=1)}([function(t,e){t.exports={Router:({base:t="",routes:e=[]}={})=>({__proto__:new Proxy({},{get:(r,n,i)=>(r,...a)=>e.push([n.toUpperCase(),RegExp(`^${(t+r).replace(/(\/?)\*/g,"($1.*)?").replace(/\/$/,"").replace(/:(\w+)(\?)?(\.)?/g,"$2(?<$1>[^/]+)$2$3").replace(/\.(?=[\w(])/,"\\.").replace(/\)\.\?\(([^\[]+)\[\^/g,"?)\\.?($1(?<=\\.)[^\\.")}/*$`),a])&&i}),routes:e,async handle(t,...r){let n,i,a=new URL(t.url);for(var[o,s,u]of(t.query=Object.fromEntries(a.searchParams),e))if((o===t.method||"ALL"===o)&&(i=a.pathname.match(s)))for(var f of(t.params=i.groups,u))if(void 0!==(n=await f(t.proxy||t,...r)))return n}})}},function(t,e,r){"use strict";r.r(e),function(t){var e=r(0);const n=r(7),i=Object(e.Router)(),a={aac_96:{num:"8",gw:"AAC_96",mime:"audio/aac",ext:"3gp"},64:{num:"10",gw:"MP3_64",mime:"audio/mpeg",ext:"mp3"},128:{num:"1",gw:"MP3_128",mime:"audio/mpeg",ext:"mp3"},320:{num:"3",gw:"MP3_320",mime:"audio/mpeg",ext:"mp3"},flac:{num:"9",gw:"FLAC",mime:"audio/flac",ext:"flac"},mp4_ra1:{num:"13",gw:"MP4_RA1",mime:"audio/mp4",ext:"mp4"},mp4_ra2:{num:"14",gw:"MP4_RA2",mime:"audio/mp4",ext:"mp4"},mp4_ra3:{num:"15",gw:"MP4_RA3",mime:"audio/mp4",ext:"mp4"},mhm1_ra1:{num:"16",gw:"MHM1_RA1",mime:"audio/mp4",ext:"mp4"},mhm1_ra2:{num:"17",gw:"MHM1_RA2",mime:"audio/mp4",ext:"mp4"},mhm1_ra3:{num:"18",gw:"MHM1_RA3",mime:"audio/mp4",ext:"mp4"},sbc_256:{num:"12",gw:"SBC_256",mime:"",ext:"sbc"},misc:{num:"0",gw:"MP3_MISC",mime:"audio/mpeg",ext:"mp3"}};async function o(t,e){"deezer.getUserData"===t&&(u=""),e||(e={});let r="arl="+ARL;f&&(r+="; sid="+f);const n={method:"POST",headers:new Headers({cookie:r}),body:JSON.stringify(e)},i=await fetch(`https://www.deezer.com/ajax/gw-light.php?method=${t}&input=3&api_version=1.0&api_token=${encodeURIComponent(u)}&cid=${Math.floor(1e9*Math.random())}`,n),a=await i.json();return 0!==a.error.length?new Response(JSON.stringify(a.error),{status:500,headers:{"content-type":"application/json"}}):("deezer.getUserData"===t&&(u=a.results.checkForm,await KV.put("checkForm",u),f=i.headers.get("set-cookie").split(",").map(t=>t.trimStart())[0],f=f.match(/^sid=(fr[\da-f]+)/)[1],await KV.put("sid",f)),a.results)}let s,u,f,c;i.get("/:type/:id",async e=>{const{query:i}=e;let{type:h,id:l}=e.params;if(!["track","album","playlist"].includes(h))return new Response("not found",{status:404,headers:{"content-type":"text/plain"}});if(l=parseInt(l),NaN===l||"track"!==h&&l<0)return new Response("Invalid ID",{status:400,headers:{"content-type":"text/plain"}});let p=i.f;if(void 0===p)p="320";else if(p=p.toLowerCase(),void 0===a[p]){let t=[];Object.values(a).forEach(e=>t.push(e.num));let e=t.indexOf(p);if(-1===e)return new Response("Invalid format",{status:400,headers:{"content-type":"text/plain"}});p=Object.keys(a)[e]}let g=i.t;switch(g=("true"===g||"1"===g)&&(["misc","128","320"].includes(p)||"track"!==h),h){case"track":return await async function(e,i,h,l){let p;if(e>=0){let t=await async function(){if(s=await KV.get("license_token"),u=await KV.get("checkForm"),f=await KV.get("sid"),null===s){const t=await o("deezer.getUserData");if("Response"===t.constructor.name)return t;if(0===t.USER.USER_ID)return new Response("Invalid arl",{status:500,headers:{"content-type":"text/plain"}});s=t.USER.OPTIONS.license_token,await KV.put("license_token",s,{expirationTtl:3600})}}();if(t)return t;if(p=await o("song.getData",{SNG_ID:e}),"Response"===p.constructor.name)return p}else{let t=await async function(){if(c=await KV.get("access_token"),null===c){const t=await fetch("https://connect.deezer.com/oauth/access_token.php?grant_type=client_credentials&client_id=447462&client_secret=a83bf7f38ad2f137e444727cfc3775cf&output=json"),e=await t.json();if(void 0!==e.error)return new Response("Couldn't get access token from Deezer",{status:500,headers:{"content-type":"text/plain"}});c=e.access_token,await KV.put("access_token",c,{expirationTtl:parseInt(e.expires)})}}();if(t)return t;const r=await fetch(`https://api.deezer.com/track/${e}?access_token=${c}`);if(p=await r.json(),void 0!==p.error)return new Response(JSON.stringify(p.error),{status:403,headers:{"content-type":"application/json"}});p={SNG_ID:p.id,FILESIZE_MP3_MISC:p.filesize_misc,SNG_TITLE:p.title,ALB_TITLE:p.album.title,ART_NAME:p.artist.name,ARTISTS:[{ART_NAME:p.artist.name}],ISRC:"",ALB_PICTURE:p.md5_image,MD5_ORIGIN:p.md5_origin,MEDIA_VERSION:p.media_version},i="misc"}let g=p["FILESIZE_"+a[i].gw];if(0==g)return new Response("Format unavailable",{status:403,headers:{"content-type":"text/plain"}});let d=null,m=null;if(!h&&null!==l){const t=l.match(/^bytes=(\d+)-(\d*)/);null!==t&&(d=parseInt(t[1]),m=parseInt(t[2]))}const y=await r.e(1).then(r.bind(null,9));let w;if(["320","flac"].includes(i)){let t;t=void 0!==p.FALLBACK?p.FALLBACK.TRACK_TOKEN:p.TRACK_TOKEN;const e={license_token:s,media:[{type:"FULL",formats:[{cipher:"BF_CBC_STRIPE",format:a[i].gw}]}],track_tokens:[t]},r={method:"POST",body:JSON.stringify(e)},n=await fetch("https://media.deezer.com/v1/get_url",r);if(200!==n.status)return new Response("Couldn't get stream URL",{status:403,headers:{"content-type":"text/plain"}});const o=await n.json();if(void 0===o.data[0].media)return new Response("Couldn't get stream URL",{status:403,headers:{"content-type":"text/plain"}});w=o.data[0].media[0].sources[0].url}else w=await function(t,e,r){t.FALLBACK&&(t=t.FALLBACK);const n=t.SNG_ID.toString(),i=t.MD5_ORIGIN,o=t.MEDIA_VERSION;return e=a[e].num,r(i,e,n,o)}(p,i,y.legacy_stream_url);g=parseInt(g);let b=p.SNG_TITLE;p.VERSION&&(b+=" "+p.VERSION);let v={},A={status:200,headers:{"content-type":a[i].mime,"content-disposition":`inline; filename="${b.replaceAll('"','\\"')} [${e}].${a[i].ext}"`}};h||(A.headers["accept-ranges"]="bytes");let _,T=g,E=g,R=0,S=0;if(null!==d){if(isNaN(m)?m=g:m++,d<0||d>g||mg)return new Response("Range invalid",{status:416,headers:{"content-type":"text/plain"}});R=d%2048,S=2048-m%2048,_=d-R,E=m+S,E>=g&&(E=g,S=0),v={headers:new Headers({range:`bytes=${_}-${E-1}`})},A.status=206,A.headers["content-range"]=`bytes ${d}-${m-1}/${g}`,T=m-d}const P=await fetch(w,v);if(![200,206].includes(P.status))return new Response("Couldn't get track stream",{status:403,headers:{"content-type":"text/plain"}});let I;if(h){if(I=new n(t.alloc(0)),I.padding=0,I.setFrame("TIT2",b).setFrame("TALB",p.ALB_TITLE).setFrame("TPE2",p.ART_NAME),void 0!==p.ARTISTS){let t=[];for(const e of p.ARTISTS)t.push(e.ART_NAME);I.setFrame("TPE1",t)}if(void 0!==p.TRACK_NUMBER&&I.setFrame("TRCK",p.TRACK_NUMBER),void 0!==p.DISK_NUMBER&&I.setFrame("TPOS",p.DISK_NUMBER),""!==p.ISRC&&I.setFrame("TSRC",p.ISRC),void 0!==p.PHYSICAL_RELEASE_DATE){const t=p.PHYSICAL_RELEASE_DATE.split("-");I.setFrame("TYER",t[0]),I.setFrame("TDAT",t[2]+t[1])}if(""!==p.ALB_PICTURE){const t=`https://cdns-images.dzcdn.net/images/cover/${p.ALB_PICTURE}/1000x1000-000000-80-0-0.jpg`,e=await fetch(t),r=await e.arrayBuffer();I.setFrame("APIC",{type:3,data:r,description:"cover"})}I.addTag(),T+=I.arrayBuffer.byteLength}let{readable:U,writable:B}=new FixedLengthStream(T);const L=B.getWriter();h&&L.write(I.arrayBuffer);p.FALLBACK&&(e=p.FALLBACK.SNG_ID);const C=new y.Cipher(String(e));return async function(t,e,r,n,i,a,o){const s=e.getReader({mode:"byob"});let u=0;i&&(u=i);let f=!1;for(;!f;){let e;f=u+2048>=r,e=f?r-u:2048;let i=(await s.readAtLeast(e,new Uint8Array(2048))).value;u%6144==0&&2048==e&&n.decrypt_chunk(i),0!==a&&(i=i.slice(a),a=0),f&&0!==o&&(i=i.slice(0,i.length-o)),u+=2048,await t.write(i)}t.close()}(L,P.body,E,C,_,R,S),new Response(U,A)}(l,p,g,e.headers.get("range"));case"album":case"playlist":return await async function(t,e,r,n,i){const a=await fetch(`https://api.deezer.com/${t}/${e}?limit=-1`),o=await a.json();if(void 0!==o.error)return new Response(JSON.stringify(o.error),{status:403,headers:{"content-type":"application/json"}});let s="#EXTM3U\n";for(const t of o.tracks.data){let e=r;t.id<0&&(e="misc");let a=`https://${i}/track/${t.id}?f=${e}&t=${+n}`;s+=`#EXTINF:${t.duration},${t.title}\n${a}\n`}return new Response(s,{status:200,headers:{"content-type":"audio/mpegurl"}})}(h,l,p,g,e.headers.get("host"))}}),i.get("/",()=>new Response(r(8),{status:200,headers:{"content-type":"text/html"}})),i.all("*",()=>new Response("not found",{status:404,headers:{"content-type":"text/plain"}})),addEventListener("fetch",t=>t.respondWith(i.handle(t.request)))}.call(this,r(2).Buffer)},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=r(4),i=r(5),a=r(6);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(n)return D(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return R(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var a,o=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,u/=2,r/=2}function f(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;as&&(r=s-u),a=r;a>=0;a--){for(var h=!0,l=0;li&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function R(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(a=t[i+1]))&&(u=(31&f)<<6|63&a)>127&&(c=u);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(u=(15&f)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&f)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),f=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function x(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(t,e,r,n,a){return a||x(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,a){return a||x(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function j(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(3))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=f(t),o=n[0],s=n[1],u=new a(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),c=0,h=s>0?o-4:o;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[c++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,a,o=[],s=e;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,u=(1<>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=l,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=l,c-=8);if(0===a)a=1-f;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=f}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,u,f=8*a-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,g=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(o++,u/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*u-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=g,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=g,o/=256,f-=8);t[r+p-g]|=128*d}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){t.exports=function(){"use strict";function t(t){return String(t).split("").map((function(t){return t.charCodeAt(0)}))}function e(e){return new Uint8Array(t(e))}function r(e){var r=new Uint8Array(2*e.length);return new Uint16Array(r.buffer).set(t(e)),r}return function(){var t=n.prototype;function n(t){if(!t||"object"!=typeof t||!("byteLength"in t))throw new Error("First argument should be an instance of ArrayBuffer or Buffer");this.arrayBuffer=t,this.padding=4096,this.frames=[],this.url=""}return t._setIntegerFrame=function(t,e){var r=parseInt(e,10);this.frames.push({name:t,value:r,size:11+r.toString().length})},t._setStringFrame=function(t,e){var r=e.toString();this.frames.push({name:t,value:r,size:13+2*r.length})},t._setPictureFrame=function(t,e,r,n){var i,a,o,s=function(t){if(!t||!t.length)return null;if(255===t[0]&&216===t[1]&&255===t[2])return"image/jpeg";if(137===t[0]&&80===t[1]&&78===t[2]&&71===t[3])return"image/png";if(71===t[0]&&73===t[1]&&70===t[2])return"image/gif";if(87===t[8]&&69===t[9]&&66===t[10]&&80===t[11])return"image/webp";var e=73===t[0]&&73===t[1]&&42===t[2]&&0===t[3],r=77===t[0]&&77===t[1]&&0===t[2]&&42===t[3];return e||r?"image/tiff":66===t[0]&&77===t[1]?"image/bmp":0===t[0]&&0===t[1]&&1===t[2]&&0===t[3]?"image/x-icon":null}(new Uint8Array(e)),u=r.toString();if(!s)throw new Error("Unknown picture MIME type");r||(n=!1),this.frames.push({name:"APIC",value:e,pictureType:t,mimeType:s,useUnicodeEncoding:n,description:u,size:(i=e.byteLength,a=s.length,o=u.length,11+a+1+1+(n?2+2*(o+1):o+1)+i)})},t._setLyricsFrame=function(t,e,r){var n,i,a=t.split("").map((function(t){return t.charCodeAt(0)})),o=e.toString(),s=r.toString();this.frames.push({name:"USLT",value:s,language:a,description:o,size:(n=o.length,i=s.length,16+2*n+2+2+2*i)})},t._setCommentFrame=function(t,e,r){var n,i,a=t.split("").map((function(t){return t.charCodeAt(0)})),o=e.toString(),s=r.toString();this.frames.push({name:"COMM",value:s,language:a,description:o,size:(n=o.length,i=s.length,16+2*n+2+2+2*i)})},t._setPrivateFrame=function(t,e){var r,n,i=t.toString();this.frames.push({name:"PRIV",value:e,id:i,size:(r=i.length,n=e.byteLength,10+r+1+n)})},t._setUserStringFrame=function(t,e){var r,n,i=t.toString(),a=e.toString();this.frames.push({name:"TXXX",description:i,value:a,size:(r=i.length,n=a.length,13+2*r+2+2+2*n)})},t._setUrlLinkFrame=function(t,e){var r=e.toString();this.frames.push({name:t,value:r,size:10+r.length})},t.setFrame=function(t,e){switch(t){case"TPE1":case"TCOM":case"TCON":if(!Array.isArray(e))throw new Error(t+" frame value should be an array of strings");var r="TCON"===t?";":"/",n=e.join(r);this._setStringFrame(t,n);break;case"TLAN":case"TIT1":case"TIT2":case"TIT3":case"TALB":case"TPE2":case"TPE3":case"TPE4":case"TRCK":case"TPOS":case"TMED":case"TPUB":case"TCOP":case"TKEY":case"TEXT":case"TSRC":this._setStringFrame(t,e);break;case"TBPM":case"TLEN":case"TDAT":case"TYER":this._setIntegerFrame(t,e);break;case"USLT":if(e.language=e.language||"eng","object"!=typeof e||!("description"in e)||!("lyrics"in e))throw new Error("USLT frame value should be an object with keys description and lyrics");if(e.language&&!e.language.match(/[a-z]{3}/i))throw new Error("Language must be coded following the ISO 639-2 standards");this._setLyricsFrame(e.language,e.description,e.lyrics);break;case"APIC":if(!("object"==typeof e&&"type"in e&&"data"in e&&"description"in e))throw new Error("APIC frame value should be an object with keys type, data and description");if(e.type<0||20>>21&127,t>>>14&127,t>>>7&127,127&t],o.set(u,s),s+=u.length,this.frames.forEach((function(t){var i;switch(u=e(t.name),o.set(u,s),s+=u.length,i=t.size-10,u=[i>>>24&255,i>>>16&255,i>>>8&255,255&i],o.set(u,s),s+=u.length,s+=2,t.name){case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":u=e(t.value),o.set(u,s),s+=u.length;break;case"TPE1":case"TCOM":case"TCON":case"TLAN":case"TIT1":case"TIT2":case"TIT3":case"TALB":case"TPE2":case"TPE3":case"TPE4":case"TRCK":case"TPOS":case"TKEY":case"TMED":case"TPUB":case"TCOP":case"TEXT":case"TSRC":u=[1].concat(n),o.set(u,s),s+=u.length,u=r(t.value),o.set(u,s),s+=u.length;break;case"TXXX":case"USLT":case"COMM":u=[1],"USLT"!==t.name&&"COMM"!==t.name||(u=u.concat(t.language)),u=u.concat(n),o.set(u,s),s+=u.length,u=r(t.description),o.set(u,s),s+=u.length,u=[0,0].concat(n),o.set(u,s),s+=u.length,u=r(t.value),o.set(u,s),s+=u.length;break;case"TBPM":case"TLEN":case"TDAT":case"TYER":s++,u=e(t.value),o.set(u,s),s+=u.length;break;case"PRIV":u=e(t.id),o.set(u,s),s+=u.length,s++,o.set(new Uint8Array(t.value),s),s+=t.value.byteLength;break;case"APIC":u=[t.useUnicodeEncoding?1:0],o.set(u,s),s+=u.length,u=e(t.mimeType),o.set(u,s),s+=u.length,u=[0,t.pictureType],o.set(u,s),s+=u.length,t.useUnicodeEncoding?(u=[].concat(n),o.set(u,s),s+=u.length,u=r(t.description),o.set(u,s),s+=u.length,s+=2):(u=e(t.description),o.set(u,s),s+=u.length,s++),o.set(new Uint8Array(t.value),s),s+=t.value.byteLength}})),s+=this.padding,o.set(new Uint8Array(this.arrayBuffer),s),this.arrayBuffer=a},t.getBlob=function(){return new Blob([this.arrayBuffer],{type:"audio/mpeg"})},t.getURL=function(){return this.url||(this.url=URL.createObjectURL(this.getBlob())),this.url},t.revokeURL=function(){URL.revokeObjectURL(this.url)},n}()}()},function(t,e){t.exports=' dzserver

dzserver

source code


how 2 use:

/track/<id>

/album/<id>

/playlist/<id>


params are:

t: tagging, boolean

f: format, can be one of these:

aac_96, 64, 128, 320, flac, mp4_ra1, mp4_ra2, mp4_ra3, mhm1_ra1, mhm1_ra2, mhm1_ra3, sbc_256, misc

available formats depend on the track

'}]);