1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,379200,e=>{"use strict";var t=e.i(411652),i=e.i(604826);let r={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},a={len:1,get:(e,t)=>{switch(e[t]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};default:return{encoding:"utf8",bom:!1}}}},n={len:4,get:(e,i)=>({encoding:a.get(e,i),language:new t.StringType(3,"latin1").get(e,i+1)})};e.s(["AttachedPictureType",0,{0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},"ExtendedHeader",0,{len:10,get:(e,r)=>({size:t.UINT32_BE.get(e,r),extendedFlags:t.UINT16_BE.get(e,r+4),sizeOfPadding:t.UINT32_BE.get(e,r+6),crcDataPresent:i.getBit(e,r+4,31)})},"ID3v2Header",0,{len:10,get:(e,a)=>({fileIdentifier:new t.StringType(3,"ascii").get(e,a),version:{major:t.INT8.get(e,a+3),revision:t.INT8.get(e,a+4)},flags:{unsynchronisation:i.getBit(e,a+5,7),isExtendedHeader:i.getBit(e,a+5,6),expIndicator:i.getBit(e,a+5,5),footer:i.getBit(e,a+5,4)},size:r.get(e,a+6)})},"LyricsContentType",0,{other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},"SyncTextHeader",0,{len:6,get:(e,i)=>{let r=n.get(e,i);return{encoding:r.encoding,language:r.language,timeStampFormat:t.UINT8.get(e,i+4),contentType:t.UINT8.get(e,i+5)}}},"TextEncodingToken",0,a,"TextHeader",0,n,"TimestampFormat",0,{notSynchronized:0,mpegFrameNumber:1,milliseconds:2},"UINT32SYNCSAFE",0,r])},569146,e=>{"use strict";var t=e.i(398991),i=e.i(411652),r=e.i(604826),a=e.i(414115),n=e.i(989696),s=e.i(439186);let o=(0,t.default)("music-metadata:parser:ID3v1"),c=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Po
1p-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],l={len:128,get:(e,t)=>{let r=new m(3).get(e,t);return"TAG"===r?{header:r,title:new m(30).get(e,t+3),artist:new m(30).get(e,t+33),album:new m(30).get(e,t+63),year:new m(4).get(e,t+93),comment:new m(28).get(e,t+97),zeroByte:i.UINT8.get(e,t+127),track:i.UINT8.get(e,t+126),genre:i.UINT8.get(e,t+127)}:null}};class m{constructor(e){this.len=e,this.stringType=new i.StringType(e,"latin1")}get(e,t){let i=this.stringType.get(e,t);return(i=(i=r.trimRightNull(i)).trim()).length>0?i:void 0}}class u extends a.BasicParser{constructor(e,t,i){super(e,t,i),this.apeHeader=i.apeHeader}static getGenre(e){if(e<c.length)return c[e]}async parse(){if(!this.tokenizer.fileInfo.size)return void o("Skip checking for ID3v1 because the file-size is unknown");if(this.apeHeader&&this.tokenizer.supportsRandomAccess()){this.tokenizer.setPosition(this.apeHeader.offset);let e=new n.APEv2Parser(this.metadata,this.tokenizer,this.options);await e.parseTags(this.apeHeader.footer)}let e=this.tokenizer.fileInfo.size-l.len;if(this.tokenizer.position>e)return void o("Already consumed the last 128 bytes");let t=await this.tokenizer.readToken(l,e);if(t){for(let e of(o("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-l.len),["title","artist","album","comment","track","year"]))t[e]&&""!==t[e]&&await this.addTag(e,t[e]);let e=u.getGenre(t.genre);e&&await this.addTag("genre",e)}else o("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-l.len)}async addTag(e,t){await this.metadata.addTag("ID3v1",e,t)}}async function p(e){if(e.fileInfo.size>=128){let t=new Uint8Array(3),i=e.position;return await e.readBuffer(t,{position:e.fileInfo.size-128}),e.setPosition(i),"TAG"===(0,s.textDecode)(t,"latin1")}return!1}e.s(["Genres",0,c,"ID3v1Parser",0,u,"hasID3v1Header",0,p])},700282,e=>{"use strict";let t={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},i={[t.video]:"video",[t.audio]:"audio",[t.complex]:"complex",[t.logo]:"logo",[t.subtitle]:"subtitle",[t.button]:"button",[t.control]:"control"};e.s(["TargetType",0,{10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},"TrackType",0,t,"TrackTypeValueToKeyMap",0,i])},791019,e=>{"use strict";var t=e.i(931718),i=e.i(632137),r=e.i(18074);e.s(["getFileIcon",0,function(e,a,n){let{Icon:s,tone:o}=(0,r.getFileTypeDescriptor)(e,n);return(0,t.jsx)(s,{className:(0,i.cn)("lg"===a?"h-12 w-12":"h-5 w-5",o)})}])},686257,(e,t,i)=>{"use strict";let r;Object.defineProperty(i,"__esModule",{value:!0}),i.format=function(e){let{type:t,parameters:i}=e;if(!t||!o.test(t))throw TypeError(`Invalid type: ${t}`);let r=t;if(i)for(let e of Object.keys(i)){if(!n.test(e))throw TypeError(`Invalid parameter name: ${e}`);r+=`; ${e}=${function(e){if(n.test(e))return e;if(a.test(e))return`"${e.replace(s,"\\$&")}"`;throw TypeError(`Invalid parameter value: ${e}`)}(i[e])}`}return r},i.parse=function(e,t){let i=t?.comma===!0?l:65536,r=e.length,a=u(e,t?.start??0,r),n=a;a=m(e,a,r,i);let s=p(e,n,a),o=e.slice(n,s).toLowerCase();return t?.parameters===!1?{type:o,index:a,parameters:new c}:function(e,t,i,r,a){let n=new c;e:for(;i<r&&e.charCodeAt(i)!==a;){let t=i=u(e,i+1,r);for(;i<r;){let s=e.charCodeAt(i);if(s===a)break e;if(59===s)continue e;if(61===s){let s=p(e,t,i),o=e.slice(t,s).toLowerCase();if((i=u(e,i+1,r))<r&&34===e.charCodeAt(i)){i++;let t="";for(;i<r;){let s=e.charCodeAt(i++);if(34===s){i=m(e,i,r,a),void 0===n[o]&&(n[o]=t);break}if(92===s&&i<r){t+=e[i++];continue}t+=String.fromCharCode(s)}continue e}let c=i;if(i=m(e,i,r,a),void 0===n[o]){let t=p(e,c,i);n[o]=e.slice(c,t)}continue e}i++}}return{type:t,index:i,parameters:n}}(e,o,a,r,i)};let a=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,s=/[\\"]/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,c=((r=function(){}).prototype=Object.create(null),r),l=44;function m(e,t,i,r){for(;t<i;){let i=e.charCodeAt(t);if(59===i||i===r)break;t++}return t}function u(e,t,i){for(;t<i;){let i=e.charCodeAt(t);if(32!==i&&9!==i)break;t++}return t}function p(e,t,i){for(;i>t;){let t=e.charCodeAt(i-1);if(32!==t&&9!==t)break;
1i--}return i}},888315,e=>{"use strict";var t=e.i(4363),i=e.i(411652),r=e.i(107259),a=e.i(398991);let n={get:e=>({signature:i.UINT32_LE.get(e,0),compressedSize:i.UINT32_LE.get(e,8),uncompressedSize:i.UINT32_LE.get(e,12)}),len:16},s={get(e){let t=i.UINT16_LE.get(e,6);return{signature:i.UINT32_LE.get(e,0),minVersion:i.UINT16_LE.get(e,4),dataDescriptor:!!(8&t),compressedMethod:i.UINT16_LE.get(e,8),compressedSize:i.UINT32_LE.get(e,18),uncompressedSize:i.UINT32_LE.get(e,22),filenameLength:i.UINT16_LE.get(e,26),extraFieldLength:i.UINT16_LE.get(e,28),filename:null}},len:30},o={get:e=>({signature:i.UINT32_LE.get(e,0),nrOfThisDisk:i.UINT16_LE.get(e,4),nrOfThisDiskWithTheStart:i.UINT16_LE.get(e,6),nrOfEntriesOnThisDisk:i.UINT16_LE.get(e,8),nrOfEntriesOfSize:i.UINT16_LE.get(e,10),sizeOfCd:i.UINT32_LE.get(e,12),offsetOfStartOfCd:i.UINT32_LE.get(e,16),zipFileCommentLength:i.UINT16_LE.get(e,20)}),len:22},c={get(e){let t=i.UINT16_LE.get(e,8);return{signature:i.UINT32_LE.get(e,0),minVersion:i.UINT16_LE.get(e,6),dataDescriptor:!!(8&t),compressedMethod:i.UINT16_LE.get(e,10),compressedSize:i.UINT32_LE.get(e,20),uncompressedSize:i.UINT32_LE.get(e,24),filenameLength:i.UINT16_LE.get(e,28),extraFieldLength:i.UINT16_LE.get(e,30),fileCommentLength:i.UINT16_LE.get(e,32),relativeOffsetOfLocalHeader:i.UINT32_LE.get(e,42),filename:null}},len:46};function l(e){let t=new Uint8Array(i.UINT32_LE.len);return i.UINT32_LE.put(t,0,e),t}let m=(0,a.default)("tokenizer:inflate"),u=l(0x8074b50),p=l(0x6054b50);class d{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(262144)}async isZip(){return await this.peekSignature()===0x4034b50}peekSignature(){return this.tokenizer.peekToken(i.UINT32_LE)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16384,e.fileInfo.size),i=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(i,{position:e.fileInfo.size-t});for(let r=i.length-4;r>=0;r--)if(i[r]===p[0]&&i[r+1]===p[1]&&i[r+2]===p[2]&&i[r+3]===p[3])return e.fileInfo.size-t+r;return -1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess())return void m("Cannot reading central-directory without random-read support");m("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){m("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(o,t),a=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let e=0;e<r.nrOfEntriesOfSize;++e){let t=await this.tokenizer.readToken(c);if(0x2014b50!==t.signature)throw Error("Expected Central-File-Header signature");t.filename=await this.tokenizer.readToken(new i.StringType(t.filenameLength,"utf-8")),await this.tokenizer.ignore(t.extraFieldLength),await this.tokenizer.ignore(t.fileCommentLength),a.push(t),m(`Add central-directory file-entry: n=${e+1}/${a.length}: filename=${a[e].filename}`)}return this.tokenizer.setPosition(e),a}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let i=!1;do{let t,r=await this.readLocalFileHeader();if(!r)break;let a=e(r);if(i=!!a.stop,await this.tokenizer.ignore(r.extraFieldLength),r.dataDescriptor&&0===r.compressedSize){let e=[],t=262144;m("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let i=-1;for(;i<0&&262144===t;){t=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0});let r=(i=function(e,t){let i=e.length,r=t.length;if(r>i)return -1;for(let a=0;a<=i-r;a++){let i=!0;for(let n=0;n<r;n++)if(e[a+n]!==t[n]){i=!1;break}if(i)return a}return -1}(this.syncBuffer.subarray(0,t),u))>=0?i:t;if(a.handler){let t=new Uint8Array(r);await this.tokenizer.readBuffer(t),e.push(t)}else await this.tokenizer.ignore(r)}m(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),a.handler&&await this.inflate(r,function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let r of e)t.set(r,i),i+=r.length;return t}(e),a.handler)}else a.handler?(m(`Reading compressed-file-data: ${r.compressedSize} bytes`),t=new Uint8Array(r.compressedSize),await this.tokenizer.readBuffer(t),await this.inflate(r,t,a.handler)):(m(`Ignoring compressed-file-data: ${r.compressedSize} bytes`),await this.tokenizer.ignore(r.compressedSize));if(m(`Reading data-descriptor at pos=${this.tokenizer.position}`),r.dataDescriptor&&0x8074b50!==(await this.tokenizer.readToken(n)).signature)throw Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-n.len}`)}while(!i)}async iterateOverCentralDirectory(e,t){for(let i of e){let e=t(i);if(e.handler){this.tokenizer.setPosition(i.relativeOffsetOfLocalHeader);let t=await this.readLocalFileHeader();if(t){await this.tokenizer.ignore(t.extraFieldLength);let r=new Uint8Array(i.compressedSize);await this.tokenizer.readBuffer(r),await this.inflate(t,r,e.handler)}}if(e.stop)break}}async inflate(e,t,i){if(0===e.compressedMethod)return i(t);if(8!==e.compressedMethod)throw Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);return m(`Decompress filename=${e.filename}
1, compressed-size=${t.length}`),i(await d.decompressDeflateRaw(t))}static async decompressDeflateRaw(e){let t=new ReadableStream({start(t){t.enqueue(e),t.close()}}),i=new DecompressionStream("deflate-raw"),r=t.pipeThrough(i);try{let e=new Response(r),t=await e.arrayBuffer();return new Uint8Array(t)}catch(e){throw TypeError(e instanceof Error?`Failed to deflate ZIP entry: ${e.message}`:"Unknown decompression error in ZIP entry")}}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(i.UINT32_LE);if(0x4034b50===e){let e=await this.tokenizer.readToken(s);return e.filename=await this.tokenizer.readToken(new i.StringType(e.filenameLength,"utf-8")),e}if(0x2014b50===e)return!1;if(0xe011cfd0===e)throw Error("Encrypted ZIP");throw Error("Unexpected signature")}}class f{constructor(e){this.tokenizer=e}inflate(){let e=this.tokenizer;return new ReadableStream({async pull(t){let i=new Uint8Array(1024),r=await e.readBuffer(i,{mayBeLess:!0});0===r?t.close():t.enqueue(i.subarray(0,r))}}).pipeThrough(new DecompressionStream("gzip"))}}var h=e.i(918498);let g={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},T=0x80000000-1,k=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),x=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],y=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]);class b extends Error{}function I(e,t,i){if(!Number.isFinite(e)||e<0||e>t)throw new b(`${i} has invalid size ${e} (maximum ${t} bytes)`);return e}async function S(e,t,{maximumLength:i=0x1000000,reason:r="skip"}={}){let a=I(t,i,r);await e.ignore(a)}async function w(e,t,i,{maximumLength:r=t.length,reason:a="read"}={}){let n=I(i?.length??t.length,r,a);return e.readBuffer(t,{...i,length:n})}async function A(e,{maximumLength:t=1048576}={}){let i=new ReadableStream({start(t){t.enqueue(e),t.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),r=[],a=0;try{for(;;){let{done:e,value:n}=await i.read();if(e)break;if((a+=n.length)>t)throw await i.cancel(),Error(`ZIP entry decompressed data exceeds ${t} bytes`);r.push(n)}}finally{i.releaseLock()}let n=new Uint8Array(a),s=0;for(let e of r)n.set(e,s),s+=e.length;return n}async function v(e,{shouldBuffer:t,maximumLength:r=1048576}={}){let{syncBuffer:a}=e,{length:n}=a,s=[],o=0;for(;;){let c=await e.tokenizer.peekBuffer(a,{mayBeLess:!0}),l=function(e,t){if(e.length<16)return -1;let r=e.length-16;for(let a=0;a<=r;a++)if(0x8074b50===i.UINT32_LE.get(e,a)&&i.UINT32_LE.get(e,a+8)===t+a)return a;return -1}(a.subarray(0,c),o),m=l>=0?0:c===n?Math.min(15,c-1):0,u=l>=0?l:c-m;if(0===u)break;if((o+=u)>r)throw Error(`ZIP entry compressed data exceeds ${r} bytes`);if(t){let t=new Uint8Array(u);await e.tokenizer.readBuffer(t),s.push(t)}else await e.tokenizer.ignore(u);if(l>=0)break}if(z(e.tokenizer)||(e.knownSizeDescriptorScannedBytes+=o),t){let e=new Uint8Array(o),t=0;for(let i of s)e.set(i,t),t+=i.length;return e}}async function _(e,t,{shouldBuffer:i,maximumDescriptorLength:r=1048576}={}){var a;let n;if(t.dataDescriptor&&0===t.compressedSize)return v(e,{shouldBuffer:i,maximumLength:r});if(!i)return void await S(e.tokenizer,t.compressedSize,{maximumLength:z(e.tokenizer)?1048576:e.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});let s=Math.min(Number.isFinite(n=(a=e.tokenizer).fileInfo.size)?Math.max(0,n-a.position):Number.MAX_SAFE_INTEGER,T);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>s)throw Error(`ZIP entry compressed data exceeds ${s} bytes`);let o=new Uint8Array(t.compressedSize);return await e.tokenizer.readBuffer(o),o}async function E(e,t){return new D(t).fromBuffer(e)}function R(e){switch(e=e.toLowerCase()){case"application/epub+zip":return{ext:"epub",mime:e};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:e};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:e};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:e};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:e};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:e};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:e};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:e};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:e};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:e};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:e};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:e};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:e};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:e};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:e};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:e};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"}}}function M(e,t,i){for(let[r,a]of(i={offset:0,...i},t.entries()))if(i.mask){if(a!==(i.mask[r]&e[r+i.offset]))return!1}else if(a!==e[r+i.offset])return!1;return!0}function z(e){let t=e.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function C(e,t,i){return z(e)&&e.position-t>i}function N(e,t=1048576){for(let i of[e.compressedSize,e.uncompressedSize])if(!Number.isFinite(i)||i<0||i>t)return!1;return!0}function L(e){if(e.hasContentTypesEntry&&!e.hasUnparseableContentTypes&&!e.isParsingContentTypes&&!e.hasParsedContentTypesEntry){if(e.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(e.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(e.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(e.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}d.prototype.inflate=async function(e,t,i){if(0===e.compressedMethod)return i(t);if(8!==e.compressedMethod)throw Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);return i(await A(t,{maximumLength:1048576}))},d.prototype.unzip=async function(e){let t=!1,r=0,a=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(C(this.tokenizer,a,0x1000000))throw new b("ZIP stream probing exceeds 16777216 bytes");let n=await this.readLocalFileHeader();if(!n)break;if(++r>1024)throw Error("ZIP entry count exceeds 1024");let s=e(n);t=!!s.stop,await this.tokenizer.ignore(n.extraFieldLength);let o=await _(this,n,{shouldBuffer:!!s.handler,maximumDescriptorLength:Math.min(1048576,z(this.tokenizer)?Math.max(0,0x1000000-(this.tokenizer.position-a)):Math.max(0,1048576-this.knownSizeDescriptorScannedBytes))});if(s.handler&&await this.inflate(n,o,s.handler),n.dataDescriptor){let e=new Uint8Array(16);if(await this.tokenizer.readBuffer(e),0x8074b50!==i.UINT32_LE.get(e,0))throw Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-e.length}`)}if(C(this.tokenizer,a,0x1000000))throw new b("ZIP stream probing exceeds 16777216 bytes")}while(!t)};class D{constructor(e){const t=function(e){return Number.isFinite(e)?Math.max(0,Math.min(4098,Math.trunc(e))):0}(e?.mpegOffsetTolerance);this.options={...e,mpegOffsetTolerance:t},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(e){return function(e){let t=e?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return e;let{reader:i}=t,r=async()=>{await i.cancel(),i.releaseLock()};return t.close=r,t.abort=async()=>{t.interrupted=!0,await r()},e}(t.fromWebStream(e,this.getTokenizerOptions()))}async parseTokenizer(e,t=0){this.detectionReentryCount=t;let i=e.position;for(let t of this.detectors){let a;try{a=await t.detect(e)}catch(e){if(e instanceof r.EndOfStreamError||e instanceof b)return;throw e}if(a)return a;
1if(i!==e.position)return}}async fromTokenizer(e){try{return await this.parseTokenizer(e)}finally{await e.close()}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let i=e instanceof Uint8Array?e:new Uint8Array(e);if(i?.length>1)return this.fromTokenizer(t.fromBuffer(i,this.getTokenizerOptions()))}async fromBlob(e){this.options.signal?.throwIfAborted();let i=t.fromBlob(e,this.getTokenizerOptions());return this.fromTokenizer(i)}async fromStream(e){this.options.signal?.throwIfAborted();let t=this.createTokenizerFromWebStream(e);return this.fromTokenizer(t)}async toDetectionStream(e,t){var i,a,n;let s,o,c=Number.isFinite(i=t?.sampleSize??4100)?Math.max(1,Math.trunc(i)):4100,l=e.getReader({mode:"byob"});try{let{value:e,done:t}=await (a=new Uint8Array(c),n=this.options.signal,void 0===n?l.read(a):(n.throwIfAborted(),new Promise((e,t)=>{let i=()=>{n.removeEventListener("abort",r)},r=()=>{let e=n.reason;i(),(async()=>{try{await l.cancel(e)}catch{}})(),t(e)};n.addEventListener("abort",r,{once:!0}),(async()=>{try{let t=await l.read(a);i(),e(t)}catch(e){i(),t(e)}})()})));if(o=e,!t&&e)try{s=await this.fromBuffer(e.subarray(0,c))}catch(e){if(!(e instanceof r.EndOfStreamError))throw e;s=void 0}o=e}finally{l.releaseLock()}let m=new TransformStream({async start(e){e.enqueue(o)},transform(e,t){t.enqueue(e)}}),u=e.pipeThrough(m);return u.fileType=s,u}async detectGzip(e){let t,i,r,a,n,s,o,c,l;if(this.gzipProbeDepth>=1)return{ext:"gz",mime:"application/gzip"};let m=(n=new f(e).inflate().getReader(),s=0,o=!1,c=!1,l=async e=>{o||c||(c=!0,await n.cancel(e))},new ReadableStream({async pull(e){if(s>=0x1000000){e.close(),await l();return}let{done:t,value:i}=await n.read();if(t||!i){o=!0,e.close();return}let r=0x1000000-s;if(i.length>r){e.enqueue(i.subarray(0,r)),s+=r,e.close(),await l();return}e.enqueue(i),s+=i.length},async cancel(e){await l(e)}})),u=z(e);if(u){let e=new AbortController;t=setTimeout(()=>{e.abort(new DOMException("Operation timed out after 100 ms","TimeoutError"))},100),i=void 0===this.options.signal?e.signal:AbortSignal.any([this.options.signal,e.signal]),(r=new D({...this.options,signal:i})).gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{a=await (r??this).fromStream(m)}catch(e){if(e?.name==="AbortError"&&i?.reason?.name!=="TimeoutError")throw e}finally{clearTimeout(t),!u&&this.gzipProbeDepth--}return a?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(e,t){return M(this.buffer,e,t)}checkString(e,t){return this.check(function(e,t){if("utf-16le"===t){let t=[];for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);t.push(255&r,r>>8&255)}return t}if("utf-16be"===t){let t=[];for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);t.push(r>>8&255,255&r)}return t}return[...e].map(e=>e.charCodeAt(0))}(e,t?.encoding),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(4100),void 0===e.fileInfo.size&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,z(e)&&(await e.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(e);if(await e.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return(await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14}))?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191])){if(this.detectionReentryCount>=256)return;return this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(e)}if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(e);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await S(e,6,{maximumLength:6,reason:"ID3 header prefix"});let t=await e.readToken(g),i=z(e);if(!Number.isFinite(t)||t<0||i&&(t>0x1000000||e.position+t>0x1000000))return;if(e.position+t>e.fileInfo.size){if(i)return;return{ext:"mp3",mime:"audio/mpeg"}}try{await S(e,t,{maximumLength:i?0x1000000:e.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof r.EndOfStreamError)return;throw e}if(this.detectionReentryCount>=256)return;return this.detectionReentryCount++,this.parseTokenizer(e,this.detectionReentryCount)}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===this.buffer[0]||70===this.buffer[0])&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};
1if(this.check([80,75,3,4])){let t,i={hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1};try{await new d(e).unzip(e=>{var r;(r=e.filename).startsWith("word/")&&(i.hasWordDirectory=!0),r.startsWith("ppt/")&&(i.hasPresentationDirectory=!0),r.startsWith("xl/")&&(i.hasSpreadsheetDirectory=!0),r.startsWith("3D/")&&r.endsWith(".model")&&(i.hasThreeDimensionalModelEntry=!0);let a="[Content_Types].xml"===e.filename,n=L(i);if(!a&&n)return t=n,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":if(!N(e,1048576))return{};return{async handler(e){let i=new TextDecoder("utf-8").decode(e).trim();t=R(i)},stop:!0};case"[Content_Types].xml":if(i.hasContentTypesEntry=!0,!N(e,1048576))return i.hasUnparseableContentTypes=!0,{};return i.isParsingContentTypes=!0,{async handler(e){let r=new TextDecoder("utf-8").decode(e),a=function(e){let t=e.indexOf('.main+xml"');if(-1===t){let t="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return e.includes(`ContentType="${t}"`)?t:void 0}let i=e.slice(0,t),r=i.lastIndexOf('"');return i.slice(r+1)}(r);a&&(t=R(a)),i.hasParsedContentTypesEntry=!0,i.isParsingContentTypes=!1},stop:!0};default:if(/classes\d*\.dex/.test(e.filename))return t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0};return{}}})}catch(e){if(!function(e){if(e instanceof r.EndOfStreamError||e instanceof b)return!0;if(!(e instanceof Error))return!1;if(k.has(e.message)||y.has(e.code))return!0;for(let t of x)if(e.message.startsWith(t))return!0;return!1}(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return t??L(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return(await e.readBuffer(t),M(t,[79,112,117,115,72,101,97,100]))?{ext:"opus",mime:"audio/ogg; codecs=opus"}:M(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:M(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:M(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:M(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:M(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let e=await this.readTiffHeader(!1);if(e)return e}if(this.check([77,77])){let e=await this.readTiffHeader(!0);if(e)return e}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let t=await e.peekNumber(i.UINT8),r=128,a=0;for(;(t&r)==0&&0!==r;)++a,r>>=1;let n=new Uint8Array(a+1);return await w(e,n,void 0,{maximumLength:n.length,reason:"EBML field"}),n}async function a(){let e=await t(),i=await t();i[0]^=128>>i.length-1;let r=Math.min(6,i.length),a=new DataView(e.buffer),n=new DataView(i.buffer,i.length-r,r);return{id:(0,h.getUintBE)(a),len:(0,h.getUintBE)(n)}}async function n(t){let r=0;for(;t>0;){if(++r>256||C(e,s,0x1000000))return;let n=e.position,o=await a();if(17026===o.id){if(o.len>64)return;let t=I(o.len,64,"EBML DocType");return(await e.readToken(new i.StringType(t))).replaceAll(/\00.*$/g,"")}if(z(e)&&(!Number.isFinite(o.len)||o.len<0||o.len>1048576)||(await S(e,o.len,{maximumLength:z(e)?1048576:e.fileInfo.size,reason:"EBML payload"}),--t,e.position<=n))return}}let r=await a(),s=e.position;switch(await n(r.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};
1if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let e=i.UINT32_BE.get(this.buffer,4),t=i.UINT16_BE.get(this.buffer,6);if(e>0&&e<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(t>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(0===this.buffer[6]||1===this.buffer[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let e=new i.StringType(4,"latin1").get(this.buffer,2);if(e.match("^d*")&&e>=1e3&&e<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return(await e.ignore(8),"debian-binary"===await e.readToken(new i.StringType(13,"ascii")))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&["\n","\r"," "," ","\0"].some(e=>this.checkString(e,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let t={ext:"png",mime:"image/png"},a={ext:"apng",mime:"image/apng"};async function s(){return{length:await e.readToken(i.INT32_BE),type:await e.readToken(new i.StringType(4,"latin1"))}}await e.ignore(8);let n=z(e),o=e.position,c=0,l=!1;do{if(++c>512||C(e,o,0x1000000))break;let i=e.position,m=await s();if(m.length<0)return;if("IHDR"===m.type){if(13!==m.length)return;l=!0}switch(m.type){case"IDAT":return t;case"acTL":return a;default:if(!l&&"CgBI"!==m.type)return;if(n&&m.length>1048576)return l&&(32&m.type.codePointAt(0))!=0?t:void 0;try{await S(e,m.length+4,{maximumLength:n?1048580:e.fileInfo.size,reason:"PNG chunk payload"})}catch(e){if(!n&&(e instanceof b||e instanceof r.EndOfStreamError))return t;throw e}}if(e.position<=i)break}while(e.position+8<e.fileInfo.size)return t}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(96&this.buffer[8])!=0){let e=new i.StringType(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(e){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:if(e.startsWith("3g")){if(e.startsWith("3g2"))return{ext:"3g2",mime:"video/3gpp2"};return{ext:"3gp",mime:"video/3gpp"}}return{ext:"mp4",mime:"video/mp4"}}}if(this.checkString("REGEDIT4\r\n"))return{ext:"reg",mime:"application/x-ms-regedit"};if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-p
1anasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){let t=!1;try{async function o(){let t=new Uint8Array(16);return await w(e,t,void 0,{maximumLength:t.length,reason:"ASF header GUID"}),{id:t,size:Number(await e.readToken(i.UINT64_LE))}}await S(e,30,{maximumLength:30,reason:"ASF header prelude"});let r=z(e),a=e.position,n=0;for(;e.position+24<e.fileInfo.size&&!(++n>512||C(e,a,0x1000000));){let i=e.position,a=await o(),n=a.size-24;if(!Number.isFinite(n)||n<0){t=!0;break}if(M(a.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let t=new Uint8Array(16);if(n-=await w(e,t,void 0,{maximumLength:t.length,reason:"ASF stream type GUID"}),M(t,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(M(t,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(r&&n>1048576||(await S(e,n,{maximumLength:r?1048576:e.fileInfo.size,reason:"ASF header payload"}),e.position<=i)){t=!0;break}}}catch(i){if(i instanceof r.EndOfStreamError||i instanceof b)z(e)&&(t=!0);else throw i}if(t)return;return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new i.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("<?xml ",{offset:2,encoding:"utf-16be"})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let e=new DataView(this.buffer.buffer).getUint32(12,!0);if(e>12&&this.buffer.length>=e+16)try{let t=new TextDecoder().decode(this.buffer.subarray(16,e+16));if(JSON.parse(t).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188})||this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&function(e,t=0){let r=Number.parseInt(new i.StringType(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(r))return!1;let a=256;for(let i=t;i<t+148;i++)a+=e[i];for(let i=t+156;i<t+512;i++)a+=e[i];return r===a}(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let e="utf-16le";return this.checkString("<?xml ",{offset:2,encoding:e})?{ext:"xml",mime:"application/xml"}:this.check([255,14],{offset:2})&&this.checkString("SketchUp Model",{offset:4,encoding:e})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:this.checkString("Windows Registry Editor Version 5.00\r\n",{offset:2,encoding:e})?{ext:"reg",mime:"application/x-ms-regedit"}:void 0}if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async e=>{var t;this.buffer=new Uint8Array(4100);let i=Number.isFinite(t=e.fileInfo.size)?Math.max(0,t):Number.MAX_SAFE_INTEGER;if(await e.peekBuffer(this.buffer,{length:Math.min(8,i),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,i),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let e=0;e<=this.options.mpegOffsetTolerance;++e){let t=this.scanMpeg(e);if(t)return t}};async readTiffTag(e){let t=await this.tokenizer.readToken(e?i.UINT16_BE:i.UINT16_LE);switch(await this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e){let t=await this.tokenizer.readToken(e?i.UINT16_BE:i.UINT16_LE);if(!(t>512)&&(!z(this.tokenizer)||!(2+12*t>0x1000000)))for(let i=0;i<t;++i){let t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){let t={ext:"tif",mime:"image/tiff"},a=(e?i.UINT16_BE:i.UINT16_LE).get(this.buffer,2),n=(e?i.UINT32_BE:i.UINT32_LE).get(this.buffer,4);if(42===a){let a;if(n>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(n>=8){let t=(e?i.UINT16_BE:i.UINT16_LE).get(this.buffer,8),r=(e?i.UINT16_BE:i.UINT16_LE).get(this.buffer,10);if(28===t&&254===r||31===t&&11===r)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(z(this.tokenizer)&&n>1048576)return t;let s=z(this.tokenizer)?0x1000000:this.tokenizer.fileInfo.size;try{await S(this.tokenizer,n,{maximumLength:s,reason:"TIFF IFD offset"})}catch(e){if(e instanceof r.EndOfStreamError)return;throw e}try{a=await this.readTiffIFD(e)}catch(e){if(e instanceof r.EndOfStreamError)return;throw e}return a??t}if(43===a)return t}scanMpeg(e){if(this.check([255,224],{offset:e,mask:[255,224]})){if(this.check([16],{offset:e+1,mask:[22]}))return this.check([8],{offset:e+1,mask:[8]}),{ext:"aac",mime:"audio/aac"};
1if(this.check([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}}var P=e.i(686257);let O=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/;var B=e.i(700282);let U={multiple:!1},X={year:U,track:U,disk:U,title:U,artist:U,artists:{multiple:!0,unique:!0},albumartist:U,albumartists:{multiple:!0,unique:!0},album:U,date:U,originaldate:U,originalyear:U,releasedate:U,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:U,subtitle:{multiple:!0},discsubtitle:U,totaltracks:U,totaldiscs:U,compilation:U,rating:{multiple:!0},bpm:U,mood:U,media:U,catalognumber:{multiple:!0,unique:!0},tvShow:U,tvShowSort:U,tvSeason:U,tvEpisode:U,tvEpisodeId:U,tvNetwork:U,podcast:U,podcasturl:U,releasestatus:U,releasetype:{multiple:!0},releasecountry:U,script:U,language:U,copyright:U,license:U,encodedby:U,encodersettings:U,gapless:U,barcode:U,isrc:{multiple:!0},asin:U,musicbrainz_recordingid:U,musicbrainz_trackid:U,musicbrainz_albumid:U,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:U,musicbrainz_workid:U,musicbrainz_trmid:U,musicbrainz_discid:U,acoustid_id:U,acoustid_fingerprint:U,musicip_puid:U,musicip_fingerprint:U,website:U,"performer:instrument":{multiple:!0,unique:!0},averageLevel:U,peakLevel:U,notes:{multiple:!0,unique:!1},key:U,originalalbum:U,originalartist:U,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:U,discogs_label_id:U,discogs_master_release_id:U,discogs_votes:U,discogs_rating:U,replaygain_track_peak:U,replaygain_track_gain:U,replaygain_album_peak:U,replaygain_album_gain:U,replaygain_track_minmax:U,replaygain_album_minmax:U,replaygain_undo:U,description:{multiple:!0},longDescription:U,category:{multiple:!0},hdVideo:U,keywords:{multiple:!0},movement:U,movementIndex:U,movementTotal:U,podcastId:U,showMovement:U,stik:U,playCounter:U};class G{static toIntOrNull(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?null:t}static normalizeTrack(e){let t=e.toString().split("/");return{no:Number.parseInt(t[0],10)||null,of:Number.parseInt(t[1],10)||null}}constructor(e,t){this.tagTypes=e,this.tagMap=t}mapGenericTag(e,t){e={id:e.id,value:e.value},this.postMap(e,t);let i=this.getCommonName(e.id);return i?{id:i,value:e.value}:null}getCommonName(e){return this.tagMap[e]}postMap(e,t){}}G.maxRatingScore=1;let F={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"};class j extends G{constructor(){super(["ID3v1"],F)}}class W extends G{constructor(e,t){const i={};for(const e of Object.keys(t))i[e.toUpperCase()]=t[e];super(e,i)}getCommonName(e){return this.tagMap[e.toUpperCase()]}}var $=e.i(604826);let q={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"
1catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"};class Z extends W{static toRating(e){return{source:e.email,rating:e.rating>0?(e.rating-1)/254*G.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],q)}postMap(e,t){switch(e.id){case"UFID":{let t=e.value;"http://musicbrainz.org"===t.owner_identifier&&(e.id+=`:${t.owner_identifier}`,e.value=(0,$.decodeString)(t.identifier,"latin1"))}break;case"PRIV":{let r=e.value;switch(r.owner_identifier){case"AverageLevel":case"PeakValue":e.id+=`:${r.owner_identifier}`,e.value=4===r.data.length?i.UINT32_LE.get(r.data,0):null,null===e.value&&t.addWarning("Failed to parse PRIV:PeakValue");break;default:t.addWarning(`Unknown PRIV owner-identifier: ${r.data}`)}}break;case"POPM":e.value=Z.toRating(e.value)}}}let V={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/
1Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"};class H extends G{static toRating(e){return{rating:Number.parseFloat(e+1)/5}}constructor(){super(["asf"],V)}postMap(e){if("WM/SharedUserRating"===e.id){let t=e.id.split(":");e.value=H.toRating(e.value),e.id=t[0]}}}let Y={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"c
1opyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"};class K extends W{constructor(){super(["ID3v2.2"],Y)}}let J={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"};class Q extends W{constructor(){super(["APEv2"],J)}}let ee={"©nam":"title","©ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","©alb":"album","©day":"date","©cmt":"comment","©com":"comment",trkn:"track",disk:"disk","©gen":"genre",covr:"picture","©wrt":"composer","©lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","©grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","©cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","©too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","©mvn":"movement","©mvi":"movementIndex","©mvc":"movementTotal","©wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"};class et extends W{constructor(){super(["iTunes"],ee)}postMap(e,t){"rate"===e.id&&(e.value={source:void 0,rating:Number.parseFloat(e.value)/100})}}let ei={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT
1:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"};class er extends G{static toRating(e,t,i){return{source:e?e.toLowerCase():void 0,rating:Number.parseFloat(t)/i*G.maxRatingScore}}constructor(){super(["vorbis"],ei)}postMap(e){if("RATING"===e.id)e.value=er.toRating(void 0,e.value,100);else if(0===e.id.indexOf("RATING:")){let t=e.id.split(":");e.value=er.toRating(t[1],e.value,1),e.id=t[0]}}}let ea={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"};class en extends G{constructor(){super(["exif"],ea)}}let es={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"};class eo extends W{constructor(){super(["matroska"],es)}}let ec={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"};class el extends G{constructor(){super(["AIFF"],ec)}}var em=e.i(467956);class eu{constructor(){this.tagMappers={},[new j,new K,new Z,new et,new et,new er,new Q,new H,new en,new eo,new el].forEach(e=>{this.registerTagMapper(e)})}mapTag(e,t,i){if(this.tagMappers[e])return this.tagMappers[e].mapGenericTag(t,i);throw new em.InternalParserError(`No generic tag mapper defined for tag-format: ${e}`)}registerTagMapper(e){for(let t of e.tagTypes)this.tagMappers[t]=e}}var ep=e.i(379200);let ed=/\[(\d{2}):(\d{2})\.(\d{2,3})]/,ef=(0,a.default)("music-metadata:collector"),eh=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"];class eg{constructor(e){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}}
1,this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new eu,this.opts=e;let t=1;for(const e of eh)this.originPriority[e]=t++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(e){ef(`streamInfo: type=${e.type?B.TrackTypeValueToKeyMap[e.type]:"?"}, codec=${e.codecName}`),this.format.trackInfo.push(e)}setFormat(e,t){ef(`format: ${e} = ${t}`),this.format[e]=t,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:e,value:t}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(e,t,i){ef(`tag ${e}.${t} = ${i}`),this.native[e]||(this.format.tagTypes.push(e),this.native[e]=[]),this.native[e].push({id:t,value:i}),await this.toCommon(e,t,i)}addWarning(e){this.quality.warnings.push({message:e})}async postMap(e,t){switch(t.id){case"artist":return this.handleSingularArtistTag(e,t,"artist","artists");case"albumartist":return this.handleSingularArtistTag(e,t,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(e,t,"artist","artists");case"albumartists":return this.handlePluralArtistTag(e,t,"albumartist","albumartists");case"picture":return this.postFixPicture(t.value).then(i=>{null!==i&&(t.value=i,this.setGenericTag(e,t))});case"totaltracks":this.common.track.of=G.toIntOrNull(t.value);return;case"totaldiscs":this.common.disk.of=G.toIntOrNull(t.value);return;case"movementTotal":this.common.movementIndex.of=G.toIntOrNull(t.value);return;case"track":case"disk":case"movementIndex":{let e=this.common[t.id].of;this.common[t.id]=G.normalizeTrack(t.value),this.common[t.id].of=null!=e?e:this.common[t.id].of;return}case"bpm":case"year":case"originalyear":t.value=Number.parseInt(t.value,10);break;case"date":{let e=Number.parseInt(t.value.substr(0,4),10);Number.isNaN(e)||(this.common.year=e);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":t.value="string"==typeof t.value?Number.parseInt(t.value,10):t.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":t.value=(0,$.toRatio)(t.value);break;case"replaygain_track_minmax":t.value=t.value.split(",").map(e=>Number.parseInt(e,10));break;case"replaygain_undo":{let e=t.value.split(",").map(e=>Number.parseInt(e,10));t.value={leftChannel:e[0],rightChannel:e[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":t.value="1"===t.value||1===t.value;break;case"isrc":{let e=this.common[t.id];if(e&&-1!==e.indexOf(t.value))return;break}case"comment":"string"==typeof t.value&&(t.value={text:t.value}),"iTunPGAP"===t.value.descriptor&&this.setGenericTag(e,{id:"gapless",value:"1"===t.value.text});break;case"lyrics":var i,r;"string"==typeof t.value&&(i=t.value,t.value=ed.test(i)?function(e){let t=e.split("\n"),i=[];for(let e of t){let t=e.match(ed);if(t){let r=(60*Number.parseInt(t[1],10)+Number.parseInt(t[2],10))*1e3+(3===t[3].length?Number.parseInt(t[3],10):10*Number.parseInt(t[3],10)),a=e.replace(ed,"").trim();i.push({timestamp:r,text:a})}}return{contentType:ep.LyricsContentType.lyrics,timeStampFormat:ep.TimestampFormat.milliseconds,text:i.map(e=>e.text).join("\n"),syncText:i}}(i):(r=i,{contentType:ep.LyricsContentType.lyrics,timeStampFormat:ep.TimestampFormat.notSynchronized,text:r.trim(),syncText:[]}))}null!==t.value&&this.setGenericTag(e,t)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(e,t,i,r){if(this.commonOrigin[i]===this.originPriority[e])return this.postMap("artificial",{id:r,value:t.value});this.common[r]||this.setGenericTag("artificial",{id:r,value:t.value}),this.setGenericTag(e,t)}handlePluralArtistTag(e,t,i,r){if((!this.common[i]||this.commonOrigin[i]===this.originPriority.artificial)&&(!this.common[r]||-1===this.common[r].indexOf(t.value))){var a;let e=(a=(this.common[r]||[]).concat([t.value])).length>2?`${a.slice(0,a.length-1).join(", ")} & ${a[a.length-1]}`:a.join(" & ");this.setGenericTag("artificial",{id:i,value:e})}this.setGenericTag(e,t)}async postFixPicture(e){if(e.data&&e.data.length>0){if(!e.format){let t=await E(Uint8Array.from(e.data));if(!t)return null;e.format=t.mime}return e.format=e.format.toLocaleLowerCase(),"image/jpg"===e.format&&(e.format="image/jpeg"),e}return this.addWarning("Empty picture tag found"),null}async toCommon(e,t,i){let r=this.tagMapper.mapTag(e,{id:t,value:i},this);r&&await this.postMap(e,r)}setGenericTag(e,t){var i,r;ef(`common.${t.id} = ${t.value}`);let a=this.commonOrigin[t.id]||1e3,n=this.originPriority[e];if(X[i=t.id]&&!X[i].multiple)if(!(n<=a))return ef(`Ignore native tag (singleton): ${e}.${t.id} = ${t.value}`);else this.common[t.id]=t.value,this.commonOrigin[t.id]=n;else if(n===a)(!X[r=t.id].multiple||X[r].unique)&&-1!==this.common[t.id].indexOf(t.value)?ef(`Ignore duplicate value: ${e}.${t.id} = ${t.value}`):this.common[t.id].push(t.value);else{if(!(n<a))return ef(`Ignore native tag (list): ${e}.${t.id} = ${t.value}`);this.common[t.id]=[t.value],this.commonOrigin[t.id]=n}this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"common",id:t.id,value:t.value}})}}let eT={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],load:async()=>(await e.A(946525)).MpegParser},ek={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],load:async()=>(await e.A(940050)).APEv2Parser},ex={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],load:async()=>(await e.A(39646)).AsfParser},ey={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],load:async()=>(await e.A(456297)).DsdiffParser},eb={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],load:async()=>(await e.A(631183)).AIFFParser},eI={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],load:async()=>(await e.A(434323)).DsfParser},eS={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],load:async()=>(await e.A(753504)).FlacParser},ew={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],load:async()=>(await e.A(421860)).MatroskaParser},eA={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],load:async()=>(await e.A(196039)).MP4Parser},ev={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],load:async()=>(await e.A(126597)).MusepackParser},e_={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],load:async()=>(await e.A(568931)).OggParser},eE={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],load:async()=>(await e.A(381068)).WavPackParser},eR={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],load:async()=>(await e.A(474292)).WaveParser},eM=(0,a.default)("music-metadata:parser:factory");class ez{constructor(){this.parsers=[],[eS,eT,ek,eA,ew,eR,e_,ex,eb,eE,ev,eI,ey].forEac
1h(e=>{this.registerParser(e)})}registerParser(e){this.parsers.push(e)}async parse(e,t,i){if(e.supportsRandomAccess()?(eM("tokenizer supports random-access, scanning for appending headers"),await eO(e,i)):eM("tokenizer does not support random-access, cannot scan for appending headers"),!t){let i=new Uint8Array(4100);if(e.fileInfo.mimeType&&(t=this.findLoaderForContentType(e.fileInfo.mimeType)),!t&&e.fileInfo.path&&(t=this.findLoaderForExtension(e.fileInfo.path)),!t){eM("Guess parser on content..."),await e.peekBuffer(i,{mayBeLess:!0});let r=await E(i,{mpegOffsetTolerance:10});if(!r||!r.mime)throw new em.CouldNotDetermineFileTypeError("Failed to determine audio format");if(eM(`Guessed file type is mime=${r.mime}, extension=${r.ext}`),!(t=this.findLoaderForContentType(r.mime)))throw new em.UnsupportedFileTypeError(`Guessed MIME-type not supported: ${r.mime}`)}}eM(`Loading ${t.parserType} parser...`);let r=new eg(i),a=new(await t.load())(r,e,i??{});return eM(`Parser ${t.parserType} loaded`),await a.parse(),r.format.trackInfo&&(void 0===r.format.hasAudio&&r.setFormat("hasAudio",!!r.format.trackInfo.find(e=>e.type===B.TrackType.audio)),void 0===r.format.hasVideo&&r.setFormat("hasVideo",!!r.format.trackInfo.find(e=>e.type===B.TrackType.video))),r.toCommonMetadata()}findLoaderForExtension(e){var t;let i;if(!e)return;let r=(-1===(i=(t=e).lastIndexOf("."))?"":t.substring(i)).toLocaleLowerCase()||e;return this.parsers.find(e=>-1!==e.extensions.indexOf(r))}findLoaderForContentType(e){let t;if(!e)return;try{let i,r;i=P.default.parse(e),t={type:(r=function(e){let t;if(!O.test(e))throw TypeError(`Invalid media type: ${e}`);let i=e.indexOf("/"),r=e.slice(0,i).toLowerCase(),a=e.slice(i+1).toLowerCase(),n=a.lastIndexOf("+");return -1!==n&&(t=a.slice(n+1),a=a.slice(0,n)),{type:r,subtype:a,suffix:t}}(i.type)).type,subtype:r.subtype,suffix:r.suffix,parameters:i.parameters}}catch(t){eM(`Invalid HTTP Content-Type header value: ${e}`);return}let i=0===t.subtype.indexOf("x-")?t.subtype.substring(2):t.subtype;return this.parsers.find(e=>e.mimeTypes.find(e=>-1!==e.indexOf(`${t.type}/${i}`)))}getSupportedMimeTypes(){let e=new Set;return this.parsers.forEach(t=>{t.mimeTypes.forEach(t=>{e.add(t),e.add(t.replace("/","/x-"))})}),Array.from(e)}}var eC=e.i(989696),eN=e.i(569146),eL=e.i(439186);async function eD(e){let t=e.fileInfo.size;if(t>=143){let i=new Uint8Array(15),r=e.position;await e.readBuffer(i,{position:t-143}),e.setPosition(r);let a=(0,eL.textDecode)(i,"latin1");if("LYRICS200"===a.substring(6))return Number.parseInt(a.substring(0,6),10)+15}return 0}async function eP(e,i={}){let r=(0,t.fromBlob)(e);try{var a,n;return await (a=r,n=i,new ez().parse(a,void 0,n))}finally{await r.close()}}async function eO(e,t={}){let i=e.fileInfo.size;await (0,eN.hasID3v1Header)(e)&&(i-=128,i-=await eD(e)),t.apeHeader=await eC.APEv2Parser.findApeFooterOffset(e,i)}var eB=e.i(485954);e.s(["useAudioArtwork",0,function(e){let[t,i]=(0,eB.useState)(null),r=(0,eB.useRef)(null);return(0,eB.useEffect)(function(){if(!e)return void i(null);let t=!1,a=new AbortController;return(async()=>{try{var n;let s=await fetch(e,{signal:a.signal});if(!s.ok||t)return;let o=await s.blob();if(t)return;let c=(n=(await eP(o)).common.picture)?n.reduce((e,t)=>t.name&&t.name.toLowerCase()in["front","cover","cover (front)"]?t:e):null;if(!c||t)return;let l=new Blob([new Uint8Array(c.data)],{type:c.format}),m=URL.createObjectURL(l);t?URL.revokeObjectURL(m):(r.current=m,i(m))}catch{t||i(null)}})().catch(()=>{i(null)}),()=>{t=!0,a.abort(),r.current&&(URL.revokeObjectURL(r.current),r.current=null),i(null)}},[e]),t}],888315)},179301,e=>{"use strict";var t=e.i(931718),i=e.i(729386),r=e.i(485954);e.s(["AudioTile",0,function(e){let a,n,s,o=(0,i.c)(7),{size:c,artworkUrl:l}=e,[m,u]=(0,r.useState)(!1);o[0]!==l?(a=function(){if(!l)return void u(!1);u(!1);let e=new window.Image;e.onerror=()=>u(!0),e.src=l},n=[l],o[0]=l,o[1]=a,o[2]=n):(a=o[1],n=o[2]),(0,r.useEffect)(a,n);let p=l&&!m?l:"/app-icons/music.png";if("sm"===c){let e;return o[3]!==p?(e=(0,t.jsx)("div",{"aria-hidden":!0,className:"flex h-[26px] w-5 shrink-0 items-center justify-center overflow-hidden rounded bg-muted/50",children:(0,t.jsx)("img",{alt:"",className:"h-full w-full object-contain",height:26,src:p,width:20})}),o[3]=p,o[4]=e):e=o[4],e}
1return o[5]!==p?(s=(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 flex h-full w-full items-center justify-center overflow-hidden",children:(0,t.jsx)("img",{alt:"",className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",height:400,src:p,width:400})}),o[5]=p,o[6]=s):s=o[6],s}])},682883,193923,e=>{"use strict";var t=e.i(931718),i=e.i(729386),r=e.i(888315),a=e.i(985067),n=e.i(179301),s=e.i(470602),o=e.i(791019),c=e.i(688351),l=e.i(874597);e.i(972063);var m=e.i(739412),u=e.i(632137),p=e.i(990188),d=e.i(422082),f=e.i(642589),h=e.i(485954);let g=null;function T(e){g===e&&(e.pause(),g=null)}function k(e){let r,n,s,o,c,k,I,S,w,A,v,_,E,R,M,z,C,N,L,D=(0,i.c)(46),{url:P,fileName:O,posterUrl:B,size:U}=e,[X,G]=(0,h.useState)(!1),[F,j]=(0,h.useState)(!0),[W,$]=(0,h.useState)(1),q=(0,h.useRef)(null);D[0]!==O?(r=(0,a.getFileExtension)(O),D[0]=O,D[1]=r):r=D[1];let Z=r,V=(0,m.useVideoNearViewport)(q),H=B??void 0,Y=V&&!H?"metadata":"none";D[2]!==F||D[3]!==W?(n=()=>{let e=q.current;null!==e&&(e.muted=F,e.volume=W)},s=[F,W],D[2]=F,D[3]=W,D[4]=n,D[5]=s):(n=D[4],s=D[5]),(0,h.useEffect)(n,s),D[6]===Symbol.for("react.memo_cache_sentinel")?(o=function(){let e=q.current;return()=>{null!==e&&T(e)}},c=[],D[6]=o,D[7]=c):(o=D[6],c=D[7]),(0,h.useEffect)(o,c),D[8]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{let e=q.current;null!==e&&(g&&g!==e&&g.pause(),g=e,e.play().catch(()=>{}))},D[8]=k):k=D[8];let K=k;D[9]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{let e=q.current;null!==e&&T(e)},D[9]=I):I=D[9];let J=I;D[10]===Symbol.for("react.memo_cache_sentinel")?(S=e=>{e.stopPropagation(),j(b)},D[10]=S):S=D[10];let Q=S;D[11]===Symbol.for("react.memo_cache_sentinel")?(w=e=>{e>0?($(e),j(!1)):j(!0)},D[11]=w):w=D[11];let ee=w;if("sm"===U){let e,i;if(X){let e;return D[12]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{"aria-hidden":!0,className:"flex h-[26px] w-5 shrink-0 items-center justify-center overflow-hidden rounded bg-muted",children:(0,t.jsx)(p.Video,{className:"h-3 w-3 text-muted-foreground"})}),D[12]=e):e=D[12],e}return D[13]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{G(!0)},D[13]=e):e=D[13],D[14]!==H||D[15]!==P||D[16]!==Y?(i=(0,t.jsx)("div",{"aria-hidden":!0,className:"relative flex h-[26px] w-5 shrink-0 items-center justify-center overflow-hidden rounded bg-muted/50",children:(0,t.jsx)("video",{className:"h-full w-full object-cover",height:26,muted:!0,onError:e,playsInl
1ine:!0,poster:H,preload:Y,ref:q,src:P,width:20})}),D[14]=H,D[15]=P,D[16]=Y,D[17]=i):i=D[17],i}if(X&&!H){let e,i,r;return D[18]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(p.Video,{className:"h-10 w-10 text-muted-foreground"}),D[18]=e):e=D[18],D[19]!==Z?(i=Z&&(0,t.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-medium text-[10px] text-muted-foreground",children:Z}),D[19]=Z,D[20]=i):i=D[20],D[21]!==i?(r=(0,t.jsxs)("div",{"aria-hidden":!0,className:"flex h-full w-full flex-col items-center justify-center gap-2",children:[e,i]}),D[21]=i,D[22]=r):r=D[22],r}let et=H?"h-full w-full object-cover":"max-h-full max-w-full object-contain";D[23]!==et?(A=(0,u.cn)("transition-transform duration-300 group-hover:scale-105",et),D[23]=et,D[24]=A):A=D[24],D[25]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{G(!0)},D[25]=v):v=D[25],D[26]!==H||D[27]!==A||D[28]!==P||D[29]!==Y?(_=(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 flex h-full w-full items-center justify-center overflow-hidden",onMouseEnter:K,onMouseLeave:J,children:(0,t.jsx)("video",{className:A,loop:!0,muted:!0,onError:v,playsInl
1ine:!0,poster:H,preload:Y,ref:q,src:P})}),D[26]=H,D[27]=A,D[28]=P,D[29]=Y,D[30]=_):_=D[30];let ei=F?"Unmute":"Mute";D[31]!==F?(E=F?(0,t.jsx)(f.VolumeX,{className:"h-3.5 w-3.5"}):(0,t.jsx)(d.Volume2,{className:"h-3.5 w-3.5"}),D[31]=F,D[32]=E):E=D[32],D[33]!==ei||D[34]!==E?(R=(0,t.jsx)("button",{"aria-label":ei,className:"flex shrink-0 items-center justify-center text-white/90 transition-colors hover:text-white focus-visible:outline-none",onClick:Q,onPointerDown:y,type:"button",children:E}),D[33]=ei,D[34]=E,D[35]=R):R=D[35],D[36]===Symbol.for("react.memo_cache_sentinel")?(M=e=>ee(e),D[36]=M):M=D[36];let er=F?0:W;return D[37]===Symbol.for("react.memo_cache_sentinel")?(z=(0,t.jsxs)(l.Slider.Control,{className:"relative flex h-4 w-full cursor-pointer items-center",children:[(0,t.jsx)(l.Slider.Track,{className:"relative h-[3px] w-full grow overflow-hidden rounded-full bg-white/25",children:(0,t.jsx)(l.Slider.Indicator,{className:"h-full bg-white"})}),(0,t.jsx)(l.Slider.Thumb,{className:"block size-2.5 rounded-full bg-white shadow-sm focus-visible:outline-none"})]}),D[37]=z):z=D[37],D[38]!==er?(C=(0,t.jsx)(l.Slider.Root,{"aria-label":"Volume",className:"flex w-16 touch-none select-none items-center",max:1,min:0,onPointerDown:x,onValueChange:M,step:.05,value:er,children:z}),D[38]=er,D[39]=C):C=D[39],D[40]!==R||D[41]!==C?(N=(0,t.jsxs)("div",{className:"absolute right-0 bottom-0 left-0 flex items-center gap-1.5 bg-gradient-to-t from-black/55 to-transparent px-2 pt-4 pb-2 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[R,C]}),D[40]=R,D[41]=C,D[42]=N):N=D[42],D[43]!==_||D[44]!==N?(L=(0,t.jsxs)(t.Fragment,{children:[_,N]}),D[43]=_,D[44]=N,D[45]=L):L=D[45],L}function x(e){return e.stopPropagation()}function y(e){return e.stopPropagation()}function b(e){return!e}e.s(["VideoTile",0,k],193923),e.s(["FilePreviewTile",0,function(e){let l,m,u=(0,i.c)(26),{fileName:p,mediaType:d,previewUrl:f,size:h,url:g}=e,T=void 0===h?"lg":h,x=(void 0===d?"":d)||"",y=(0,r.useAudioArtwork)((0,a.isAudioType)(x)&&g?g:null);if((0,a.isImageType)(x,p)&&g){let e;return u[0]!==p||u[1]!==f||u[2]!==T||u[3]!==g?(e=(0,t.jsx)(c.ImageTile,{fileName:p,previewUrl:f,size:T,url:g}),u[0]=p,u[1]=f,u[2]=T,u[3]=g,u[4]=e):e=u[4],e}if((0,a.isVideoType)(x,p)&&g){let e;return u[5]!==p||u[6]!==f||u[7]!==T||u[8]!==g?(e=(0,t.jsx)(k,{fileName:p,posterUrl:f,size:T,url:g}),u[5]=p,u[6]=f,u[7]=T,u[8]=g,u[9]=e):e=u[9],e}if((0,a.isDocumentType)(x)){let e,i=g??void 0;return u[10]!==p||u[11]!==x||u[12]!==T||u[13]!==i?(e=(0,t.jsx)(s.DocumentTile,{fileName:p,mimeType:x,size:T,url:i}),u[10]=p,u[11]=x,u[12]=T,u[13]=i,u[14]=e):e=u[14],e}if((0,a.isAudioType)(x)){let e;return u[15]!==y||u[16]!==T?(e=(0,t.jsx)(n.AudioTile,{artworkUrl:y,size:T}),u[15]=y,u[16]=T,u[17]=e):e=u[17],e}u[18]!==p||u[19]!==x||u[20]!==T?(l=(0,o.getFileIcon)(x,T,p),u[18]=p,u[19]=x,u[20]=T,u[21]=l):l=u[21];let b=l;if("sm"===T){let e;return u[22]!==b?(e=(0,t.jsx)("div",{"aria-hidden":!0,className:"flex h-[26px] w-5 shrink-0 items-center justify-center overflow-hidden rounded bg-muted",children:b}),u[22]=b,u[23]=e):e=u[23],e}return u[24]!==b?(m=(0,t.jsx)("div",{"aria-hidden":!0,className:"flex h-full w-full items-center justify-center overflow-hidden",children:b}),u[24]=b,u[25]=m):m=u[25],m}],682883)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.