@zip.js/zip.js 2.8.43 → 2.8.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -37
- package/deno.json +21 -1
- package/dist/zip-core-external.js +194 -159
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +194 -131
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +246 -167
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +244 -139
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +267 -1761
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +269 -1735
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +268 -1734
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +196 -133
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +196 -133
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker-native.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +195 -132
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +31 -2
- package/index-native.cjs +269 -1735
- package/index-native.min.js +1 -1
- package/index.cjs +268 -1734
- package/index.d.cts +129 -8
- package/index.d.ts +129 -8
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +6 -2
- package/lib/core/codec-worker.js +2 -2
- package/lib/core/constants.js +4 -0
- package/lib/core/options.js +6 -0
- package/lib/core/streams/aes-crypto-stream.js +18 -21
- package/lib/core/streams/codec-stream.js +6 -2
- package/lib/core/streams/common-crypto.js +2 -0
- package/lib/core/streams/zip-entry-stream.js +16 -17
- package/lib/core/util/mime-type-data.js +3 -0
- package/lib/core/util/mime-type.js +23 -1596
- package/lib/core/web-worker-base.js +2 -2
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/web-worker-wasm.js +4 -8
- package/lib/core/zip-entry.js +11 -1
- package/lib/core/zip-fs.js +62 -5
- package/lib/core/zip-reader.js +80 -43
- package/lib/core/zip-writer.js +68 -45
- package/lib/zip-core-external.js +2 -0
- package/lib/zip-core-reader.js +2 -0
- package/lib/zip-fs-core-external.js +2 -0
- package/lib/zip-fs-external.js +2 -0
- package/lib/zip-mime-types.js +2 -0
- package/package.json +9 -3
- package/worker-message-property-names.js +1 -1
package/index.cjs
CHANGED
|
@@ -65,6 +65,8 @@ const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;
|
|
|
65
65
|
const EXTRAFIELD_TYPE_USDZ = 0x1986;
|
|
66
66
|
const EXTRAFIELD_TYPE_INFOZIP = 0x7875;
|
|
67
67
|
const EXTRAFIELD_TYPE_UNIX = 0x7855;
|
|
68
|
+
const EXTRAFIELD_TYPE_UNIX_TYPE1 = 0x5855;
|
|
69
|
+
const EXTRAFIELD_TYPE_PKWARE_UNIX = 0x000d;
|
|
68
70
|
|
|
69
71
|
const BITFLAG_ENCRYPTED = 0b1;
|
|
70
72
|
const BITFLAG_LEVEL = 0b0110;
|
|
@@ -218,7 +220,7 @@ function resetConfiguration() {
|
|
|
218
220
|
Object.assign(config, DEFAULT_CONFIGURATION);
|
|
219
221
|
}
|
|
220
222
|
|
|
221
|
-
function t$1(t){const e='(t=>{"function"==typeof define&&define.amd?define(t):t()})(function(){"use strict";const{Array:t,Object:e,Number:n,Math:s,Error:r,Uint8Array:o,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:l,Promise:w,TextEncoder:u,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:g,DecompressionStream:S}=self,v=void 0,b="undefined",z="function",k=new o,C=[[],[],[],[],[],[],[],[]];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)e=1&e?e>>>1^3988292384:e>>>1;C[0][t]=e}for(let t=0;256>t;t++)for(let e=1;8>e;e++){const n=C[e-1][t];C[e][t]=n>>>8^C[0][255&n]}const[A,I,x,M,P,B,D,R]=C;class U{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let s=0;if(n>=8&&t.buffer){const r=new l(t.buffer,t.byteOffset,n),o=n-8;for(;o>=s;s+=8){const t=e^r.getInt32(s,!0),n=r.getInt32(s+4,!0);e=R[255&t]^D[t>>>8&255]^B[t>>>16&255]^P[t>>>24&255]^M[255&n]^x[n>>>8&255]^I[n>>>16&255]^A[n>>>24&255]}}for(;n>s;s++)e=e>>>8^A[255&(e^t[s])];this.o=e}get(){return~this.o}}class W extends d{constructor(){let t;const e=new U;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new o(4);new l(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function _(t,e){const n=new o(t.length+e.length);return n.set(t),n.set(e,t.length),n}function T(t){return new l(t.buffer,t.byteOffset,t.byteLength)}const V={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=V.l(n);return 32===s?t.concat(e):V.h(e,s,0|n,t.slice(0,t.length-1))},m(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+V.l(n)},S(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=V.v(e,t[n-1]&2147483648>>e-1,1)),t},v:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,l:t=>s.round(t/1099511627776)||32,h(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,o=V.l(r);return s.push(V.v(e+o&31,e+o>32?n:s.pop(),1)),s}},K={bytes:{C(t){const e=V.m(t)/8,n=new o(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},A(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(V.v(8*(3&n),s)),e}}},E=class{constructor(t){const e=this;e.blockSize=512,e.I=[1732584193,4023233417,2562383102,271733878,3285377520],e.M=[1518500249,1859775393,2400959708,3395469782],t?(e.P=t.P.slice(0),e.B=t.B.slice(0),e.D=t.D):e.reset()}reset(){const t=this;return t.P=t.I.slice(0),t.B=[],t.D=0,t}update(t){const e=this;"string"==typeof t&&(t=K.R.A(t));const n=e.B=V.concat(e.B,t),s=e.D,o=e.D=s+V.m(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const c=new i(n);let a=0;for(let t=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o>=t;t+=e.blockSize)e.U(c.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e}W(){const t=this;let e=t.B;const n=t.P;e=V.concat(e,[V.v(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.D/4294967296)),e.push(0|t.D);e.length;)t.U(e.splice(0,16));return t.reset(),n}_(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}T(t,e){return e<<t|e>>>32-t}U(e){const n=this,r=n.P,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let c=r[0],i=r[1],a=r[2],f=r[3],l=r[4];for(let t=0;79>=t;t++){16>t||(o[t]=n.T(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.T(5,c)+n._(t,i,a,f)+l+o[t]+n.M[s.floor(t/20)]|0;l=f,f=a,a=n.T(30,i),i=c,c=e}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+f|0,r[4]=r[4]+l|0}},F={importKey:t=>new F.V(K.bytes.A(t)),K(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let c,i,a,f,w;const u=new ArrayBuffer(o),h=new l(u);let p=0;const d=V;for(e=K.bytes.A(e),w=1;(o||1)>p;w++){for(c=i=t.encrypt(d.concat(e,[w])),a=1;n>a;a++)for(i=t.encrypt(i),f=0;f<i.length;f++)c[f]^=i[f];for(a=0;(o||1)>p&&a<c.length;a++)h.setInt32(p,c[a]),p+=4}return u.slice(0,s/8)},V:class{constructor(t){const e=this,n=e.F=E,s=[[],[]];e.L=[new n,new n];const r=e.L[0].blockSize/32;t.length>r&&(t=(new n).update(t).W());for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e.L[0].update(s[0]),e.L[1].update(s[1]),e.O=new n(e.L[0])}reset(){const t=this;t.O=new t.F(t.L[0]),t.j=!1}update(t){this.j=!0,this.O.update(t)}digest(){const t=this,e=t.O.W(),n=new t.F(t.L[1]).update(e).W();return t.reset(),n}encrypt(t){if(this.j)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},L=typeof h!=b&&typeof h.getRandomValues==z,O="Invalid password",j="Invalid signature",H="zipjs-abort-check-password";function Z(t){if(L)return h.getRandomValues(t);throw new r("Crypto API not supported")}const N=16,q={name:"PBKDF2"},G=e.assign({hash:{name:"HMAC"}},q),J=e.assign({iterations:1e3,hash:{name:"SHA-1"}},q),Q=["deriveBits"],X=[8,12,16],Y=[16,24,32],$=10,tt=[0,0,0,0],et=typeof h!=b,nt=et&&h.subtle,st=et&&typeof nt!=b,rt=K.bytes,ot=class{constructor(t){const e=this;e.H=[[[],[],[],[],[]],[[],[],[],[],[]]],e.H[0][0][0]||e.Z();const n=e.H[0][4],s=e.H[1],o=t.length;let c,i,a,f=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.M=[i=t.slice(0),a=[]],c=o;4*o+28>c;c++){let t=i[c-1];(c%o===0||8===o&&c%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],c%o===0&&(t=t<<8^t>>>24^f<<24,f=f<<1^283*(f>>7))),i[c]=i[c-o]^t}for(let t=0;c;t++,c--){const e=i[3&t?c:c-4];a[t]=4>=c||4>t?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this.N(t,0)}decrypt(t){return this.N(t,1)}Z(){const t=this.H[0],e=this.H[1],n=t[4],s=e[4],r=[],o=[];let c,i,a,f;for(let t=0;256>t;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=c=0;!n[l];l^=i||1,c=o[c]||1){let o=c^c<<1^c<<2^c<<3^c<<4;o=o>>8^255&o^99,n[l]=o,s[o]=l,f=r[a=r[i=r[l]]];let w=16843009*f^65537*a^257*i^16843008*l,u=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][l]=u=u<<24^u>>>8,e[n][o]=w=w<<24^w>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}N(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.M[e],s=n.length/4-2,o=[0,0,0,0],c=this.H[e],i=c[0],a=c[1],f=c[2],l=c[3],w=c[4];let u,h,p,d=t[0]^n[0],y=t[e?3:1]^n[1],m=t[2]^n[2],g=t[e?1:3]^n[3],S=4;for(let t=0;s>t;t++)u=i[d>>>24]^a[y>>16&255]^f[m>>8&255]^l[255&g]^n[S],h=i[y>>>24]^a[m>>16&255]^f[g>>8&255]^l[255&d]^n[S+1],p=i[m>>>24]^a[g>>16&255]^f[d>>8&255]^l[255&y]^n[S+2],g=i[g>>>24]^a[d>>16&255]^f[y>>8&255]^l[255&m]^n[S+3],S+=4,d=u,y=h,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=w[d>>>24]<<24^w[y>>16&255]<<16^w[m>>8&255]<<8^w[255&g]^n[S++],u=d,d=y,y=m,m=g,g=u;return o}},ct=class{constructor(t,e){this.G=t,this.J=e,this.X=e}reset(){this.X=this.J}update(t){return this.Y(this.G,t,this.X)}$(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}et(t){0===(t[0]=this.$(t[0]))&&(t[1]=this.$(t[1]))}Y(t,e,n){let s;if(!(s=e.length))return[];const r=V.m(e);for(let r=0;s>r;r+=4){this.et(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return V.S(e,r)}},it=F.V;let at=et&&st&&typeof nt.importKey==z,ft=et&&st&&typeof nt.deriveBits==z;class lt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:s}){super({start(){ut(this,t,e,n)},async transform(t,e){const n=this,{password:c,strength:i,nt:a,ready:f}=n;c?(await(async(t,e,n,s)=>{const o=await pt(t,e,n,yt(s,0,X[e])),c=yt(s,X[e]);if(o[0]!=c[0]||o[1]!=c[1])throw new r(O)})(n,i,c,yt(t,0,X[i]+2)),t=yt(t,X[i]+2),s?e.error(new r(H)):a()):await f;const l=new o(t.length-$-(t.length-$)%N);e.enqueue(ht(n,t,l,0,$,!0))},async flush(t){const{st:e,ot:n,pending:s,ready:o}=this;if(n&&e){await o;const c=yt(s,0,s.length-$),i=yt(s,s.length-$);let a=k;if(c.length){const t=gt(rt,c);n.update(t);const s=e.update(t);a=mt(rt,s)}const f=yt(mt(rt,n.digest()),0,$);let l=s.length<$?1:0;for(let t=0;$>t;t++)l|=f[t]^i[t];if(l)throw new r(j);t.enqueue(a)}}})}}class wt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n}){let s;super({start(){ut(this,t,e,n)},async transform(t,e){const n=this,{password:s,strength:r,nt:c,ready:i}=n;let a=k;s?(a=await(async(t,e,n)=>{const s=Z(new o(X[e]));return _(s,await pt(t,e,n,s))})(n,r,s),c()):await i;const f=new o(a.length+t.length-t.length%N);f.set(a,0),e.enqueue(ht(n,t,f,a.length,0))},async flush(t){const{st:e,ot:n,pending:r,ready:o}=this;if(n&&e){await o;let c=k;if(r.length){const t=e.update(gt(rt,r));n.update(t),c=mt(rt,t)}s.signature=mt(rt,n.digest()).slice(0,$),t.enqueue(_(c,s.signature))}}}),s=this}}function ut(t,n,s,r){e.assign(t,{ready:new w(e=>t.nt=e),password:dt(n,s),strength:r-1,pending:k})}function ht(t,e,n,s,r,c){const{st:i,ot:a,pending:f}=t;f.length&&(e=_(f,e));const l=e.length-r;let w;for(n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new o(e)).set(n,0)}return t})(n,s+(l-l%N)),w=0;l-N>=w;w+=N){const t=gt(rt,yt(e,w,w+N));c&&a.update(t);const r=i.update(t);c||a.update(r),n.set(mt(rt,r),w+s)}return t.pending=yt(e,w),n}async function pt(n,s,r,c){n.password=null;const i=await(async(t,e,n,s,r)=>{if(!at)return F.importKey(e);try{return await nt.importKey("raw",e,n,!1,r)}catch{return at=!1,F.importKey(e)}})(0,r,G,0,Q),a=await(async(t,e,n)=>{if(!ft)return F.K(e,t.salt,J.iterations,n);try{return await nt.deriveBits(t,e,n)}catch{return ft=!1,F.K(e,t.salt,J.iterations,n)}})(e.assign({salt:c},J),i,8*(2*Y[s]+2)),f=new o(a),l=gt(rt,yt(f,0,Y[s])),w=gt(rt,yt(f,Y[s],2*Y[s])),u=yt(f,2*Y[s]);return e.assign(n,{keys:{key:l,ct:w,passwordVerification:u},st:new ct(new ot(l),t.from(tt)),ot:new it(w)}),u}function dt(t,e){return e===v?(t=>{if(typeof u==b){const e=new o((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new u).encode(t)})(t):e}function yt(t,e,n){return t.subarray(e,n)}function mt(t,e){return t.C(e)}function gt(t,e){return t.A(e)}class St extends d{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){bt(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=zt(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new r(O);t=t.subarray(12)}s?e.error(new r(H)):e.enqueue(zt(n,t))}})}}class vt extends d{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){bt(this,t,e,n)},transform(t,e){const n=this;let s,r;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=Z(new o(12));e[11]=n.passwordVerification,s=new o(t.length+e.length),s.set(kt(n,e),0),r=12}else s=new o(t.length),r=0;s.set(kt(n,t),r),e.enqueue(s)}})}}function bt(t,n,s,r){e.assign(t,{password:n,rawPassword:s,passwordVerification:r}),((t,n,s)=>{const r=[305419896,591751049,878082192];if(e.assign(t,{keys:r,it:new U(r[0]),ft:new U(r[2])}),s)for(let e=0;e<s.length;e++)Ct(t,s[e]);else for(let e=0;e<n.length;e++)Ct(t,n.charCodeAt(e))})(t,n,s)}function zt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=At(t)^e[s],Ct(t,n[s]);return n}function kt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=At(t)^e[s],Ct(t,e[s]);return n}function Ct(t,e){let[,n]=t.keys;t.it.append([e]);const r=~t.it.get();n=xt(s.imul(xt(n+It(r)),134775813)+1),t.ft.append([n>>>24]);const o=~t.ft.get();t.keys=[r,n,o]}function At(t){const e=2|t.keys[2];return It(s.imul(e,1^e)>>>8)}function It(t){return 255&t}function xt(t){return 4294967295&t}const Mt=new f;function Pt(t){return Mt.get(t)}const Bt="Invalid uncompressed size",Dt="deflate-raw",Rt="gzip",Ut=[31,139,8];class Wt extends d{constructor(t,{chunkSize:e,CompressionStreamZlib:n,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:c,zipCrypto:i,signed:a,level:f,deflate64:w,format:u,compressionMethod:h}=t,p=this;let d,y,m,g=super.readable;const S=u&&Pt(u),v=a&&r&&!w&&!S&&(!o||i)&&!(!c||!s);if(o&&!i||!a||v||(d=new W,g=Lt(g,d)),r)if(S)g=Ot(g,Et(S.CompressionStream,u,{level:f,chunkSize:e,compressionMethod:h}));else if(v)m=new _t,g=Ot(g,new s(Rt)),g=Lt(g,m);else try{g=Ft(g,c,{level:f,chunkSize:e},s,n)}catch(t){let e;try{e=new s(Rt)}catch{throw t}g=Ot(g,e),g=Lt(g,new _t)}o&&(i?g=Lt(g,new vt(t)):(y=new wt(t),g=Lt(g,y))),Kt(p,g,()=>{let t;o&&!i&&(t=y.signature),o&&!i||!a||(t=v?m.signature:new l(d.value.buffer).getUint32(0)),p.signature=t})}}class _t extends d{constructor(){let t,e=10,n=new o(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(8>=o)return void(n=_(n,t));const c=o-8,i=s.min(c,n.length);r.enqueue(_(n.subarray(0,i),t.subarray(0,c-i))),n=_(n.subarray(i),t.subarray(c-i))},flush(){const e=T(n);t.signature=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Tt extends d{constructor(t,{chunkSize:e,DecompressionStreamZlib:n,DecompressionStream:s}){super({});const{zipCrypto:c,encrypted:i,signed:a,signature:f,compressed:u,useCompressionStream:h,deflate64:p,format:m,compressionMethod:g,rawBitFlag:S,outputSize:b}=t;let z,k,C=super.readable;if(i&&(c?C=Lt(C,new St(t)):(k=new lt(t),C=Lt(C,k))),u){const t=m&&Pt(m);if(t)C=Ot(C,Et(t.DecompressionStream,m,{chunkSize:e,compressionMethod:g,rawBitFlag:S,uncompressedSize:b}));else try{C=Ft(C,h,{chunkSize:e,deflate64:p},s,n)}catch(t){if(p||b===v)throw t;let e;try{e=new s(Rt)}catch{throw t}C=((t,e,n)=>{const s=new U;let c,i,a,f=0,l=!1;const u=new w((t,e)=>{i=t,a=e});u.catch(()=>{}),n||i();const h=new d({start(t){const e=new o(10);e.set(Ut),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){l=!0,y();try{await u}finally{m()}const e=new o(8),r=T(e);r.setUint32(0,s.get(),!0),r.setUint32(4,n,!0),t.enqueue(e)},cancel(t){a(t)}}),p=new d({transform(t,e){s.append(t),f+=t.length,n>f?l&&y():i(),e.enqueue(t)},cancel(t){a(t)}});return t=Lt(t,h),Lt(t=Ot(t,e),p);function y(){m(),c=setTimeout(()=>a(new r(Bt)),5e3)}function m(){clearTimeout(c)}})(C,e,b)}C=(t=>{const e=t.getReader();return new y({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new r("Invalid compressed data");throw e.cause=t,e}const{value:s,done:o}=n;o?t.close():t.enqueue(s)},cancel:t=>e.cancel(t)})})(C)}i&&!c||!a||(z=new W,C=Lt(C,z)),Kt(this,C,()=>{if((!i||c)&&a){const t=new l(z.value.buffer);if(f!=t.getUint32(0,!1))throw new r(j)}})}}const Vt=new f;function Kt(t,n,s){n=Lt(n,new d({flush:s})),e.defineProperty(t,"readable",{get:()=>n})}function Et(t,e,n){if(!t)throw new r("Compression method not supported");return new t(e,n)}function Ft(t,e,n,s,r){const o=e&&s?s:r||s,c=n.deflate64?"deflate64-raw":Dt;let i;try{i=new o(c,n)}catch(t){if(!e||!r||o==r)throw t;i=new r(c,n)}return Ot(t,i)}function Lt(t,e){return(t=>{if(t instanceof y)return t;const e=t.getReader();return new y({async pull(t){const{value:n,done:s}=await e.read();s?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})})(t).pipeThrough(e)}function Ot(t,e){const n=e.writable.getWriter(),s=t.getReader();return(async()=>{try{for(;;){await n.ready;const t=await s.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await(async(t,e)=>{try{await t.abort(e)}catch{}})(n,t),await(async(t,e)=>{try{await t.cancel(e)}catch{}})(s,t)}})(),e.readable}const jt="data",Ht="close",Zt="deflate";class Nt extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let c;o.startsWith(Zt)?c=Wt:o.startsWith("inflate")&&(c=Tt),s.outputSize=0;let i=0;const a=new c(t,n),f=super.readable,l=new d({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){e.assign(s,{inputSize:i})}}),w=new d({transform(e,n){if(e&&e.length&&(n.enqueue(e),s.outputSize+=e.length,t.outputSize!==v&&s.outputSize>t.outputSize))throw new r(Bt)},flush(){const{signature:t}=a;e.assign(s,{signature:t,inputSize:i})}});e.defineProperty(s,"readable",{get:()=>f.pipeThrough(l).pipeThrough(a).pipeThrough(w)})}}class qt extends d{constructor(t){const e=[];let s=0;function r(){const n=new o(t);let r=0;for(;t>r;){const s=e[0],o=t-r;s.length>o?(n.set(s.subarray(0,o),r),e[0]=s.subarray(o),r+=o):(n.set(s,r),r+=s.length,e.shift())}return s-=t,n}n.isFinite(t)&&t>=1||(t=65536),super({transform(n,o){for(e.push(n),s+=n.length;s>t;)o.enqueue(r())},flush(t){s&&t.enqueue(((t,e)=>{const n=new o(e);let s=0;for(const e of t)n.set(e,s),s+=e.length;return n})(e,s))}})}}let Gt=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(Gt=navigator.hardwareConcurrency)}catch{}const Jt=new f,Qt=new f;let Xt,Yt,$t,te,ee,ne,se=0;async function re(t){let e,o;try{const{options:c,config:i}=t;if(c.format&&await(async(t,e)=>{!Mt.has(t)&&e&&((t,e)=>{const{CompressionStream:n,DecompressionStream:s}=e;if(typeof n!=z&&typeof s!=z)throw new r("Invalid codec module");Mt.set(t,{CompressionStream:n,DecompressionStream:s})})(t,await(import(e)))})(c.format,c.codecURI),i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,c.compressed&&!c.format)if(c.useCompressionStream){if(!((t,e)=>{if(!t)return!1;let n=Vt.get(t);n||(n=new f,Vt.set(t,n));let s=n.get(e);if(s===v){try{new t(e),s=!0}catch{s=!1}n.set(e,s)}return s})(c.codecType.startsWith(Zt)?i.CompressionStream:i.DecompressionStream,Dt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{c.useCompressionStream=!0}const a={highWaterMark:1},l=t.readable||new y({async pull(t){const e=new w(t=>Jt.set(se,t));oe({type:"pull",messageId:se}),se=(se+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await e;t.enqueue(s),r&&t.close()}},a);o=t.writable||new m({async write(t){let e;const s=new w(t=>e=t);Qt.set(se,e),oe({type:jt,value:t,messageId:se}),se=(se+1)%n.MAX_SAFE_INTEGER,await s}},a),e=new Nt(c,i),Xt=new AbortController;const{signal:u}=Xt;await l.pipeThrough(e).pipeThrough(new qt((t=>s.max(t.chunkSize,64))(i))).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{signature:h,inputSize:p,outputSize:d}=e;oe({type:Ht,result:{signature:h,inputSize:p,outputSize:d}})}catch(t){if(t.outputSize=e?e.outputSize:0,o&&!o.locked)try{await o.getWriter().close()}catch{}ce(t)}}function oe(t){const{value:e}=t;if(e)if(e.length)try{t.value=(n=e,n.byteOffset||n.byteLength!=n.buffer.byteLength?new o(n):n).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var n}function ce(t=new r("Unknown error")){const{message:e,stack:n,code:s,name:o,outputSize:c,cause:i}=t,a={message:e,stack:n,code:s,name:o,outputSize:c};i&&(a.cause={name:i.name,message:i.message}),p({error:a})}function ie(t,e,n={}){if(!Yt){const t=new r("WASM module not loaded");throw t.cause=ne,t}const c="number"==typeof n.level?n.level:-1,i="number"==typeof n.outBuffer?n.outBuffer:65536,a="number"==typeof n.inBufferSize?n.inBufferSize:65536;return new d({start(){try{let n;if(this.lt=$t(i),this.in=$t(a),this.inBufferSize=a,!this.lt||!this.in)throw new r("allocation failed");if(this.wt=new o(i),t?(this.ut=Yt.deflate_process,this.ht=Yt.deflate_last_consumed,this.yt=Yt.deflate_end,this.gt=Yt.deflate_new(),n="gzip"===e?Yt.deflate_init_gzip(this.gt,c):"deflate-raw"===e?Yt.deflate_init_raw(this.gt,c):Yt.deflate_init(this.gt,c)):"deflate64-raw"===e?(this.ut=Yt.inflate9_process,this.ht=Yt.inflate9_last_consumed,this.yt=Yt.inflate9_end,this.gt=Yt.inflate9_new(),n=Yt.inflate9_init_raw(this.gt)):(this.ut=Yt.inflate_process,this.ht=Yt.inflate_last_consumed,this.yt=Yt.inflate_end,this.gt=Yt.inflate_new(),n="deflate-raw"===e?Yt.inflate_init_raw(this.gt):"gzip"===e?Yt.inflate_init_gzip(this.gt):Yt.inflate_init(this.gt)),0!==n)throw new r("init failed:"+n)}catch(t){throw f(this),t}},transform(e,n){try{const c=e,a=new o(ee.buffer),f=this.ut,l=this.ht,w=this.lt,u=this.wt;let h=0;for(;h<c.length;){const e=s.min(c.length-h,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&te&&(te(this.in),this.in=0),this.in=$t(e),this.inBufferSize=e,!this.in))throw new r("allocation failed");a.set(c.subarray(h,h+e),this.in);const o=f(this.gt,this.in,e,w,i,0),p=16777215&o;if(p&&(u.set(a.subarray(w,w+p),0),n.enqueue(u.slice(0,p))),!t){const t=o>>24&255,e=128&t?t-256:t;if(0>e)throw new r("process error:"+e)}const d=l(this.gt);if(0===d)break;h+=d}}catch(t){f(this),n.error(t)}},flush(e){try{const n=new o(ee.buffer),s=this.ut,c=this.lt,a=this.wt;for(;;){const o=s(this.gt,0,0,c,i,4),f=16777215&o,l=o>>24&255;if(!t){const t=128&l?l-256:l;if(0>t)throw new r("process error:"+t)}if(f&&(a.set(n.subarray(c,c+f),0),e.enqueue(a.slice(0,f))),1===l||0===f)break}}catch(t){e.error(t)}finally{const t=f(this);0!==t&&e.error(new r("end error:"+t))}},cancel(){f(this)}});function f(t){let e=0;return t.gt&&t.yt&&(e=t.yt(t.gt)),t.gt=0,t.in&&te&&te(t.in),t.in=0,t.lt&&te&&te(t.lt),t.lt=0,e}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if("start"==e&&re(t),e==jt){const t=Jt.get(n);Jt.delete(n),t({value:s||new o,done:r})}if("ack"==e){const t=Qt.get(n);Qt.delete(n),t()}e==Ht&&Xt.abort()}catch(t){ce(t)}}),p({type:"ready"});class ae{constructor(t="deflate",e){return ie(!0,t,e)}}class fe{constructor(t="deflate",e){return ie(!1,t,e)}}ae.St=!0,fe.St=!0;let le=!1;self.initModule=async t=>{try{const e=await(async(t,{baseURI:e})=>{if(!le)try{await(async(t,e)=>{let n,s;try{try{s=new URL(t,e)}catch{}const r=await fetch(s);n=await r.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=(t=>{const e=t.split(",")[1],n=atob(e),s=n.length,r=new o(s);for(let t=0;s>t;++t)r[t]=n.charCodeAt(t);return r.buffer})(t)}(t=>{if(Yt=t,({malloc:$t,free:te,memory:ee}=Yt),"function"!=typeof $t||"function"!=typeof te||!ee)throw Yt=$t=te=ee=null,new r("Invalid WASM module")})((await WebAssembly.instantiate(n)).instance.exports)})(t,e),le=!0}catch(t){throw(t=>{ne=t})(t),t}})(t.wasmURI,t);return t.CompressionStreamZlib=ae,t.DecompressionStreamZlib=fe,e}catch{}}});\n';t({workerURI:t=>{const n="text/javascript";if(t){const t=new Blob([e],{type:n});return URL.createObjectURL(t)}return "data:"+n+","+encodeURIComponent(e)}});}
|
|
223
|
+
function t$1(t){const e='(t=>{"function"==typeof define&&define.amd?define(t):t()})(function(){"use strict";const{Array:t,Object:e,Number:n,Math:s,Error:r,Uint8Array:o,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:l,Promise:w,TextEncoder:u,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:g,DecompressionStream:S}=self,v=void 0,b="undefined",k="function",z=new o,C=[[],[],[],[],[],[],[],[]];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)e=1&e?e>>>1^3988292384:e>>>1;C[0][t]=e}for(let t=0;256>t;t++)for(let e=1;8>e;e++){const n=C[e-1][t];C[e][t]=n>>>8^C[0][255&n]}const[A,I,x,M,P,B,D,R]=C;class U{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let s=0;if(n>=8&&t.buffer){const r=new l(t.buffer,t.byteOffset,n),o=n-8;for(;o>=s;s+=8){const t=e^r.getInt32(s,!0),n=r.getInt32(s+4,!0);e=R[255&t]^D[t>>>8&255]^B[t>>>16&255]^P[t>>>24&255]^M[255&n]^x[n>>>8&255]^I[n>>>16&255]^A[n>>>24&255]}}for(;n>s;s++)e=e>>>8^A[255&(e^t[s])];this.o=e}get(){return~this.o}}class W extends d{constructor(){let t;const e=new U;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new o(4);new l(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function _(t,e){const n=new o(t.length+e.length);return n.set(t),n.set(e,t.length),n}function T(t){return new l(t.buffer,t.byteOffset,t.byteLength)}const V={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=V.l(n);return 32===s?t.concat(e):V.h(e,s,0|n,t.slice(0,t.length-1))},m(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+V.l(n)},S(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=V.v(e,t[n-1]&2147483648>>e-1,1)),t},v:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,l:t=>s.round(t/1099511627776)||32,h(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,o=V.l(r);return s.push(V.v(e+o&31,e+o>32?n:s.pop(),1)),s}},K={bytes:{C(t){const e=V.m(t)/8,n=new o(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},A(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(V.v(8*(3&n),s)),e}}},E=class{constructor(t){const e=this;e.blockSize=512,e.I=[1732584193,4023233417,2562383102,271733878,3285377520],e.M=[1518500249,1859775393,2400959708,3395469782],t?(e.P=t.P.slice(0),e.B=t.B.slice(0),e.D=t.D):e.reset()}reset(){const t=this;return t.P=t.I.slice(0),t.B=[],t.D=0,t}update(t){const e=this;"string"==typeof t&&(t=K.R.A(t));const n=e.B=V.concat(e.B,t),s=e.D,o=e.D=s+V.m(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const c=new i(n);let a=0;for(let t=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o>=t;t+=e.blockSize)e.U(c.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e}W(){const t=this;let e=t.B;const n=t.P;e=V.concat(e,[V.v(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.D/4294967296)),e.push(0|t.D);e.length;)t.U(e.splice(0,16));return t.reset(),n}_(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}T(t,e){return e<<t|e>>>32-t}U(e){const n=this,r=n.P,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let c=r[0],i=r[1],a=r[2],f=r[3],l=r[4];for(let t=0;79>=t;t++){16>t||(o[t]=n.T(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.T(5,c)+n._(t,i,a,f)+l+o[t]+n.M[s.floor(t/20)]|0;l=f,f=a,a=n.T(30,i),i=c,c=e}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+f|0,r[4]=r[4]+l|0}},F={importKey:t=>new F.V(K.bytes.A(t)),K(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let c,i,a,f,w;const u=new ArrayBuffer(o),h=new l(u);let p=0;const d=V;for(e=K.bytes.A(e),w=1;(o||1)>p;w++){for(c=i=t.encrypt(d.concat(e,[w])),a=1;n>a;a++)for(i=t.encrypt(i),f=0;f<i.length;f++)c[f]^=i[f];for(a=0;(o||1)>p&&a<c.length;a++)h.setInt32(p,c[a]),p+=4}return u.slice(0,s/8)},V:class{constructor(t){const e=this,n=e.F=E,s=[[],[]];e.L=[new n,new n];const r=e.L[0].blockSize/32;t.length>r&&(t=(new n).update(t).W());for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e.L[0].update(s[0]),e.L[1].update(s[1]),e.O=new n(e.L[0])}reset(){const t=this;t.O=new t.F(t.L[0]),t.j=!1}update(t){this.j=!0,this.O.update(t)}digest(){const t=this,e=t.O.W(),n=new t.F(t.L[1]).update(e).W();return t.reset(),n}encrypt(t){if(this.j)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},L=typeof h!=b&&typeof h.getRandomValues==k,O="Invalid password",j="Invalid signature",H=j,Z="zipjs-abort-check-password";function N(t){if(L)return h.getRandomValues(t);throw new r("Crypto API not supported")}const q=16,G={name:"PBKDF2"},J=e.assign({hash:{name:"HMAC"}},G),Q=e.assign({iterations:1e3,hash:{name:"SHA-1"}},G),X=["deriveBits"],Y=[8,12,16],$=[16,24,32],tt=10,et=[0,0,0,0],nt=typeof h!=b,st=nt&&h.subtle,rt=nt&&typeof st!=b,ot=K.bytes,ct=class{constructor(t){const e=this;e.H=[[[],[],[],[],[]],[[],[],[],[],[]]],e.H[0][0][0]||e.Z();const n=e.H[0][4],s=e.H[1],o=t.length;let c,i,a,f=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.M=[i=t.slice(0),a=[]],c=o;4*o+28>c;c++){let t=i[c-1];(c%o===0||8===o&&c%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],c%o===0&&(t=t<<8^t>>>24^f<<24,f=f<<1^283*(f>>7))),i[c]=i[c-o]^t}for(let t=0;c;t++,c--){const e=i[3&t?c:c-4];a[t]=4>=c||4>t?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this.N(t,0)}decrypt(t){return this.N(t,1)}Z(){const t=this.H[0],e=this.H[1],n=t[4],s=e[4],r=[],o=[];let c,i,a,f;for(let t=0;256>t;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=c=0;!n[l];l^=i||1,c=o[c]||1){let o=c^c<<1^c<<2^c<<3^c<<4;o=o>>8^255&o^99,n[l]=o,s[o]=l,f=r[a=r[i=r[l]]];let w=16843009*f^65537*a^257*i^16843008*l,u=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][l]=u=u<<24^u>>>8,e[n][o]=w=w<<24^w>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}N(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.M[e],s=n.length/4-2,o=[0,0,0,0],c=this.H[e],i=c[0],a=c[1],f=c[2],l=c[3],w=c[4];let u,h,p,d=t[0]^n[0],y=t[e?3:1]^n[1],m=t[2]^n[2],g=t[e?1:3]^n[3],S=4;for(let t=0;s>t;t++)u=i[d>>>24]^a[y>>16&255]^f[m>>8&255]^l[255&g]^n[S],h=i[y>>>24]^a[m>>16&255]^f[g>>8&255]^l[255&d]^n[S+1],p=i[m>>>24]^a[g>>16&255]^f[d>>8&255]^l[255&y]^n[S+2],g=i[g>>>24]^a[d>>16&255]^f[y>>8&255]^l[255&m]^n[S+3],S+=4,d=u,y=h,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=w[d>>>24]<<24^w[y>>16&255]<<16^w[m>>8&255]<<8^w[255&g]^n[S++],u=d,d=y,y=m,m=g,g=u;return o}},it=class{constructor(t,e){this.G=t,this.J=e,this.X=e}reset(){this.X=this.J}update(t){return this.Y(this.G,t,this.X)}$(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}et(t){0===(t[0]=this.$(t[0]))&&(t[1]=this.$(t[1]))}Y(t,e,n){let s;if(!(s=e.length))return[];const r=V.m(e);for(let r=0;s>r;r+=4){this.et(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return V.S(e,r)}},at=F.V;let ft=nt&&rt&&typeof st.importKey==k,lt=nt&&rt&&typeof st.deriveBits==k;class wt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:s,checkAuthenticationCode:c=!0}){super({start(){ht(this,t,e,n)},async transform(t,e){const n=this,{password:c,strength:i,nt:a,ready:f}=n;c?(await(async(t,e,n,s)=>{const o=await dt(t,e,n,mt(s,0,Y[e])),c=mt(s,Y[e]);if(o[0]!=c[0]||o[1]!=c[1])throw new r(O)})(n,i,c,mt(t,0,Y[i]+2)),t=mt(t,Y[i]+2),s?e.error(new r(Z)):a()):await f;const l=new o(t.length-tt-(t.length-tt)%q);e.enqueue(pt(n,t,l,0,tt,!0))},async flush(t){const{st:e,ot:n,pending:s,ready:o}=this;if(n&&e){await o;const i=mt(s,0,s.length-tt),a=mt(s,s.length-tt);let f=z;if(i.length){const t=St(ot,i);n.update(t);const s=e.update(t);f=gt(ot,s)}const l=mt(gt(ot,n.digest()),0,tt);let w=s.length<tt?1:0;for(let t=0;tt>t;t++)w|=l[t]^a[t];if(w&&c)throw new r(H);t.enqueue(f)}}})}}class ut extends d{constructor({password:t,rawPassword:e,encryptionStrength:n}){super({start(){ht(this,t,e,n)},async transform(t,e){const n=this,{password:s,strength:r,nt:c,ready:i}=n;let a=z;s?(a=await(async(t,e,n)=>{const s=N(new o(Y[e]));return _(s,await dt(t,e,n,s))})(n,r,s),c()):await i;const f=new o(a.length+t.length-t.length%q);f.set(a,0),e.enqueue(pt(n,t,f,a.length,0))},async flush(t){const{st:e,ot:n,pending:s,ready:r}=this;if(n&&e){await r;let o=z;if(s.length){const t=e.update(St(ot,s));n.update(t),o=gt(ot,t)}const c=gt(ot,n.digest()).slice(0,tt);t.enqueue(_(o,c))}}})}}function ht(t,n,s,r){e.assign(t,{ready:new w(e=>t.nt=e),password:yt(n,s),strength:r-1,pending:z})}function pt(t,e,n,s,r,c){const{st:i,ot:a,pending:f}=t;f.length&&(e=_(f,e));const l=e.length-r;let w;for(n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new o(e)).set(n,0)}return t})(n,s+(l-l%q)),w=0;l-q>=w;w+=q){const t=St(ot,mt(e,w,w+q));c&&a.update(t);const r=i.update(t);c||a.update(r),n.set(gt(ot,r),w+s)}return t.pending=mt(e,w),n}async function dt(n,s,r,c){n.password=null;const i=await(async(t,e,n,s,r)=>{if(!ft)return F.importKey(e);try{return await st.importKey("raw",e,n,!1,r)}catch{return ft=!1,F.importKey(e)}})(0,r,J,0,X),a=await(async(t,e,n)=>{if(!lt)return F.K(e,t.salt,Q.iterations,n);try{return await st.deriveBits(t,e,n)}catch{return lt=!1,F.K(e,t.salt,Q.iterations,n)}})(e.assign({salt:c},Q),i,8*(2*$[s]+2)),f=new o(a),l=St(ot,mt(f,0,$[s])),w=St(ot,mt(f,$[s],2*$[s])),u=mt(f,2*$[s]);return e.assign(n,{keys:{key:l,ct:w,passwordVerification:u},st:new it(new ct(l),t.from(et)),ot:new at(w)}),u}function yt(t,e){return e===v?(t=>{if(typeof u==b){const e=new o((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new u).encode(t)})(t):e}function mt(t,e,n){return t.subarray(e,n)}function gt(t,e){return t.C(e)}function St(t,e){return t.A(e)}class vt extends d{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){kt(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=zt(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new r(O);t=t.subarray(12)}s?e.error(new r(Z)):e.enqueue(zt(n,t))}})}}class bt extends d{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){kt(this,t,e,n)},transform(t,e){const n=this;let s,r;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=N(new o(12));e[11]=n.passwordVerification,s=new o(t.length+e.length),s.set(Ct(n,e),0),r=12}else s=new o(t.length),r=0;s.set(Ct(n,t),r),e.enqueue(s)}})}}function kt(t,n,s,r){e.assign(t,{password:n,rawPassword:s,passwordVerification:r}),((t,n,s)=>{const r=[305419896,591751049,878082192];if(e.assign(t,{keys:r,it:new U(r[0]),ft:new U(r[2])}),s)for(let e=0;e<s.length;e++)At(t,s[e]);else for(let e=0;e<n.length;e++)At(t,n.charCodeAt(e))})(t,n,s)}function zt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=It(t)^e[s],At(t,n[s]);return n}function Ct(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=It(t)^e[s],At(t,e[s]);return n}function At(t,e){let[,n]=t.keys;t.it.append([e]);const r=~t.it.get();n=Mt(s.imul(Mt(n+xt(r)),134775813)+1),t.ft.append([n>>>24]);const o=~t.ft.get();t.keys=[r,n,o]}function It(t){const e=2|t.keys[2];return xt(s.imul(e,1^e)>>>8)}function xt(t){return 255&t}function Mt(t){return 4294967295&t}const Pt=new f;function Bt(t){return Pt.get(t)}const Dt="Invalid uncompressed size",Rt=j,Ut="deflate-raw",Wt="gzip",_t=[31,139,8];class Tt extends d{constructor(t,{chunkSize:e,CompressionStreamZlib:n,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:c,zipCrypto:i,computeCrc32:a,level:f,deflate64:w,format:u,compressionMethod:h}=t,p=this;let d,y,m,g=super.readable;const S=u&&Bt(u),v=a&&r&&!w&&!S&&(!o||i)&&!(!c||!s);if(o&&!i||!a||v||(d=new W,g=jt(g,d)),r)if(S)g=Ht(g,Lt(S.CompressionStream,u,{level:f,chunkSize:e,compressionMethod:h}));else if(v)m=new Vt,g=Ht(g,new s(Wt)),g=jt(g,m);else try{g=Ot(g,c,{level:f,chunkSize:e},s,n)}catch(t){let e;try{e=new s(Wt)}catch{throw t}g=Ht(g,e),g=jt(g,new Vt)}o&&(i?g=jt(g,new bt(t)):(y=new ut(t),g=jt(g,y))),Ft(p,g,()=>{o&&!i||!a||(p.crc32=v?m.crc32:new l(d.value.buffer).getUint32(0))})}}class Vt extends d{constructor(){let t,e=10,n=new o(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(8>=o)return void(n=_(n,t));const c=o-8,i=s.min(c,n.length);r.enqueue(_(n.subarray(0,i),t.subarray(0,c-i))),n=_(n.subarray(i),t.subarray(c-i))},flush(){const e=T(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Kt extends d{constructor(t,{chunkSize:e,DecompressionStreamZlib:n,DecompressionStream:s}){super({});const{zipCrypto:c,encrypted:i,checkCrc32:a,crc32:f,compressed:u,useCompressionStream:h,deflate64:p,format:m,compressionMethod:g,rawBitFlag:S,outputSize:b}=t;let k,z,C=super.readable;if(i&&(c?C=jt(C,new vt(t)):(z=new wt(t),C=jt(C,z))),u){const t=m&&Bt(m);if(t)C=Ht(C,Lt(t.DecompressionStream,m,{chunkSize:e,compressionMethod:g,rawBitFlag:S,uncompressedSize:b}));else try{C=Ot(C,h,{chunkSize:e,deflate64:p},s,n)}catch(t){if(p||b===v)throw t;let e;try{e=new s(Wt)}catch{throw t}C=((t,e,n)=>{const s=new U;let c,i,a,f=0,l=!1;const u=new w((t,e)=>{i=t,a=e});u.catch(()=>{}),n||i();const h=new d({start(t){const e=new o(10);e.set(_t),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){l=!0,y();try{await u}finally{m()}const e=new o(8),r=T(e);r.setUint32(0,s.get(),!0),r.setUint32(4,n,!0),t.enqueue(e)},cancel(t){a(t)}}),p=new d({transform(t,e){s.append(t),f+=t.length,n>f?l&&y():i(),e.enqueue(t)},cancel(t){a(t)}});return t=jt(t,h),jt(t=Ht(t,e),p);function y(){m(),c=setTimeout(()=>a(new r(Dt)),5e3)}function m(){clearTimeout(c)}})(C,e,b)}C=(t=>{const e=t.getReader();return new y({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new r("Invalid compressed data");throw e.cause=t,e}const{value:s,done:o}=n;o?t.close():t.enqueue(s)},cancel:t=>e.cancel(t)})})(C)}a&&(k=new W,C=jt(C,k)),Ft(this,C,()=>{if(a){const t=new l(k.value.buffer);if(f!=t.getUint32(0,!1))throw new r(Rt)}})}}const Et=new f;function Ft(t,n,s){n=jt(n,new d({flush:s})),e.defineProperty(t,"readable",{get:()=>n})}function Lt(t,e,n){if(!t)throw new r("Compression method not supported");return new t(e,n)}function Ot(t,e,n,s,r){const o=e&&s?s:r||s,c=n.deflate64?"deflate64-raw":Ut;let i;try{i=new o(c,n)}catch(t){if(!e||!r||o==r)throw t;i=new r(c,n)}return Ht(t,i)}function jt(t,e){return(t=>{if(t instanceof y)return t;const e=t.getReader();return new y({async pull(t){const{value:n,done:s}=await e.read();s?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})})(t).pipeThrough(e)}function Ht(t,e){const n=e.writable.getWriter(),s=t.getReader();return(async()=>{try{for(;;){await n.ready;const t=await s.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await(async(t,e)=>{try{await t.abort(e)}catch{}})(n,t),await(async(t,e)=>{try{await t.cancel(e)}catch{}})(s,t)}})(),e.readable}const Zt="data",Nt="close",qt="deflate";class Gt extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let c;o.startsWith(qt)?c=Tt:o.startsWith("inflate")&&(c=Kt),s.outputSize=0;let i=0;const a=new c(t,n),f=super.readable,l=new d({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){e.assign(s,{inputSize:i})}}),w=new d({transform(e,n){if(e&&e.length&&(n.enqueue(e),s.outputSize+=e.length,t.outputSize!==v&&s.outputSize>t.outputSize))throw new r(Dt)},flush(){const{crc32:t}=a;e.assign(s,{crc32:t,inputSize:i})}});e.defineProperty(s,"readable",{get:()=>f.pipeThrough(l).pipeThrough(a).pipeThrough(w)})}}class Jt extends d{constructor(t){const e=[];let s=0;function r(){const n=new o(t);let r=0;for(;t>r;){const s=e[0],o=t-r;s.length>o?(n.set(s.subarray(0,o),r),e[0]=s.subarray(o),r+=o):(n.set(s,r),r+=s.length,e.shift())}return s-=t,n}n.isFinite(t)&&t>=1||(t=65536),super({transform(n,o){for(e.push(n),s+=n.length;s>t;)o.enqueue(r())},flush(t){s&&t.enqueue(((t,e)=>{const n=new o(e);let s=0;for(const e of t)n.set(e,s),s+=e.length;return n})(e,s))}})}}let Qt=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(Qt=navigator.hardwareConcurrency)}catch{}const Xt=new f,Yt=new f;let $t,te,ee,ne,se,re,oe=0;async function ce(t){let e,o;try{const{options:c,config:i}=t;if(c.format&&await(async(t,e)=>{!Pt.has(t)&&e&&((t,e)=>{const{CompressionStream:n,DecompressionStream:s}=e;if(typeof n!=k&&typeof s!=k)throw new r("Invalid codec module");Pt.set(t,{CompressionStream:n,DecompressionStream:s})})(t,await(import(e)))})(c.format,c.codecURI),i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,c.compressed&&!c.format)if(c.useCompressionStream){if(!((t,e)=>{if(!t)return!1;let n=Et.get(t);n||(n=new f,Et.set(t,n));let s=n.get(e);if(s===v){try{new t(e),s=!0}catch{s=!1}n.set(e,s)}return s})(c.codecType.startsWith(qt)?i.CompressionStream:i.DecompressionStream,Ut))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{c.useCompressionStream=!0}const a={highWaterMark:1},l=t.readable||new y({async pull(t){const e=new w(t=>Xt.set(oe,t));ie({type:"pull",messageId:oe}),oe=(oe+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await e;t.enqueue(s),r&&t.close()}},a);o=t.writable||new m({async write(t){let e;const s=new w(t=>e=t);Yt.set(oe,e),ie({type:Zt,value:t,messageId:oe}),oe=(oe+1)%n.MAX_SAFE_INTEGER,await s}},a),e=new Gt(c,i),$t=new AbortController;const{signal:u}=$t;await l.pipeThrough(e).pipeThrough(new Jt((t=>s.max(t.chunkSize,64))(i))).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{crc32:h,inputSize:p,outputSize:d}=e;ie({type:Nt,result:{crc32:h,inputSize:p,outputSize:d}})}catch(t){if(t.outputSize=e?e.outputSize:0,o&&!o.locked)try{await o.getWriter().close()}catch{}ae(t)}}function ie(t){const{value:e}=t;if(e)if(e.length)try{t.value=(n=e,n.byteOffset||n.byteLength!=n.buffer.byteLength?new o(n):n).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var n}function ae(t=new r("Unknown error")){const{message:e,stack:n,code:s,name:o,outputSize:c,cause:i}=t,a={message:e,stack:n,code:s,name:o,outputSize:c};i&&(a.cause={name:i.name,message:i.message}),p({error:a})}function fe(t,e,n={}){if(!te){const t=new r("WASM module not loaded");throw t.cause=re,t}const c="number"==typeof n.level?n.level:-1,i="number"==typeof n.outBuffer?n.outBuffer:65536,a="number"==typeof n.inBufferSize?n.inBufferSize:65536;return new d({start(){try{let n;if(this.lt=ee(i),this.in=ee(a),this.inBufferSize=a,!this.lt||!this.in)throw new r("allocation failed");if(this.wt=new o(i),t?(this.ut=te.deflate_process,this.ht=te.deflate_last_consumed,this.yt=te.deflate_end,this.gt=te.deflate_new(),n="gzip"===e?te.deflate_init_gzip(this.gt,c):"deflate-raw"===e?te.deflate_init_raw(this.gt,c):te.deflate_init(this.gt,c)):"deflate64-raw"===e?(this.ut=te.inflate9_process,this.ht=te.inflate9_last_consumed,this.yt=te.inflate9_end,this.gt=te.inflate9_new(),n=te.inflate9_init_raw(this.gt)):(this.ut=te.inflate_process,this.ht=te.inflate_last_consumed,this.yt=te.inflate_end,this.gt=te.inflate_new(),n="deflate-raw"===e?te.inflate_init_raw(this.gt):"gzip"===e?te.inflate_init_gzip(this.gt):te.inflate_init(this.gt)),0!==n)throw new r("init failed:"+n)}catch(t){throw f(this),t}},transform(e,n){try{const c=e,a=new o(se.buffer),f=this.ut,l=this.ht,w=this.lt,u=this.wt;let h=0;for(;h<c.length;){const e=s.min(c.length-h,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&ne&&(ne(this.in),this.in=0),this.in=ee(e),this.inBufferSize=e,!this.in))throw new r("allocation failed");a.set(c.subarray(h,h+e),this.in);const o=f(this.gt,this.in,e,w,i,0),p=16777215&o;if(p&&(u.set(a.subarray(w,w+p),0),n.enqueue(u.slice(0,p))),!t){const t=o>>24&255,e=128&t?t-256:t;if(0>e)throw new r("process error:"+e)}const d=l(this.gt);if(0===d)break;h+=d}}catch(t){f(this),n.error(t)}},flush(e){try{const n=new o(se.buffer),s=this.ut,c=this.lt,a=this.wt;for(;;){const o=s(this.gt,0,0,c,i,4),f=16777215&o,l=o>>24&255;if(!t){const t=128&l?l-256:l;if(0>t)throw new r("process error:"+t)}if(f&&(a.set(n.subarray(c,c+f),0),e.enqueue(a.slice(0,f))),1===l||0===f)break}}catch(t){e.error(t)}finally{const t=f(this);0!==t&&e.error(new r("end error:"+t))}},cancel(){f(this)}});function f(t){let e=0;return t.gt&&t.yt&&(e=t.yt(t.gt)),t.gt=0,t.in&&ne&&ne(t.in),t.in=0,t.lt&&ne&&ne(t.lt),t.lt=0,e}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if("start"==e&&ce(t),e==Zt){const t=Xt.get(n);Xt.delete(n),t({value:s||new o,done:r})}if("ack"==e){const t=Yt.get(n);Yt.delete(n),t()}e==Nt&&$t.abort()}catch(t){ae(t)}}),p({type:"ready"});class le{constructor(t="deflate",e){return fe(!0,t,e)}}class we{constructor(t="deflate",e){return fe(!1,t,e)}}le.St=!0,we.St=!0;let ue=!1;self.initModule=async t=>{const e=await(async(t,{baseURI:e})=>{if(!ue)try{await(async(t,e)=>{let n,s;try{try{s=new URL(t,e)}catch{}const r=await fetch(s);n=await r.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=(t=>{const e=t.split(",")[1],n=atob(e),s=n.length,r=new o(s);for(let t=0;s>t;++t)r[t]=n.charCodeAt(t);return r.buffer})(t)}(t=>{if(te=t,({malloc:ee,free:ne,memory:se}=te),"function"!=typeof ee||"function"!=typeof ne||!se)throw te=ee=ne=se=null,new r("Invalid WASM module")})((await WebAssembly.instantiate(n)).instance.exports)})(t,e),ue=!0}catch(t){throw(t=>{re=t})(t),t}})(t.wasmURI,t);return t.CompressionStreamZlib=le,t.DecompressionStreamZlib=we,e}});\n';t({workerURI:t=>{const n="text/javascript";if(t){const t=new Blob([e],{type:n});return URL.createObjectURL(t)}return "data:"+n+","+encodeURIComponent(e)}});}
|
|
222
224
|
|
|
223
225
|
/*
|
|
224
226
|
Copyright (c) 2025 Gildas Lormeau. All rights reserved.
|
|
@@ -1365,6 +1367,7 @@ const GET_RANDOM_VALUES_SUPPORTED = typeof crypto != UNDEFINED_TYPE && typeof cr
|
|
|
1365
1367
|
|
|
1366
1368
|
const ERR_INVALID_PASSWORD = "Invalid password";
|
|
1367
1369
|
const ERR_INVALID_SIGNATURE = "Invalid signature";
|
|
1370
|
+
const ERR_INVALID_AUTHENTICATION_CODE = ERR_INVALID_SIGNATURE;
|
|
1368
1371
|
const ERR_ABORT_CHECK_PASSWORD = "zipjs-abort-check-password";
|
|
1369
1372
|
const ERR_UNSUPPORTED_CRYPTO_API = "Crypto API not supported";
|
|
1370
1373
|
|
|
@@ -1415,7 +1418,7 @@ const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: H
|
|
|
1415
1418
|
const DERIVED_BITS_USAGE = ["deriveBits"];
|
|
1416
1419
|
const SALT_LENGTH = [8, 12, 16];
|
|
1417
1420
|
const KEY_LENGTH = [16, 24, 32];
|
|
1418
|
-
const
|
|
1421
|
+
const AUTHENTICATION_CODE_LENGTH = 10;
|
|
1419
1422
|
const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];
|
|
1420
1423
|
// deno-lint-ignore valid-typeof
|
|
1421
1424
|
const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;
|
|
@@ -1431,7 +1434,7 @@ let DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && type
|
|
|
1431
1434
|
|
|
1432
1435
|
class AESDecryptionStream extends TransformStream {
|
|
1433
1436
|
|
|
1434
|
-
constructor({ password, rawPassword, encryptionStrength, checkPasswordOnly }) {
|
|
1437
|
+
constructor({ password, rawPassword, encryptionStrength, checkPasswordOnly, checkAuthenticationCode = true }) {
|
|
1435
1438
|
super({
|
|
1436
1439
|
start() {
|
|
1437
1440
|
initAesCrypto(this, password, rawPassword, encryptionStrength);
|
|
@@ -1455,8 +1458,8 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1455
1458
|
} else {
|
|
1456
1459
|
await ready;
|
|
1457
1460
|
}
|
|
1458
|
-
const output = new Uint8Array(chunk.length -
|
|
1459
|
-
controller.enqueue(append(aesCrypto, chunk, output, 0,
|
|
1461
|
+
const output = new Uint8Array(chunk.length - AUTHENTICATION_CODE_LENGTH - ((chunk.length - AUTHENTICATION_CODE_LENGTH) % BLOCK_LENGTH));
|
|
1462
|
+
controller.enqueue(append(aesCrypto, chunk, output, 0, AUTHENTICATION_CODE_LENGTH, true));
|
|
1460
1463
|
},
|
|
1461
1464
|
async flush(controller) {
|
|
1462
1465
|
const {
|
|
@@ -1467,8 +1470,8 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1467
1470
|
} = this;
|
|
1468
1471
|
if (hmac && ctr) {
|
|
1469
1472
|
await ready;
|
|
1470
|
-
const chunkToDecrypt = subarray(pending, 0, pending.length -
|
|
1471
|
-
const
|
|
1473
|
+
const chunkToDecrypt = subarray(pending, 0, pending.length - AUTHENTICATION_CODE_LENGTH);
|
|
1474
|
+
const originalAuthenticationCode = subarray(pending, pending.length - AUTHENTICATION_CODE_LENGTH);
|
|
1472
1475
|
let decryptedChunkArray = EMPTY_UINT8_ARRAY;
|
|
1473
1476
|
if (chunkToDecrypt.length) {
|
|
1474
1477
|
const encryptedChunk = toBits(codecBytes, chunkToDecrypt);
|
|
@@ -1476,13 +1479,13 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1476
1479
|
const decryptedChunk = ctr.update(encryptedChunk);
|
|
1477
1480
|
decryptedChunkArray = fromBits(codecBytes, decryptedChunk);
|
|
1478
1481
|
}
|
|
1479
|
-
const
|
|
1480
|
-
let
|
|
1481
|
-
for (let
|
|
1482
|
-
|
|
1482
|
+
const authenticationCode = subarray(fromBits(codecBytes, hmac.digest()), 0, AUTHENTICATION_CODE_LENGTH);
|
|
1483
|
+
let invalidAuthenticationCode = pending.length < AUTHENTICATION_CODE_LENGTH ? 1 : 0;
|
|
1484
|
+
for (let indexByte = 0; indexByte < AUTHENTICATION_CODE_LENGTH; indexByte++) {
|
|
1485
|
+
invalidAuthenticationCode |= authenticationCode[indexByte] ^ originalAuthenticationCode[indexByte];
|
|
1483
1486
|
}
|
|
1484
|
-
if (
|
|
1485
|
-
throw new Error(
|
|
1487
|
+
if (invalidAuthenticationCode && checkAuthenticationCode) {
|
|
1488
|
+
throw new Error(ERR_INVALID_AUTHENTICATION_CODE);
|
|
1486
1489
|
}
|
|
1487
1490
|
controller.enqueue(decryptedChunkArray);
|
|
1488
1491
|
}
|
|
@@ -1494,8 +1497,6 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1494
1497
|
class AESEncryptionStream extends TransformStream {
|
|
1495
1498
|
|
|
1496
1499
|
constructor({ password, rawPassword, encryptionStrength }) {
|
|
1497
|
-
// deno-lint-ignore prefer-const
|
|
1498
|
-
let stream;
|
|
1499
1500
|
super({
|
|
1500
1501
|
start() {
|
|
1501
1502
|
initAesCrypto(this, password, rawPassword, encryptionStrength);
|
|
@@ -1534,12 +1535,11 @@ class AESEncryptionStream extends TransformStream {
|
|
|
1534
1535
|
hmac.update(encryptedChunk);
|
|
1535
1536
|
encryptedChunkArray = fromBits(codecBytes, encryptedChunk);
|
|
1536
1537
|
}
|
|
1537
|
-
|
|
1538
|
-
controller.enqueue(concat(encryptedChunkArray,
|
|
1538
|
+
const authenticationCode = fromBits(codecBytes, hmac.digest()).slice(0, AUTHENTICATION_CODE_LENGTH);
|
|
1539
|
+
controller.enqueue(concat(encryptedChunkArray, authenticationCode));
|
|
1539
1540
|
}
|
|
1540
1541
|
}
|
|
1541
1542
|
});
|
|
1542
|
-
stream = this;
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
|
|
@@ -1552,7 +1552,7 @@ function initAesCrypto(aesCrypto, password, rawPassword, encryptionStrength) {
|
|
|
1552
1552
|
});
|
|
1553
1553
|
}
|
|
1554
1554
|
|
|
1555
|
-
function append(aesCrypto, input, output, paddingStart, paddingEnd,
|
|
1555
|
+
function append(aesCrypto, input, output, paddingStart, paddingEnd, verifyAuthenticationCode) {
|
|
1556
1556
|
const {
|
|
1557
1557
|
ctr,
|
|
1558
1558
|
hmac,
|
|
@@ -1566,11 +1566,11 @@ function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignat
|
|
|
1566
1566
|
let offset;
|
|
1567
1567
|
for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {
|
|
1568
1568
|
const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));
|
|
1569
|
-
if (
|
|
1569
|
+
if (verifyAuthenticationCode) {
|
|
1570
1570
|
hmac.update(inputChunk);
|
|
1571
1571
|
}
|
|
1572
1572
|
const outputChunk = ctr.update(inputChunk);
|
|
1573
|
-
if (!
|
|
1573
|
+
if (!verifyAuthenticationCode) {
|
|
1574
1574
|
hmac.update(outputChunk);
|
|
1575
1575
|
}
|
|
1576
1576
|
output.set(fromBits(codecBytes, outputChunk), offset + paddingStart);
|
|
@@ -1920,6 +1920,7 @@ function toCompatibleWritable(writable) {
|
|
|
1920
1920
|
|
|
1921
1921
|
const ERR_INVALID_UNCOMPRESSED_SIZE = "Invalid uncompressed size";
|
|
1922
1922
|
const ERR_INVALID_COMPRESSED_DATA = "Invalid compressed data";
|
|
1923
|
+
const ERR_INVALID_CRC32 = ERR_INVALID_SIGNATURE;
|
|
1923
1924
|
const ERR_UNSUPPORTED_COMPRESSION$2 = "Compression method not supported";
|
|
1924
1925
|
const FORMAT_DEFLATE_RAW = "deflate-raw";
|
|
1925
1926
|
const FORMAT_DEFLATE64_RAW = "deflate64-raw";
|
|
@@ -1933,14 +1934,14 @@ class DeflateStream extends TransformStream {
|
|
|
1933
1934
|
|
|
1934
1935
|
constructor(options, { chunkSize, CompressionStreamZlib, CompressionStream }) {
|
|
1935
1936
|
super({});
|
|
1936
|
-
const { compressed, encrypted, useCompressionStream, zipCrypto,
|
|
1937
|
+
const { compressed, encrypted, useCompressionStream, zipCrypto, computeCrc32, level, deflate64, format, compressionMethod } = options;
|
|
1937
1938
|
const stream = this;
|
|
1938
1939
|
let crc32Stream, encryptionStream, gzipCrc32Stream;
|
|
1939
1940
|
let readable = super.readable;
|
|
1940
1941
|
const codecStreams = format && getCodecStreams(format);
|
|
1941
|
-
const useGzipCrc32 =
|
|
1942
|
+
const useGzipCrc32 = computeCrc32 && compressed && !deflate64 && !codecStreams && (!encrypted || zipCrypto) &&
|
|
1942
1943
|
Boolean(useCompressionStream && CompressionStream);
|
|
1943
|
-
if ((!encrypted || zipCrypto) &&
|
|
1944
|
+
if ((!encrypted || zipCrypto) && computeCrc32 && !useGzipCrc32) {
|
|
1944
1945
|
crc32Stream = new Crc32Stream();
|
|
1945
1946
|
readable = pipeThrough(readable, crc32Stream);
|
|
1946
1947
|
}
|
|
@@ -1975,14 +1976,9 @@ class DeflateStream extends TransformStream {
|
|
|
1975
1976
|
}
|
|
1976
1977
|
}
|
|
1977
1978
|
setReadable(stream, readable, () => {
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
signature = encryptionStream.signature;
|
|
1979
|
+
if ((!encrypted || zipCrypto) && computeCrc32) {
|
|
1980
|
+
stream.crc32 = useGzipCrc32 ? gzipCrc32Stream.crc32 : new DataView(crc32Stream.value.buffer).getUint32(0);
|
|
1981
1981
|
}
|
|
1982
|
-
if ((!encrypted || zipCrypto) && signed) {
|
|
1983
|
-
signature = useGzipCrc32 ? gzipCrc32Stream.signature : new DataView(crc32Stream.value.buffer).getUint32(0);
|
|
1984
|
-
}
|
|
1985
|
-
stream.signature = signature;
|
|
1986
1982
|
});
|
|
1987
1983
|
}
|
|
1988
1984
|
}
|
|
@@ -2020,7 +2016,7 @@ class GzipToRawDeflateStream extends TransformStream {
|
|
|
2020
2016
|
},
|
|
2021
2017
|
flush() {
|
|
2022
2018
|
const dataView = getDataView(trailerCandidate);
|
|
2023
|
-
stream.
|
|
2019
|
+
stream.crc32 = dataView.getUint32(0, true);
|
|
2024
2020
|
stream.uncompressedSize = dataView.getUint32(4, true);
|
|
2025
2021
|
}
|
|
2026
2022
|
});
|
|
@@ -2102,7 +2098,7 @@ class InflateStream extends TransformStream {
|
|
|
2102
2098
|
|
|
2103
2099
|
constructor(options, { chunkSize, DecompressionStreamZlib, DecompressionStream }) {
|
|
2104
2100
|
super({});
|
|
2105
|
-
const { zipCrypto, encrypted,
|
|
2101
|
+
const { zipCrypto, encrypted, checkCrc32, crc32, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;
|
|
2106
2102
|
let crc32Stream, decryptionStream;
|
|
2107
2103
|
let readable = super.readable;
|
|
2108
2104
|
if (encrypted) {
|
|
@@ -2135,15 +2131,15 @@ class InflateStream extends TransformStream {
|
|
|
2135
2131
|
}
|
|
2136
2132
|
readable = mapInflateStreamError(readable);
|
|
2137
2133
|
}
|
|
2138
|
-
if (
|
|
2134
|
+
if (checkCrc32) {
|
|
2139
2135
|
crc32Stream = new Crc32Stream();
|
|
2140
2136
|
readable = pipeThrough(readable, crc32Stream);
|
|
2141
2137
|
}
|
|
2142
2138
|
setReadable(this, readable, () => {
|
|
2143
|
-
if (
|
|
2144
|
-
const
|
|
2145
|
-
if (
|
|
2146
|
-
throw new Error(
|
|
2139
|
+
if (checkCrc32) {
|
|
2140
|
+
const computedCrc32View = new DataView(crc32Stream.value.buffer);
|
|
2141
|
+
if (crc32 != computedCrc32View.getUint32(0, false)) {
|
|
2142
|
+
throw new Error(ERR_INVALID_CRC32);
|
|
2147
2143
|
}
|
|
2148
2144
|
}
|
|
2149
2145
|
});
|
|
@@ -2367,9 +2363,9 @@ class CodecStream extends TransformStream {
|
|
|
2367
2363
|
}
|
|
2368
2364
|
},
|
|
2369
2365
|
flush() {
|
|
2370
|
-
const {
|
|
2366
|
+
const { crc32 } = stream;
|
|
2371
2367
|
Object.assign(codec, {
|
|
2372
|
-
|
|
2368
|
+
crc32,
|
|
2373
2369
|
inputSize
|
|
2374
2370
|
});
|
|
2375
2371
|
}
|
|
@@ -2672,12 +2668,12 @@ async function runWorker$1({ options, readable, writable, onTaskFinished }, conf
|
|
|
2672
2668
|
.pipeThrough(new ChunkStream(getChunkSize(config)))
|
|
2673
2669
|
.pipeTo(writable, { preventClose: true, preventAbort: true });
|
|
2674
2670
|
const {
|
|
2675
|
-
|
|
2671
|
+
crc32,
|
|
2676
2672
|
inputSize,
|
|
2677
2673
|
outputSize
|
|
2678
2674
|
} = codecStream;
|
|
2679
2675
|
return {
|
|
2680
|
-
|
|
2676
|
+
crc32,
|
|
2681
2677
|
inputSize,
|
|
2682
2678
|
outputSize
|
|
2683
2679
|
};
|
|
@@ -3038,7 +3034,7 @@ let indexWorker = 0;
|
|
|
3038
3034
|
|
|
3039
3035
|
async function runWorker(stream, workerOptions) {
|
|
3040
3036
|
const { options, config } = workerOptions;
|
|
3041
|
-
const { transferStreams, useWebWorkers, useCompressionStream, compressed,
|
|
3037
|
+
const { transferStreams, useWebWorkers, useCompressionStream, compressed, checkCrc32, computeCrc32, encrypted, format, codecURI } = options;
|
|
3042
3038
|
const { workerURI, maxWorkers } = config;
|
|
3043
3039
|
if (format) {
|
|
3044
3040
|
if (codecURI) {
|
|
@@ -3047,7 +3043,7 @@ async function runWorker(stream, workerOptions) {
|
|
|
3047
3043
|
await ensureCodecStreams(format, options.codecURI);
|
|
3048
3044
|
}
|
|
3049
3045
|
workerOptions.transferStreams = transferStreams || (transferStreams === UNDEFINED_VALUE && config.transferStreams);
|
|
3050
|
-
const streamCopy = !compressed && !
|
|
3046
|
+
const streamCopy = !compressed && !checkCrc32 && !computeCrc32 && !encrypted;
|
|
3051
3047
|
const workerSupported = format === UNDEFINED_VALUE || Boolean(options.codecURI);
|
|
3052
3048
|
workerOptions.useWebWorkers = !streamCopy && workerSupported && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));
|
|
3053
3049
|
workerOptions.workerURI = workerOptions.useWebWorkers && workerURI ? workerURI : UNDEFINED_VALUE;
|
|
@@ -4271,9 +4267,12 @@ const PROPERTY_NAME_DIRECTORY = "directory";
|
|
|
4271
4267
|
const PROPERTY_NAME_EXECUTABLE = "executable";
|
|
4272
4268
|
const PROPERTY_NAME_COMPRESSION_METHOD = "compressionMethod";
|
|
4273
4269
|
const PROPERTY_NAME_SIGNATURE = "signature";
|
|
4270
|
+
const PROPERTY_NAME_CRC32 = "crc32";
|
|
4274
4271
|
const PROPERTY_NAME_EXTRA_FIELD = "extraField";
|
|
4275
4272
|
const PROPERTY_NAME_EXTRA_FIELD_INFOZIP = "extraFieldInfoZip";
|
|
4276
4273
|
const PROPERTY_NAME_EXTRA_FIELD_UNIX = "extraFieldUnix";
|
|
4274
|
+
const PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1 = "extraFieldUnixType1";
|
|
4275
|
+
const PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX = "extraFieldPkwareUnix";
|
|
4277
4276
|
const PROPERTY_NAME_UID = "uid";
|
|
4278
4277
|
const PROPERTY_NAME_GID = "gid";
|
|
4279
4278
|
const PROPERTY_NAME_UNIX_MODE = "unixMode";
|
|
@@ -4290,6 +4289,7 @@ const PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT = "extraFieldUnicodeComment";
|
|
|
4290
4289
|
const PROPERTY_NAME_EXTRA_FIELD_AES = "extraFieldAES";
|
|
4291
4290
|
const PROPERTY_NAME_EXTRA_FIELD_NTFS = "extraFieldNTFS";
|
|
4292
4291
|
const PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP = "extraFieldExtendedTimestamp";
|
|
4292
|
+
const PROPERTY_NAME_EXTRA_FIELD_USDZ = "extraFieldUSDZ";
|
|
4293
4293
|
|
|
4294
4294
|
const PROPERTY_NAMES = [
|
|
4295
4295
|
PROPERTY_NAME_FILENAME,
|
|
@@ -4301,6 +4301,7 @@ const PROPERTY_NAMES = [
|
|
|
4301
4301
|
PROPERTY_NAME_COMMENT,
|
|
4302
4302
|
PROPERTY_NAME_RAW_COMMENT,
|
|
4303
4303
|
PROPERTY_NAME_LAST_ACCESS_DATE,
|
|
4304
|
+
PROPERTY_NAME_RAW_LAST_ACCESS_DATE,
|
|
4304
4305
|
PROPERTY_NAME_CREATION_DATE,
|
|
4305
4306
|
PROPERTY_NAME_RAW_CREATION_DATE,
|
|
4306
4307
|
PROPERTY_NAME_OFFSET,
|
|
@@ -4319,9 +4320,12 @@ const PROPERTY_NAMES = [
|
|
|
4319
4320
|
PROPERTY_NAME_EXECUTABLE,
|
|
4320
4321
|
PROPERTY_NAME_COMPRESSION_METHOD,
|
|
4321
4322
|
PROPERTY_NAME_SIGNATURE,
|
|
4323
|
+
PROPERTY_NAME_CRC32,
|
|
4322
4324
|
PROPERTY_NAME_EXTRA_FIELD,
|
|
4323
4325
|
PROPERTY_NAME_EXTRA_FIELD_UNIX,
|
|
4324
4326
|
PROPERTY_NAME_EXTRA_FIELD_INFOZIP,
|
|
4327
|
+
PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1,
|
|
4328
|
+
PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX,
|
|
4325
4329
|
PROPERTY_NAME_UID,
|
|
4326
4330
|
PROPERTY_NAME_GID,
|
|
4327
4331
|
PROPERTY_NAME_UNIX_MODE,
|
|
@@ -4337,7 +4341,8 @@ const PROPERTY_NAMES = [
|
|
|
4337
4341
|
PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT,
|
|
4338
4342
|
PROPERTY_NAME_EXTRA_FIELD_AES,
|
|
4339
4343
|
PROPERTY_NAME_EXTRA_FIELD_NTFS,
|
|
4340
|
-
PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP
|
|
4344
|
+
PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP,
|
|
4345
|
+
PROPERTY_NAME_EXTRA_FIELD_USDZ
|
|
4341
4346
|
];
|
|
4342
4347
|
|
|
4343
4348
|
class Entry {
|
|
@@ -4390,6 +4395,8 @@ const OPTION_CHECK_OVERLAPPING_ENTRY_ONLY = "checkOverlappingEntryOnly";
|
|
|
4390
4395
|
const OPTION_CHECK_OVERLAPPING_ENTRY = "checkOverlappingEntry";
|
|
4391
4396
|
const OPTION_CHECK_AMBIGUITY = "checkAmbiguity";
|
|
4392
4397
|
const OPTION_CHECK_SIGNATURE = "checkSignature";
|
|
4398
|
+
const OPTION_CHECK_CRC32 = "checkCrc32";
|
|
4399
|
+
const OPTION_CHECK_AUTHENTICATION_CODE = "checkAuthenticationCode";
|
|
4393
4400
|
const OPTION_USE_WEB_WORKERS = "useWebWorkers";
|
|
4394
4401
|
const OPTION_USE_COMPRESSION_STREAM = "useCompressionStream";
|
|
4395
4402
|
const OPTION_TRANSFER_STREAMS = "transferStreams";
|
|
@@ -4409,6 +4416,7 @@ const OPTION_ENCODE_TEXT = "encodeText";
|
|
|
4409
4416
|
const OPTION_OFFSET = "offset";
|
|
4410
4417
|
const OPTION_USDZ = "usdz";
|
|
4411
4418
|
const OPTION_UNIX_EXTRA_FIELD_TYPE = "unixExtraFieldType";
|
|
4419
|
+
const OPTION_LOCAL_EXTRA_FIELD = "localExtraField";
|
|
4412
4420
|
const OPTION_STRICTNESS = "strictness";
|
|
4413
4421
|
const OPTION_MAX_APPENDED_DATA_SIZE = "maxAppendedDataSize";
|
|
4414
4422
|
const STRICTNESS_STRICT = "strict";
|
|
@@ -4461,6 +4469,7 @@ const CHARSET_UTF8 = "utf-8";
|
|
|
4461
4469
|
const PROPERTY_NAME_UTF8_SUFFIX = "UTF8";
|
|
4462
4470
|
const CHARSET_CP437 = "cp437";
|
|
4463
4471
|
const BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_LANG_ENCODING_FLAG;
|
|
4472
|
+
const VENDOR_VERSION_AE_1$1 = 1;
|
|
4464
4473
|
const ZIP64_PROPERTIES = [
|
|
4465
4474
|
[PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],
|
|
4466
4475
|
[PROPERTY_NAME_COMPRESSED_SIZE, MAX_32_BITS],
|
|
@@ -4853,7 +4862,7 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4853
4862
|
config,
|
|
4854
4863
|
bitFlag,
|
|
4855
4864
|
rawBitFlag,
|
|
4856
|
-
|
|
4865
|
+
crc32,
|
|
4857
4866
|
rawLastModDate,
|
|
4858
4867
|
uncompressedSize,
|
|
4859
4868
|
compressedSize
|
|
@@ -4940,6 +4949,11 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4940
4949
|
if (deflate64) {
|
|
4941
4950
|
useCompressionStream = false;
|
|
4942
4951
|
}
|
|
4952
|
+
const checkCrc32Option = getOptionValue$1(zipEntry, options, OPTION_CHECK_CRC32);
|
|
4953
|
+
const checkCrc32 = (checkCrc32Option === UNDEFINED_VALUE ?
|
|
4954
|
+
getOptionValue$1(zipEntry, options, OPTION_CHECK_SIGNATURE) :
|
|
4955
|
+
checkCrc32Option) && !passThrough &&
|
|
4956
|
+
(!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1$1));
|
|
4943
4957
|
const workerOptions = {
|
|
4944
4958
|
options: {
|
|
4945
4959
|
codecType: CODEC_INFLATE,
|
|
@@ -4947,10 +4961,11 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4947
4961
|
rawPassword,
|
|
4948
4962
|
zipCrypto,
|
|
4949
4963
|
encryptionStrength: extraFieldAES && extraFieldAES.strength,
|
|
4950
|
-
|
|
4951
|
-
|
|
4964
|
+
checkCrc32,
|
|
4965
|
+
checkAuthenticationCode: getOptionValue$1(zipEntry, options, OPTION_CHECK_AUTHENTICATION_CODE),
|
|
4966
|
+
passwordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((crc32 >>> 24) & MAX_8_BITS)),
|
|
4952
4967
|
outputSize: passThrough ? compressedSize : uncompressedSize,
|
|
4953
|
-
|
|
4968
|
+
crc32,
|
|
4954
4969
|
compressed: compressionMethod != 0 && !passThrough,
|
|
4955
4970
|
encrypted,
|
|
4956
4971
|
useWebWorkers: getOptionValue$1(zipEntry, options, OPTION_USE_WEB_WORKERS),
|
|
@@ -4972,7 +4987,7 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4972
4987
|
fileEntry,
|
|
4973
4988
|
index,
|
|
4974
4989
|
offset: localHeaderOffset,
|
|
4975
|
-
|
|
4990
|
+
crc32,
|
|
4976
4991
|
compressedSize,
|
|
4977
4992
|
uncompressedSize,
|
|
4978
4993
|
dataOffset,
|
|
@@ -5063,6 +5078,7 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
|
|
|
5063
5078
|
const compressionMethod = getUint16(dataView, offset + 4);
|
|
5064
5079
|
Object.assign(directory, {
|
|
5065
5080
|
signature: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),
|
|
5081
|
+
crc32: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),
|
|
5066
5082
|
compressedSize: getUint32(dataView, offset + HEADER_OFFSET_COMPRESSED_SIZE),
|
|
5067
5083
|
uncompressedSize: getUint32(dataView, offset + HEADER_OFFSET_UNCOMPRESSED_SIZE)
|
|
5068
5084
|
});
|
|
@@ -5088,6 +5104,16 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
|
|
|
5088
5104
|
} else {
|
|
5089
5105
|
directory.compressionMethod = compressionMethod;
|
|
5090
5106
|
}
|
|
5107
|
+
const extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);
|
|
5108
|
+
if (extraFieldPkwareUnix) {
|
|
5109
|
+
readExtraFieldUnixDates(extraFieldPkwareUnix, directory);
|
|
5110
|
+
directory.extraFieldPkwareUnix = extraFieldPkwareUnix;
|
|
5111
|
+
}
|
|
5112
|
+
const extraFieldUnixType1 = extraField.get(EXTRAFIELD_TYPE_UNIX_TYPE1);
|
|
5113
|
+
if (extraFieldUnixType1) {
|
|
5114
|
+
readExtraFieldUnixDates(extraFieldUnixType1, directory);
|
|
5115
|
+
directory.extraFieldUnixType1 = extraFieldUnixType1;
|
|
5116
|
+
}
|
|
5091
5117
|
const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);
|
|
5092
5118
|
if (extraFieldNTFS) {
|
|
5093
5119
|
readExtraFieldNTFS(extraFieldNTFS, directory);
|
|
@@ -5137,15 +5163,15 @@ function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName,
|
|
|
5137
5163
|
return;
|
|
5138
5164
|
}
|
|
5139
5165
|
const extraFieldView = getDataView(extraFieldUnicode.data);
|
|
5140
|
-
const
|
|
5141
|
-
|
|
5142
|
-
const
|
|
5143
|
-
|
|
5144
|
-
const
|
|
5166
|
+
const computedCrc32 = new Crc32();
|
|
5167
|
+
computedCrc32.append(fileEntry[rawPropertyName]);
|
|
5168
|
+
const computedCrc32View = getDataView(new Uint8Array(4));
|
|
5169
|
+
computedCrc32View.setUint32(0, computedCrc32.get(), true);
|
|
5170
|
+
const nameCrc32 = getUint32(extraFieldView, 1);
|
|
5145
5171
|
Object.assign(extraFieldUnicode, {
|
|
5146
5172
|
version: getUint8(extraFieldView, 0),
|
|
5147
5173
|
[propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),
|
|
5148
|
-
valid: !fileEntry.bitFlag.languageEncodingFlag &&
|
|
5174
|
+
valid: !fileEntry.bitFlag.languageEncodingFlag && nameCrc32 == getUint32(computedCrc32View, 0)
|
|
5149
5175
|
});
|
|
5150
5176
|
if (extraFieldUnicode.valid) {
|
|
5151
5177
|
directory[propertyName] = extraFieldUnicode[propertyName];
|
|
@@ -5164,6 +5190,9 @@ function readExtraFieldAES(extraFieldAES, directory, compressionMethod) {
|
|
|
5164
5190
|
compressionMethod: getUint16(extraFieldView, 5)
|
|
5165
5191
|
});
|
|
5166
5192
|
directory.compressionMethod = extraFieldAES.compressionMethod;
|
|
5193
|
+
if (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1$1) {
|
|
5194
|
+
directory.crc32 = UNDEFINED_VALUE;
|
|
5195
|
+
}
|
|
5167
5196
|
}
|
|
5168
5197
|
|
|
5169
5198
|
function readExtraFieldNTFS(extraFieldNTFS, directory) {
|
|
@@ -5182,27 +5211,39 @@ function readExtraFieldNTFS(extraFieldNTFS, directory) {
|
|
|
5182
5211
|
} catch {
|
|
5183
5212
|
// ignored
|
|
5184
5213
|
}
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5214
|
+
if (tag1Data && tag1Data.length == 24) {
|
|
5215
|
+
const tag1View = getDataView(tag1Data);
|
|
5216
|
+
const rawLastModDate = tag1View.getBigUint64(0, true);
|
|
5217
|
+
const rawLastAccessDate = tag1View.getBigUint64(8, true);
|
|
5218
|
+
const rawCreationDate = tag1View.getBigUint64(16, true);
|
|
5219
|
+
Object.assign(extraFieldNTFS, {
|
|
5220
|
+
rawLastModDate,
|
|
5221
|
+
rawLastAccessDate,
|
|
5222
|
+
rawCreationDate
|
|
5223
|
+
});
|
|
5224
|
+
const lastModDate = getDateNTFS(rawLastModDate);
|
|
5225
|
+
const lastAccessDate = getDateNTFS(rawLastAccessDate);
|
|
5226
|
+
const creationDate = getDateNTFS(rawCreationDate);
|
|
5227
|
+
const extraFieldData = { lastModDate, lastAccessDate, creationDate };
|
|
5228
|
+
Object.assign(extraFieldNTFS, extraFieldData);
|
|
5229
|
+
Object.assign(directory, extraFieldData);
|
|
5230
|
+
}
|
|
5231
|
+
}
|
|
5232
|
+
|
|
5233
|
+
function readExtraFieldUnixDates(extraField, directory) {
|
|
5234
|
+
if (extraField.data.length < 8) {
|
|
5235
|
+
return;
|
|
5205
5236
|
}
|
|
5237
|
+
const extraFieldView = getDataView(extraField.data);
|
|
5238
|
+
const lastAccessDate = new Date(getUint32(extraFieldView, 0) * 1000);
|
|
5239
|
+
const lastModDate = new Date(getUint32(extraFieldView, 4) * 1000);
|
|
5240
|
+
const extraFieldData = { lastAccessDate, lastModDate };
|
|
5241
|
+
if (extraField.data.length >= 12) {
|
|
5242
|
+
extraFieldData.uid = getUint16(extraFieldView, 8);
|
|
5243
|
+
extraFieldData.gid = getUint16(extraFieldView, 10);
|
|
5244
|
+
}
|
|
5245
|
+
Object.assign(extraField, extraFieldData);
|
|
5246
|
+
Object.assign(directory, extraFieldData);
|
|
5206
5247
|
}
|
|
5207
5248
|
|
|
5208
5249
|
function readExtraFieldUnix(extraField, directory, isInfoZip) {
|
|
@@ -5283,7 +5324,7 @@ async function detectOverlappingEntry({
|
|
|
5283
5324
|
fileEntry,
|
|
5284
5325
|
index,
|
|
5285
5326
|
offset,
|
|
5286
|
-
|
|
5327
|
+
crc32,
|
|
5287
5328
|
compressedSize,
|
|
5288
5329
|
uncompressedSize,
|
|
5289
5330
|
dataOffset,
|
|
@@ -5304,7 +5345,7 @@ async function detectOverlappingEntry({
|
|
|
5304
5345
|
const dataDescriptorSignature = dataDescriptorArray.length == dataDescriptorLength + DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH &&
|
|
5305
5346
|
getUint32(getDataView(dataDescriptorArray), 0) == DATA_DESCRIPTOR_RECORD_SIGNATURE;
|
|
5306
5347
|
if (dataDescriptorSignature) {
|
|
5307
|
-
const
|
|
5348
|
+
const readCrc32 = getUint32(getDataView(dataDescriptorArray), 4);
|
|
5308
5349
|
let readCompressedSize;
|
|
5309
5350
|
let readUncompressedSize;
|
|
5310
5351
|
if (extraFieldZip64) {
|
|
@@ -5314,8 +5355,8 @@ async function detectOverlappingEntry({
|
|
|
5314
5355
|
readCompressedSize = getUint32(getDataView(dataDescriptorArray), 8);
|
|
5315
5356
|
readUncompressedSize = getUint32(getDataView(dataDescriptorArray), 12);
|
|
5316
5357
|
}
|
|
5317
|
-
const
|
|
5318
|
-
if (
|
|
5358
|
+
const matchCrc32 = (fileEntry.encrypted && !fileEntry.zipCrypto) || readCrc32 == crc32;
|
|
5359
|
+
if (matchCrc32 &&
|
|
5319
5360
|
readCompressedSize == compressedSize &&
|
|
5320
5361
|
readUncompressedSize == uncompressedSize) {
|
|
5321
5362
|
dataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;
|
|
@@ -5484,11 +5525,11 @@ function checkLocalDirectory(zipEntry, localDirectory, rawLocalFilename) {
|
|
|
5484
5525
|
throwAmbiguousArchive("mismatched local file header (compression method)");
|
|
5485
5526
|
}
|
|
5486
5527
|
if (!localDirectory.bitFlag.dataDescriptor &&
|
|
5487
|
-
(localDirectory.
|
|
5488
|
-
(localDirectory.
|
|
5528
|
+
(localDirectory.crc32 || localDirectory.compressedSize || localDirectory.uncompressedSize) &&
|
|
5529
|
+
(localDirectory.crc32 != zipEntry.crc32 ||
|
|
5489
5530
|
localDirectory.compressedSize != zipEntry.compressedSize ||
|
|
5490
5531
|
localDirectory.uncompressedSize != zipEntry.uncompressedSize)) {
|
|
5491
|
-
throwAmbiguousArchive("mismatched local file header (
|
|
5532
|
+
throwAmbiguousArchive("mismatched local file header (crc32 or sizes)");
|
|
5492
5533
|
}
|
|
5493
5534
|
}
|
|
5494
5535
|
|
|
@@ -5504,11 +5545,7 @@ function getOptionValue$1(zipReader, options, name) {
|
|
|
5504
5545
|
|
|
5505
5546
|
function getDate(timeRaw) {
|
|
5506
5547
|
const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & MAX_16_BITS;
|
|
5507
|
-
|
|
5508
|
-
return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);
|
|
5509
|
-
} catch {
|
|
5510
|
-
// ignored
|
|
5511
|
-
}
|
|
5548
|
+
return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);
|
|
5512
5549
|
}
|
|
5513
5550
|
|
|
5514
5551
|
function getDateNTFS(timeRaw) {
|
|
@@ -5541,7 +5578,9 @@ var zipReader = /*#__PURE__*/Object.freeze({
|
|
|
5541
5578
|
ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND: ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,
|
|
5542
5579
|
ERR_EOCDR_NOT_FOUND: ERR_EOCDR_NOT_FOUND,
|
|
5543
5580
|
ERR_EXTRAFIELD_ZIP64_NOT_FOUND: ERR_EXTRAFIELD_ZIP64_NOT_FOUND,
|
|
5581
|
+
ERR_INVALID_AUTHENTICATION_CODE: ERR_INVALID_AUTHENTICATION_CODE,
|
|
5544
5582
|
ERR_INVALID_COMPRESSED_DATA: ERR_INVALID_COMPRESSED_DATA,
|
|
5583
|
+
ERR_INVALID_CRC32: ERR_INVALID_CRC32,
|
|
5545
5584
|
ERR_INVALID_PASSWORD: ERR_INVALID_PASSWORD,
|
|
5546
5585
|
ERR_INVALID_SIGNATURE: ERR_INVALID_SIGNATURE,
|
|
5547
5586
|
ERR_INVALID_UNCOMPRESSED_SIZE: ERR_INVALID_UNCOMPRESSED_SIZE,
|
|
@@ -5595,6 +5634,8 @@ const ERR_INVALID_EXTRAFIELD_DATA = "Extra field data exceeds 64KB";
|
|
|
5595
5634
|
const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported";
|
|
5596
5635
|
const MIN_UNIX_TIME = -2147483648;
|
|
5597
5636
|
const MAX_UNIX_TIME = 2147483647;
|
|
5637
|
+
const MIN_NTFS_TIME = BigInt(0);
|
|
5638
|
+
const MAX_NTFS_TIME = BigInt("0x7fffffffffffffff");
|
|
5598
5639
|
const ERR_UNSUPPORTED_FORMAT = "Zip64 is not supported (set the 'zip64' option to 'true')";
|
|
5599
5640
|
const ERR_UNDEFINED_UNCOMPRESSED_SIZE = "Undefined uncompressed size";
|
|
5600
5641
|
const ERR_UNDEFINED_READER = "Undefined reader";
|
|
@@ -5608,7 +5649,9 @@ const ERR_INVALID_MSDOS_ATTRIBUTES = "Invalid msdosAttributesRaw (must be intege
|
|
|
5608
5649
|
const ERR_INVALID_MSDOS_DATA = "Invalid msdosAttributes (must be an object with boolean flags)";
|
|
5609
5650
|
|
|
5610
5651
|
const EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);
|
|
5611
|
-
const
|
|
5652
|
+
const EXTRAFIELD_OFFSET_AES_VENDOR_VERSION = 4;
|
|
5653
|
+
const VENDOR_VERSION_AE_1 = 1;
|
|
5654
|
+
const INFOZIP_EXTRA_FIELD_TYPE$1 = "infozip";
|
|
5612
5655
|
const UNIX_EXTRA_FIELD_TYPE = "unix";
|
|
5613
5656
|
|
|
5614
5657
|
let workers = 0;
|
|
@@ -5702,9 +5745,9 @@ class ZipWriter {
|
|
|
5702
5745
|
zip64UncompressedSize,
|
|
5703
5746
|
extraFieldLength
|
|
5704
5747
|
});
|
|
5705
|
-
const {
|
|
5706
|
-
if (
|
|
5707
|
-
setUint32(headerView, HEADER_OFFSET_SIGNATURE,
|
|
5748
|
+
const { crc32 } = entry;
|
|
5749
|
+
if (crc32 !== UNDEFINED_VALUE) {
|
|
5750
|
+
setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
|
|
5708
5751
|
}
|
|
5709
5752
|
Object.assign(entry, {
|
|
5710
5753
|
zip64UncompressedSize,
|
|
@@ -5889,6 +5932,7 @@ async function addFile(zipWriter, name, reader, options) {
|
|
|
5889
5932
|
internalFileAttribute: metadataInfo.resolvedOptions.internalFileAttributes,
|
|
5890
5933
|
externalFileAttribute: attributesInfo.resolvedOptions.externalFileAttributes,
|
|
5891
5934
|
signature: options[PROPERTY_NAME_SIGNATURE],
|
|
5935
|
+
crc32: options.crc32 === UNDEFINED_VALUE ? options[PROPERTY_NAME_SIGNATURE] : options.crc32,
|
|
5892
5936
|
offset: zipWriter.offset - diskOffset,
|
|
5893
5937
|
diskNumberStart: diskNumber
|
|
5894
5938
|
});
|
|
@@ -5925,7 +5969,7 @@ function resolveAttributes(zipWriter, name, options) {
|
|
|
5925
5969
|
if (unixMode !== UNDEFINED_VALUE && (unixMode < 0 || unixMode > MAX_16_BITS)) {
|
|
5926
5970
|
throw new Error(ERR_INVALID_UNIX_MODE);
|
|
5927
5971
|
}
|
|
5928
|
-
if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
|
|
5972
|
+
if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE$1 && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
|
|
5929
5973
|
throw new Error(ERR_INVALID_UNIX_EXTRA_FIELD_TYPE);
|
|
5930
5974
|
}
|
|
5931
5975
|
if (unixExtraFieldType === UNIX_EXTRA_FIELD_TYPE &&
|
|
@@ -5933,7 +5977,7 @@ function resolveAttributes(zipWriter, name, options) {
|
|
|
5933
5977
|
throw new Error(ERR_INVALID_UNIX_ID_SIZE);
|
|
5934
5978
|
}
|
|
5935
5979
|
if (unixExtraFieldType === UNDEFINED_VALUE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
5936
|
-
unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE;
|
|
5980
|
+
unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE$1;
|
|
5937
5981
|
}
|
|
5938
5982
|
let msdosAttributesRaw = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW);
|
|
5939
5983
|
let msdosAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES);
|
|
@@ -6105,27 +6149,8 @@ function resolveMetadata(zipWriter, name, options) {
|
|
|
6105
6149
|
if (!zipCrypto && (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) && !(encryptionStrength >= 1 && encryptionStrength <= 3)) {
|
|
6106
6150
|
throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
|
|
6107
6151
|
}
|
|
6108
|
-
|
|
6109
|
-
const
|
|
6110
|
-
if (extraField) {
|
|
6111
|
-
let extraFieldSize = 0;
|
|
6112
|
-
let offset = 0;
|
|
6113
|
-
extraField.forEach(data => extraFieldSize += 4 + getLength(data));
|
|
6114
|
-
rawExtraField = new Uint8Array(extraFieldSize);
|
|
6115
|
-
const rawExtraFieldView = getDataView(rawExtraField);
|
|
6116
|
-
extraField.forEach((data, type) => {
|
|
6117
|
-
if (type > MAX_16_BITS) {
|
|
6118
|
-
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
|
|
6119
|
-
}
|
|
6120
|
-
if (getLength(data) > MAX_16_BITS) {
|
|
6121
|
-
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6122
|
-
}
|
|
6123
|
-
setUint16(rawExtraFieldView, offset, type);
|
|
6124
|
-
setUint16(rawExtraFieldView, offset + 2, getLength(data));
|
|
6125
|
-
arraySet(rawExtraField, data, offset + 4);
|
|
6126
|
-
offset += 4 + getLength(data);
|
|
6127
|
-
});
|
|
6128
|
-
}
|
|
6152
|
+
const rawExtraField = serializeExtraField(options[PROPERTY_NAME_EXTRA_FIELD]);
|
|
6153
|
+
const rawLocalExtraField = serializeExtraField(options[OPTION_LOCAL_EXTRA_FIELD]);
|
|
6129
6154
|
return {
|
|
6130
6155
|
comment,
|
|
6131
6156
|
resolvedOptions: {
|
|
@@ -6159,11 +6184,36 @@ function resolveMetadata(zipWriter, name, options) {
|
|
|
6159
6184
|
useCompressionStream,
|
|
6160
6185
|
dataDescriptor,
|
|
6161
6186
|
zip64,
|
|
6162
|
-
rawExtraField
|
|
6187
|
+
rawExtraField,
|
|
6188
|
+
rawLocalExtraField
|
|
6163
6189
|
}
|
|
6164
6190
|
};
|
|
6165
6191
|
}
|
|
6166
6192
|
|
|
6193
|
+
function serializeExtraField(extraField) {
|
|
6194
|
+
if (!extraField) {
|
|
6195
|
+
return EMPTY_UINT8_ARRAY;
|
|
6196
|
+
}
|
|
6197
|
+
let extraFieldSize = 0;
|
|
6198
|
+
let offset = 0;
|
|
6199
|
+
extraField.forEach(data => extraFieldSize += 4 + getLength(data));
|
|
6200
|
+
const rawExtraField = new Uint8Array(extraFieldSize);
|
|
6201
|
+
const rawExtraFieldView = getDataView(rawExtraField);
|
|
6202
|
+
extraField.forEach((data, type) => {
|
|
6203
|
+
if (type > MAX_16_BITS) {
|
|
6204
|
+
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
|
|
6205
|
+
}
|
|
6206
|
+
if (getLength(data) > MAX_16_BITS) {
|
|
6207
|
+
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6208
|
+
}
|
|
6209
|
+
setUint16(rawExtraFieldView, offset, type);
|
|
6210
|
+
setUint16(rawExtraFieldView, offset + 2, getLength(data));
|
|
6211
|
+
arraySet(rawExtraField, data, offset + 4);
|
|
6212
|
+
offset += 4 + getLength(data);
|
|
6213
|
+
});
|
|
6214
|
+
return rawExtraField;
|
|
6215
|
+
}
|
|
6216
|
+
|
|
6167
6217
|
async function resolveSizes(zipWriter, reader, { resolvedOptions: metadata }, options) {
|
|
6168
6218
|
const { passThrough, zipCrypto, password, rawPassword, encryptionStrength } = metadata;
|
|
6169
6219
|
let { dataDescriptor, zip64, level, compressionMethod } = metadata;
|
|
@@ -6488,7 +6538,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6488
6538
|
msdosAttributes
|
|
6489
6539
|
};
|
|
6490
6540
|
let {
|
|
6491
|
-
|
|
6541
|
+
crc32,
|
|
6492
6542
|
uncompressedSize
|
|
6493
6543
|
} = options;
|
|
6494
6544
|
let compressedSize = 0;
|
|
@@ -6508,7 +6558,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6508
6558
|
encryptionStrength,
|
|
6509
6559
|
zipCrypto: encrypted && zipCrypto,
|
|
6510
6560
|
passwordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & MAX_8_BITS,
|
|
6511
|
-
|
|
6561
|
+
computeCrc32: !passThrough,
|
|
6512
6562
|
compressed: compressed && !passThrough,
|
|
6513
6563
|
encrypted: encrypted && !passThrough,
|
|
6514
6564
|
useWebWorkers,
|
|
@@ -6527,7 +6577,9 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6527
6577
|
writer.size += compressedSize;
|
|
6528
6578
|
if (!passThrough) {
|
|
6529
6579
|
uncompressedSize = result.inputSize;
|
|
6530
|
-
|
|
6580
|
+
if (!encrypted || zipCrypto) {
|
|
6581
|
+
crc32 = result.crc32;
|
|
6582
|
+
}
|
|
6531
6583
|
}
|
|
6532
6584
|
if ((!zip64CompressedSize && compressedSize >= MAX_32_BITS) ||
|
|
6533
6585
|
(!zip64UncompressedSize && uncompressedSize >= MAX_32_BITS)) {
|
|
@@ -6542,7 +6594,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6542
6594
|
|
|
6543
6595
|
}
|
|
6544
6596
|
setEntryInfo({
|
|
6545
|
-
|
|
6597
|
+
crc32,
|
|
6546
6598
|
compressedSize,
|
|
6547
6599
|
uncompressedSize,
|
|
6548
6600
|
headerInfo,
|
|
@@ -6565,7 +6617,8 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6565
6617
|
version,
|
|
6566
6618
|
headerArray,
|
|
6567
6619
|
headerView,
|
|
6568
|
-
signature,
|
|
6620
|
+
signature: crc32,
|
|
6621
|
+
crc32: encrypted && !zipCrypto && !passThrough ? UNDEFINED_VALUE : crc32,
|
|
6569
6622
|
extraFieldExtendedTimestampFlag,
|
|
6570
6623
|
zip64UncompressedSize,
|
|
6571
6624
|
zip64CompressedSize
|
|
@@ -6586,6 +6639,7 @@ function getHeaderInfo(options) {
|
|
|
6586
6639
|
dataDescriptor,
|
|
6587
6640
|
directory,
|
|
6588
6641
|
rawExtraField,
|
|
6642
|
+
rawLocalExtraField,
|
|
6589
6643
|
encryptionStrength,
|
|
6590
6644
|
extendedTimestamp,
|
|
6591
6645
|
ntfsTimestamp,
|
|
@@ -6593,7 +6647,8 @@ function getHeaderInfo(options) {
|
|
|
6593
6647
|
encrypted,
|
|
6594
6648
|
zip64UncompressedSize,
|
|
6595
6649
|
zip64CompressedSize,
|
|
6596
|
-
uncompressedSize
|
|
6650
|
+
uncompressedSize,
|
|
6651
|
+
crc32
|
|
6597
6652
|
} = options;
|
|
6598
6653
|
let { version, compressionMethod } = options;
|
|
6599
6654
|
const compressed = !directory && (compressionMethod === UNDEFINED_VALUE
|
|
@@ -6666,8 +6721,8 @@ function getHeaderInfo(options) {
|
|
|
6666
6721
|
extraFieldNTFS.uint16(EXTRAFIELD_TYPE_NTFS_TAG1);
|
|
6667
6722
|
extraFieldNTFS.uint16(24);
|
|
6668
6723
|
extraFieldNTFS.uint64(lastModTimeNTFS);
|
|
6669
|
-
extraFieldNTFS.uint64(getTimeNTFS(lastAccessDate)
|
|
6670
|
-
extraFieldNTFS.uint64(getTimeNTFS(creationDate)
|
|
6724
|
+
extraFieldNTFS.uint64(lastAccessDate ? getTimeNTFS(lastAccessDate) : lastModTimeNTFS);
|
|
6725
|
+
extraFieldNTFS.uint64(creationDate ? getTimeNTFS(creationDate) : lastModTimeNTFS);
|
|
6671
6726
|
rawExtraFieldNTFS = extraFieldNTFS.array;
|
|
6672
6727
|
} catch {
|
|
6673
6728
|
rawExtraFieldNTFS = EMPTY_UINT8_ARRAY;
|
|
@@ -6681,7 +6736,7 @@ function getHeaderInfo(options) {
|
|
|
6681
6736
|
let rawExtraFieldUnix;
|
|
6682
6737
|
try {
|
|
6683
6738
|
const { uid, gid, unixExtraFieldType } = options;
|
|
6684
|
-
if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
6739
|
+
if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE$1 && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
6685
6740
|
const uidBytes = packUnixId(uid);
|
|
6686
6741
|
const gidBytes = packUnixId(gid);
|
|
6687
6742
|
const payloadLength = 3 + uidBytes.length + gidBytes.length;
|
|
@@ -6719,15 +6774,18 @@ function getHeaderInfo(options) {
|
|
|
6719
6774
|
}
|
|
6720
6775
|
if (encrypted && !zipCrypto) {
|
|
6721
6776
|
version = version > VERSION_AES ? version : VERSION_AES;
|
|
6777
|
+
if (passThrough && crc32 !== UNDEFINED_VALUE) {
|
|
6778
|
+
rawExtraFieldAES[EXTRAFIELD_OFFSET_AES_VENDOR_VERSION] = VENDOR_VERSION_AE_1;
|
|
6779
|
+
}
|
|
6722
6780
|
rawExtraFieldAES[9] = compressionMethod;
|
|
6723
6781
|
compressionMethod = COMPRESSION_METHOD_AES;
|
|
6724
6782
|
}
|
|
6725
6783
|
const localExtraFieldZip64Length = writeLocalExtraFieldZip64 ? getLength(rawLocalExtraFieldZip64) : 0;
|
|
6726
|
-
const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField);
|
|
6784
|
+
const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawLocalExtraField);
|
|
6727
6785
|
if (extraFieldLength > MAX_16_BITS) {
|
|
6728
6786
|
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6729
6787
|
}
|
|
6730
|
-
const dosLastModDate = new Date(Math.ceil(lastModDate.getTime() /
|
|
6788
|
+
const dosLastModDate = new Date(Math.ceil(Math.floor(lastModDate.getTime() / 1000) / 2) * 2000);
|
|
6731
6789
|
const {
|
|
6732
6790
|
headerArray,
|
|
6733
6791
|
headerView,
|
|
@@ -6757,6 +6815,7 @@ function getHeaderInfo(options) {
|
|
|
6757
6815
|
localHeader.bytes(rawExtraFieldNTFS);
|
|
6758
6816
|
localHeader.bytes(rawExtraFieldUnix);
|
|
6759
6817
|
localHeader.bytes(rawExtraField);
|
|
6818
|
+
localHeader.bytes(rawLocalExtraField);
|
|
6760
6819
|
if (dataDescriptor) {
|
|
6761
6820
|
if (!zip64CompressedSize) {
|
|
6762
6821
|
setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);
|
|
@@ -6875,7 +6934,7 @@ function getDataDescriptorInfo({
|
|
|
6875
6934
|
}
|
|
6876
6935
|
|
|
6877
6936
|
function setEntryInfo({
|
|
6878
|
-
|
|
6937
|
+
crc32,
|
|
6879
6938
|
compressedSize,
|
|
6880
6939
|
uncompressedSize,
|
|
6881
6940
|
headerInfo,
|
|
@@ -6883,6 +6942,7 @@ function setEntryInfo({
|
|
|
6883
6942
|
}, {
|
|
6884
6943
|
zip64,
|
|
6885
6944
|
zipCrypto,
|
|
6945
|
+
passThrough,
|
|
6886
6946
|
dataDescriptor
|
|
6887
6947
|
}) {
|
|
6888
6948
|
const {
|
|
@@ -6893,10 +6953,10 @@ function setEntryInfo({
|
|
|
6893
6953
|
dataDescriptorView,
|
|
6894
6954
|
dataDescriptorOffset
|
|
6895
6955
|
} = dataDescriptorInfo;
|
|
6896
|
-
if ((!encrypted || zipCrypto) &&
|
|
6897
|
-
setUint32(headerView, HEADER_OFFSET_SIGNATURE,
|
|
6956
|
+
if ((!encrypted || zipCrypto || passThrough) && crc32 !== UNDEFINED_VALUE) {
|
|
6957
|
+
setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
|
|
6898
6958
|
if (dataDescriptor) {
|
|
6899
|
-
setUint32(dataDescriptorView, dataDescriptorOffset,
|
|
6959
|
+
setUint32(dataDescriptorView, dataDescriptorOffset, crc32);
|
|
6900
6960
|
}
|
|
6901
6961
|
}
|
|
6902
6962
|
if (zip64) {
|
|
@@ -6919,15 +6979,15 @@ function updateLocalHeader({
|
|
|
6919
6979
|
encrypted,
|
|
6920
6980
|
zip64,
|
|
6921
6981
|
localExtraFieldZip64Length,
|
|
6922
|
-
|
|
6982
|
+
crc32,
|
|
6923
6983
|
compressedSize,
|
|
6924
6984
|
uncompressedSize,
|
|
6925
6985
|
zip64UncompressedSize,
|
|
6926
6986
|
zip64CompressedSize
|
|
6927
|
-
}, localHeaderView, { dataDescriptor }) {
|
|
6987
|
+
}, localHeaderView, { dataDescriptor, passThrough }) {
|
|
6928
6988
|
if (!dataDescriptor) {
|
|
6929
|
-
if (!encrypted) {
|
|
6930
|
-
setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET,
|
|
6989
|
+
if (!encrypted || (passThrough && crc32 !== UNDEFINED_VALUE)) {
|
|
6990
|
+
setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, crc32);
|
|
6931
6991
|
}
|
|
6932
6992
|
if (!zip64CompressedSize) {
|
|
6933
6993
|
setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, compressedSize);
|
|
@@ -7236,7 +7296,8 @@ async function flushBufferedData(readable, writer, signal, onChunkWritten) {
|
|
|
7236
7296
|
|
|
7237
7297
|
function getTimeNTFS(date) {
|
|
7238
7298
|
if (date) {
|
|
7239
|
-
|
|
7299
|
+
const timeNTFS = ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));
|
|
7300
|
+
return timeNTFS < MIN_NTFS_TIME ? MIN_NTFS_TIME : timeNTFS > MAX_NTFS_TIME ? MAX_NTFS_TIME : timeNTFS;
|
|
7240
7301
|
}
|
|
7241
7302
|
}
|
|
7242
7303
|
|
|
@@ -8260,6 +8321,20 @@ U(setDefaultConfiguration);
|
|
|
8260
8321
|
|
|
8261
8322
|
const ERR_ENTRY_EXISTS = "Entry filename already exists";
|
|
8262
8323
|
const ERR_READABLE_CONSUMED = "Readable stream already consumed";
|
|
8324
|
+
const INFOZIP_EXTRA_FIELD_TYPE = "infozip";
|
|
8325
|
+
const INTERPRETED_EXTRA_FIELD_TYPES = new Set([
|
|
8326
|
+
EXTRAFIELD_TYPE_ZIP64,
|
|
8327
|
+
EXTRAFIELD_TYPE_AES,
|
|
8328
|
+
EXTRAFIELD_TYPE_NTFS,
|
|
8329
|
+
EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,
|
|
8330
|
+
EXTRAFIELD_TYPE_UNICODE_PATH,
|
|
8331
|
+
EXTRAFIELD_TYPE_UNICODE_COMMENT,
|
|
8332
|
+
EXTRAFIELD_TYPE_USDZ,
|
|
8333
|
+
EXTRAFIELD_TYPE_INFOZIP,
|
|
8334
|
+
EXTRAFIELD_TYPE_UNIX,
|
|
8335
|
+
EXTRAFIELD_TYPE_UNIX_TYPE1,
|
|
8336
|
+
EXTRAFIELD_TYPE_PKWARE_UNIX
|
|
8337
|
+
]);
|
|
8263
8338
|
|
|
8264
8339
|
class ZipEntry {
|
|
8265
8340
|
|
|
@@ -8997,6 +9072,20 @@ function detach(entry) {
|
|
|
8997
9072
|
}
|
|
8998
9073
|
}
|
|
8999
9074
|
|
|
9075
|
+
function getUserExtraField(extraField) {
|
|
9076
|
+
if (extraField) {
|
|
9077
|
+
const userExtraField = new Map();
|
|
9078
|
+
extraField.forEach((field, type) => {
|
|
9079
|
+
if (!INTERPRETED_EXTRA_FIELD_TYPES.has(type)) {
|
|
9080
|
+
userExtraField.set(type, field.data);
|
|
9081
|
+
}
|
|
9082
|
+
});
|
|
9083
|
+
if (userExtraField.size) {
|
|
9084
|
+
return userExtraField;
|
|
9085
|
+
}
|
|
9086
|
+
}
|
|
9087
|
+
}
|
|
9088
|
+
|
|
9000
9089
|
async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
9001
9090
|
const selectedEntry = entry;
|
|
9002
9091
|
const entryOffsets = new Map();
|
|
@@ -9034,9 +9123,13 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
|
9034
9123
|
uncompressedSize,
|
|
9035
9124
|
encrypted,
|
|
9036
9125
|
zipCrypto,
|
|
9037
|
-
|
|
9126
|
+
crc32,
|
|
9038
9127
|
compressionMethod,
|
|
9039
|
-
extraFieldAES
|
|
9128
|
+
extraFieldAES,
|
|
9129
|
+
internalFileAttributes,
|
|
9130
|
+
extraField,
|
|
9131
|
+
uid,
|
|
9132
|
+
gid
|
|
9040
9133
|
} = child.data;
|
|
9041
9134
|
zipEntryOptions = {
|
|
9042
9135
|
externalFileAttributes,
|
|
@@ -9044,8 +9137,20 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
|
9044
9137
|
comment,
|
|
9045
9138
|
lastModDate,
|
|
9046
9139
|
creationDate,
|
|
9047
|
-
lastAccessDate
|
|
9140
|
+
lastAccessDate,
|
|
9141
|
+
internalFileAttributes
|
|
9048
9142
|
};
|
|
9143
|
+
const userExtraField = getUserExtraField(extraField);
|
|
9144
|
+
if (userExtraField) {
|
|
9145
|
+
zipEntryOptions.extraField = userExtraField;
|
|
9146
|
+
}
|
|
9147
|
+
if (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE) {
|
|
9148
|
+
Object.assign(zipEntryOptions, {
|
|
9149
|
+
uid,
|
|
9150
|
+
gid,
|
|
9151
|
+
unixExtraFieldType: options.unixExtraFieldType || INFOZIP_EXTRA_FIELD_TYPE
|
|
9152
|
+
});
|
|
9153
|
+
}
|
|
9049
9154
|
if (child.passThrough) {
|
|
9050
9155
|
let level, encryptionStrength;
|
|
9051
9156
|
if (compressionMethod === 0) {
|
|
@@ -9058,7 +9163,7 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
|
9058
9163
|
passThrough: true,
|
|
9059
9164
|
encrypted,
|
|
9060
9165
|
zipCrypto,
|
|
9061
|
-
|
|
9166
|
+
crc32,
|
|
9062
9167
|
uncompressedSize,
|
|
9063
9168
|
level,
|
|
9064
9169
|
encryptionStrength,
|
|
@@ -9245,6 +9350,8 @@ function addChild(parent, name, params, directory) {
|
|
|
9245
9350
|
}
|
|
9246
9351
|
}
|
|
9247
9352
|
|
|
9353
|
+
const encodedMimeTypes = "application:0andrew-inset ez,2nodex anx,1pplixware aw,1tom!,4cat!,4serv! atomsrv,5vc!,0bbolin lin,0ccxml!,1dmi-capability cdmia,6ontainer cdmic,5domain cdmid,5object cdmio,5queue cdmiq,1u-seeme cu,0davmount!,1ocbook! dbk,1sptype tsp,2sc+der,4! xdssc,0ecmascript es ecma,1mma!,1nvoy evy,1pub+zip,1xi,0font-tdpfr pfr,1ractals fif,1uturesplash spl,0gml!,1px!,1xf,1zip gz tgz,0hta,1yperstudio stk,0inkml! ink inkml,2ternet-property-stream acx,1pfix,0java-archive jar,5serialized-object ser,5vm class,1sonml+json,0lost! lostxml,0m3g,1ac-binhex40 hqx,2ds!,2rc mrc,4xml! mrcx,2thematica nb ma mb,4ml! mathml mml,1box,1ediaservercontrol! mscml,2talink!,84! meta4,3s!,1ods!,1p21 m21 mp21,24 mp4s,1saccess mdb,2word doc dot wiz,1xf,0oda,1ebps-package! opf,1gg ogx,1lescript axs,1mdoc!,1nenote onetoc onetoc2 onetmp onepkg,1xps,0patch-ops-error! xer,1df,1gp-encrypted pgp,4keys key,4signature asc sig,1ics-rules prf,1kcs10 p10,47-mime p7m p7c,6signature p7s,48 p8,2ix-attr-cert ac,5crl crl,5pkipath pkipath,4cmp pki,1ls!,1ostscript ps ai eps epsi epsf eps2 eps3,1rs.cww cww,1skc! pskcxml,0rar,1df!,1eginfo! rif,2lax-ng-compact-syntax rnc,2source-lists! rl,e-diff! rld,1ls-services! rs,1pki-ghostbusters gbr,5manifest mft,5roa roa,1sd!,2s!,1tf,0sbml!,1cvp-cv-request scq,asponse scs,5vp-request spq,asponse spp,1dp,1et-payment-initiation setpay,4registration-initiation setreg,1hf!,1mil! smi smil,1parql-query rq,7results! srx,1rgs gram,4! grxml,2u!,1sdl!,2ml!,0tei! tei teicorpus,1hraud! tfi,1imestamped-data tsd,0vnd.3gpp.pic-bw-large plb,gsmall psb,gvar pvb,82.tcap tcap,5m.post-it-notes pwn,4accpac.simply.aso aso,iimp imp,6ucobol acu,9rp atc acutc,5dobe.air-application-installer-package+zip air,aformscentral.fcdt fcdt,bxp fxp fxpl,axdp! xdp,bfdf xfdf,5head.space ahead,5irzip.filesecure.azf azf,os azs,5mazon.ebook azw,6ericandynamics.acc acc,6iga.ami ami,5ndroid.package-archive apk,6ser-web-certificate-issue-initiation cii,efunds-transfer-initiation fti,6tix.game-component atx,5pple.installer! mpkg,ampegurl m3u8,5ristanetworks.swi swi,5straea-software.iota iota,5udiograph aep,4blueice.multipass mpm,5mi bmi,5usinessobjects rep,4chemdraw! cdxml,6ipnuts.karaoke-mmd mmd,5inderella cdy,5laymore cla,6oanto.rp9 rp9,7nk.c4group c4g c4d c4f c4p c4u,6uetrust.cartomobile-config c11amc,w-pkg c11amz,5ommonspace csp,6ntact.cmsg cdbcmsg,6smocaller cmc,5rick.clicker clkx,h.keyboard clkk,ipalette clkp,itemplate clkt,iwordbank clkw,7ticaltools.wbs! wbs,5tc-posml pml,5ups-ppd ppd,6rl.car car,9pcurl pcurl,4dart dart,6ta-vision.rdz rdz,5ebian.binary-package deb udeb,6ce.data uvf uvvf uvd uvvd,9ttml! uvt uvvt,9unspecified uvx uvvx,9zip uvz uvvz,6novo.fcselayout-link fe_launch,5na dna,5olby.mlp mlp,5pgraph dpg,5reamfactory dfac,5s-keypoint kpxx,5vb.ait ait,8service svc,5ynageo geo,4ecowin.chart mag,5nliven nml,5pson.esf esf,amsf msf,aquickanime qam,asalt slt,bsf ssf,5szigno3! es3 et3,5zpix-album ez2,apackage ez3,4fdf fdf,6sn.mseed mseed,9seed seed dataless,5lographit gph,6uxtime.clip ftc,5ramemaker fm frame maker book,6ogans.fnc fnc,cltf ltf,5sc.weblaunch fsc,5ujitsu.oasys oas,h2 oa2,h3 oa3,hgp fg5,hprs bh2,8xerox.ddd ddd,focuworks xdw,n.binder xbd,6zzysheet fzs,4genomatix.tuxedo txd,6ogebra.file ggb,dtool ggt,7metry-explorer gex gre,7next gxt,7plan g2w,7space g3w,5mx gmx,5oogle-earth.kml! kml,jz kmz,5rafeq gqf gqs,6oove-account gac,bhelp ghf,bidentity-message gim,cnjector grv,btool-message gtm,gtemplate tpl,bvcard vcg,4hal! hal,6ndheld-entertainment! zmm,5bci hbci,5he.lesson-player les,5p-hpgl hpgl,9id hpid,9s hps,7jlyt jlt,7pcl pcl,axl pclxl,5ydrostatix.sof-data sfd-hdstx,5zn-3d-crossword x3d,4ibm.minipay mpy,9odcap afp listafp list3820,8rights-management irm,8secure-container sc,5ccprofile icc icm,5gloader igl,5mmervision-ivp ivp,iu ivu,5nsors.igm igm,6tercon.formnet xpw xpx,9geo i2g,7u.qbo qbo,afx qfx,5punplugged.rcprofile rcprofile,5repository.package! irp,5s-xpr xpr,6ac.fcs fcs,4jam jam,5cp.javame.midlet-rms rms,5isp jisp,5oost.joda-archive joda,4kahootz ktz ktr,5de.karbon karbon,9chart chrt,9formula kfo,9ivio flw,9ontour kon,9presenter kpr kpt,9spread ksp,9word kwd kwt,5enameaapp htke,5idspiration kia,6nar kne knp,5oan skp skd skt skm,6dak-descriptor sse,4las.las! lasxml,5lamagraphics.life-balance.desktop lbd,vexchange! lbe,5otus-1-2-3 123,aapproach apr,afreelance pre,anotes nsf,aorganizer org,ascreencam scm,awordpro lwp,4macports.portpkg portpkg,5cd mcd,5edcalcdata mc1,7iastation.cdkey cdkey,5fer mwf,6mp mfm,5icrografx.flo flo,figx igx,6f mif,5obius.daf daf,cis dis,bmbk mbk,cqy mqy,csl msl,bplc plc,btxf txf,6phun.application mpn,bcertificate mpc,6zilla.xul! xul,5s-artgalry cil,7cab-compressed cab,7excel xls xlb xlt xlm xla xlc xlw,c.addin.macroenabled.12 xlam,dsheet.binary.macroenabled.12 xlsb,jmacroenabled.12 xlsm,dtemplate.macroenabled.12 xltm,7fontobject eot,7htmlhelp chm,7ims ims,7lrm lrm,7officetheme thmx,8utlook msg,7pki.seccat cat,ctl stl,acertstore sst,8owerpoint ppt pps pot ppa pwz,h.addin.macroenabled.12 ppam,ipresentation.macroenabled.12 pptm,islide.macroenabled.12 sldm,nshow.macroenabled.12 ppsm,itemplate.macroenabled.12 potm,8roject mpp mpt,7word.document.macroenabled.12 docm,ctemplate.macroenabled.12 dotm,aks wps wks wcm wdb,8pl wpl,7xpsdocument xps,6eq mseq,5usician mus,6vee.style msty,5ynfc taglet,4neurolanguage.nlu nlu,5itf ntf nitf,5oblenet-directory nnd,dsealer nns,dweb nnw,6kia.n-gage.data ngdat,hsymbian.install n-gage,aradio-preset rpst,ms rpss,6vadigm.edm edm,fx edx,ext ext,4oasis.opendocument.chart odc,s-template otc,ndatabase odb,nformula odf,u-template odft,ngraphics odg,v-template otg,nimage odi,s-template oti,npresentation odp,z-template otp,nspreadsheet ods,y-template ots,ntext odt,r-master odm otm,stemplate ott,sweb oth,5lpc-sugar xo,5ma.dd2! dd2,5penofficeorg.extension oxt,8xmlformats-officedocument.presentationml.presentation pptx,zresentationml.slide sldx,zresentationml.slideshow ppsx,zresentationml.template potx,yspreadsheetml.sheet xlsx,zpreadsheetml.template xltx,ywordprocessingml.document docx,zordprocessingml.template dotx,5sgeo.mapguide.package mgp,7i.dp dp,9subsystem esa,4palm pdb pqa oprc,6waafile paw,5g.format str,7osasli ei6,5icsel efif,5mi.widget wg,5ocketlearn plf,6werbuilder6 pbd,5reviewsystems.box box,6oteus.magazine mgz,5ublishare-delta-tree qps,5vi.ptid1 ptid,4quark.quarkxpress qxd qxt qwd qwt qxl qxb,4realvnc.bed bed,6cordare.musicxml mxl,m! musicxml,5ig.cryptonote cryptonote,5n-realmedia rm,g-vbr rmvb,5oute66.link66! link66,4sailingtracker.track st,5eemail see,6ma sema,7d semd,7f semf,5hana.informed.formdata ifm,ntemplate itp,jinterchange iif,jpackage ipk,5imtech-mindmapper twd twds,5maf mmf,7rt.teacher teacher,5olent.sdkm! sdkm sdkd,5potfire.dxp dxp,dsfs sfs,5qlite3 db sqlite sqlite3 db-wal sqlite-wal db-shm sqlite-shm,5tardivision.calc sdc,ihart sds,hdraw sda,himpress sdd,hmath sdf smf,hwriter sdw vor,n-global sgl,6epmania.package smzip,estepchart sm,5un.xml.calc sxc,g.template stc,cdraw sxd,g.template std,cimpress sxi,j.template sti,cmath sxm,cwriter sxw,i.global sxg,jtemplate stw,6s-calendar sus susp,5vd svd,5ymbian.install sis sisx,6ncml! xsm,a.dm+wbxml bdm,d! xdm,4tao.intent-module-archive tao,5cpdump.pcap pcap cap dmp,5mobile-livetv tmo,5rid.tpt tpt,7scape.mxs mxs,6ueapp tra,4ufdl ufd ufdl,5iq.theme utz,5majin umj,5nity unityweb,5oml! uoml,4vcx vcx,5isio vsd vst vss vsw vsdx vssx vstx vssm vstm,9nary vis,5sf vsf,4wap.sic sic,9lc slc,8wbxml wbxml,9mlc wmlc,bscriptc wmlsc,5ebturbo wtb,5olfram.player nbp,6rdperfect wpd,f5.1 wp5,5qd wqd,5t.stf stf,4xara xar,5fdl xfdl,4yamaha.hv-dic hvd,escript hvs,evoice hvp,bopenscoreformat osf,q.osfpvg! osfpvg,bsmaf-audio saf,gphrase spf,5ellowriver-custom-menu cmp,4zul zir zirz,5zazz.deck! zaz,1oicexml! vxml,0widget wgt,2nhlp hlp,1sdl!,2policy!,0x-123 wk,27z-compressed 7z,2abiword abw,3ce-compressed ace,3pple-diskimage dmg,3uthorware-bin aab x32 u32 vox,dmap aam,dseg aas,2bcpio bcpio,3ittorrent torrent,3lorb blb blorb,3zip bz,62 bz2 boz,2cbr cbr cba cbt cb7,4z cbz,3df cdf cda,4link vcd,3fs-compressed cfs,3hat chat,4ess-pgn pgn,3ompress z,4nference nsc,3pio cpio,3sh csh,2dgc-compressed dgc,3irector dir dxr cst cct cxt w3d fgd swa,3ms dms,3oom wad,3tbncx! ncx,5ook! dtb,5resource! res,3vi dvi,2eva eva,2font-bdf bdf,7ghostscript gsf,7linux-psf psf,7pcf pcf,7snf snf,7ttf ttf ttc,8ype1 pfa pfb pfm afm,3reearc arc,6mind mm,2gca-compressed gca,3lulx ulx,3numeric gnumeric,3o-sgf sgf,3ramps-xml gramps,5phing-calculator gcf,3tar gtar taz,2hdf hdf,3ttpd-eruby rhtml,8php phtml pht php,b-source phps,b3 php3,c-preprocessed php3p,b4 php4,b5 php5,2ica ica,3nfo info,4stall-instructions install,4ternet-signup ins isp,3phone iii,3so9660-image iso,2java-jnlp-file jnlp,3mol jmz,2killustrator kil,3rita kra krz,2latex latex,3yx lyx,3zh-compressed lzh lha,4x lzx,2maker frm fb fbdoc,3ie mie,3obipocket-ebook prc mobi,3s-application application,5installer msi,5shortcut lnk,5wmd wmd,5xbap xbap,4binder obd,4cardfile crd,5lip clp,4dos-program com exe bat dll,4mediaview mvb m13 m14,6tafile wmf wmz emf emz,5oney mny,4publisher pub,4schedule scd,4terminal trm,4write wri,2netcdf nc,3s-proxy-autoconfig pac dat,3wc nwc,3zb nzb,2object o,3z-application oza,2perfmon pma pmc pmr pmw,5l pm pl,3kcs12 p12 pfx,67-certificates p7b spc,creqresp p7r,3ython-code pyc pyo,2qgis qgs shp shx,3uicktimeplayer qtl,2redhat-package-manager rpm rpa,4search-info-systems ris,3uby rb,2sh sh,4ar shar,4ockwave-flash swf swfl,3ilverlight scr,d-app xap,3ql sql,3tuffit sit,9x sitx,3ubrip srt,3v4cpio sv4cpio,6rc sv4crc,2t3vm-image t3,3ar tar,3ex-gf gf,6pk pk,6tfm tfm,5info texinfo texi,3gif obj,3rash ~ % bak old sik,2ustar ustar,2wais-source src,3ingz wz,2x509-ca-cert crt der cer,3cf xcf,3fig fig,3liff! xlf,3pinstall xpi,3z xz,2zmachine z1 z2 z3 z4 z5 z6 z7 z8,1aml!,1cap-diff! xdf,1enc!,1html! xhtml xht,1ml xml xsl xsd xpdl,3-dtd dtd,1op!,1proc! xpl,1slt!,2pf!,1v! mxml xhvml xvml xvm,0yaml yaml yml,2ng,1in!,1nd.ms-pkipko pko,0zip;audio:0aac,1dpcm adp,1iff aiff aif aff,1mr,3-wb awb,1nnodex axa,0basic au snd,0flac,0midi mid midi kar rmi,1p4 mp4a,2eg mpga mpega mp3 m4a mp2a m2a m3a,4url m3u,0ogg oga ogg spx,1pus,0prs.sid sid,0s3m,1ilk sil,0vnd.dece.audio uva uvva,5igital-winds eol,5ra dra,5ts dts,7.hd dtshd,4lucent.voice lvp,4ms-playready.media.pya pya,4nuera.ecelp4800 ecelp4800,f7470 ecelp7470,f9600 ecelp9600,4rip rip,0wav,1ebm weba,0x-aiff aifc,2caf caf,2gsm gsm,2matroska mka,3s-wax wax,6ma wma,2pn-realaudio ram,e-plugin rmp,2realaudio ra,2sd2 sd2,1m;chemical:0x-alchemy alc,2cache cac cache,7-csf csf,5tvs-binary cbin cascii ctab,3dx cdx,3hem3d c3d,3if cif,3mdf cmdf,4l cml,3ompass cpa,3rossfire bsd,3sml csml csm,3tx ctx,3xf cxf cef,2embl-dl-nucleotide emb embl,2gamess-input inp gam gamin,4ussian-checkpoint fch fchk,cube cub,binput gau gjc gjf,blog gal,3cg8-sequence gcg,3enbank gen,2hin hin,2isostar istr ist,2jcamp-dx jdx dx,2kinemage kin,2macmolecule mcm,5romodel-input mmod,3dl-molfile mol,6rdfile rd,7xnfile rxn,6sdfile sd,6tgf tgf,3mcif mcif,3ol2 mol2,5conn-Z b,4pac-graph gpt,8input mop mopcrt zmt,8out moo,2ncbi-asn1 asn,b-ascii prt ent,cbinary val,2rosdal ros,2swissprot sw,2vamas-iso14976 vms,3md vmd,2xtel xtel,3yz xyz;font:0otf,0woff,42;image:0avif avif avifs,0bmp,0cgm,1is-cod cod,0g3fax g3,1if,0heic heif heic,0ief,0jpeg jpeg jpg jpe jfif jfif-tbnl jif,0ktx,0pcx,1jpeg pjpg,1ng,1rs.btif btif,0sgi,1vg! svg svgz,0tiff tiff tif,0vnd.adobe.photoshop psd,4dece.graphic uvi uvvi uvg uvvg,5jvu djvu djv,5wg dwg,5xf dxf,4fastbidsheet fbs,5px fpx,5st fst,5ujixerox.edmics-mmr mmr,lrlc rlc,4ms-modi mdi,7photo wdp,4net-fpx npx,4wap.wbmp wbmp,4xiff xif,0webp,0x-3ds 3ds,2adobe-dng dng,2canon-cr2 cr2,aw crw,3mu-raster ras,4x cmx,3oreldraw cdr,bpattern pat,btemplate cdt,7photopaint cpt,2epson-erf erf,2freehand fh fhc fh4 fh5 fh7,3uji-raf raf,2icns icns,4on ico,2jg art,3ng jng,2kodak-dcr dcr,8k25 k25,9dc kdc,2minolta-mrw mrw,2nikon-nef nef,2olympus-orf orf,2panasonic-raw raw rw2 rwl,3entax-pef pef ptx,3ict pic pct,3ortable-anymap pnm,bbitmap pbm,bgraymap pgm,bpixmap ppm,2rgb rgb,2sigma-x3f x3f,3ony-arw arw,7sr2 sr2,9f srf,2tga tga,2xbitmap xbm,3pixmap xpm,3windowdump xwd;message:0rfc822 eml mime mht mhtml nws;model:0iges igs iges,0mesh msh mesh silo,0vnd.collada! dae,4dwf dwf,4gdl gdl,5tw gtw,4mts mts,4usdz+zip usdz,4vtu vtu,1rml wrl vrml,0x3d+binary x3db x3dbz,4vrml x3dv x3dvz,3! x3dz;text:0cache-manifest manifest appcache,2lendar ics icz ifb,1ss,2v,0h323 323,1tml html htm shtml stm,0iuls uls,0javascript js,1son,0markdown md markdown mdown markdn,0n3,0plain txt text brf conf def list log in bas diff ksh,1rs.lines.tag dsc,0richtext rtx,0scriptlet sct wsc,1gml sgml sgm,0tab-separated-values tsv,1exmacs tm,1roff t tr roff man me ms,1urtle ttl,0uri-list uri uris urls,0vcard,1nd.curl curl,8.dcurl dcurl,9mcurl mcurl,9scurl scurl,4dvb.subtitle sub,4fly fly,5mi.flexstor flx,4graphviz gv,4in3d.3dml 3dml,9spot spot,4sun.j2me.app-descriptor jad,4wap.si si,9l sl,8wml wml,bscript wmls,0webviewhtml htt,0x-asm s asm,2bibtex bib,3oo boo,2c c h dic,3++hdr h++ hpp hxx hh,5src c++ cpp cxx cc,3omponent htc,2diff patch,3src d,2fortran f for f77 f90,2haskell hs,2java java,2literate-haskell lhs,2moc moc,2nfo nfo,2opml opml,2pascal p pas pp inc,3cs-gcd gcd,3ython py,2scala scala,3etext etx,3fv sfv,2tcl tcl tk,3ex tex ltx sty cls,2uuencode uu,2vcalendar vcs,5rd vcf;video:03gpp 3gp,42 3g2,0annodex axv,0dl,1v dif dv,0fli,0gl,0h261,33,34,0jpeg jpgv,2m jpm jpgm,0mj2 mj2 mjp2,1p2t ts,24 mp4 mp4v mpg4,2eg mpeg mpg mpe m1v m2v mp2 mpa mpv2,0ogg ogv,0quicktime qt mov,0vnd.dece.hd uvh uvvh,9mobile uvm uvvm,9pd uvp uvvp,9sd uvs uvvs,9video uvv uvvv,5vb.file dvb,4fvt fvt,4mpegurl mxu m4u,5s-playready.media.pyv pyv,4uvvu.mp4 uvu uvvu,4vivo viv,0webm,0x-f4v f4v,3lv flv,2la-asf lsf lsx,2m4v m4v,3atroska mpv mkv mk3d mks,3ng mng,3s-asf asf asx asr,5vob vob,5wm wm,7v wmv,7x wmx,6vx wvx,4video avi,2sgi-movie movie,3mv smv;x-conference:0x-cooltalk ice;x-world:0x-vrml vrm flr wrz xaf xof";
|
|
9354
|
+
|
|
9248
9355
|
/*
|
|
9249
9356
|
Copyright (c) 2022 Gildas Lormeau. All rights reserved.
|
|
9250
9357
|
|
|
@@ -9274,1589 +9381,6 @@ function addChild(parent, name, params, directory) {
|
|
|
9274
9381
|
*/
|
|
9275
9382
|
|
|
9276
9383
|
|
|
9277
|
-
const table = {
|
|
9278
|
-
"application": {
|
|
9279
|
-
"andrew-inset": "ez",
|
|
9280
|
-
"annodex": "anx",
|
|
9281
|
-
"atom+xml": "atom",
|
|
9282
|
-
"atomcat+xml": "atomcat",
|
|
9283
|
-
"atomserv+xml": "atomsrv",
|
|
9284
|
-
"bbolin": "lin",
|
|
9285
|
-
"cu-seeme": "cu",
|
|
9286
|
-
"davmount+xml": "davmount",
|
|
9287
|
-
"dsptype": "tsp",
|
|
9288
|
-
"ecmascript": [
|
|
9289
|
-
"es",
|
|
9290
|
-
"ecma"
|
|
9291
|
-
],
|
|
9292
|
-
"futuresplash": "spl",
|
|
9293
|
-
"hta": "hta",
|
|
9294
|
-
"java-archive": "jar",
|
|
9295
|
-
"java-serialized-object": "ser",
|
|
9296
|
-
"java-vm": "class",
|
|
9297
|
-
"m3g": "m3g",
|
|
9298
|
-
"mac-binhex40": "hqx",
|
|
9299
|
-
"mathematica": [
|
|
9300
|
-
"nb",
|
|
9301
|
-
"ma",
|
|
9302
|
-
"mb"
|
|
9303
|
-
],
|
|
9304
|
-
"msaccess": "mdb",
|
|
9305
|
-
"msword": [
|
|
9306
|
-
"doc",
|
|
9307
|
-
"dot",
|
|
9308
|
-
"wiz"
|
|
9309
|
-
],
|
|
9310
|
-
"mxf": "mxf",
|
|
9311
|
-
"oda": "oda",
|
|
9312
|
-
"ogg": "ogx",
|
|
9313
|
-
"pdf": "pdf",
|
|
9314
|
-
"pgp-keys": "key",
|
|
9315
|
-
"pgp-signature": [
|
|
9316
|
-
"asc",
|
|
9317
|
-
"sig"
|
|
9318
|
-
],
|
|
9319
|
-
"pics-rules": "prf",
|
|
9320
|
-
"postscript": [
|
|
9321
|
-
"ps",
|
|
9322
|
-
"ai",
|
|
9323
|
-
"eps",
|
|
9324
|
-
"epsi",
|
|
9325
|
-
"epsf",
|
|
9326
|
-
"eps2",
|
|
9327
|
-
"eps3"
|
|
9328
|
-
],
|
|
9329
|
-
"rar": "rar",
|
|
9330
|
-
"rdf+xml": "rdf",
|
|
9331
|
-
"rss+xml": "rss",
|
|
9332
|
-
"rtf": "rtf",
|
|
9333
|
-
"xhtml+xml": [
|
|
9334
|
-
"xhtml",
|
|
9335
|
-
"xht"
|
|
9336
|
-
],
|
|
9337
|
-
"xml": [
|
|
9338
|
-
"xml",
|
|
9339
|
-
"xsl",
|
|
9340
|
-
"xsd",
|
|
9341
|
-
"xpdl"
|
|
9342
|
-
],
|
|
9343
|
-
"xspf+xml": "xspf",
|
|
9344
|
-
"zip": "zip",
|
|
9345
|
-
"vnd.android.package-archive": "apk",
|
|
9346
|
-
"vnd.cinderella": "cdy",
|
|
9347
|
-
"vnd.google-earth.kml+xml": "kml",
|
|
9348
|
-
"vnd.google-earth.kmz": "kmz",
|
|
9349
|
-
"vnd.mozilla.xul+xml": "xul",
|
|
9350
|
-
"vnd.ms-excel": [
|
|
9351
|
-
"xls",
|
|
9352
|
-
"xlb",
|
|
9353
|
-
"xlt",
|
|
9354
|
-
"xlm",
|
|
9355
|
-
"xla",
|
|
9356
|
-
"xlc",
|
|
9357
|
-
"xlw"
|
|
9358
|
-
],
|
|
9359
|
-
"vnd.ms-pki.seccat": "cat",
|
|
9360
|
-
"vnd.ms-pki.stl": "stl",
|
|
9361
|
-
"vnd.ms-powerpoint": [
|
|
9362
|
-
"ppt",
|
|
9363
|
-
"pps",
|
|
9364
|
-
"pot",
|
|
9365
|
-
"ppa",
|
|
9366
|
-
"pwz"
|
|
9367
|
-
],
|
|
9368
|
-
"vnd.oasis.opendocument.chart": "odc",
|
|
9369
|
-
"vnd.oasis.opendocument.database": "odb",
|
|
9370
|
-
"vnd.oasis.opendocument.formula": "odf",
|
|
9371
|
-
"vnd.oasis.opendocument.graphics": "odg",
|
|
9372
|
-
"vnd.oasis.opendocument.graphics-template": "otg",
|
|
9373
|
-
"vnd.oasis.opendocument.image": "odi",
|
|
9374
|
-
"vnd.oasis.opendocument.presentation": "odp",
|
|
9375
|
-
"vnd.oasis.opendocument.presentation-template": "otp",
|
|
9376
|
-
"vnd.oasis.opendocument.spreadsheet": "ods",
|
|
9377
|
-
"vnd.oasis.opendocument.spreadsheet-template": "ots",
|
|
9378
|
-
"vnd.oasis.opendocument.text": "odt",
|
|
9379
|
-
"vnd.oasis.opendocument.text-master": [
|
|
9380
|
-
"odm",
|
|
9381
|
-
"otm"
|
|
9382
|
-
],
|
|
9383
|
-
"vnd.oasis.opendocument.text-template": "ott",
|
|
9384
|
-
"vnd.oasis.opendocument.text-web": "oth",
|
|
9385
|
-
"vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
9386
|
-
"vnd.openxmlformats-officedocument.spreadsheetml.template": "xltx",
|
|
9387
|
-
"vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
|
|
9388
|
-
"vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx",
|
|
9389
|
-
"vnd.openxmlformats-officedocument.presentationml.template": "potx",
|
|
9390
|
-
"vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
9391
|
-
"vnd.openxmlformats-officedocument.wordprocessingml.template": "dotx",
|
|
9392
|
-
"vnd.smaf": "mmf",
|
|
9393
|
-
"vnd.stardivision.calc": "sdc",
|
|
9394
|
-
"vnd.stardivision.chart": "sds",
|
|
9395
|
-
"vnd.stardivision.draw": "sda",
|
|
9396
|
-
"vnd.stardivision.impress": "sdd",
|
|
9397
|
-
"vnd.stardivision.math": [
|
|
9398
|
-
"sdf",
|
|
9399
|
-
"smf"
|
|
9400
|
-
],
|
|
9401
|
-
"vnd.stardivision.writer": [
|
|
9402
|
-
"sdw",
|
|
9403
|
-
"vor"
|
|
9404
|
-
],
|
|
9405
|
-
"vnd.stardivision.writer-global": "sgl",
|
|
9406
|
-
"vnd.sun.xml.calc": "sxc",
|
|
9407
|
-
"vnd.sun.xml.calc.template": "stc",
|
|
9408
|
-
"vnd.sun.xml.draw": "sxd",
|
|
9409
|
-
"vnd.sun.xml.draw.template": "std",
|
|
9410
|
-
"vnd.sun.xml.impress": "sxi",
|
|
9411
|
-
"vnd.sun.xml.impress.template": "sti",
|
|
9412
|
-
"vnd.sun.xml.math": "sxm",
|
|
9413
|
-
"vnd.sun.xml.writer": "sxw",
|
|
9414
|
-
"vnd.sun.xml.writer.global": "sxg",
|
|
9415
|
-
"vnd.sun.xml.writer.template": "stw",
|
|
9416
|
-
"vnd.symbian.install": [
|
|
9417
|
-
"sis",
|
|
9418
|
-
"sisx"
|
|
9419
|
-
],
|
|
9420
|
-
"vnd.visio": [
|
|
9421
|
-
"vsd",
|
|
9422
|
-
"vst",
|
|
9423
|
-
"vss",
|
|
9424
|
-
"vsw",
|
|
9425
|
-
"vsdx",
|
|
9426
|
-
"vssx",
|
|
9427
|
-
"vstx",
|
|
9428
|
-
"vssm",
|
|
9429
|
-
"vstm"
|
|
9430
|
-
],
|
|
9431
|
-
"vnd.wap.wbxml": "wbxml",
|
|
9432
|
-
"vnd.wap.wmlc": "wmlc",
|
|
9433
|
-
"vnd.wap.wmlscriptc": "wmlsc",
|
|
9434
|
-
"vnd.wordperfect": "wpd",
|
|
9435
|
-
"vnd.wordperfect5.1": "wp5",
|
|
9436
|
-
"x-123": "wk",
|
|
9437
|
-
"x-7z-compressed": "7z",
|
|
9438
|
-
"x-abiword": "abw",
|
|
9439
|
-
"x-apple-diskimage": "dmg",
|
|
9440
|
-
"x-bcpio": "bcpio",
|
|
9441
|
-
"x-bittorrent": "torrent",
|
|
9442
|
-
"x-cbr": [
|
|
9443
|
-
"cbr",
|
|
9444
|
-
"cba",
|
|
9445
|
-
"cbt",
|
|
9446
|
-
"cb7"
|
|
9447
|
-
],
|
|
9448
|
-
"x-cbz": "cbz",
|
|
9449
|
-
"x-cdf": [
|
|
9450
|
-
"cdf",
|
|
9451
|
-
"cda"
|
|
9452
|
-
],
|
|
9453
|
-
"x-cdlink": "vcd",
|
|
9454
|
-
"x-chess-pgn": "pgn",
|
|
9455
|
-
"x-cpio": "cpio",
|
|
9456
|
-
"x-csh": "csh",
|
|
9457
|
-
"x-director": [
|
|
9458
|
-
"dir",
|
|
9459
|
-
"dxr",
|
|
9460
|
-
"cst",
|
|
9461
|
-
"cct",
|
|
9462
|
-
"cxt",
|
|
9463
|
-
"w3d",
|
|
9464
|
-
"fgd",
|
|
9465
|
-
"swa"
|
|
9466
|
-
],
|
|
9467
|
-
"x-dms": "dms",
|
|
9468
|
-
"x-doom": "wad",
|
|
9469
|
-
"x-dvi": "dvi",
|
|
9470
|
-
"x-httpd-eruby": "rhtml",
|
|
9471
|
-
"x-freemind": "mm",
|
|
9472
|
-
"x-gnumeric": "gnumeric",
|
|
9473
|
-
"x-go-sgf": "sgf",
|
|
9474
|
-
"x-graphing-calculator": "gcf",
|
|
9475
|
-
"x-gtar": [
|
|
9476
|
-
"gtar",
|
|
9477
|
-
"taz"
|
|
9478
|
-
],
|
|
9479
|
-
"x-hdf": "hdf",
|
|
9480
|
-
"x-httpd-php": [
|
|
9481
|
-
"phtml",
|
|
9482
|
-
"pht",
|
|
9483
|
-
"php"
|
|
9484
|
-
],
|
|
9485
|
-
"x-httpd-php-source": "phps",
|
|
9486
|
-
"x-httpd-php3": "php3",
|
|
9487
|
-
"x-httpd-php3-preprocessed": "php3p",
|
|
9488
|
-
"x-httpd-php4": "php4",
|
|
9489
|
-
"x-httpd-php5": "php5",
|
|
9490
|
-
"x-ica": "ica",
|
|
9491
|
-
"x-info": "info",
|
|
9492
|
-
"x-internet-signup": [
|
|
9493
|
-
"ins",
|
|
9494
|
-
"isp"
|
|
9495
|
-
],
|
|
9496
|
-
"x-iphone": "iii",
|
|
9497
|
-
"x-iso9660-image": "iso",
|
|
9498
|
-
"x-java-jnlp-file": "jnlp",
|
|
9499
|
-
"x-jmol": "jmz",
|
|
9500
|
-
"x-killustrator": "kil",
|
|
9501
|
-
"x-latex": "latex",
|
|
9502
|
-
"x-lyx": "lyx",
|
|
9503
|
-
"x-lzx": "lzx",
|
|
9504
|
-
"x-maker": [
|
|
9505
|
-
"frm",
|
|
9506
|
-
"fb",
|
|
9507
|
-
"fbdoc"
|
|
9508
|
-
],
|
|
9509
|
-
"x-ms-wmd": "wmd",
|
|
9510
|
-
"x-msdos-program": [
|
|
9511
|
-
"com",
|
|
9512
|
-
"exe",
|
|
9513
|
-
"bat",
|
|
9514
|
-
"dll"
|
|
9515
|
-
],
|
|
9516
|
-
"x-netcdf": [
|
|
9517
|
-
"nc"
|
|
9518
|
-
],
|
|
9519
|
-
"x-ns-proxy-autoconfig": [
|
|
9520
|
-
"pac",
|
|
9521
|
-
"dat"
|
|
9522
|
-
],
|
|
9523
|
-
"x-nwc": "nwc",
|
|
9524
|
-
"x-object": "o",
|
|
9525
|
-
"x-oz-application": "oza",
|
|
9526
|
-
"x-pkcs7-certreqresp": "p7r",
|
|
9527
|
-
"x-python-code": [
|
|
9528
|
-
"pyc",
|
|
9529
|
-
"pyo"
|
|
9530
|
-
],
|
|
9531
|
-
"x-qgis": [
|
|
9532
|
-
"qgs",
|
|
9533
|
-
"shp",
|
|
9534
|
-
"shx"
|
|
9535
|
-
],
|
|
9536
|
-
"x-quicktimeplayer": "qtl",
|
|
9537
|
-
"x-redhat-package-manager": [
|
|
9538
|
-
"rpm",
|
|
9539
|
-
"rpa"
|
|
9540
|
-
],
|
|
9541
|
-
"x-ruby": "rb",
|
|
9542
|
-
"x-sh": "sh",
|
|
9543
|
-
"x-shar": "shar",
|
|
9544
|
-
"x-shockwave-flash": [
|
|
9545
|
-
"swf",
|
|
9546
|
-
"swfl"
|
|
9547
|
-
],
|
|
9548
|
-
"x-silverlight": "scr",
|
|
9549
|
-
"x-stuffit": "sit",
|
|
9550
|
-
"x-sv4cpio": "sv4cpio",
|
|
9551
|
-
"x-sv4crc": "sv4crc",
|
|
9552
|
-
"x-tar": "tar",
|
|
9553
|
-
"x-tex-gf": "gf",
|
|
9554
|
-
"x-tex-pk": "pk",
|
|
9555
|
-
"x-texinfo": [
|
|
9556
|
-
"texinfo",
|
|
9557
|
-
"texi"
|
|
9558
|
-
],
|
|
9559
|
-
"x-trash": [
|
|
9560
|
-
"~",
|
|
9561
|
-
"%",
|
|
9562
|
-
"bak",
|
|
9563
|
-
"old",
|
|
9564
|
-
"sik"
|
|
9565
|
-
],
|
|
9566
|
-
"x-ustar": "ustar",
|
|
9567
|
-
"x-wais-source": "src",
|
|
9568
|
-
"x-wingz": "wz",
|
|
9569
|
-
"x-x509-ca-cert": [
|
|
9570
|
-
"crt",
|
|
9571
|
-
"der",
|
|
9572
|
-
"cer"
|
|
9573
|
-
],
|
|
9574
|
-
"x-xcf": "xcf",
|
|
9575
|
-
"x-xfig": "fig",
|
|
9576
|
-
"x-xpinstall": "xpi",
|
|
9577
|
-
"applixware": "aw",
|
|
9578
|
-
"atomsvc+xml": "atomsvc",
|
|
9579
|
-
"ccxml+xml": "ccxml",
|
|
9580
|
-
"cdmi-capability": "cdmia",
|
|
9581
|
-
"cdmi-container": "cdmic",
|
|
9582
|
-
"cdmi-domain": "cdmid",
|
|
9583
|
-
"cdmi-object": "cdmio",
|
|
9584
|
-
"cdmi-queue": "cdmiq",
|
|
9585
|
-
"docbook+xml": "dbk",
|
|
9586
|
-
"dssc+der": "dssc",
|
|
9587
|
-
"dssc+xml": "xdssc",
|
|
9588
|
-
"emma+xml": "emma",
|
|
9589
|
-
"epub+zip": "epub",
|
|
9590
|
-
"exi": "exi",
|
|
9591
|
-
"font-tdpfr": "pfr",
|
|
9592
|
-
"gml+xml": "gml",
|
|
9593
|
-
"gpx+xml": "gpx",
|
|
9594
|
-
"gxf": "gxf",
|
|
9595
|
-
"hyperstudio": "stk",
|
|
9596
|
-
"inkml+xml": [
|
|
9597
|
-
"ink",
|
|
9598
|
-
"inkml"
|
|
9599
|
-
],
|
|
9600
|
-
"ipfix": "ipfix",
|
|
9601
|
-
"jsonml+json": "jsonml",
|
|
9602
|
-
"lost+xml": "lostxml",
|
|
9603
|
-
"mads+xml": "mads",
|
|
9604
|
-
"marc": "mrc",
|
|
9605
|
-
"marcxml+xml": "mrcx",
|
|
9606
|
-
"mathml+xml": [
|
|
9607
|
-
"mathml",
|
|
9608
|
-
"mml"
|
|
9609
|
-
],
|
|
9610
|
-
"mbox": "mbox",
|
|
9611
|
-
"mediaservercontrol+xml": "mscml",
|
|
9612
|
-
"metalink+xml": "metalink",
|
|
9613
|
-
"metalink4+xml": "meta4",
|
|
9614
|
-
"mets+xml": "mets",
|
|
9615
|
-
"mods+xml": "mods",
|
|
9616
|
-
"mp21": [
|
|
9617
|
-
"m21",
|
|
9618
|
-
"mp21"
|
|
9619
|
-
],
|
|
9620
|
-
"mp4": "mp4s",
|
|
9621
|
-
"oebps-package+xml": "opf",
|
|
9622
|
-
"omdoc+xml": "omdoc",
|
|
9623
|
-
"onenote": [
|
|
9624
|
-
"onetoc",
|
|
9625
|
-
"onetoc2",
|
|
9626
|
-
"onetmp",
|
|
9627
|
-
"onepkg"
|
|
9628
|
-
],
|
|
9629
|
-
"oxps": "oxps",
|
|
9630
|
-
"patch-ops-error+xml": "xer",
|
|
9631
|
-
"pgp-encrypted": "pgp",
|
|
9632
|
-
"pkcs10": "p10",
|
|
9633
|
-
"pkcs7-mime": [
|
|
9634
|
-
"p7m",
|
|
9635
|
-
"p7c"
|
|
9636
|
-
],
|
|
9637
|
-
"pkcs7-signature": "p7s",
|
|
9638
|
-
"pkcs8": "p8",
|
|
9639
|
-
"pkix-attr-cert": "ac",
|
|
9640
|
-
"pkix-crl": "crl",
|
|
9641
|
-
"pkix-pkipath": "pkipath",
|
|
9642
|
-
"pkixcmp": "pki",
|
|
9643
|
-
"pls+xml": "pls",
|
|
9644
|
-
"prs.cww": "cww",
|
|
9645
|
-
"pskc+xml": "pskcxml",
|
|
9646
|
-
"reginfo+xml": "rif",
|
|
9647
|
-
"relax-ng-compact-syntax": "rnc",
|
|
9648
|
-
"resource-lists+xml": "rl",
|
|
9649
|
-
"resource-lists-diff+xml": "rld",
|
|
9650
|
-
"rls-services+xml": "rs",
|
|
9651
|
-
"rpki-ghostbusters": "gbr",
|
|
9652
|
-
"rpki-manifest": "mft",
|
|
9653
|
-
"rpki-roa": "roa",
|
|
9654
|
-
"rsd+xml": "rsd",
|
|
9655
|
-
"sbml+xml": "sbml",
|
|
9656
|
-
"scvp-cv-request": "scq",
|
|
9657
|
-
"scvp-cv-response": "scs",
|
|
9658
|
-
"scvp-vp-request": "spq",
|
|
9659
|
-
"scvp-vp-response": "spp",
|
|
9660
|
-
"sdp": "sdp",
|
|
9661
|
-
"set-payment-initiation": "setpay",
|
|
9662
|
-
"set-registration-initiation": "setreg",
|
|
9663
|
-
"shf+xml": "shf",
|
|
9664
|
-
"sparql-query": "rq",
|
|
9665
|
-
"sparql-results+xml": "srx",
|
|
9666
|
-
"srgs": "gram",
|
|
9667
|
-
"srgs+xml": "grxml",
|
|
9668
|
-
"sru+xml": "sru",
|
|
9669
|
-
"ssdl+xml": "ssdl",
|
|
9670
|
-
"ssml+xml": "ssml",
|
|
9671
|
-
"tei+xml": [
|
|
9672
|
-
"tei",
|
|
9673
|
-
"teicorpus"
|
|
9674
|
-
],
|
|
9675
|
-
"thraud+xml": "tfi",
|
|
9676
|
-
"timestamped-data": "tsd",
|
|
9677
|
-
"vnd.3gpp.pic-bw-large": "plb",
|
|
9678
|
-
"vnd.3gpp.pic-bw-small": "psb",
|
|
9679
|
-
"vnd.3gpp.pic-bw-var": "pvb",
|
|
9680
|
-
"vnd.3gpp2.tcap": "tcap",
|
|
9681
|
-
"vnd.3m.post-it-notes": "pwn",
|
|
9682
|
-
"vnd.accpac.simply.aso": "aso",
|
|
9683
|
-
"vnd.accpac.simply.imp": "imp",
|
|
9684
|
-
"vnd.acucobol": "acu",
|
|
9685
|
-
"vnd.acucorp": [
|
|
9686
|
-
"atc",
|
|
9687
|
-
"acutc"
|
|
9688
|
-
],
|
|
9689
|
-
"vnd.adobe.air-application-installer-package+zip": "air",
|
|
9690
|
-
"vnd.adobe.formscentral.fcdt": "fcdt",
|
|
9691
|
-
"vnd.adobe.fxp": [
|
|
9692
|
-
"fxp",
|
|
9693
|
-
"fxpl"
|
|
9694
|
-
],
|
|
9695
|
-
"vnd.adobe.xdp+xml": "xdp",
|
|
9696
|
-
"vnd.adobe.xfdf": "xfdf",
|
|
9697
|
-
"vnd.ahead.space": "ahead",
|
|
9698
|
-
"vnd.airzip.filesecure.azf": "azf",
|
|
9699
|
-
"vnd.airzip.filesecure.azs": "azs",
|
|
9700
|
-
"vnd.amazon.ebook": "azw",
|
|
9701
|
-
"vnd.americandynamics.acc": "acc",
|
|
9702
|
-
"vnd.amiga.ami": "ami",
|
|
9703
|
-
"vnd.anser-web-certificate-issue-initiation": "cii",
|
|
9704
|
-
"vnd.anser-web-funds-transfer-initiation": "fti",
|
|
9705
|
-
"vnd.antix.game-component": "atx",
|
|
9706
|
-
"vnd.apple.installer+xml": "mpkg",
|
|
9707
|
-
"vnd.apple.mpegurl": "m3u8",
|
|
9708
|
-
"vnd.aristanetworks.swi": "swi",
|
|
9709
|
-
"vnd.astraea-software.iota": "iota",
|
|
9710
|
-
"vnd.audiograph": "aep",
|
|
9711
|
-
"vnd.blueice.multipass": "mpm",
|
|
9712
|
-
"vnd.bmi": "bmi",
|
|
9713
|
-
"vnd.businessobjects": "rep",
|
|
9714
|
-
"vnd.chemdraw+xml": "cdxml",
|
|
9715
|
-
"vnd.chipnuts.karaoke-mmd": "mmd",
|
|
9716
|
-
"vnd.claymore": "cla",
|
|
9717
|
-
"vnd.cloanto.rp9": "rp9",
|
|
9718
|
-
"vnd.clonk.c4group": [
|
|
9719
|
-
"c4g",
|
|
9720
|
-
"c4d",
|
|
9721
|
-
"c4f",
|
|
9722
|
-
"c4p",
|
|
9723
|
-
"c4u"
|
|
9724
|
-
],
|
|
9725
|
-
"vnd.cluetrust.cartomobile-config": "c11amc",
|
|
9726
|
-
"vnd.cluetrust.cartomobile-config-pkg": "c11amz",
|
|
9727
|
-
"vnd.commonspace": "csp",
|
|
9728
|
-
"vnd.contact.cmsg": "cdbcmsg",
|
|
9729
|
-
"vnd.cosmocaller": "cmc",
|
|
9730
|
-
"vnd.crick.clicker": "clkx",
|
|
9731
|
-
"vnd.crick.clicker.keyboard": "clkk",
|
|
9732
|
-
"vnd.crick.clicker.palette": "clkp",
|
|
9733
|
-
"vnd.crick.clicker.template": "clkt",
|
|
9734
|
-
"vnd.crick.clicker.wordbank": "clkw",
|
|
9735
|
-
"vnd.criticaltools.wbs+xml": "wbs",
|
|
9736
|
-
"vnd.ctc-posml": "pml",
|
|
9737
|
-
"vnd.cups-ppd": "ppd",
|
|
9738
|
-
"vnd.curl.car": "car",
|
|
9739
|
-
"vnd.curl.pcurl": "pcurl",
|
|
9740
|
-
"vnd.dart": "dart",
|
|
9741
|
-
"vnd.data-vision.rdz": "rdz",
|
|
9742
|
-
"vnd.dece.data": [
|
|
9743
|
-
"uvf",
|
|
9744
|
-
"uvvf",
|
|
9745
|
-
"uvd",
|
|
9746
|
-
"uvvd"
|
|
9747
|
-
],
|
|
9748
|
-
"vnd.dece.ttml+xml": [
|
|
9749
|
-
"uvt",
|
|
9750
|
-
"uvvt"
|
|
9751
|
-
],
|
|
9752
|
-
"vnd.dece.unspecified": [
|
|
9753
|
-
"uvx",
|
|
9754
|
-
"uvvx"
|
|
9755
|
-
],
|
|
9756
|
-
"vnd.dece.zip": [
|
|
9757
|
-
"uvz",
|
|
9758
|
-
"uvvz"
|
|
9759
|
-
],
|
|
9760
|
-
"vnd.denovo.fcselayout-link": "fe_launch",
|
|
9761
|
-
"vnd.dna": "dna",
|
|
9762
|
-
"vnd.dolby.mlp": "mlp",
|
|
9763
|
-
"vnd.dpgraph": "dpg",
|
|
9764
|
-
"vnd.dreamfactory": "dfac",
|
|
9765
|
-
"vnd.ds-keypoint": "kpxx",
|
|
9766
|
-
"vnd.dvb.ait": "ait",
|
|
9767
|
-
"vnd.dvb.service": "svc",
|
|
9768
|
-
"vnd.dynageo": "geo",
|
|
9769
|
-
"vnd.ecowin.chart": "mag",
|
|
9770
|
-
"vnd.enliven": "nml",
|
|
9771
|
-
"vnd.epson.esf": "esf",
|
|
9772
|
-
"vnd.epson.msf": "msf",
|
|
9773
|
-
"vnd.epson.quickanime": "qam",
|
|
9774
|
-
"vnd.epson.salt": "slt",
|
|
9775
|
-
"vnd.epson.ssf": "ssf",
|
|
9776
|
-
"vnd.eszigno3+xml": [
|
|
9777
|
-
"es3",
|
|
9778
|
-
"et3"
|
|
9779
|
-
],
|
|
9780
|
-
"vnd.ezpix-album": "ez2",
|
|
9781
|
-
"vnd.ezpix-package": "ez3",
|
|
9782
|
-
"vnd.fdf": "fdf",
|
|
9783
|
-
"vnd.fdsn.mseed": "mseed",
|
|
9784
|
-
"vnd.fdsn.seed": [
|
|
9785
|
-
"seed",
|
|
9786
|
-
"dataless"
|
|
9787
|
-
],
|
|
9788
|
-
"vnd.flographit": "gph",
|
|
9789
|
-
"vnd.fluxtime.clip": "ftc",
|
|
9790
|
-
"vnd.framemaker": [
|
|
9791
|
-
"fm",
|
|
9792
|
-
"frame",
|
|
9793
|
-
"maker",
|
|
9794
|
-
"book"
|
|
9795
|
-
],
|
|
9796
|
-
"vnd.frogans.fnc": "fnc",
|
|
9797
|
-
"vnd.frogans.ltf": "ltf",
|
|
9798
|
-
"vnd.fsc.weblaunch": "fsc",
|
|
9799
|
-
"vnd.fujitsu.oasys": "oas",
|
|
9800
|
-
"vnd.fujitsu.oasys2": "oa2",
|
|
9801
|
-
"vnd.fujitsu.oasys3": "oa3",
|
|
9802
|
-
"vnd.fujitsu.oasysgp": "fg5",
|
|
9803
|
-
"vnd.fujitsu.oasysprs": "bh2",
|
|
9804
|
-
"vnd.fujixerox.ddd": "ddd",
|
|
9805
|
-
"vnd.fujixerox.docuworks": "xdw",
|
|
9806
|
-
"vnd.fujixerox.docuworks.binder": "xbd",
|
|
9807
|
-
"vnd.fuzzysheet": "fzs",
|
|
9808
|
-
"vnd.genomatix.tuxedo": "txd",
|
|
9809
|
-
"vnd.geogebra.file": "ggb",
|
|
9810
|
-
"vnd.geogebra.tool": "ggt",
|
|
9811
|
-
"vnd.geometry-explorer": [
|
|
9812
|
-
"gex",
|
|
9813
|
-
"gre"
|
|
9814
|
-
],
|
|
9815
|
-
"vnd.geonext": "gxt",
|
|
9816
|
-
"vnd.geoplan": "g2w",
|
|
9817
|
-
"vnd.geospace": "g3w",
|
|
9818
|
-
"vnd.gmx": "gmx",
|
|
9819
|
-
"vnd.grafeq": [
|
|
9820
|
-
"gqf",
|
|
9821
|
-
"gqs"
|
|
9822
|
-
],
|
|
9823
|
-
"vnd.groove-account": "gac",
|
|
9824
|
-
"vnd.groove-help": "ghf",
|
|
9825
|
-
"vnd.groove-identity-message": "gim",
|
|
9826
|
-
"vnd.groove-injector": "grv",
|
|
9827
|
-
"vnd.groove-tool-message": "gtm",
|
|
9828
|
-
"vnd.groove-tool-template": "tpl",
|
|
9829
|
-
"vnd.groove-vcard": "vcg",
|
|
9830
|
-
"vnd.hal+xml": "hal",
|
|
9831
|
-
"vnd.handheld-entertainment+xml": "zmm",
|
|
9832
|
-
"vnd.hbci": "hbci",
|
|
9833
|
-
"vnd.hhe.lesson-player": "les",
|
|
9834
|
-
"vnd.hp-hpgl": "hpgl",
|
|
9835
|
-
"vnd.hp-hpid": "hpid",
|
|
9836
|
-
"vnd.hp-hps": "hps",
|
|
9837
|
-
"vnd.hp-jlyt": "jlt",
|
|
9838
|
-
"vnd.hp-pcl": "pcl",
|
|
9839
|
-
"vnd.hp-pclxl": "pclxl",
|
|
9840
|
-
"vnd.hydrostatix.sof-data": "sfd-hdstx",
|
|
9841
|
-
"vnd.ibm.minipay": "mpy",
|
|
9842
|
-
"vnd.ibm.modcap": [
|
|
9843
|
-
"afp",
|
|
9844
|
-
"listafp",
|
|
9845
|
-
"list3820"
|
|
9846
|
-
],
|
|
9847
|
-
"vnd.ibm.rights-management": "irm",
|
|
9848
|
-
"vnd.ibm.secure-container": "sc",
|
|
9849
|
-
"vnd.iccprofile": [
|
|
9850
|
-
"icc",
|
|
9851
|
-
"icm"
|
|
9852
|
-
],
|
|
9853
|
-
"vnd.igloader": "igl",
|
|
9854
|
-
"vnd.immervision-ivp": "ivp",
|
|
9855
|
-
"vnd.immervision-ivu": "ivu",
|
|
9856
|
-
"vnd.insors.igm": "igm",
|
|
9857
|
-
"vnd.intercon.formnet": [
|
|
9858
|
-
"xpw",
|
|
9859
|
-
"xpx"
|
|
9860
|
-
],
|
|
9861
|
-
"vnd.intergeo": "i2g",
|
|
9862
|
-
"vnd.intu.qbo": "qbo",
|
|
9863
|
-
"vnd.intu.qfx": "qfx",
|
|
9864
|
-
"vnd.ipunplugged.rcprofile": "rcprofile",
|
|
9865
|
-
"vnd.irepository.package+xml": "irp",
|
|
9866
|
-
"vnd.is-xpr": "xpr",
|
|
9867
|
-
"vnd.isac.fcs": "fcs",
|
|
9868
|
-
"vnd.jam": "jam",
|
|
9869
|
-
"vnd.jcp.javame.midlet-rms": "rms",
|
|
9870
|
-
"vnd.jisp": "jisp",
|
|
9871
|
-
"vnd.joost.joda-archive": "joda",
|
|
9872
|
-
"vnd.kahootz": [
|
|
9873
|
-
"ktz",
|
|
9874
|
-
"ktr"
|
|
9875
|
-
],
|
|
9876
|
-
"vnd.kde.karbon": "karbon",
|
|
9877
|
-
"vnd.kde.kchart": "chrt",
|
|
9878
|
-
"vnd.kde.kformula": "kfo",
|
|
9879
|
-
"vnd.kde.kivio": "flw",
|
|
9880
|
-
"vnd.kde.kontour": "kon",
|
|
9881
|
-
"vnd.kde.kpresenter": [
|
|
9882
|
-
"kpr",
|
|
9883
|
-
"kpt"
|
|
9884
|
-
],
|
|
9885
|
-
"vnd.kde.kspread": "ksp",
|
|
9886
|
-
"vnd.kde.kword": [
|
|
9887
|
-
"kwd",
|
|
9888
|
-
"kwt"
|
|
9889
|
-
],
|
|
9890
|
-
"vnd.kenameaapp": "htke",
|
|
9891
|
-
"vnd.kidspiration": "kia",
|
|
9892
|
-
"vnd.kinar": [
|
|
9893
|
-
"kne",
|
|
9894
|
-
"knp"
|
|
9895
|
-
],
|
|
9896
|
-
"vnd.koan": [
|
|
9897
|
-
"skp",
|
|
9898
|
-
"skd",
|
|
9899
|
-
"skt",
|
|
9900
|
-
"skm"
|
|
9901
|
-
],
|
|
9902
|
-
"vnd.kodak-descriptor": "sse",
|
|
9903
|
-
"vnd.las.las+xml": "lasxml",
|
|
9904
|
-
"vnd.llamagraphics.life-balance.desktop": "lbd",
|
|
9905
|
-
"vnd.llamagraphics.life-balance.exchange+xml": "lbe",
|
|
9906
|
-
"vnd.lotus-1-2-3": "123",
|
|
9907
|
-
"vnd.lotus-approach": "apr",
|
|
9908
|
-
"vnd.lotus-freelance": "pre",
|
|
9909
|
-
"vnd.lotus-notes": "nsf",
|
|
9910
|
-
"vnd.lotus-organizer": "org",
|
|
9911
|
-
"vnd.lotus-screencam": "scm",
|
|
9912
|
-
"vnd.lotus-wordpro": "lwp",
|
|
9913
|
-
"vnd.macports.portpkg": "portpkg",
|
|
9914
|
-
"vnd.mcd": "mcd",
|
|
9915
|
-
"vnd.medcalcdata": "mc1",
|
|
9916
|
-
"vnd.mediastation.cdkey": "cdkey",
|
|
9917
|
-
"vnd.mfer": "mwf",
|
|
9918
|
-
"vnd.mfmp": "mfm",
|
|
9919
|
-
"vnd.micrografx.flo": "flo",
|
|
9920
|
-
"vnd.micrografx.igx": "igx",
|
|
9921
|
-
"vnd.mif": "mif",
|
|
9922
|
-
"vnd.mobius.daf": "daf",
|
|
9923
|
-
"vnd.mobius.dis": "dis",
|
|
9924
|
-
"vnd.mobius.mbk": "mbk",
|
|
9925
|
-
"vnd.mobius.mqy": "mqy",
|
|
9926
|
-
"vnd.mobius.msl": "msl",
|
|
9927
|
-
"vnd.mobius.plc": "plc",
|
|
9928
|
-
"vnd.mobius.txf": "txf",
|
|
9929
|
-
"vnd.mophun.application": "mpn",
|
|
9930
|
-
"vnd.mophun.certificate": "mpc",
|
|
9931
|
-
"vnd.ms-artgalry": "cil",
|
|
9932
|
-
"vnd.ms-cab-compressed": "cab",
|
|
9933
|
-
"vnd.ms-excel.addin.macroenabled.12": "xlam",
|
|
9934
|
-
"vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb",
|
|
9935
|
-
"vnd.ms-excel.sheet.macroenabled.12": "xlsm",
|
|
9936
|
-
"vnd.ms-excel.template.macroenabled.12": "xltm",
|
|
9937
|
-
"vnd.ms-fontobject": "eot",
|
|
9938
|
-
"vnd.ms-htmlhelp": "chm",
|
|
9939
|
-
"vnd.ms-ims": "ims",
|
|
9940
|
-
"vnd.ms-lrm": "lrm",
|
|
9941
|
-
"vnd.ms-officetheme": "thmx",
|
|
9942
|
-
"vnd.ms-powerpoint.addin.macroenabled.12": "ppam",
|
|
9943
|
-
"vnd.ms-powerpoint.presentation.macroenabled.12": "pptm",
|
|
9944
|
-
"vnd.ms-powerpoint.slide.macroenabled.12": "sldm",
|
|
9945
|
-
"vnd.ms-powerpoint.slideshow.macroenabled.12": "ppsm",
|
|
9946
|
-
"vnd.ms-powerpoint.template.macroenabled.12": "potm",
|
|
9947
|
-
"vnd.ms-project": [
|
|
9948
|
-
"mpp",
|
|
9949
|
-
"mpt"
|
|
9950
|
-
],
|
|
9951
|
-
"vnd.ms-word.document.macroenabled.12": "docm",
|
|
9952
|
-
"vnd.ms-word.template.macroenabled.12": "dotm",
|
|
9953
|
-
"vnd.ms-works": [
|
|
9954
|
-
"wps",
|
|
9955
|
-
"wks",
|
|
9956
|
-
"wcm",
|
|
9957
|
-
"wdb"
|
|
9958
|
-
],
|
|
9959
|
-
"vnd.ms-wpl": "wpl",
|
|
9960
|
-
"vnd.ms-xpsdocument": "xps",
|
|
9961
|
-
"vnd.mseq": "mseq",
|
|
9962
|
-
"vnd.musician": "mus",
|
|
9963
|
-
"vnd.muvee.style": "msty",
|
|
9964
|
-
"vnd.mynfc": "taglet",
|
|
9965
|
-
"vnd.neurolanguage.nlu": "nlu",
|
|
9966
|
-
"vnd.nitf": [
|
|
9967
|
-
"ntf",
|
|
9968
|
-
"nitf"
|
|
9969
|
-
],
|
|
9970
|
-
"vnd.noblenet-directory": "nnd",
|
|
9971
|
-
"vnd.noblenet-sealer": "nns",
|
|
9972
|
-
"vnd.noblenet-web": "nnw",
|
|
9973
|
-
"vnd.nokia.n-gage.data": "ngdat",
|
|
9974
|
-
"vnd.nokia.n-gage.symbian.install": "n-gage",
|
|
9975
|
-
"vnd.nokia.radio-preset": "rpst",
|
|
9976
|
-
"vnd.nokia.radio-presets": "rpss",
|
|
9977
|
-
"vnd.novadigm.edm": "edm",
|
|
9978
|
-
"vnd.novadigm.edx": "edx",
|
|
9979
|
-
"vnd.novadigm.ext": "ext",
|
|
9980
|
-
"vnd.oasis.opendocument.chart-template": "otc",
|
|
9981
|
-
"vnd.oasis.opendocument.formula-template": "odft",
|
|
9982
|
-
"vnd.oasis.opendocument.image-template": "oti",
|
|
9983
|
-
"vnd.olpc-sugar": "xo",
|
|
9984
|
-
"vnd.oma.dd2+xml": "dd2",
|
|
9985
|
-
"vnd.openofficeorg.extension": "oxt",
|
|
9986
|
-
"vnd.openxmlformats-officedocument.presentationml.slide": "sldx",
|
|
9987
|
-
"vnd.osgeo.mapguide.package": "mgp",
|
|
9988
|
-
"vnd.osgi.dp": "dp",
|
|
9989
|
-
"vnd.osgi.subsystem": "esa",
|
|
9990
|
-
"vnd.palm": [
|
|
9991
|
-
"pdb",
|
|
9992
|
-
"pqa",
|
|
9993
|
-
"oprc"
|
|
9994
|
-
],
|
|
9995
|
-
"vnd.pawaafile": "paw",
|
|
9996
|
-
"vnd.pg.format": "str",
|
|
9997
|
-
"vnd.pg.osasli": "ei6",
|
|
9998
|
-
"vnd.picsel": "efif",
|
|
9999
|
-
"vnd.pmi.widget": "wg",
|
|
10000
|
-
"vnd.pocketlearn": "plf",
|
|
10001
|
-
"vnd.powerbuilder6": "pbd",
|
|
10002
|
-
"vnd.previewsystems.box": "box",
|
|
10003
|
-
"vnd.proteus.magazine": "mgz",
|
|
10004
|
-
"vnd.publishare-delta-tree": "qps",
|
|
10005
|
-
"vnd.pvi.ptid1": "ptid",
|
|
10006
|
-
"vnd.quark.quarkxpress": [
|
|
10007
|
-
"qxd",
|
|
10008
|
-
"qxt",
|
|
10009
|
-
"qwd",
|
|
10010
|
-
"qwt",
|
|
10011
|
-
"qxl",
|
|
10012
|
-
"qxb"
|
|
10013
|
-
],
|
|
10014
|
-
"vnd.realvnc.bed": "bed",
|
|
10015
|
-
"vnd.recordare.musicxml": "mxl",
|
|
10016
|
-
"vnd.recordare.musicxml+xml": "musicxml",
|
|
10017
|
-
"vnd.rig.cryptonote": "cryptonote",
|
|
10018
|
-
"vnd.rn-realmedia": "rm",
|
|
10019
|
-
"vnd.rn-realmedia-vbr": "rmvb",
|
|
10020
|
-
"vnd.route66.link66+xml": "link66",
|
|
10021
|
-
"vnd.sailingtracker.track": "st",
|
|
10022
|
-
"vnd.seemail": "see",
|
|
10023
|
-
"vnd.sema": "sema",
|
|
10024
|
-
"vnd.semd": "semd",
|
|
10025
|
-
"vnd.semf": "semf",
|
|
10026
|
-
"vnd.shana.informed.formdata": "ifm",
|
|
10027
|
-
"vnd.shana.informed.formtemplate": "itp",
|
|
10028
|
-
"vnd.shana.informed.interchange": "iif",
|
|
10029
|
-
"vnd.shana.informed.package": "ipk",
|
|
10030
|
-
"vnd.simtech-mindmapper": [
|
|
10031
|
-
"twd",
|
|
10032
|
-
"twds"
|
|
10033
|
-
],
|
|
10034
|
-
"vnd.smart.teacher": "teacher",
|
|
10035
|
-
"vnd.solent.sdkm+xml": [
|
|
10036
|
-
"sdkm",
|
|
10037
|
-
"sdkd"
|
|
10038
|
-
],
|
|
10039
|
-
"vnd.spotfire.dxp": "dxp",
|
|
10040
|
-
"vnd.spotfire.sfs": "sfs",
|
|
10041
|
-
"vnd.stepmania.package": "smzip",
|
|
10042
|
-
"vnd.stepmania.stepchart": "sm",
|
|
10043
|
-
"vnd.sus-calendar": [
|
|
10044
|
-
"sus",
|
|
10045
|
-
"susp"
|
|
10046
|
-
],
|
|
10047
|
-
"vnd.svd": "svd",
|
|
10048
|
-
"vnd.syncml+xml": "xsm",
|
|
10049
|
-
"vnd.syncml.dm+wbxml": "bdm",
|
|
10050
|
-
"vnd.syncml.dm+xml": "xdm",
|
|
10051
|
-
"vnd.tao.intent-module-archive": "tao",
|
|
10052
|
-
"vnd.tcpdump.pcap": [
|
|
10053
|
-
"pcap",
|
|
10054
|
-
"cap",
|
|
10055
|
-
"dmp"
|
|
10056
|
-
],
|
|
10057
|
-
"vnd.tmobile-livetv": "tmo",
|
|
10058
|
-
"vnd.trid.tpt": "tpt",
|
|
10059
|
-
"vnd.triscape.mxs": "mxs",
|
|
10060
|
-
"vnd.trueapp": "tra",
|
|
10061
|
-
"vnd.ufdl": [
|
|
10062
|
-
"ufd",
|
|
10063
|
-
"ufdl"
|
|
10064
|
-
],
|
|
10065
|
-
"vnd.uiq.theme": "utz",
|
|
10066
|
-
"vnd.umajin": "umj",
|
|
10067
|
-
"vnd.unity": "unityweb",
|
|
10068
|
-
"vnd.uoml+xml": "uoml",
|
|
10069
|
-
"vnd.vcx": "vcx",
|
|
10070
|
-
"vnd.visionary": "vis",
|
|
10071
|
-
"vnd.vsf": "vsf",
|
|
10072
|
-
"vnd.webturbo": "wtb",
|
|
10073
|
-
"vnd.wolfram.player": "nbp",
|
|
10074
|
-
"vnd.wqd": "wqd",
|
|
10075
|
-
"vnd.wt.stf": "stf",
|
|
10076
|
-
"vnd.xara": "xar",
|
|
10077
|
-
"vnd.xfdl": "xfdl",
|
|
10078
|
-
"vnd.yamaha.hv-dic": "hvd",
|
|
10079
|
-
"vnd.yamaha.hv-script": "hvs",
|
|
10080
|
-
"vnd.yamaha.hv-voice": "hvp",
|
|
10081
|
-
"vnd.yamaha.openscoreformat": "osf",
|
|
10082
|
-
"vnd.yamaha.openscoreformat.osfpvg+xml": "osfpvg",
|
|
10083
|
-
"vnd.yamaha.smaf-audio": "saf",
|
|
10084
|
-
"vnd.yamaha.smaf-phrase": "spf",
|
|
10085
|
-
"vnd.yellowriver-custom-menu": "cmp",
|
|
10086
|
-
"vnd.zul": [
|
|
10087
|
-
"zir",
|
|
10088
|
-
"zirz"
|
|
10089
|
-
],
|
|
10090
|
-
"vnd.zzazz.deck+xml": "zaz",
|
|
10091
|
-
"voicexml+xml": "vxml",
|
|
10092
|
-
"widget": "wgt",
|
|
10093
|
-
"winhlp": "hlp",
|
|
10094
|
-
"wsdl+xml": "wsdl",
|
|
10095
|
-
"wspolicy+xml": "wspolicy",
|
|
10096
|
-
"x-ace-compressed": "ace",
|
|
10097
|
-
"x-authorware-bin": [
|
|
10098
|
-
"aab",
|
|
10099
|
-
"x32",
|
|
10100
|
-
"u32",
|
|
10101
|
-
"vox"
|
|
10102
|
-
],
|
|
10103
|
-
"x-authorware-map": "aam",
|
|
10104
|
-
"x-authorware-seg": "aas",
|
|
10105
|
-
"x-blorb": [
|
|
10106
|
-
"blb",
|
|
10107
|
-
"blorb"
|
|
10108
|
-
],
|
|
10109
|
-
"x-bzip": "bz",
|
|
10110
|
-
"x-bzip2": [
|
|
10111
|
-
"bz2",
|
|
10112
|
-
"boz"
|
|
10113
|
-
],
|
|
10114
|
-
"x-cfs-compressed": "cfs",
|
|
10115
|
-
"x-chat": "chat",
|
|
10116
|
-
"x-conference": "nsc",
|
|
10117
|
-
"x-dgc-compressed": "dgc",
|
|
10118
|
-
"x-dtbncx+xml": "ncx",
|
|
10119
|
-
"x-dtbook+xml": "dtb",
|
|
10120
|
-
"x-dtbresource+xml": "res",
|
|
10121
|
-
"x-eva": "eva",
|
|
10122
|
-
"x-font-bdf": "bdf",
|
|
10123
|
-
"x-font-ghostscript": "gsf",
|
|
10124
|
-
"x-font-linux-psf": "psf",
|
|
10125
|
-
"x-font-pcf": "pcf",
|
|
10126
|
-
"x-font-snf": "snf",
|
|
10127
|
-
"x-font-ttf": [
|
|
10128
|
-
"ttf",
|
|
10129
|
-
"ttc"
|
|
10130
|
-
],
|
|
10131
|
-
"x-font-type1": [
|
|
10132
|
-
"pfa",
|
|
10133
|
-
"pfb",
|
|
10134
|
-
"pfm",
|
|
10135
|
-
"afm"
|
|
10136
|
-
],
|
|
10137
|
-
"x-freearc": "arc",
|
|
10138
|
-
"x-gca-compressed": "gca",
|
|
10139
|
-
"x-glulx": "ulx",
|
|
10140
|
-
"x-gramps-xml": "gramps",
|
|
10141
|
-
"x-install-instructions": "install",
|
|
10142
|
-
"x-lzh-compressed": [
|
|
10143
|
-
"lzh",
|
|
10144
|
-
"lha"
|
|
10145
|
-
],
|
|
10146
|
-
"x-mie": "mie",
|
|
10147
|
-
"x-mobipocket-ebook": [
|
|
10148
|
-
"prc",
|
|
10149
|
-
"mobi"
|
|
10150
|
-
],
|
|
10151
|
-
"x-ms-application": "application",
|
|
10152
|
-
"x-ms-shortcut": "lnk",
|
|
10153
|
-
"x-ms-xbap": "xbap",
|
|
10154
|
-
"x-msbinder": "obd",
|
|
10155
|
-
"x-mscardfile": "crd",
|
|
10156
|
-
"x-msclip": "clp",
|
|
10157
|
-
"x-ms-installer": "msi",
|
|
10158
|
-
"x-msmediaview": [
|
|
10159
|
-
"mvb",
|
|
10160
|
-
"m13",
|
|
10161
|
-
"m14"
|
|
10162
|
-
],
|
|
10163
|
-
"x-msmetafile": [
|
|
10164
|
-
"wmf",
|
|
10165
|
-
"wmz",
|
|
10166
|
-
"emf",
|
|
10167
|
-
"emz"
|
|
10168
|
-
],
|
|
10169
|
-
"x-msmoney": "mny",
|
|
10170
|
-
"x-mspublisher": "pub",
|
|
10171
|
-
"x-msschedule": "scd",
|
|
10172
|
-
"x-msterminal": "trm",
|
|
10173
|
-
"x-mswrite": "wri",
|
|
10174
|
-
"x-nzb": "nzb",
|
|
10175
|
-
"x-pkcs12": [
|
|
10176
|
-
"p12",
|
|
10177
|
-
"pfx"
|
|
10178
|
-
],
|
|
10179
|
-
"x-pkcs7-certificates": [
|
|
10180
|
-
"p7b",
|
|
10181
|
-
"spc"
|
|
10182
|
-
],
|
|
10183
|
-
"x-research-info-systems": "ris",
|
|
10184
|
-
"x-silverlight-app": "xap",
|
|
10185
|
-
"x-sql": "sql",
|
|
10186
|
-
"x-stuffitx": "sitx",
|
|
10187
|
-
"x-subrip": "srt",
|
|
10188
|
-
"x-t3vm-image": "t3",
|
|
10189
|
-
"x-tex-tfm": "tfm",
|
|
10190
|
-
"x-tgif": "obj",
|
|
10191
|
-
"x-xliff+xml": "xlf",
|
|
10192
|
-
"x-xz": "xz",
|
|
10193
|
-
"x-zmachine": [
|
|
10194
|
-
"z1",
|
|
10195
|
-
"z2",
|
|
10196
|
-
"z3",
|
|
10197
|
-
"z4",
|
|
10198
|
-
"z5",
|
|
10199
|
-
"z6",
|
|
10200
|
-
"z7",
|
|
10201
|
-
"z8"
|
|
10202
|
-
],
|
|
10203
|
-
"xaml+xml": "xaml",
|
|
10204
|
-
"xcap-diff+xml": "xdf",
|
|
10205
|
-
"xenc+xml": "xenc",
|
|
10206
|
-
"xml-dtd": "dtd",
|
|
10207
|
-
"xop+xml": "xop",
|
|
10208
|
-
"xproc+xml": "xpl",
|
|
10209
|
-
"xslt+xml": "xslt",
|
|
10210
|
-
"xv+xml": [
|
|
10211
|
-
"mxml",
|
|
10212
|
-
"xhvml",
|
|
10213
|
-
"xvml",
|
|
10214
|
-
"xvm"
|
|
10215
|
-
],
|
|
10216
|
-
"yang": "yang",
|
|
10217
|
-
"yin+xml": "yin",
|
|
10218
|
-
"envoy": "evy",
|
|
10219
|
-
"fractals": "fif",
|
|
10220
|
-
"internet-property-stream": "acx",
|
|
10221
|
-
"olescript": "axs",
|
|
10222
|
-
"vnd.ms-outlook": "msg",
|
|
10223
|
-
"vnd.ms-pkicertstore": "sst",
|
|
10224
|
-
"x-compress": "z",
|
|
10225
|
-
"x-perfmon": [
|
|
10226
|
-
"pma",
|
|
10227
|
-
"pmc",
|
|
10228
|
-
"pmr",
|
|
10229
|
-
"pmw"
|
|
10230
|
-
],
|
|
10231
|
-
"ynd.ms-pkipko": "pko",
|
|
10232
|
-
"gzip": [
|
|
10233
|
-
"gz",
|
|
10234
|
-
"tgz"
|
|
10235
|
-
],
|
|
10236
|
-
"smil+xml": [
|
|
10237
|
-
"smi",
|
|
10238
|
-
"smil"
|
|
10239
|
-
],
|
|
10240
|
-
"vnd.debian.binary-package": [
|
|
10241
|
-
"deb",
|
|
10242
|
-
"udeb"
|
|
10243
|
-
],
|
|
10244
|
-
"vnd.hzn-3d-crossword": "x3d",
|
|
10245
|
-
"vnd.sqlite3": [
|
|
10246
|
-
"db",
|
|
10247
|
-
"sqlite",
|
|
10248
|
-
"sqlite3",
|
|
10249
|
-
"db-wal",
|
|
10250
|
-
"sqlite-wal",
|
|
10251
|
-
"db-shm",
|
|
10252
|
-
"sqlite-shm"
|
|
10253
|
-
],
|
|
10254
|
-
"vnd.wap.sic": "sic",
|
|
10255
|
-
"vnd.wap.slc": "slc",
|
|
10256
|
-
"x-krita": [
|
|
10257
|
-
"kra",
|
|
10258
|
-
"krz"
|
|
10259
|
-
],
|
|
10260
|
-
"x-perl": [
|
|
10261
|
-
"pm",
|
|
10262
|
-
"pl"
|
|
10263
|
-
],
|
|
10264
|
-
"yaml": [
|
|
10265
|
-
"yaml",
|
|
10266
|
-
"yml"
|
|
10267
|
-
]
|
|
10268
|
-
},
|
|
10269
|
-
"audio": {
|
|
10270
|
-
"amr": "amr",
|
|
10271
|
-
"amr-wb": "awb",
|
|
10272
|
-
"annodex": "axa",
|
|
10273
|
-
"basic": [
|
|
10274
|
-
"au",
|
|
10275
|
-
"snd"
|
|
10276
|
-
],
|
|
10277
|
-
"flac": "flac",
|
|
10278
|
-
"midi": [
|
|
10279
|
-
"mid",
|
|
10280
|
-
"midi",
|
|
10281
|
-
"kar",
|
|
10282
|
-
"rmi"
|
|
10283
|
-
],
|
|
10284
|
-
"mpeg": [
|
|
10285
|
-
"mpga",
|
|
10286
|
-
"mpega",
|
|
10287
|
-
"mp3",
|
|
10288
|
-
"m4a",
|
|
10289
|
-
"mp2a",
|
|
10290
|
-
"m2a",
|
|
10291
|
-
"m3a"
|
|
10292
|
-
],
|
|
10293
|
-
"mpegurl": "m3u",
|
|
10294
|
-
"ogg": [
|
|
10295
|
-
"oga",
|
|
10296
|
-
"ogg",
|
|
10297
|
-
"spx"
|
|
10298
|
-
],
|
|
10299
|
-
"prs.sid": "sid",
|
|
10300
|
-
"x-aiff": "aifc",
|
|
10301
|
-
"x-gsm": "gsm",
|
|
10302
|
-
"x-ms-wma": "wma",
|
|
10303
|
-
"x-ms-wax": "wax",
|
|
10304
|
-
"x-pn-realaudio": "ram",
|
|
10305
|
-
"x-realaudio": "ra",
|
|
10306
|
-
"x-sd2": "sd2",
|
|
10307
|
-
"adpcm": "adp",
|
|
10308
|
-
"mp4": "mp4a",
|
|
10309
|
-
"s3m": "s3m",
|
|
10310
|
-
"silk": "sil",
|
|
10311
|
-
"vnd.dece.audio": [
|
|
10312
|
-
"uva",
|
|
10313
|
-
"uvva"
|
|
10314
|
-
],
|
|
10315
|
-
"vnd.digital-winds": "eol",
|
|
10316
|
-
"vnd.dra": "dra",
|
|
10317
|
-
"vnd.dts": "dts",
|
|
10318
|
-
"vnd.dts.hd": "dtshd",
|
|
10319
|
-
"vnd.lucent.voice": "lvp",
|
|
10320
|
-
"vnd.ms-playready.media.pya": "pya",
|
|
10321
|
-
"vnd.nuera.ecelp4800": "ecelp4800",
|
|
10322
|
-
"vnd.nuera.ecelp7470": "ecelp7470",
|
|
10323
|
-
"vnd.nuera.ecelp9600": "ecelp9600",
|
|
10324
|
-
"vnd.rip": "rip",
|
|
10325
|
-
"webm": "weba",
|
|
10326
|
-
"x-caf": "caf",
|
|
10327
|
-
"x-matroska": "mka",
|
|
10328
|
-
"x-pn-realaudio-plugin": "rmp",
|
|
10329
|
-
"xm": "xm",
|
|
10330
|
-
"aac": "aac",
|
|
10331
|
-
"aiff": [
|
|
10332
|
-
"aiff",
|
|
10333
|
-
"aif",
|
|
10334
|
-
"aff"
|
|
10335
|
-
],
|
|
10336
|
-
"opus": "opus",
|
|
10337
|
-
"wav": "wav"
|
|
10338
|
-
},
|
|
10339
|
-
"chemical": {
|
|
10340
|
-
"x-alchemy": "alc",
|
|
10341
|
-
"x-cache": [
|
|
10342
|
-
"cac",
|
|
10343
|
-
"cache"
|
|
10344
|
-
],
|
|
10345
|
-
"x-cache-csf": "csf",
|
|
10346
|
-
"x-cactvs-binary": [
|
|
10347
|
-
"cbin",
|
|
10348
|
-
"cascii",
|
|
10349
|
-
"ctab"
|
|
10350
|
-
],
|
|
10351
|
-
"x-cdx": "cdx",
|
|
10352
|
-
"x-chem3d": "c3d",
|
|
10353
|
-
"x-cif": "cif",
|
|
10354
|
-
"x-cmdf": "cmdf",
|
|
10355
|
-
"x-cml": "cml",
|
|
10356
|
-
"x-compass": "cpa",
|
|
10357
|
-
"x-crossfire": "bsd",
|
|
10358
|
-
"x-csml": [
|
|
10359
|
-
"csml",
|
|
10360
|
-
"csm"
|
|
10361
|
-
],
|
|
10362
|
-
"x-ctx": "ctx",
|
|
10363
|
-
"x-cxf": [
|
|
10364
|
-
"cxf",
|
|
10365
|
-
"cef"
|
|
10366
|
-
],
|
|
10367
|
-
"x-embl-dl-nucleotide": [
|
|
10368
|
-
"emb",
|
|
10369
|
-
"embl"
|
|
10370
|
-
],
|
|
10371
|
-
"x-gamess-input": [
|
|
10372
|
-
"inp",
|
|
10373
|
-
"gam",
|
|
10374
|
-
"gamin"
|
|
10375
|
-
],
|
|
10376
|
-
"x-gaussian-checkpoint": [
|
|
10377
|
-
"fch",
|
|
10378
|
-
"fchk"
|
|
10379
|
-
],
|
|
10380
|
-
"x-gaussian-cube": "cub",
|
|
10381
|
-
"x-gaussian-input": [
|
|
10382
|
-
"gau",
|
|
10383
|
-
"gjc",
|
|
10384
|
-
"gjf"
|
|
10385
|
-
],
|
|
10386
|
-
"x-gaussian-log": "gal",
|
|
10387
|
-
"x-gcg8-sequence": "gcg",
|
|
10388
|
-
"x-genbank": "gen",
|
|
10389
|
-
"x-hin": "hin",
|
|
10390
|
-
"x-isostar": [
|
|
10391
|
-
"istr",
|
|
10392
|
-
"ist"
|
|
10393
|
-
],
|
|
10394
|
-
"x-jcamp-dx": [
|
|
10395
|
-
"jdx",
|
|
10396
|
-
"dx"
|
|
10397
|
-
],
|
|
10398
|
-
"x-kinemage": "kin",
|
|
10399
|
-
"x-macmolecule": "mcm",
|
|
10400
|
-
"x-macromodel-input": "mmod",
|
|
10401
|
-
"x-mdl-molfile": "mol",
|
|
10402
|
-
"x-mdl-rdfile": "rd",
|
|
10403
|
-
"x-mdl-rxnfile": "rxn",
|
|
10404
|
-
"x-mdl-sdfile": "sd",
|
|
10405
|
-
"x-mdl-tgf": "tgf",
|
|
10406
|
-
"x-mmcif": "mcif",
|
|
10407
|
-
"x-mol2": "mol2",
|
|
10408
|
-
"x-molconn-Z": "b",
|
|
10409
|
-
"x-mopac-graph": "gpt",
|
|
10410
|
-
"x-mopac-input": [
|
|
10411
|
-
"mop",
|
|
10412
|
-
"mopcrt",
|
|
10413
|
-
"zmt"
|
|
10414
|
-
],
|
|
10415
|
-
"x-mopac-out": "moo",
|
|
10416
|
-
"x-ncbi-asn1": "asn",
|
|
10417
|
-
"x-ncbi-asn1-ascii": [
|
|
10418
|
-
"prt",
|
|
10419
|
-
"ent"
|
|
10420
|
-
],
|
|
10421
|
-
"x-ncbi-asn1-binary": "val",
|
|
10422
|
-
"x-rosdal": "ros",
|
|
10423
|
-
"x-swissprot": "sw",
|
|
10424
|
-
"x-vamas-iso14976": "vms",
|
|
10425
|
-
"x-vmd": "vmd",
|
|
10426
|
-
"x-xtel": "xtel",
|
|
10427
|
-
"x-xyz": "xyz"
|
|
10428
|
-
},
|
|
10429
|
-
"font": {
|
|
10430
|
-
"otf": "otf",
|
|
10431
|
-
"woff": "woff",
|
|
10432
|
-
"woff2": "woff2"
|
|
10433
|
-
},
|
|
10434
|
-
"image": {
|
|
10435
|
-
"gif": "gif",
|
|
10436
|
-
"ief": "ief",
|
|
10437
|
-
"jpeg": [
|
|
10438
|
-
"jpeg",
|
|
10439
|
-
"jpg",
|
|
10440
|
-
"jpe",
|
|
10441
|
-
"jfif",
|
|
10442
|
-
"jfif-tbnl",
|
|
10443
|
-
"jif"
|
|
10444
|
-
],
|
|
10445
|
-
"pcx": "pcx",
|
|
10446
|
-
"png": "png",
|
|
10447
|
-
"svg+xml": [
|
|
10448
|
-
"svg",
|
|
10449
|
-
"svgz"
|
|
10450
|
-
],
|
|
10451
|
-
"tiff": [
|
|
10452
|
-
"tiff",
|
|
10453
|
-
"tif"
|
|
10454
|
-
],
|
|
10455
|
-
"vnd.djvu": [
|
|
10456
|
-
"djvu",
|
|
10457
|
-
"djv"
|
|
10458
|
-
],
|
|
10459
|
-
"vnd.wap.wbmp": "wbmp",
|
|
10460
|
-
"x-canon-cr2": "cr2",
|
|
10461
|
-
"x-canon-crw": "crw",
|
|
10462
|
-
"x-cmu-raster": "ras",
|
|
10463
|
-
"x-coreldraw": "cdr",
|
|
10464
|
-
"x-coreldrawpattern": "pat",
|
|
10465
|
-
"x-coreldrawtemplate": "cdt",
|
|
10466
|
-
"x-corelphotopaint": "cpt",
|
|
10467
|
-
"x-epson-erf": "erf",
|
|
10468
|
-
"x-icon": "ico",
|
|
10469
|
-
"x-jg": "art",
|
|
10470
|
-
"x-jng": "jng",
|
|
10471
|
-
"x-nikon-nef": "nef",
|
|
10472
|
-
"x-olympus-orf": "orf",
|
|
10473
|
-
"x-portable-anymap": "pnm",
|
|
10474
|
-
"x-portable-bitmap": "pbm",
|
|
10475
|
-
"x-portable-graymap": "pgm",
|
|
10476
|
-
"x-portable-pixmap": "ppm",
|
|
10477
|
-
"x-rgb": "rgb",
|
|
10478
|
-
"x-xbitmap": "xbm",
|
|
10479
|
-
"x-xpixmap": "xpm",
|
|
10480
|
-
"x-xwindowdump": "xwd",
|
|
10481
|
-
"bmp": "bmp",
|
|
10482
|
-
"cgm": "cgm",
|
|
10483
|
-
"g3fax": "g3",
|
|
10484
|
-
"ktx": "ktx",
|
|
10485
|
-
"prs.btif": "btif",
|
|
10486
|
-
"sgi": "sgi",
|
|
10487
|
-
"vnd.dece.graphic": [
|
|
10488
|
-
"uvi",
|
|
10489
|
-
"uvvi",
|
|
10490
|
-
"uvg",
|
|
10491
|
-
"uvvg"
|
|
10492
|
-
],
|
|
10493
|
-
"vnd.dwg": "dwg",
|
|
10494
|
-
"vnd.dxf": "dxf",
|
|
10495
|
-
"vnd.fastbidsheet": "fbs",
|
|
10496
|
-
"vnd.fpx": "fpx",
|
|
10497
|
-
"vnd.fst": "fst",
|
|
10498
|
-
"vnd.fujixerox.edmics-mmr": "mmr",
|
|
10499
|
-
"vnd.fujixerox.edmics-rlc": "rlc",
|
|
10500
|
-
"vnd.ms-modi": "mdi",
|
|
10501
|
-
"vnd.ms-photo": "wdp",
|
|
10502
|
-
"vnd.net-fpx": "npx",
|
|
10503
|
-
"vnd.xiff": "xif",
|
|
10504
|
-
"webp": "webp",
|
|
10505
|
-
"x-3ds": "3ds",
|
|
10506
|
-
"x-cmx": "cmx",
|
|
10507
|
-
"x-freehand": [
|
|
10508
|
-
"fh",
|
|
10509
|
-
"fhc",
|
|
10510
|
-
"fh4",
|
|
10511
|
-
"fh5",
|
|
10512
|
-
"fh7"
|
|
10513
|
-
],
|
|
10514
|
-
"x-pict": [
|
|
10515
|
-
"pic",
|
|
10516
|
-
"pct"
|
|
10517
|
-
],
|
|
10518
|
-
"x-tga": "tga",
|
|
10519
|
-
"cis-cod": "cod",
|
|
10520
|
-
"avif": [
|
|
10521
|
-
"avif",
|
|
10522
|
-
"avifs"
|
|
10523
|
-
],
|
|
10524
|
-
"heic": [
|
|
10525
|
-
"heif",
|
|
10526
|
-
"heic"
|
|
10527
|
-
],
|
|
10528
|
-
"pjpeg": [
|
|
10529
|
-
"pjpg"
|
|
10530
|
-
],
|
|
10531
|
-
"vnd.adobe.photoshop": "psd",
|
|
10532
|
-
"x-adobe-dng": "dng",
|
|
10533
|
-
"x-fuji-raf": "raf",
|
|
10534
|
-
"x-icns": "icns",
|
|
10535
|
-
"x-kodak-dcr": "dcr",
|
|
10536
|
-
"x-kodak-k25": "k25",
|
|
10537
|
-
"x-kodak-kdc": "kdc",
|
|
10538
|
-
"x-minolta-mrw": "mrw",
|
|
10539
|
-
"x-panasonic-raw": [
|
|
10540
|
-
"raw",
|
|
10541
|
-
"rw2",
|
|
10542
|
-
"rwl"
|
|
10543
|
-
],
|
|
10544
|
-
"x-pentax-pef": [
|
|
10545
|
-
"pef",
|
|
10546
|
-
"ptx"
|
|
10547
|
-
],
|
|
10548
|
-
"x-sigma-x3f": "x3f",
|
|
10549
|
-
"x-sony-arw": "arw",
|
|
10550
|
-
"x-sony-sr2": "sr2",
|
|
10551
|
-
"x-sony-srf": "srf"
|
|
10552
|
-
},
|
|
10553
|
-
"message": {
|
|
10554
|
-
"rfc822": [
|
|
10555
|
-
"eml",
|
|
10556
|
-
"mime",
|
|
10557
|
-
"mht",
|
|
10558
|
-
"mhtml",
|
|
10559
|
-
"nws"
|
|
10560
|
-
]
|
|
10561
|
-
},
|
|
10562
|
-
"model": {
|
|
10563
|
-
"iges": [
|
|
10564
|
-
"igs",
|
|
10565
|
-
"iges"
|
|
10566
|
-
],
|
|
10567
|
-
"mesh": [
|
|
10568
|
-
"msh",
|
|
10569
|
-
"mesh",
|
|
10570
|
-
"silo"
|
|
10571
|
-
],
|
|
10572
|
-
"vrml": [
|
|
10573
|
-
"wrl",
|
|
10574
|
-
"vrml"
|
|
10575
|
-
],
|
|
10576
|
-
"x3d+vrml": [
|
|
10577
|
-
"x3dv",
|
|
10578
|
-
"x3dvz"
|
|
10579
|
-
],
|
|
10580
|
-
"x3d+xml": "x3dz",
|
|
10581
|
-
"x3d+binary": [
|
|
10582
|
-
"x3db",
|
|
10583
|
-
"x3dbz"
|
|
10584
|
-
],
|
|
10585
|
-
"vnd.collada+xml": "dae",
|
|
10586
|
-
"vnd.dwf": "dwf",
|
|
10587
|
-
"vnd.gdl": "gdl",
|
|
10588
|
-
"vnd.gtw": "gtw",
|
|
10589
|
-
"vnd.mts": "mts",
|
|
10590
|
-
"vnd.usdz+zip": "usdz",
|
|
10591
|
-
"vnd.vtu": "vtu"
|
|
10592
|
-
},
|
|
10593
|
-
"text": {
|
|
10594
|
-
"cache-manifest": [
|
|
10595
|
-
"manifest",
|
|
10596
|
-
"appcache"
|
|
10597
|
-
],
|
|
10598
|
-
"calendar": [
|
|
10599
|
-
"ics",
|
|
10600
|
-
"icz",
|
|
10601
|
-
"ifb"
|
|
10602
|
-
],
|
|
10603
|
-
"css": "css",
|
|
10604
|
-
"csv": "csv",
|
|
10605
|
-
"h323": "323",
|
|
10606
|
-
"html": [
|
|
10607
|
-
"html",
|
|
10608
|
-
"htm",
|
|
10609
|
-
"shtml",
|
|
10610
|
-
"stm"
|
|
10611
|
-
],
|
|
10612
|
-
"iuls": "uls",
|
|
10613
|
-
"plain": [
|
|
10614
|
-
"txt",
|
|
10615
|
-
"text",
|
|
10616
|
-
"brf",
|
|
10617
|
-
"conf",
|
|
10618
|
-
"def",
|
|
10619
|
-
"list",
|
|
10620
|
-
"log",
|
|
10621
|
-
"in",
|
|
10622
|
-
"bas",
|
|
10623
|
-
"diff",
|
|
10624
|
-
"ksh"
|
|
10625
|
-
],
|
|
10626
|
-
"richtext": "rtx",
|
|
10627
|
-
"scriptlet": [
|
|
10628
|
-
"sct",
|
|
10629
|
-
"wsc"
|
|
10630
|
-
],
|
|
10631
|
-
"texmacs": "tm",
|
|
10632
|
-
"tab-separated-values": "tsv",
|
|
10633
|
-
"vnd.sun.j2me.app-descriptor": "jad",
|
|
10634
|
-
"vnd.wap.wml": "wml",
|
|
10635
|
-
"vnd.wap.wmlscript": "wmls",
|
|
10636
|
-
"x-bibtex": "bib",
|
|
10637
|
-
"x-boo": "boo",
|
|
10638
|
-
"x-c++hdr": [
|
|
10639
|
-
"h++",
|
|
10640
|
-
"hpp",
|
|
10641
|
-
"hxx",
|
|
10642
|
-
"hh"
|
|
10643
|
-
],
|
|
10644
|
-
"x-c++src": [
|
|
10645
|
-
"c++",
|
|
10646
|
-
"cpp",
|
|
10647
|
-
"cxx",
|
|
10648
|
-
"cc"
|
|
10649
|
-
],
|
|
10650
|
-
"x-component": "htc",
|
|
10651
|
-
"x-dsrc": "d",
|
|
10652
|
-
"x-diff": "patch",
|
|
10653
|
-
"x-haskell": "hs",
|
|
10654
|
-
"x-java": "java",
|
|
10655
|
-
"x-literate-haskell": "lhs",
|
|
10656
|
-
"x-moc": "moc",
|
|
10657
|
-
"x-pascal": [
|
|
10658
|
-
"p",
|
|
10659
|
-
"pas",
|
|
10660
|
-
"pp",
|
|
10661
|
-
"inc"
|
|
10662
|
-
],
|
|
10663
|
-
"x-pcs-gcd": "gcd",
|
|
10664
|
-
"x-python": "py",
|
|
10665
|
-
"x-scala": "scala",
|
|
10666
|
-
"x-setext": "etx",
|
|
10667
|
-
"x-tcl": [
|
|
10668
|
-
"tcl",
|
|
10669
|
-
"tk"
|
|
10670
|
-
],
|
|
10671
|
-
"x-tex": [
|
|
10672
|
-
"tex",
|
|
10673
|
-
"ltx",
|
|
10674
|
-
"sty",
|
|
10675
|
-
"cls"
|
|
10676
|
-
],
|
|
10677
|
-
"x-vcalendar": "vcs",
|
|
10678
|
-
"x-vcard": "vcf",
|
|
10679
|
-
"n3": "n3",
|
|
10680
|
-
"prs.lines.tag": "dsc",
|
|
10681
|
-
"sgml": [
|
|
10682
|
-
"sgml",
|
|
10683
|
-
"sgm"
|
|
10684
|
-
],
|
|
10685
|
-
"troff": [
|
|
10686
|
-
"t",
|
|
10687
|
-
"tr",
|
|
10688
|
-
"roff",
|
|
10689
|
-
"man",
|
|
10690
|
-
"me",
|
|
10691
|
-
"ms"
|
|
10692
|
-
],
|
|
10693
|
-
"turtle": "ttl",
|
|
10694
|
-
"uri-list": [
|
|
10695
|
-
"uri",
|
|
10696
|
-
"uris",
|
|
10697
|
-
"urls"
|
|
10698
|
-
],
|
|
10699
|
-
"vcard": "vcard",
|
|
10700
|
-
"vnd.curl": "curl",
|
|
10701
|
-
"vnd.curl.dcurl": "dcurl",
|
|
10702
|
-
"vnd.curl.scurl": "scurl",
|
|
10703
|
-
"vnd.curl.mcurl": "mcurl",
|
|
10704
|
-
"vnd.dvb.subtitle": "sub",
|
|
10705
|
-
"vnd.fly": "fly",
|
|
10706
|
-
"vnd.fmi.flexstor": "flx",
|
|
10707
|
-
"vnd.graphviz": "gv",
|
|
10708
|
-
"vnd.in3d.3dml": "3dml",
|
|
10709
|
-
"vnd.in3d.spot": "spot",
|
|
10710
|
-
"x-asm": [
|
|
10711
|
-
"s",
|
|
10712
|
-
"asm"
|
|
10713
|
-
],
|
|
10714
|
-
"x-c": [
|
|
10715
|
-
"c",
|
|
10716
|
-
"h",
|
|
10717
|
-
"dic"
|
|
10718
|
-
],
|
|
10719
|
-
"x-fortran": [
|
|
10720
|
-
"f",
|
|
10721
|
-
"for",
|
|
10722
|
-
"f77",
|
|
10723
|
-
"f90"
|
|
10724
|
-
],
|
|
10725
|
-
"x-opml": "opml",
|
|
10726
|
-
"x-nfo": "nfo",
|
|
10727
|
-
"x-sfv": "sfv",
|
|
10728
|
-
"x-uuencode": "uu",
|
|
10729
|
-
"webviewhtml": "htt",
|
|
10730
|
-
"javascript": "js",
|
|
10731
|
-
"json": "json",
|
|
10732
|
-
"markdown": [
|
|
10733
|
-
"md",
|
|
10734
|
-
"markdown",
|
|
10735
|
-
"mdown",
|
|
10736
|
-
"markdn"
|
|
10737
|
-
],
|
|
10738
|
-
"vnd.wap.si": "si",
|
|
10739
|
-
"vnd.wap.sl": "sl"
|
|
10740
|
-
},
|
|
10741
|
-
"video": {
|
|
10742
|
-
"3gpp": "3gp",
|
|
10743
|
-
"annodex": "axv",
|
|
10744
|
-
"dl": "dl",
|
|
10745
|
-
"dv": [
|
|
10746
|
-
"dif",
|
|
10747
|
-
"dv"
|
|
10748
|
-
],
|
|
10749
|
-
"fli": "fli",
|
|
10750
|
-
"gl": "gl",
|
|
10751
|
-
"mpeg": [
|
|
10752
|
-
"mpeg",
|
|
10753
|
-
"mpg",
|
|
10754
|
-
"mpe",
|
|
10755
|
-
"m1v",
|
|
10756
|
-
"m2v",
|
|
10757
|
-
"mp2",
|
|
10758
|
-
"mpa",
|
|
10759
|
-
"mpv2"
|
|
10760
|
-
],
|
|
10761
|
-
"mp4": [
|
|
10762
|
-
"mp4",
|
|
10763
|
-
"mp4v",
|
|
10764
|
-
"mpg4"
|
|
10765
|
-
],
|
|
10766
|
-
"quicktime": [
|
|
10767
|
-
"qt",
|
|
10768
|
-
"mov"
|
|
10769
|
-
],
|
|
10770
|
-
"ogg": "ogv",
|
|
10771
|
-
"vnd.mpegurl": [
|
|
10772
|
-
"mxu",
|
|
10773
|
-
"m4u"
|
|
10774
|
-
],
|
|
10775
|
-
"x-flv": "flv",
|
|
10776
|
-
"x-la-asf": [
|
|
10777
|
-
"lsf",
|
|
10778
|
-
"lsx"
|
|
10779
|
-
],
|
|
10780
|
-
"x-mng": "mng",
|
|
10781
|
-
"x-ms-asf": [
|
|
10782
|
-
"asf",
|
|
10783
|
-
"asx",
|
|
10784
|
-
"asr"
|
|
10785
|
-
],
|
|
10786
|
-
"x-ms-wm": "wm",
|
|
10787
|
-
"x-ms-wmv": "wmv",
|
|
10788
|
-
"x-ms-wmx": "wmx",
|
|
10789
|
-
"x-ms-wvx": "wvx",
|
|
10790
|
-
"x-msvideo": "avi",
|
|
10791
|
-
"x-sgi-movie": "movie",
|
|
10792
|
-
"x-matroska": [
|
|
10793
|
-
"mpv",
|
|
10794
|
-
"mkv",
|
|
10795
|
-
"mk3d",
|
|
10796
|
-
"mks"
|
|
10797
|
-
],
|
|
10798
|
-
"3gpp2": "3g2",
|
|
10799
|
-
"h261": "h261",
|
|
10800
|
-
"h263": "h263",
|
|
10801
|
-
"h264": "h264",
|
|
10802
|
-
"jpeg": "jpgv",
|
|
10803
|
-
"jpm": [
|
|
10804
|
-
"jpm",
|
|
10805
|
-
"jpgm"
|
|
10806
|
-
],
|
|
10807
|
-
"mj2": [
|
|
10808
|
-
"mj2",
|
|
10809
|
-
"mjp2"
|
|
10810
|
-
],
|
|
10811
|
-
"vnd.dece.hd": [
|
|
10812
|
-
"uvh",
|
|
10813
|
-
"uvvh"
|
|
10814
|
-
],
|
|
10815
|
-
"vnd.dece.mobile": [
|
|
10816
|
-
"uvm",
|
|
10817
|
-
"uvvm"
|
|
10818
|
-
],
|
|
10819
|
-
"vnd.dece.pd": [
|
|
10820
|
-
"uvp",
|
|
10821
|
-
"uvvp"
|
|
10822
|
-
],
|
|
10823
|
-
"vnd.dece.sd": [
|
|
10824
|
-
"uvs",
|
|
10825
|
-
"uvvs"
|
|
10826
|
-
],
|
|
10827
|
-
"vnd.dece.video": [
|
|
10828
|
-
"uvv",
|
|
10829
|
-
"uvvv"
|
|
10830
|
-
],
|
|
10831
|
-
"vnd.dvb.file": "dvb",
|
|
10832
|
-
"vnd.fvt": "fvt",
|
|
10833
|
-
"vnd.ms-playready.media.pyv": "pyv",
|
|
10834
|
-
"vnd.uvvu.mp4": [
|
|
10835
|
-
"uvu",
|
|
10836
|
-
"uvvu"
|
|
10837
|
-
],
|
|
10838
|
-
"vnd.vivo": "viv",
|
|
10839
|
-
"webm": "webm",
|
|
10840
|
-
"x-f4v": "f4v",
|
|
10841
|
-
"x-m4v": "m4v",
|
|
10842
|
-
"x-ms-vob": "vob",
|
|
10843
|
-
"x-smv": "smv",
|
|
10844
|
-
"mp2t": "ts"
|
|
10845
|
-
},
|
|
10846
|
-
"x-conference": {
|
|
10847
|
-
"x-cooltalk": "ice"
|
|
10848
|
-
},
|
|
10849
|
-
"x-world": {
|
|
10850
|
-
"x-vrml": [
|
|
10851
|
-
"vrm",
|
|
10852
|
-
"flr",
|
|
10853
|
-
"wrz",
|
|
10854
|
-
"xaf",
|
|
10855
|
-
"xof"
|
|
10856
|
-
]
|
|
10857
|
-
}
|
|
10858
|
-
};
|
|
10859
|
-
|
|
10860
9384
|
let mimeTypes;
|
|
10861
9385
|
|
|
10862
9386
|
function getMimeType(filename) {
|
|
@@ -10865,17 +9389,25 @@ function getMimeType(filename) {
|
|
|
10865
9389
|
|
|
10866
9390
|
function getMimeTypes() {
|
|
10867
9391
|
if (!mimeTypes) {
|
|
10868
|
-
mimeTypes =
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
9392
|
+
mimeTypes = decodeMimeTypes(encodedMimeTypes);
|
|
9393
|
+
}
|
|
9394
|
+
return mimeTypes;
|
|
9395
|
+
}
|
|
9396
|
+
|
|
9397
|
+
function decodeMimeTypes(data) {
|
|
9398
|
+
const mimeTypes = Object.create(null);
|
|
9399
|
+
for (const block of data.split(";")) {
|
|
9400
|
+
const colonIndex = block.indexOf(":");
|
|
9401
|
+
const type = block.slice(0, colonIndex);
|
|
9402
|
+
let previousSubtype = "";
|
|
9403
|
+
for (const entry of block.slice(colonIndex + 1).split(",")) {
|
|
9404
|
+
const tokens = entry.split(" ");
|
|
9405
|
+
const subtype = previousSubtype.slice(0, Number.parseInt(tokens[0][0], 36)) + tokens[0].slice(1);
|
|
9406
|
+
previousSubtype = subtype;
|
|
9407
|
+
const expandedSubtype = subtype.replace(/!/g, "+xml");
|
|
9408
|
+
const extensions = tokens.length > 1 ? tokens.slice(1) : [expandedSubtype.split("+")[0]];
|
|
9409
|
+
for (const extension of extensions) {
|
|
9410
|
+
mimeTypes[extension] = type + "/" + expandedSubtype;
|
|
10879
9411
|
}
|
|
10880
9412
|
}
|
|
10881
9413
|
}
|
|
@@ -10928,10 +9460,12 @@ exports.ERR_EOCDR_NOT_FOUND = ERR_EOCDR_NOT_FOUND;
|
|
|
10928
9460
|
exports.ERR_EXTRAFIELD_ZIP64_NOT_FOUND = ERR_EXTRAFIELD_ZIP64_NOT_FOUND;
|
|
10929
9461
|
exports.ERR_HTTP_RANGE = ERR_HTTP_RANGE;
|
|
10930
9462
|
exports.ERR_HTTP_RESOURCE_CHANGED = ERR_HTTP_RESOURCE_CHANGED;
|
|
9463
|
+
exports.ERR_INVALID_AUTHENTICATION_CODE = ERR_INVALID_AUTHENTICATION_CODE;
|
|
10931
9464
|
exports.ERR_INVALID_CODEC_DEFINITION = ERR_INVALID_CODEC_DEFINITION;
|
|
10932
9465
|
exports.ERR_INVALID_CODEC_MODULE = ERR_INVALID_CODEC_MODULE;
|
|
10933
9466
|
exports.ERR_INVALID_COMMENT = ERR_INVALID_COMMENT;
|
|
10934
9467
|
exports.ERR_INVALID_COMPRESSED_DATA = ERR_INVALID_COMPRESSED_DATA;
|
|
9468
|
+
exports.ERR_INVALID_CRC32 = ERR_INVALID_CRC32;
|
|
10935
9469
|
exports.ERR_INVALID_ENCRYPTION_STRENGTH = ERR_INVALID_ENCRYPTION_STRENGTH;
|
|
10936
9470
|
exports.ERR_INVALID_ENTRY_COMMENT = ERR_INVALID_ENTRY_COMMENT;
|
|
10937
9471
|
exports.ERR_INVALID_ENTRY_NAME = ERR_INVALID_ENTRY_NAME;
|