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lB,WAAayB,GAE3E0P,EAAa7D,EAAY4D,EAAO,GACtC,GAAmB,IAAfC,EACF,MAAM,IAAIxJ,MAAM,6DAA6DwJ,KAM/E,MAAM/C,EAAad,EAAY4D,EAAO,IAEhC7C,EAAuBb,EAAY0D,EAAO,IAE1C1C,EAAyBhB,EAAY0D,EAAO,IAE5CE,EAAgB9D,EAAY4D,EAAO,IACnCG,EAAwBH,EAAMhR,OAAS4M,EAC7C,GAAIsE,IAAkBC,EACpB,MAAM,IAAI1J,MAAM,qCAAqC0J,cAAkCD,KAKzF,MAAM9F,EAAe,IAAI1M,WAAWsS,EAAMpR,OAAQoR,EAAMnR,WAAa,GAAIqR,GACnE/F,EAAUsB,EAAarB,GAE7B,OAAmB,QAAf8C,GAAoD,aAA3BI,QACdT,EAA0B1P,EAAQ4S,EAAYxP,EAAG4J,EAASC,SAE1DgD,GAAYjQ,EAAQmQ,EAAwBH,EAAsBD,EAAY/C,EAASC,EAExG,CAEA,MAAM,IAAI3D,MAAM,8DAClB,CAwUe2J,CAAyBjT,EAAQiS,EAChD,CAI+BiB,CAASZ,GACtC,MAAO,CACLP,MACAC,QAASmB,OAAOC,YAAYpB,EAAQzN,KAAI9D,GAAK,CAACA,EAAEoM,KAAMpM,MAE1D,C","sources":["webpack://client-app/./node_modules/unzipit/dist/unzipit.module.js"],"sourcesContent":["/* unzipit@1.4.3, license MIT */\n/* global SharedArrayBuffer, process */\n\nfunction readBlobAsArrayBuffer(blob) {\n if (blob.arrayBuffer) {\n return blob.arrayBuffer();\n }\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('loadend', () => {\n resolve(reader.result);\n });\n reader.addEventListener('error', reject);\n reader.readAsArrayBuffer(blob);\n });\n}\n\nasync function readBlobAsUint8Array(blob) {\n const arrayBuffer = await readBlobAsArrayBuffer(blob);\n return new Uint8Array(arrayBuffer);\n}\n\nfunction isBlob(v) {\n return typeof Blob !== 'undefined' && v instanceof Blob;\n}\n\nfunction isSharedArrayBuffer(b) {\n return typeof SharedArrayBuffer !== 'undefined' && b instanceof SharedArrayBuffer;\n}\n\nconst isNode =\n (typeof process !== 'undefined') &&\n process.versions &&\n (typeof process.versions.node !== 'undefined') &&\n (typeof process.versions.electron === 'undefined');\n\nfunction isTypedArraySameAsArrayBuffer(typedArray) {\n return typedArray.byteOffset === 0 && typedArray.byteLength === typedArray.buffer.byteLength;\n}\n\nclass ArrayBufferReader {\n constructor(arrayBufferOrView) {\n this.typedArray = (arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView))\n ? new Uint8Array(arrayBufferOrView)\n : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength);\n }\n async getLength() {\n return this.typedArray.byteLength;\n }\n async read(offset, length) {\n return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset, length);\n }\n}\n\nclass BlobReader {\n constructor(blob) {\n this.blob = blob;\n }\n async getLength() {\n return this.blob.size;\n }\n async read(offset, length) {\n const blob = this.blob.slice(offset, offset + length);\n const arrayBuffer = await readBlobAsArrayBuffer(blob);\n return new Uint8Array(arrayBuffer);\n }\n async sliceAsBlob(offset, length, type = '') {\n return this.blob.slice(offset, offset + length, type);\n }\n}\n\nclass HTTPRangeReader {\n constructor(url) {\n this.url = url;\n }\n async getLength() {\n if (this.length === undefined) {\n const req = await fetch(this.url, { method: 'HEAD' });\n if (!req.ok) {\n throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);\n }\n this.length = parseInt(req.headers.get('content-length'));\n if (Number.isNaN(this.length)) {\n throw Error('could not get length');\n }\n }\n return this.length;\n }\n async read(offset, size) {\n if (size === 0) {\n return new Uint8Array(0);\n }\n const req = await fetch(this.url, {\n headers: {\n Range: `bytes=${offset}-${offset + size - 1}`,\n },\n });\n if (!req.ok) {\n throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset} size: ${size}: ${req.statusText}`);\n }\n const buffer = await req.arrayBuffer();\n return new Uint8Array(buffer);\n }\n}\n\nfunction inflate(data, buf) {\n\tvar u8=Uint8Array;\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\n\tvar bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17;\n\t\n\tvar noBuf = (buf==null);\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\n\t\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\n\tvar off = 0, pos = 0;\n\tvar lmap, dmap;\n\t\n\twhile(BFINAL==0) {\t\t\n\t\tBFINAL = bitsF(data, pos , 1);\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\n\t\t//console.log(BFINAL, BTYPE);\n\t\t\n\t\tif(BTYPE==0) {\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \n\t\t\tif(noBuf) buf=_check(buf, off+len);\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\n\t\t\t//for(var i=0; itl)tl=l; } pos+=3*HCLEN; //console.log(itree);\n\t\t\tmakeCodes(U.itree, tl);\n\t\t\tcodes2map(U.itree, tl, U.imap);\n\t\t\t\n\t\t\tlmap = U.lmap; dmap = U.dmap;\n\t\t\t\n\t\t\tpos = decodeTiny(U.imap, (1<>>24))-1; pos+=(ml&0xffffff);\n\t\t\tmakeCodes(U.ltree, mx0);\n\t\t\tcodes2map(U.ltree, mx0, lmap);\n\t\t\t\n\t\t\t//var md = decodeTiny(U.imap, (1<>>24))-1; pos+=(md&0xffffff);\n\t\t\tmakeCodes(U.dtree, mx1);\n\t\t\tcodes2map(U.dtree, mx1, dmap);\n\t\t}\n\t\t//var ooff=off, opos=pos;\n\t\twhile(true) {\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\n\t\t\telse if(lit==256) { break; }\n\t\t\telse {\n\t\t\t\tvar end = off+lit-254;\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\n\t\t\t\t//dst[end-off]++;\n\t\t\t\t\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\n\t\t\t\tvar dlit = dcode>>>4;\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\n\t\t\t\t\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\n\t\t\t\t//if(stp>20) while(off>>3);\n\t}\n\t//console.log(dst);\n\t//console.log(tlen, dlen, off-tlen+tcnt);\n\treturn buf.length==off ? buf : buf.slice(0,off);\n}\nfunction _check(buf, len) {\n\tvar bl=buf.length; if(len<=bl) return buf;\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\n\t//for(var i=0; i>>4; \n\t\tif(lit<=15) { tree[i]=lit; i++; }\n\t\telse {\n\t\t\tvar ll = 0, n = 0;\n\t\t\tif(lit==16) {\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\n\t\t\t}\n\t\t\telse if(lit==17) {\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\n\t\t\t}\n\t\t\telse if(lit==18) {\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\n\t\t\t}\n\t\t\tvar ni = i+n;\n\t\t\twhile(i>>1;\n\twhile(imx)mx=v; i++; }\n\twhile(i>1;\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<>>(15-MAX_BITS);\n\t\twhile(i0!=i1) {\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\n\t\t\tmap[p0]=val; i0++;\n\t\t}\n\t}\n}\nfunction revCodes(tree, MAX_BITS) {\n\tvar r15 = U.rev15, imb = 15-MAX_BITS;\n\tfor(var i=0; i>>imb; }\n}\n\nfunction _bitsE(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\n} */\nfunction _get17(dt, pos) {\t// return at least 17 meaningful bytes\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\n}\nconst U = function(){\n\tvar u16=Uint16Array, u32=Uint32Array;\n\treturn {\n\t\tnext_code : new u16(16),\n\t\tbl_count : new u16(16),\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n\t\tof0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n\t\tldef : new u16(32),\n\t\tdf0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n\t\tddef : new u32(32),\n\t\tflmap: new u16( 512), fltree: [],\n\t\tfdmap: new u16( 32), fdtree: [],\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\n\t\tdmap : new u16(32768), dtree : [],\n\t\timap : new u16( 512), itree : [],\n\t\t//rev9 : new u16( 512)\n\t\trev15: new u16(1<<15),\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n\t\tlits : new u32(15000),\n\t\tstrt : new u16(1<<16),\n\t\tprev : new u16(1<<15)\n\t}; \n} ();\n\n(function(){\t\n\tvar len = 1<<15;\n\tfor(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n\t}\n\t\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n\t\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n\t\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n\t/*\n\tvar i = 0;\n\tfor(; i<=143; i++) U.fltree.push(0,8);\n\tfor(; i<=255; i++) U.fltree.push(0,9);\n\tfor(; i<=279; i++) U.fltree.push(0,7);\n\tfor(; i<=287; i++) U.fltree.push(0,8);\n\t*/\n\tmakeCodes(U.fltree, 9);\n\tcodes2map(U.fltree, 9, U.flmap);\n\trevCodes (U.fltree, 9);\n\t\n\tpushV(U.fdtree,32,5);\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\n\tmakeCodes(U.fdtree, 5);\n\tcodes2map(U.fdtree, 5, U.fdmap);\n\trevCodes (U.fdtree, 5);\n\t\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n\t/*\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\n\t*/\n})();\n\nconst crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n};\r\n\r\nfunction inflateRaw(file, buf) { return inflate(file, buf); }\n\n/* global module */\n\nconst config = {\n numWorkers: 1,\n workerURL: '',\n useWorkers: false,\n};\n\nlet nextId = 0;\n\n// Requests are put on a queue.\n// We don't send the request to the worker until the worker\n// is finished. This probably adds a small amount of latency\n// but the issue is imagine you have 2 workers. You give worker\n// A x seconds of work to do and worker B y seconds of work to\n// do. You don't know which will finish first. If you give\n// the worker with more work to do the request then you'll\n// waste time.\n\n// note: we can't check `workers.length` for deciding if\n// we've reached `config.numWorkers` because creation the worker\n// is async which means other requests to make workers might\n// come in before a worker gets added to `workers`\nlet numWorkers = 0;\nlet canUseWorkers = true; // gets set to false if we can't start a worker\nconst workers = [];\nconst availableWorkers = [];\nconst waitingForWorkerQueue = [];\nconst currentlyProcessingIdToRequestMap = new Map();\n\nfunction handleResult(e) {\n makeWorkerAvailable(e.target);\n const {id, error, data} = e.data;\n const request = currentlyProcessingIdToRequestMap.get(id);\n currentlyProcessingIdToRequestMap.delete(id);\n if (error) {\n request.reject(error);\n } else {\n request.resolve(data);\n }\n}\n\n// Because Firefox uses non-standard onerror to signal an error.\nfunction startWorker(url) {\n return new Promise((resolve, reject) => {\n const worker = new Worker(url);\n worker.onmessage = (e) => {\n if (e.data === 'start') {\n worker.onerror = undefined;\n worker.onmessage = undefined;\n resolve(worker);\n } else {\n reject(new Error(`unexpected message: ${e.data}`));\n }\n };\n worker.onerror = reject;\n });\n}\n\nfunction dynamicRequire(mod, request) {\n return mod.require ? mod.require(request) : {};\n}\n\nconst workerHelper = (function() {\n if (isNode) {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n const {Worker} = dynamicRequire(module, 'worker_threads');\n return {\n async createWorker(url) {\n return new Worker(url);\n },\n addEventListener(worker, fn) {\n worker.on('message', (data) => {\n fn({target: worker, data});\n });\n },\n async terminate(worker) {\n await worker.terminate();\n },\n };\n } else {\n return {\n async createWorker(url) {\n // I don't understand this security issue\n // Apparently there is some iframe setting or http header\n // that prevents cross domain workers. But, I can manually\n // download the text and do it. I reported this to Chrome\n // and they said it was fine so ¯\\_(ツ)_/¯\n try {\n const worker = await startWorker(url);\n return worker;\n } catch (e) {\n console.warn('could not load worker:', url);\n }\n\n let text;\n try {\n const req = await fetch(url, {mode: 'cors'});\n if (!req.ok) {\n throw new Error(`could not load: ${url}`);\n }\n text = await req.text();\n url = URL.createObjectURL(new Blob([text], {type: 'application/javascript'}));\n const worker = await startWorker(url);\n config.workerURL = url; // this is a hack. What's a better way to structure this code?\n return worker;\n } catch (e) {\n console.warn('could not load worker via fetch:', url);\n }\n\n if (text !== undefined) {\n try {\n url = `data:application/javascript;base64,${btoa(text)}`;\n const worker = await startWorker(url);\n config.workerURL = url;\n return worker;\n } catch (e) {\n console.warn('could not load worker via dataURI');\n }\n }\n\n console.warn('workers will not be used');\n throw new Error('can not start workers');\n },\n addEventListener(worker, fn) {\n worker.addEventListener('message', fn);\n },\n async terminate(worker) {\n worker.terminate();\n },\n };\n }\n}());\n\nfunction makeWorkerAvailable(worker) {\n availableWorkers.push(worker);\n processWaitingForWorkerQueue();\n}\n\nasync function getAvailableWorker() {\n if (availableWorkers.length === 0 && numWorkers < config.numWorkers) {\n ++numWorkers; // see comment at numWorkers declaration\n try {\n const worker = await workerHelper.createWorker(config.workerURL);\n workers.push(worker);\n availableWorkers.push(worker);\n workerHelper.addEventListener(worker, handleResult);\n } catch (e) {\n // set this global out-of-band (needs refactor)\n canUseWorkers = false;\n }\n }\n return availableWorkers.pop();\n}\n\n// @param {Uint8Array} src\n// @param {number} uncompressedSize\n// @param {string} [type] mime-type\n// @returns {ArrayBuffer|Blob} ArrayBuffer if type is falsy or Blob otherwise.\nfunction inflateRawLocal(src, uncompressedSize, type, resolve) {\n const dst = new Uint8Array(uncompressedSize);\n inflateRaw(src, dst);\n resolve(type\n ? new Blob([dst], {type})\n : dst.buffer);\n}\n\nasync function processWaitingForWorkerQueue() {\n if (waitingForWorkerQueue.length === 0) {\n return;\n }\n\n if (config.useWorkers && canUseWorkers) {\n const worker = await getAvailableWorker();\n // canUseWorkers might have been set out-of-band (need refactor)\n if (canUseWorkers) {\n if (worker) {\n if (waitingForWorkerQueue.length === 0) {\n // the queue might be empty while we awaited for a worker.\n makeWorkerAvailable(worker);\n return;\n }\n const {id, src, uncompressedSize, type, resolve, reject} = waitingForWorkerQueue.shift();\n currentlyProcessingIdToRequestMap.set(id, {id, resolve, reject});\n const transferables = [];\n // NOTE: Originally I thought you could transfer an ArrayBuffer.\n // The code on this side is often using views into the entire file\n // which means if we transferred we'd lose the entire file. That sucks\n // because it means there's an expensive copy to send the uncompressed\n // data to the worker.\n //\n // Also originally I thought we could send a Blob but we'd need to refactor\n // the code in unzipit/readEntryData as currently it reads the uncompressed\n // bytes.\n //\n //if (!isBlob(src) && !isSharedArrayBuffer(src)) {\n // transferables.push(src);\n //}\n worker.postMessage({\n type: 'inflate',\n data: {\n id,\n type,\n src,\n uncompressedSize,\n },\n }, transferables);\n }\n return;\n }\n }\n\n // inflate locally\n // We loop here because what happens if many requests happen at once\n // the first N requests will try to async make a worker. Other requests\n // will then be on the queue. But if we fail to make workers then there\n // are pending requests.\n while (waitingForWorkerQueue.length) {\n const {src, uncompressedSize, type, resolve} = waitingForWorkerQueue.shift();\n let data = src;\n if (isBlob(src)) {\n data = await readBlobAsUint8Array(src);\n }\n inflateRawLocal(data, uncompressedSize, type, resolve);\n }\n}\n\nfunction setOptions(options) {\n config.workerURL = options.workerURL || config.workerURL;\n // there's no reason to set the workerURL if you're not going to use workers\n if (options.workerURL) {\n config.useWorkers = true;\n }\n config.useWorkers = options.useWorkers !== undefined ? options.useWorkers : config.useWorkers;\n config.numWorkers = options.numWorkers || config.numWorkers;\n}\n\n// It has to take non-zero time to put a large typed array in a Blob since the very\n// next instruction you could change the contents of the array. So, if you're reading\n// the zip file for images/video/audio then all you want is a Blob on which to get a URL.\n// so that operation of putting the data in a Blob should happen in the worker.\n//\n// Conversely if you want the data itself then you want an ArrayBuffer immediately\n// since the worker can transfer its ArrayBuffer zero copy.\n//\n// @param {Uint8Array|Blob} src\n// @param {number} uncompressedSize\n// @param {string} [type] falsy or mimeType string (eg: 'image/png')\n// @returns {ArrayBuffer|Blob} ArrayBuffer if type is falsy or Blob otherwise.\nfunction inflateRawAsync(src, uncompressedSize, type) {\n return new Promise((resolve, reject) => {\n // note: there is potential an expensive copy here. In order for the data\n // to make it into the worker we need to copy the data to the worker unless\n // it's a Blob or a SharedArrayBuffer.\n //\n // Solutions:\n //\n // 1. A minor enhancement, if `uncompressedSize` is small don't call the worker.\n //\n // might be a win period as their is overhead calling the worker\n //\n // 2. Move the entire library to the worker\n //\n // Good, Maybe faster if you pass a URL, Blob, or SharedArrayBuffer? Not sure about that\n // as those are also easy to transfer. Still slow if you pass an ArrayBuffer\n // as the ArrayBuffer has to be copied to the worker.\n //\n // I guess benchmarking is really the only thing to try.\n waitingForWorkerQueue.push({src, uncompressedSize, type, resolve, reject, id: nextId++});\n processWaitingForWorkerQueue();\n });\n}\n\nfunction clearArray(arr) {\n arr.splice(0, arr.length);\n}\n\nasync function cleanup() {\n for (const worker of workers) {\n await workerHelper.terminate(worker);\n }\n clearArray(workers);\n clearArray(availableWorkers);\n clearArray(waitingForWorkerQueue);\n currentlyProcessingIdToRequestMap.clear();\n numWorkers = 0;\n canUseWorkers = true;\n}\n\n/*\nclass Zip {\n constructor(reader) {\n comment, // the comment for this entry\n commentBytes, // the raw comment for this entry\n }\n}\n*/\n\nfunction dosDateTimeToDate(date, time) {\n const day = date & 0x1f; // 1-31\n const month = (date >> 5 & 0xf) - 1; // 1-12, 0-11\n const year = (date >> 9 & 0x7f) + 1980; // 0-128, 1980-2108\n\n const millisecond = 0;\n const second = (time & 0x1f) * 2; // 0-29, 0-58 (even numbers)\n const minute = time >> 5 & 0x3f; // 0-59\n const hour = time >> 11 & 0x1f; // 0-23\n\n return new Date(year, month, day, hour, minute, second, millisecond);\n}\n\nclass ZipEntry {\n constructor(reader, rawEntry) {\n this._reader = reader;\n this._rawEntry = rawEntry;\n this.name = rawEntry.name;\n this.nameBytes = rawEntry.nameBytes;\n this.size = rawEntry.uncompressedSize;\n this.compressedSize = rawEntry.compressedSize;\n this.comment = rawEntry.comment;\n this.commentBytes = rawEntry.commentBytes;\n this.compressionMethod = rawEntry.compressionMethod;\n this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime);\n this.isDirectory = rawEntry.uncompressedSize === 0 && rawEntry.name.endsWith('/');\n this.encrypted = !!(rawEntry.generalPurposeBitFlag & 0x1);\n this.externalFileAttributes = rawEntry.externalFileAttributes;\n this.versionMadeBy = rawEntry.versionMadeBy;\n }\n // returns a promise that returns a Blob for this entry\n async blob(type = 'application/octet-stream') {\n return await readEntryDataAsBlob(this._reader, this._rawEntry, type);\n }\n // returns a promise that returns an ArrayBuffer for this entry\n async arrayBuffer() {\n return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry);\n }\n // returns text, assumes the text is valid utf8. If you want more options decode arrayBuffer yourself\n async text() {\n const buffer = await this.arrayBuffer();\n return decodeBuffer(new Uint8Array(buffer));\n }\n // returns text with JSON.parse called on it. If you want more options decode arrayBuffer yourself\n async json() {\n const text = await this.text();\n return JSON.parse(text);\n }\n}\n\nconst EOCDR_WITHOUT_COMMENT_SIZE = 22;\nconst MAX_COMMENT_SIZE = 0xffff; // 2-byte size\nconst EOCDR_SIGNATURE = 0x06054b50;\nconst ZIP64_EOCDR_SIGNATURE = 0x06064b50;\n\nasync function readAs(reader, offset, length) {\n return await reader.read(offset, length);\n}\n\n// The point of this function is we want to be able to pass the data\n// to a worker as fast as possible so when decompressing if the data\n// is already a blob and we can get a blob then get a blob.\n//\n// I'm not sure what a better way to refactor this is. We've got examples\n// of multiple readers. Ideally, for every type of reader we could ask\n// it, \"give me a type that is zero copy both locally and when sent to a worker\".\n//\n// The problem is the worker would also have to know the how to handle this\n// opaque type. I suppose the correct solution is to register different\n// reader handlers in the worker so BlobReader would register some\n// `handleZeroCopyType`. At the moment I don't feel like\n// refactoring. As it is you just pass in an instance of the reader\n// but instead you'd have to register the reader and some how get the\n// source for the `handleZeroCopyType` handler function into the worker.\n// That sounds like a huge PITA, requiring you to put the implementation\n// in a separate file so the worker can load it or some other workaround\n// hack.\n//\n// For now this hack works even if it's not generic.\nasync function readAsBlobOrTypedArray(reader, offset, length, type) {\n if (reader.sliceAsBlob) {\n return await reader.sliceAsBlob(offset, length, type);\n }\n return await reader.read(offset, length);\n}\n\nconst crc$1 = {\n unsigned() {\n return 0;\n },\n};\n\nfunction getUint16LE(uint8View, offset) {\n return uint8View[offset ] +\n uint8View[offset + 1] * 0x100;\n}\n\nfunction getUint32LE(uint8View, offset) {\n return uint8View[offset ] +\n uint8View[offset + 1] * 0x100 +\n uint8View[offset + 2] * 0x10000 +\n uint8View[offset + 3] * 0x1000000;\n}\n\nfunction getUint64LE(uint8View, offset) {\n return getUint32LE(uint8View, offset) +\n getUint32LE(uint8View, offset + 4) * 0x100000000;\n}\n\n/* eslint-disable no-irregular-whitespace */\n// const decodeCP437 = (function() {\n// const cp437 = '\\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ';\n//\n// return function(uint8view) {\n// return Array.from(uint8view).map(v => cp437[v]).join('');\n// };\n// }());\n/* eslint-enable no-irregular-whitespace */\n\nconst utf8Decoder = new TextDecoder();\nfunction decodeBuffer(uint8View, isUTF8) { /* eslint-disable-line no-unused-vars */ /* lgtm [js/superfluous-trailing-arguments] */\n if (isSharedArrayBuffer(uint8View.buffer)) {\n uint8View = new Uint8Array(uint8View);\n }\n return utf8Decoder.decode(uint8View);\n /*\n AFAICT the UTF8 flat is not set so it's 100% up to the user\n to self decode if their file is not utf8 filenames\n return isUTF8\n ? utf8Decoder.decode(uint8View)\n : decodeCP437(uint8View);\n */\n}\n\nasync function findEndOfCentralDirector(reader, totalLength) {\n const size = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);\n const readStart = totalLength - size;\n const data = await readAs(reader, readStart, size);\n for (let i = size - EOCDR_WITHOUT_COMMENT_SIZE; i >= 0; --i) {\n if (getUint32LE(data, i) !== EOCDR_SIGNATURE) {\n continue;\n }\n\n // 0 - End of central directory signature\n const eocdr = new Uint8Array(data.buffer, data.byteOffset + i, data.byteLength - i);\n // 4 - Number of this disk\n const diskNumber = getUint16LE(eocdr, 4);\n if (diskNumber !== 0) {\n throw new Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`);\n }\n\n // 6 - Disk where central directory starts\n // 8 - Number of central directory records on this disk\n // 10 - Total number of central directory records\n const entryCount = getUint16LE(eocdr, 10);\n // 12 - Size of central directory (bytes)\n const centralDirectorySize = getUint32LE(eocdr, 12);\n // 16 - Offset of start of central directory, relative to start of archive\n const centralDirectoryOffset = getUint32LE(eocdr, 16);\n // 20 - Comment length\n const commentLength = getUint16LE(eocdr, 20);\n const expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE;\n if (commentLength !== expectedCommentLength) {\n throw new Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`);\n }\n\n // 22 - Comment\n // the encoding is always cp437.\n const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength);\n const comment = decodeBuffer(commentBytes);\n\n if (entryCount === 0xffff || centralDirectoryOffset === 0xffffffff) {\n return await readZip64CentralDirectory(reader, readStart + i, comment, commentBytes);\n } else {\n return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);\n }\n }\n\n throw new Error('could not find end of central directory. maybe not zip file');\n}\n\nconst END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 0x07064b50;\n\nasync function readZip64CentralDirectory(reader, offset, comment, commentBytes) {\n // ZIP64 Zip64 end of central directory locator\n const zip64EocdlOffset = offset - 20;\n const eocdl = await readAs(reader, zip64EocdlOffset, 20);\n\n // 0 - zip64 end of central dir locator signature\n if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) {\n throw new Error('invalid zip64 end of central directory locator signature');\n }\n\n // 4 - number of the disk with the start of the zip64 end of central directory\n // 8 - relative offset of the zip64 end of central directory record\n const zip64EocdrOffset = getUint64LE(eocdl, 8);\n // 16 - total number of disks\n\n // ZIP64 end of central directory record\n const zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56);\n\n // 0 - zip64 end of central dir signature 4 bytes (0x06064b50)\n if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) {\n throw new Error('invalid zip64 end of central directory record signature');\n }\n // 4 - size of zip64 end of central directory record 8 bytes\n // 12 - version made by 2 bytes\n // 14 - version needed to extract 2 bytes\n // 16 - number of this disk 4 bytes\n // 20 - number of the disk with the start of the central directory 4 bytes\n // 24 - total number of entries in the central directory on this disk 8 bytes\n // 32 - total number of entries in the central directory 8 bytes\n const entryCount = getUint64LE(zip64Eocdr, 32);\n // 40 - size of the central directory 8 bytes\n const centralDirectorySize = getUint64LE(zip64Eocdr, 40);\n // 48 - offset of start of central directory with respect to the starting disk number 8 bytes\n const centralDirectoryOffset = getUint64LE(zip64Eocdr, 48);\n // 56 - zip64 extensible data sector (variable size)\n return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);\n}\n\nconst CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 0x02014b50;\n\nasync function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) {\n let readEntryCursor = 0;\n const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize);\n const rawEntries = [];\n\n for (let e = 0; e < rawEntryCount; ++e) {\n const buffer = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46);\n // 0 - Central directory file header signature\n const signature = getUint32LE(buffer, 0);\n if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) {\n throw new Error(`invalid central directory file header signature: 0x${signature.toString(16)}`);\n }\n const rawEntry = {\n // 4 - Version made by\n versionMadeBy: getUint16LE(buffer, 4),\n // 6 - Version needed to extract (minimum)\n versionNeededToExtract: getUint16LE(buffer, 6),\n // 8 - General purpose bit flag\n generalPurposeBitFlag: getUint16LE(buffer, 8),\n // 10 - Compression method\n compressionMethod: getUint16LE(buffer, 10),\n // 12 - File last modification time\n lastModFileTime: getUint16LE(buffer, 12),\n // 14 - File last modification date\n lastModFileDate: getUint16LE(buffer, 14),\n // 16 - CRC-32\n crc32: getUint32LE(buffer, 16),\n // 20 - Compressed size\n compressedSize: getUint32LE(buffer, 20),\n // 24 - Uncompressed size\n uncompressedSize: getUint32LE(buffer, 24),\n // 28 - File name length (n)\n fileNameLength: getUint16LE(buffer, 28),\n // 30 - Extra field length (m)\n extraFieldLength: getUint16LE(buffer, 30),\n // 32 - File comment length (k)\n fileCommentLength: getUint16LE(buffer, 32),\n // 34 - Disk number where file starts\n // 36 - Internal file attributes\n internalFileAttributes: getUint16LE(buffer, 36),\n // 38 - External file attributes\n externalFileAttributes: getUint32LE(buffer, 38),\n // 42 - Relative offset of local file header\n relativeOffsetOfLocalHeader: getUint32LE(buffer, 42),\n };\n\n if (rawEntry.generalPurposeBitFlag & 0x40) {\n throw new Error('strong encryption is not supported');\n }\n\n readEntryCursor += 46;\n\n const data = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength);\n rawEntry.nameBytes = data.slice(0, rawEntry.fileNameLength);\n rawEntry.name = decodeBuffer(rawEntry.nameBytes);\n\n // 46+n - Extra field\n const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength;\n const extraFieldBuffer = data.slice(rawEntry.fileNameLength, fileCommentStart);\n rawEntry.extraFields = [];\n let i = 0;\n while (i < extraFieldBuffer.length - 3) {\n const headerId = getUint16LE(extraFieldBuffer, i + 0);\n const dataSize = getUint16LE(extraFieldBuffer, i + 2);\n const dataStart = i + 4;\n const dataEnd = dataStart + dataSize;\n if (dataEnd > extraFieldBuffer.length) {\n throw new Error('extra field length exceeds extra field buffer size');\n }\n rawEntry.extraFields.push({\n id: headerId,\n data: extraFieldBuffer.slice(dataStart, dataEnd),\n });\n i = dataEnd;\n }\n\n // 46+n+m - File comment\n rawEntry.commentBytes = data.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength);\n rawEntry.comment = decodeBuffer(rawEntry.commentBytes);\n\n readEntryCursor += data.length;\n\n if (rawEntry.uncompressedSize === 0xffffffff ||\n rawEntry.compressedSize === 0xffffffff ||\n rawEntry.relativeOffsetOfLocalHeader === 0xffffffff) {\n // ZIP64 format\n // find the Zip64 Extended Information Extra Field\n const zip64ExtraField = rawEntry.extraFields.find(e => e.id === 0x0001);\n if (!zip64ExtraField) {\n throw new Error('expected zip64 extended information extra field');\n }\n const zip64EiefBuffer = zip64ExtraField.data;\n let index = 0;\n // 0 - Original Size 8 bytes\n if (rawEntry.uncompressedSize === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include uncompressed size');\n }\n rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 8 - Compressed Size 8 bytes\n if (rawEntry.compressedSize === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include compressed size');\n }\n rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 16 - Relative Header Offset 8 bytes\n if (rawEntry.relativeOffsetOfLocalHeader === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include relative header offset');\n }\n rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 24 - Disk Start Number 4 bytes\n }\n\n // check for Info-ZIP Unicode Path Extra Field (0x7075)\n // see https://github.com/thejoshwolfe/yauzl/issues/33\n const nameField = rawEntry.extraFields.find(e =>\n e.id === 0x7075 &&\n e.data.length >= 6 && // too short to be meaningful\n e.data[0] === 1 && // Version 1 byte version of this extra field, currently 1\n getUint32LE(e.data, 1), crc$1.unsigned(rawEntry.nameBytes)); // NameCRC32 4 bytes File Name Field CRC32 Checksum\n // > If the CRC check fails, this UTF-8 Path Extra Field should be\n // > ignored and the File Name field in the header should be used instead.\n if (nameField) {\n // UnicodeName Variable UTF-8 version of the entry File Name\n rawEntry.fileName = decodeBuffer(nameField.data.slice(5));\n }\n\n // validate file size\n if (rawEntry.compressionMethod === 0) {\n let expectedCompressedSize = rawEntry.uncompressedSize;\n if ((rawEntry.generalPurposeBitFlag & 0x1) !== 0) {\n // traditional encryption prefixes the file data with a header\n expectedCompressedSize += 12;\n }\n if (rawEntry.compressedSize !== expectedCompressedSize) {\n throw new Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`);\n }\n }\n rawEntries.push(rawEntry);\n }\n const zip = {\n comment,\n commentBytes,\n };\n return {\n zip,\n entries: rawEntries.map(e => new ZipEntry(reader, e)),\n };\n}\n\nasync function readEntryDataHeader(reader, rawEntry) {\n if (rawEntry.generalPurposeBitFlag & 0x1) {\n throw new Error('encrypted entries not supported');\n }\n const buffer = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30);\n // note: maybe this should be passed in or cached on entry\n // as it's async so there will be at least one tick (not sure about that)\n const totalLength = await reader.getLength();\n\n // 0 - Local file header signature = 0x04034b50\n const signature = getUint32LE(buffer, 0);\n if (signature !== 0x04034b50) {\n throw new Error(`invalid local file header signature: 0x${signature.toString(16)}`);\n }\n\n // all this should be redundant\n // 4 - Version needed to extract (minimum)\n // 6 - General purpose bit flag\n // 8 - Compression method\n // 10 - File last modification time\n // 12 - File last modification date\n // 14 - CRC-32\n // 18 - Compressed size\n // 22 - Uncompressed size\n // 26 - File name length (n)\n const fileNameLength = getUint16LE(buffer, 26);\n // 28 - Extra field length (m)\n const extraFieldLength = getUint16LE(buffer, 28);\n // 30 - File name\n // 30+n - Extra field\n const localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;\n let decompress;\n if (rawEntry.compressionMethod === 0) {\n // 0 - The file is stored (no compression)\n decompress = false;\n } else if (rawEntry.compressionMethod === 8) {\n // 8 - The file is Deflated\n decompress = true;\n } else {\n throw new Error(`unsupported compression method: ${rawEntry.compressionMethod}`);\n }\n const fileDataStart = localFileHeaderEnd;\n const fileDataEnd = fileDataStart + rawEntry.compressedSize;\n if (rawEntry.compressedSize !== 0) {\n // bounds check now, because the read streams will probably not complain loud enough.\n // since we're dealing with an unsigned offset plus an unsigned size,\n // we only have 1 thing to check for.\n if (fileDataEnd > totalLength) {\n throw new Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`);\n }\n }\n return {\n decompress,\n fileDataStart,\n };\n}\n\nasync function readEntryDataAsArrayBuffer(reader, rawEntry) {\n const {decompress, fileDataStart} = await readEntryDataHeader(reader, rawEntry);\n if (!decompress) {\n const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize);\n // make copy?\n //\n // 1. The source is a Blob/file. In this case we'll get back TypedArray we can just hand to the user\n // 2. The source is a TypedArray. In this case we'll get back TypedArray that is a view into a larger buffer\n // but because ultimately this is used to return an ArrayBuffer to `someEntry.arrayBuffer()`\n // we need to return copy since we need the `ArrayBuffer`, not the TypedArray to exactly match the data.\n // Note: We could add another API function `bytes()` or something that returned a `Uint8Array`\n // instead of an `ArrayBuffer`. This would let us skip a copy here. But this case only happens for uncompressed\n // data. That seems like a rare enough case that adding a new API is not worth it? Or is it? A zip of jpegs or mp3s\n // might not be compressed. For now that's a TBD.\n return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer;\n }\n // see comment in readEntryDateAsBlob\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);\n const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize);\n return result;\n}\n\nasync function readEntryDataAsBlob(reader, rawEntry, type) {\n const {decompress, fileDataStart} = await readEntryDataHeader(reader, rawEntry);\n if (!decompress) {\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type);\n if (isBlob(typedArrayOrBlob)) {\n return typedArrayOrBlob;\n }\n return new Blob([isSharedArrayBuffer(typedArrayOrBlob.buffer) ? new Uint8Array(typedArrayOrBlob) : typedArrayOrBlob], {type});\n }\n // Here's the issue with this mess (should refactor?)\n // if the source is a blob then we really want to pass a blob to inflateRawAsync to avoid a large\n // copy if we're going to a worker.\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);\n const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type);\n return result;\n}\n\nfunction setOptions$1(options) {\n setOptions(options);\n}\n\nasync function unzipRaw(source) {\n let reader;\n if (typeof Blob !== 'undefined' && source instanceof Blob) {\n reader = new BlobReader(source);\n } else if (source instanceof ArrayBuffer || (source && source.buffer && source.buffer instanceof ArrayBuffer)) {\n reader = new ArrayBufferReader(source);\n } else if (isSharedArrayBuffer(source) || isSharedArrayBuffer(source.buffer)) {\n reader = new ArrayBufferReader(source);\n } else if (typeof source === 'string') {\n const req = await fetch(source);\n if (!req.ok) {\n throw new Error(`failed http request ${source}, status: ${req.status}: ${req.statusText}`);\n }\n const blob = await req.blob();\n reader = new BlobReader(blob);\n } else if (typeof source.getLength === 'function' && typeof source.read === 'function') {\n reader = source;\n } else {\n throw new Error('unsupported source type');\n }\n\n const totalLength = await reader.getLength();\n\n if (totalLength > Number.MAX_SAFE_INTEGER) {\n throw new Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`);\n }\n\n return await findEndOfCentralDirector(reader, totalLength);\n}\n\n// If the names are not utf8 you should use unzipitRaw\nasync function unzip(source) {\n const {zip, entries} = await unzipRaw(source);\n return {\n zip,\n entries: Object.fromEntries(entries.map(v => [v.name, v])),\n };\n}\n\nfunction cleanup$1() {\n cleanup();\n}\n\nexport { HTTPRangeReader, cleanup$1 as cleanup, setOptions$1 as setOptions, unzip, unzipRaw };\n"],"names":["readBlobAsArrayBuffer","blob","arrayBuffer","Promise","resolve","reject","reader","FileReader","addEventListener","result","readAsArrayBuffer","async","readBlobAsUint8Array","Uint8Array","isBlob","v","Blob","isSharedArrayBuffer","b","SharedArrayBuffer","isNode","process","versions","node","electron","ArrayBufferReader","constructor","arrayBufferOrView","this","typedArray","ArrayBuffer","buffer","byteOffset","byteLength","offset","length","BlobReader","size","slice","type","_check","buf","len","bl","nbuf","Math","max","set","_decodeTiny","lmap","LL","data","pos","tree","bitsE","_bitsE","get17","_get17","i","code","lit","ll","n","ni","_copyOut","src","off","mx","tl","makeCodes","MAX_BITS","bits","max_code","bl_count","U","next_code","codes2map","map","r15","rev15","cl","val","rest","i0","i1","revCodes","imb","dt","_bitsF","u16","Uint16Array","u32","Uint32Array","ordr","of0","exb","ldef","df0","dxb","ddef","flmap","fltree","fdmap","fdtree","ltree","ttree","dmap","dtree","imap","itree","lhst","dhst","ihst","lits","strt","prev","x","pushV","tgt","sv","push","crc","table","tab","c","k","update","o","l","config","numWorkers","workerURL","useWorkers","nextId","canUseWorkers","workers","availableWorkers","waitingForWorkerQueue","currentlyProcessingIdToRequestMap","Map","handleResult","e","makeWorkerAvailable","target","id","error","request","get","delete","startWorker","url","worker","Worker","onmessage","onerror","undefined","Error","workerHelper","mod","module","require","fn","on","terminate","console","warn","text","req","fetch","mode","ok","URL","createObjectURL","btoa","processWaitingForWorkerQueue","inflateRawLocal","uncompressedSize","dst","u8","bitsF","decodeTiny","noBuf","BFINAL","BTYPE","HLIT","HDIST","HCLEN","ML","MD","mx0","mx1","end","ebs","dcode","dlit","dbs","p8","inflate","createWorker","pop","getAvailableWorker","shift","transferables","postMessage","inflateRawAsync","ZipEntry","rawEntry","date","time","_reader","_rawEntry","name","nameBytes","compressedSize","comment","commentBytes","compressionMethod","lastModDate","lastModFileDate","lastModFileTime","Date","isDirectory","endsWith","encrypted","generalPurposeBitFlag","externalFileAttributes","versionMadeBy","decompress","fileDataStart","readEntryDataHeader","typedArrayOrBlob","readAsBlobOrTypedArray","readEntryDataAsBlob","dataView","readAs","readEntryDataAsArrayBuffer","decodeBuffer","JSON","parse","EOCDR_WITHOUT_COMMENT_SIZE","MAX_COMMENT_SIZE","EOCDR_SIGNATURE","ZIP64_EOCDR_SIGNATURE","read","sliceAsBlob","crc$1","unsigned","getUint16LE","uint8View","getUint32LE","getUint64LE","utf8Decoder","TextDecoder","isUTF8","decode","END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE","readZip64CentralDirectory","zip64EocdlOffset","eocdl","zip64EocdrOffset","zip64Eocdr","entryCount","centralDirectorySize","readEntries","CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE","centralDirectoryOffset","rawEntryCount","readEntryCursor","allEntriesBuffer","rawEntries","subarray","signature","toString","versionNeededToExtract","crc32","fileNameLength","extraFieldLength","fileCommentLength","internalFileAttributes","relativeOffsetOfLocalHeader","fileCommentStart","extraFieldBuffer","extraFields","headerId","dataStart","dataEnd","zip64ExtraField","find","zip64EiefBuffer","index","nameField","fileName","expectedCompressedSize","zip","entries","totalLength","getLength","localFileHeaderEnd","fileDataEnd","unzip","source","status","statusText","Number","MAX_SAFE_INTEGER","min","readStart","eocdr","diskNumber","commentLength","expectedCommentLength","findEndOfCentralDirector","unzipRaw","Object","fromEntries"],"sourceRoot":""}